[antlr-interest] Comparing two rules for equality

Gokulakannan Somasundaram gokul007 at gmail.com
Thu Dec 3 23:34:04 PST 2009

   Sometimes we have a rule which will work only with say k=n(n>1). We work
on it to create a rule with some lesser k(say k=n-1). Obviously i would have
done some kind of left-factoring  to arrive at this. After working on it and
completing it. Is there a way to check, whether the new rule is the same as
older rule?
   Say the first rule accepts 10 alternatives in the form of two sub-rules
with some chain of tokens. How can i verify whether the new rule written
will have the same behavior? Of- course testing it with the alternatives is
one-way. But is there a way to compare two rules for equality?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091204/b0ed793f/attachment.html 

More information about the antlr-interest mailing list