[REBOL] Re: Dialecting......
From: gregg:pointillistic at: 28-May-2008 10:31
SI> I had a look at dialects and managed to get a simple one working using
SI> Blocks using Parse (not string parsing)...
SI> I was wondering if you or someone else could throw some light
SI> (with examples) on more complex parsing. Like recursive parsing
SI> for nested blocks
Look at the INTO keyword in parse.
>> b: ["hello" [world]]
== ["hello" [world]]
>> parse b [string! word!]
>> parse b [string! block!]
>> parse b [string! into [word!]]
>> b: [hello [world]]
== [hello [world]]
>> rule=: [set w [into [word!] | word!] (print mold w)]
== [set w [into [word!] | word!] (print mold w)]
>> parse b [some rule=]