[antlr-interest] ST feature proposal
Graham Wideman
gwlist at grahamwideman.com
Thu Jul 9 19:19:17 PDT 2009
Hi Ter,
Idea looks attractive to me. Comments:
> Perhaps we need another special symbol that means
> allow me to do a newline and it didn't the next line,
> but don't put it into the output.
"it didn't" probably = "indent"?
So basically, the double-backslash expression means ignore subsequent whitespace that matches some pattern, probably:
[space or tab]* newline [space or tab]*
... or did you intend more like:
[space or tab or newline]*
...following which could be another expression, or non-whitespace string.
Issue: Might there be occasions where you actually want to retain a space before what follows, and if so what do you do about that? I'm not *sure* this is a problem, just noting it.
Perhaps could have optional space suffixed to the double-backslash expression?
Ie:
<\\> vs
<\\ >
My 2 cents
-- Graham
More information about the antlr-interest
mailing list