[antlr-interest] De-emphasizing tree grammars?

Terence Parr parrt at cs.usfca.edu
Mon Dec 26 12:43:04 PST 2011


On Dec 26, 2011, at 12:01 PM, Jason Osgood wrote:
>> Sam Harwell has convinced me to include things like skip in setting channels in
>> the lexer with special syntax rather than actions? again we get retargeting.
> 
> Some day I hope to understand what you just said. :)

Sorry.  just meant we can do

WS : (' '|'\n')+ => skip ;

not

WS : (' '|'\n')+ {skip();} ;

or

WS : (' '|'\n')+ => channel(HIDDEN) ;

might not use =>. might be ->. @ doesn't stand out or does it?

WS : (' '|'\n')+ @ channel(HIDDEN) ;

Ter
PS	yep, they are listeners not visitors.




More information about the antlr-interest mailing list