Question about syntax coloring
Posted: Mon Jun 14, 2010 4:10 pm
I'm trying to put together a syntax coloring scheme for the M4 macro language. Keywords are easy, as are comments and a couple other items that user defined words accommodate. Where I'm running it to some issues is the strings. M4 uses (by default, at least) the ` character (back quote?) as the leading quoting character, and the ' characters (quote) as the trailing quoting character. It also permits effectively infinite nesting of strings, across multiple lines. What would be absolutely ideal is to be able to see the full quoted string with the nested sub-strings somehow also indicated, but that strikes me as somewhat difficult. Failing that, it would be useful to be able to highlight the open quote and close quote by color, perhaps using different colors. What I tried was to define the open quote as a user-defined 1 word, and close quote as a user-defined 2 word, with nothing entered for the string or literal settings. This works well for the open quote, but only sporadically for the close quote. Is there an alternative way?
Another possibility would be to use BraceMatching, but I don't see any way to tell it about open and close quoting.
I'm considering developing a macro that highlights the string on request - am I correct that the only means I have of highlighting is to mark the text?
Bill Diener
Another possibility would be to use BraceMatching, but I don't see any way to tell it about open and close quoting.
I'm considering developing a macro that highlights the string on request - am I correct that the only means I have of highlighting is to mark the text?
Bill Diener