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

Andreas Rueckert a_rueckert at gmx.net
Mon Oct 7 10:04:22 PDT 2002


Hi!

On Mon, 07 Okt 2002 Sriram Durbha wrote:

--<snip>--
 
> 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.. 

--<snip>--
 
> i havent tried it but hope there is a way to do it
> with predll(k).. 

The classfile grammar matches a given number of tokens:
=======================================
          attributes_count=u2
          ( {attributes_count > 0}? attribute_info {attributes_count--;})* {attributes_count==0}?  
=======================================

HTH,
Andreas

 

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



More information about the antlr-interest mailing list