On Mon, Apr 11, 2011 at 04:54:40PM -0600, Alan Post wrote: > 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 fear I might have hastily worded the preface to my reply, please allow me to try again: Erik, I'm not Yury, who you replied to; I was involved earlier in this thread by opening it with a question about {m,n} rules in PEG, and I realized I had not followed up with the syntax I used to implement this rule. Seeing this thread I wanted to follow up to acknowledge I used an implementation proposed by another member of this list, Michaeljohn Clement. I hope I didn't cause confusion by replying to this thread rather than to Michaeljohn Clement's thread. -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