[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to show 0-n occurences




Rajat,

You could use the ? operator n times (although the parser for this would 
take a long time to generate).

rule = token? token? token? token?

Roger


Rajat Solan wrote:
> HI!
> I have not been able to figure out , how to represent 0-n occurrences of 
> any token in a production rule.
> 
> Like we use * to show 0 or more occurrences ,+ to show 1 or more 
> occurrence , ? to show 0 or 1 occurrence, how do I specify 0 to n 
> science of any token .
> 
>  
> 
> Thanks
> 
> rajat 
>