[antlr-interest] Rewrite rule problem!

Randall R Schulz rschulz at sonic.net
Fri Jul 6 15:05:55 PDT 2007


On Friday 06 July 2007 14:35, Felix Schmid wrote:
> Hi,
>
> this should work:
>
> class:
>   attr* modif* TK_CLASS '{' ( mtd| fld | prop )* '}'
>     -> ^( TK_CLASS attr* modif*  mtd* fld* prop*  )

But doing that will eradicate the ordering of the mtd, fld and props as 
they appeared in the original input, putting all the mtds first, then 
all the flds and last all the props.


> F.


Randall Schulz


More information about the antlr-interest mailing list