[antlr-interest] Left-factoring and recursion
Nigel Sheridan-Smith
nbsherid at secsme.org.au
Sun Jan 9 14:38:24 PST 2005
Hi everyone,
I was wondering if there are any tools out there that help with
left-factoring, or converting from LALR/LR to LL(k)?
I am trying to do a Structure of Management Information (SMI) grammar for
networking devices. I tried the ANTLR ASN.1 grammar that already exists, but
it had a few non-determinisms and the like, so I started to do my own since
it looked pretty messy to fix up. However, now I have even more
non-determinisms because the X.680-683 standards seem to favour
left-recursion (like just about everyone else). So I'm faced with the huge
and complicated left-factoring task, or I can switch back to the existing
ASN.1 grammar and try and extend that.
Any ideas?
I found a few links from ANTLR/PCCTS users:
http://www.zenspider.com/Languages/PCCTS/LR2LL.html
http://www.javadude.com/articles/lalrtoll.html
But these are just very high-level. What I really need is a tool that either
helps in clarifying what the non-determinisms are given a particular ANTLR
grammar, or even attempts to left-factor on its own.
Cheers
Nigel
--
Nigel Sheridan-Smith
PhD research student
Faculty of Engineering
University of Technology, Sydney
Phone: 02 9514 7946
Fax: 02 9514 2435
More information about the antlr-interest
mailing list