[REBOL] Re: how to parse thru nested parens?
From: robert:muench:robertmuench at: 10-Dec-2001 21:43
> -----Original Message-----
> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]On Behalf Of
> Petr Krenzelok
> Sent: Monday, December 10, 2001 9:27 PM
> To: [rebol-list--rebol--com]
> Subject: [REBOL] how to parse thru nested parens?
> I am building sms system and I would like to trace following occurance:
> comand(text info or parameters)
> however, I wold like following to be parsed correctly, so ignoring
> nested parens, e.g.:
> command(some params(some subparams), maybe some other params)
Hi, do you want to know how to parse the ( and ) exactly or do you want to know
how nested structures are parsed?
Anyway, the second is more interesting (not tested!):
rules: "command" some params
params: ["(" [params | some subparams] ")" ]