[antlr-interest] Parser generation takes hours

Denis Debarbieux denis.debarbieux at ateji.com
Fri Jan 8 03:05:18 PST 2010


Hi everybody,
> One of most tough problem in the migration for me was to resolve the
> left factoring. 

I am surprised by this discussion.

I thought that there are algorithms that automatically removes left  
recursions and left factorizations. Did I learn those algorithms at   
school but they are never used in real problem? Why  ANTLR does not use 
them?

Regards

Denis

Gokulakannan Somasundaram a écrit :
> Hi Jean,
>          I faced up with a similar issue, when i tried the migration of  a
> LR parser. But it's definitely because of recursion stuffs. The way i
> removed is sort of layman stuff, but thought of just informing you.
>          Try to split the grammar into multiple sections(group of rules) and
> try to add them one-by-one. You don't need to wait till the errors are
> emitted. As soon as the parser generation takes more than 3-4 mins, just
> stop the generation. The last section, which resulted in the increase most
> probably contains the problematic code. Bear with me, if this approach looks
> very awkward.
>
> Thanks,
> Gokul.
>   



More information about the antlr-interest mailing list