newLISP Fan Club

Forum => Anything else we might add? => Topic started by: cormullion on November 21, 2007, 08:16:59 AM

Title: parse and colons?
Post by: cormullion on November 21, 2007, 08:16:59 AM
What is parse supposed to do for colons?


> (parse {(define (fred jim) (println fred jim))})
("(" "define" "(" "fred" "jim" ")" "(" "println" "fred" "jim" ")"  ")")
> (parse {(define (fred:jim) (println fred jim))})
("(" "define" "(" "fred" "jim" ")" "(" "println" "fred" "jim" ")"  ")")


It appears to ignore them, even though it's supposed to use the newlisp internal parser when there are no options...

I know that the colon is enhanced for the latest release...
Title:
Post by: Lutz on November 21, 2007, 10:27:45 AM
The colon if it follows directly after a symbol is not recognized as an extra token. You could preprocess the string replacing all ":" with a space before it.



Lutz
Title:
Post by: cormullion on November 21, 2007, 11:03:33 AM
gotcha. Thanks!