[antlr-interest] Problem with Strip forgetting some parenthesis
Damien Cassou
damien.cassou at gmail.com
Wed Jun 24 05:04:21 PDT 2009
Hi,
can at least someone tell me if there is a bug in Strip or if it's just me?
On Sun, Jun 21, 2009 at 12:44 PM, 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