Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Parse and and recursion local variables?

From: volker:nitsch:gma:il at: 19-Mar-2007 12:46

Am Sonntag, den 18.03.2007, 17:33 -0500 schrieb Maxim Olivier-Adlhoch:
> thru [a | b] is not only a problem in learning... its a valid extension > cause it can simply many complex rules, by not having to explicitely > implement all possible variations as rules. > > but I am almost sure that it would lead to regexp like slowdown in some > rules ' :-/ > > why are charsets clumsy? > > -MAx >
any [ thru [ a | b ] ] is similar to as any[ a | b | skip ] and thru[ a | b ] to some[ a break | b break | skip] So its there. If you know how. As with stacks and parse-recursion ;) Slowdown yes :) charsets are clumsy because they are defined somewhere and not in the rule. And they are look ugly, this #"c". digits: charset[ #0" - #"9" ] rule: [ some[ digit ] ] Thats natural for BNF-academics. But rule: [ some [ 0 - 9 ] ] would be much nicer.