[antlr-interest] AST/rewrite rule question
Terence Parr
parrt at cs.usfca.edu
Fri Jan 18 16:25:17 PST 2008
On Jan 18, 2008, at 3:51 PM, Ashish wrote:
> Hi,
> If the start rule is specified without any rewrite rules all the
> queries from the
> input are parsed and nodes are created for the select queries as
> expected.
> However if the start rule is modified to use the rewrite rule to
> create the AST ie
>
> from
> selectQueries : (selectQuery)*;
> to
> selectQueries : (sq+=selectQuery)* -> ^(SELECT_QUERIES $sq);
try
selectQueries : (sq+=selectQuery)* -> ^(SELECT_QUERIES $sq+);
Ter
More information about the antlr-interest
mailing list