[antlr-interest] Antlr 3.0b5 - possible Bug in NFAToDFAConverter
Terence Parr
parrt at cs.usfca.edu
Tue Nov 28 17:44:26 PST 2006
I have added a bug report for this.
http://www.antlr.org:8888/browse/ANTLR-53
In your particular case,
programmDeclaration :
functionDeclaration ';' -> functionDeclaration
| functionDefinition ';' -> functionDefinition
| procedureDeclaration ';' -> procedureDeclaration
| procedureDefinition ';' -> procedureDefinition
;
is non-LL(*), it's just that ANTLR does not figure this out soon
enough. Your function definition calls your function declaration
rule I think. The failsafe will catch this.
Ter
On Nov 19, 2006, at 11:54 PM, <alexander.berger at finnova.ch>
<alexander.berger at finnova.ch> wrote:
> Hi Terence
>
> Here is the grammar that causes the problem.
> I tried the -Xwatchconversion option, but I am not yet
> sure how I have to interpret the output. It looks as
> if the rule "programmDeclaration" causes the problem.
>
> The grammar itself is far from finished but it used to
> work with antlr-3.0b4.
>
> Kind regards
> Alex
>
> ____________________________________________
>
> finnova AG Bankware
> Alexander Berger
> SR-Peripheral-Team
>
> Sägestrasse 22, CH-5600 Lenzburg
> Tel: +41 62 886 4807 / Fax: +41 62 886 4888
> mailto:alexander.berger at finnova.ch
> http://www.finnova.ch
>
> -----Ursprüngliche Nachricht-----
> Von: Terence Parr [mailto:parrt at cs.usfca.edu]
> Gesendet: Sonntag, 19. November 2006 19:47
> An: Berger Alexander
> Betreff: Re: [antlr-interest] Antlr 3.0b5 - possible Bug in
> NFAToDFAConverter
>
> Hi. Did you find out what the issue was with your rule? You can
> send me your gramma if you want and I'll take a look.
>
> Ter
> On Nov 17, 2006, at 6:56 AM, <alexander.berger at finnova.ch>
> <alexander.berger at finnova.ch> wrote:
>
>> Hi Everybody.
>>
>> I upgraded from antlr 3.0b4 to 3.0b5 and now the processing of my
>> grammar
>> fails with the StackTrace below. Antlr is consuming a lot of memory
>> (up to
>> 1GB), so it looks as if there is a serious problem in the NFA to
>> DFA Converter.
>>
>> So, can anybody please confirm this or am I the only one having
>> this problem. The grammar producing this error is quite big but I
>> will provide
>> it if someone wants to have a look at it.
>>
>>
>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap
>> space
>> at java.util.HashMap.resize(HashMap.java:462)
>> at java.util.HashMap.addEntry(HashMap.java:755)
>> at java.util.HashMap.put(HashMap.java:385)
>> at java.util.HashSet.add(HashSet.java:200)
>> at org.antlr.analysis.NFAToDFAConverter.closure
>> (NFAToDFAConverter.java:618)
>> at org.antlr.analysis.NFAToDFAConverter.closure
>> (NFAToDFAConverter.java:748)
>> at org.antlr.analysis.NFAToDFAConverter.closure
>> (NFAToDFAConverter.java:748)
>> at org.antlr.analysis.NFAToDFAConverter.closure
>> (NFAToDFAConverter.java:748)
>> at org.antlr.analysis.NFAToDFAConverter.closure
>> (NFAToDFAConverter.java:704)
>> at org.antlr.analysis.NFAToDFAConverter.closure
>> (NFAToDFAConverter.java:669)
>> at org.antlr.analysis.NFAToDFAConverter.closure
>> (NFAToDFAConverter.java:457)
>> at
>> org.antlr.analysis.NFAToDFAConverter.findNewDFAStatesAndAddDFATransit
>> i
>> ons(NFAToDFAConverter.java:274)
>> at org.antlr.analysis.NFAToDFAConverter.convert
>> (NFAToDFAConverter.java:99)
>> at org.antlr.analysis.DFA.<init>(DFA.java:219)
>> at org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:826)
>> at org.antlr.tool.Grammar.createLookaheadDFAs(Grammar.java:774)
>> at org.antlr.codegen.Target.performGrammarAnalysis(Target.java:111)
>> at org.antlr.codegen.CodeGenerator.genRecognizer
>> (CodeGenerator.java:279)
>> at org.antlr.Tool.processGrammar(Tool.java:329)
>> at org.antlr.Tool.process(Tool.java:266)
>> at org.antlr.Tool.main(Tool.java:69)
>>
>>
>>
>> By the way. What is the official way to report bugs in antlr 3.0b* ?
>>
>> Kind Regards
>> Alex
>> ____________________________________________
>>
>> finnova AG Bankware
>> Alexander Berger
>> SR-Peripheral-Team
>>
>> Sägestrasse 22, CH-5600 Lenzburg
>> Tel: +41 62 886 4807 / Fax: +41 62 886 4888
>> mailto:alexander.berger at finnova.ch
>> http://www.finnova.ch
>>
>
> <PLSQL.g>
More information about the antlr-interest
mailing list