[antlr-interest] ST feature proposal

Graham Wideman gwlist at grahamwideman.com
Fri Jul 10 12:49:00 PDT 2009


Hi Ter,

At 7/10/2009 11:42 AM, Terence Parr wrote:
>Hi Graham, yep, i wonder if we need both "ignore newline" and "ignore  
>newline and indentation".  Actually, Ignore \n without ignoring  
>whitespace doesn't make any sense because without a \n there is no  
>indentation ;)
>I think <\\> should work just fine and would be very helpful.

I agree that having separate "ignore newline" and "ignore whitespace" is not useful, because once you've decided that you want the line/column positioning of a chunk of ST input text to serve input text aesthetics rather than specifying output then neither line nor column of the input text in that neighborhood is relevant to the output.

That said, there's still a need to address the two points I raised:

1. What is the extent of "ignore newlines and whitespace": 
  -- just one line, or 
  -- all up to next non-whitespace?

2. How to specify what whitespace (if any) that you *do* want in the output at the location of the <\\>.

-- Graham


More information about the antlr-interest mailing list