[antlr-interest] different behavoir ANTLRworks and ANTLR
Markus Kuhla
bace.spam at gmx.net
Wed Jun 13 08:56:36 PDT 2007
Hi,
yes ANTLRworks writes this error to the console but could also generate
the scanner/parser sources. The GUI itself gave no message.
But if I only used ANTLR from a terminal, or used the ANTLR libraries to
generate scanner/parser from another Java program, then the generation
stopped after this error, and nothing was generated.
Regards,
Markus
Jean Bovet wrote:
> What happens if you check the grammar in ANTLRWorks? Does it report
> the error?
>
> Regards,
>
> Jean
>
> On Jun 2, 2007, at 4:30 PM, Markus Kuhla wrote:
>
>> Hi!
>>
>> I developed my grammar in ANTLRworks. Now I must compile this grammar
>> from a Java program. In both cases I get an error message:
>>
>> error(211):
>> C:/workspace/dev/wtp3/eclipse/webapps/Validator/grammars/grammar.g:71:27:
>> [fatal] rule link_text has non-LL(*) decision due to recursive rule
>> invocations reachable from alts 1,2. Resolve by left-factoring or
>> using syntactic predicates or using backtrack=true option.
>>
>> Strange now is that ANTLRworks generated the scanner and parser
>> properly, but not on command-line or out of a Java program. Why is
>> there a different behavior? I don't want to change the grammar,
>> because it is possible the generate a parser (with ANTLRworks). Is
>> there a further option that I have to set to ignore the error and
>> proceed generation?
>>
>> (For ANTLRworks I reserved 1GB heap space, how can I do this using
>> the Tool class inside my Java program?)
>>
>>
>> Thanks for any ideas!!!
>> Best regards,
>> Markus
>>
More information about the antlr-interest
mailing list