2 Replies Latest reply on Aug 16, 2010 12:29 PM by jmkirsch NameToUpdate

    Close Only Counts in Horseshoes and Grenades

      I need to parameterize the entries in a php configuration file, and I've found three grammars which are 90% correct. The problem is that they break one line in the config file. The grammar breaks the line by turning spaces into tabs.


      I can think of three solutions to this problem. Does anyone know of a better solution than the three I came up with?


      Solution 1: Write a custom grammar

      I don't like this solution because it's more trouble than it's worth. There is only one line in the whole config file that's broken.

      Solution 2: Add an external command to the BLPackage.

      I could use an external command in the BLPackage to add a 2nd copy of the broken line at the end of the file. The 2nd copy of the line supersedes the first. Kind of a kludge, but it should work.

      Solution 3: Sed & Awk

      Use an external command to fix the broken line with sed and awk.


      I've noticed that many of the grammars turn spaces to tabs; are there any which don't exhibit this behavior?