Tom,
    Thank you for your assistance.  I am now happily producing all sorts of 
production rules that work.  REBOL is not a language to learn in a vacuum. 
-Joe Solinsky

----- Original Message ----
From: Tom <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Friday, November 30, 2007 12:26:16 AM
Subject: [REBOL] Re: Parse learning problem (simple)

store: copy []
letter: charset [#"a" - #"z" #"A" - #"Z"]
digit: charset [#"0" - #"9"]
alphanum: union letter digit
valid-name: [letter any alphanum]
params: [
    copy token valid-name
    (insert/only tail store token)
    opt ["," params]
]
function-rule: [
    copy token valid-name
    (insert/only tail store token)
    "(" params ")"
]
;;; use /all whenever you make a block rule
parse/all "person(fred)" function-rule
parse/all "buys(fred,shoes)" function-rule
probe store
== ["person" "fred" "buys" "fred" "shoes"]





      
____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to