[antlr-interest] Re: [antlr-dev] Hitting method size limit
Emond Papegaaij
e.papegaaij at student.utwente.nl
Sat Jun 24 06:44:02 PDT 2006
On Friday 23 June 2006 20:09, Terence Parr wrote:
> On Jun 23, 2006, at 12:12 AM, Emond Papegaaij wrote:
> but adding filter=true and moving some tokens did
> > the trick.
>
> Hooray!
>
> I realized afterwards that you really need lexer modes so you can
> switch contexts...a must have feature coming soon... > 3.0
That would really make the lexer much simpler. I hope to see that feature
soon :)
> > Note that ANTLR still takes very long to generate the parser and
> > lexer, over a minute.
>
> Strange...how fast is your box? Can you send me directly the grammar?
I'm running ANTLR on a dual Opteron 242 (1.6GHz) with 2GB ram. Below is the
output with the version you sent me a few days ago:
time java -cp <cut> org.antlr.Tool tpl.g
ANTLR Parser Generator Early Access Version 3.0b1 (?) 1989-2006
tpl.g:113:15: no lexer rule corresponding to token: VISIT_IDENTIFIER
real 1m3.201s
user 1m4.810s
sys 0m0.616s
And with version ea10:
time java -cp <cut> org.antlr.Tool tpl.g
ANTLR Parser Generator Early Access Version 3.0ea10 (June 2, 2006)
1989-2006
tpl.g:113:15: no lexer rule corresponding to token: VISIT_IDENTIFIER
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
stop state @k=1 (terminated early)
real 0m19.001s
user 0m23.855s
sys 0m0.525s
Note that ea10 is much faster (but produces an incorrect result).
I also don't know what to do about the 'no lexer rule corresponding to token:
VISIT_IDENTIFIER' warning.
Best regards
Emond Papegaaij
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tpl.g
Type: text/x-java
Size: 3352 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20060624/c2449e75/tpl.bin
More information about the antlr-interest
mailing list