[antlr-interest] Re: known number of repetitions..

John D. Mitchell johnm-antlr at non.net
Fri Oct 25 10:25:49 PDT 2002


>>>>> "Sriram" == Sriram Durbha <cintyram at yahoo.com> writes:
[...]
> but first continuing with == 1 =========

I'm jumping into the middle of this thread so let me apologize in advance
if I've missed some critical context.

> your solution works..  but suppose there is a special case where the
> records starting from record number 1001 are to be put into anotehr set
> instead of issuing an error..  what can be done? in that case how do we
> return to the same rule, reset our counter?  one solution i have is to
> have conditinally recursive rules..

Why are you trying to do so much in e.g., the lexer?

In general, it is *much* better to confine the earlier stages with
structural conformance and the later stages to semantic conformance.


[....]
> the new issue is as follows..  i am writing a translator from on
> elanguage to another..

Administrivia: Please post separate questions in separate messages with
useful and appropriate subject lines.

Take care,
	John

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list