Large bounded repetition is a theoretical question. My use case requires to ensure repetition of only small number of digits - one digit, two digits and similar. I would use bounded repetition to ensure the needed number of digits. Yes, different workarounds will work for me, so it is not a pressing problem.
Googling the exception operator: http://avisynth.org/mediawiki/User:Gzarkadas/EBNF Exception The effect is the logical negation of the rule following. For example -"a" becomes ? all characters not equal to a ?. They use it here: stringliteral = quote , { -quote } , quote | tripleqouote , { -tripleqouote } , tripleqouote ; So it is something like "everything else than". In Instaparse we would define exception + set "S = !'a' #'.' " They just define exception "S = -'a' " On Monday, June 10, 2013 11:26:13 AM UTC+2, puzzler wrote: > > On Mon, Jun 10, 2013 at 2:13 AM, Frantisek Sodomka > <fsod...@gmail.com<javascript:> > > wrote: > >> > > EBNF syntax for bounded repetition could be just simply A 3*5 and these >> are equal: >> A? is A*1 >> A+ is A1* >> A* is A0* >> > > Right now, in the EBNF syntax, numbers are valid non-terminal > identifiers. So for example, rather than "S = A B+", you could do "1 = 2 > 3+". I thought this might be useful for programmatically generated > grammars. Adding a bounded repetition operator to EBNF is certainly > possible, but the most obvious syntaxes would eliminate the use of numbers > as identifiers. > > Have you actually encountered a real example where you wished for the > large bounded repetition, or is this just a theoretical question? Even in > the ABNF examples I've seen (which has the bounded repetition option), most > instances of repetition correspond to the standard + * and ? operators. > > I've seen the exception operator listed on a couple of tables, but have > never seen it in use, and didn't come across a clear explanation of its > semantics. Can you point me to a fuller description of what it does? > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.