[antlr-interest] Problem with Strip forgetting some parenthesis
Damien Cassou
damien.cassou at gmail.com
Sun Jun 21 03:44:39 PDT 2009
Hi,
On Fri, Jun 19, 2009 at 11:09 AM, Damien Cassou<damien.cassou at gmail.com> wrote:
> running org.antlr.tool.Strip on my grammar produces an incorrect
> result. For example, the following:
>
> document
> : types+=type_def*
> -> ^(DOCUMENT<Document>[$types] type_def*)
> ;
>
> is translated to:
>
> document
> : type_def*
> )
> ;
>
> there is an unexpected right parenthesis.
I forgot to say that there are some error messages:
line 12:15 mismatched input '<' expecting ')'
line 12:43 extraneous input ')' expecting ';'
It seems to me the grammar used by Tool to generate the parser is not
the same as the one used by Strip.
Can somebody help me please?
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry
More information about the antlr-interest
mailing list