On Tue, Apr 12, 2011 at 08:34:49AM +1000, Erik de Castro Lopo wrote:
> Yury Euceda wrote:
> 
> > Well, I have this option in my tool I developed. But I defined my own way 
> > due my 
> > own need (And well, I didn't know anything about this but I supposed to be 
> > necesary
> > and I invented my own way not knowing the other notation)
> > for example:
> > 
> > a>>3 
> > 
> > defines that a MUST appear three times ---> aaa is accepted
> > 
> > and
> > 
> > a<<3 
> > 
> > defines that a can appear 0, 1, 2 or 3 times ---> epsilon, a , aa , aaa are 
> > accepted
> > 
> > I would like to hear about your comments for my notation.
> 
> I think that notation is far less clear than the regular expression
> notation that has been used in lexers for 30+ years. Ie
> 
>      a{0,3}
> 
> Erik

I know you didn't reply to me.  I'm the original author of this
thread, and since it is alive again, I did go with the {n,m}
notation exactly as presented by another user on this list.

I made this one of my atomic operators so I could push rule
counting down into what amounts to my inner loop.  I was able to
simplify a couple of my existing grammars using this form as well.

-Alan
-- 
.i ma'a lo bradi ku penmi gi'e du

_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to