[antlr-interest] Building a regular expression AST

John B. Brodie jbb at acm.org
Wed Jul 7 15:17:45 PDT 2010


Greetings!
On Wed, 2010-07-07 at 22:24 +0100, Matt Palmer wrote:
...snipped....
> 
> chars	:	CHAR+ -> ^(CONCAT CHAR+) ;
> 
...snipped...

chars : (CHAR->CHAR) ( chars -> ^(CONCAT CHAR chars) )? ;

but the above tree will be right associative. is that a problem for you?

hope this helps
   -jbb




More information about the antlr-interest mailing list