Feature request: parse

Started by newdep, May 06, 2012, 08:36:36 AM

Previous topic - Next topic

newdep

Hi Lutz,



A pothole for many (at least for me over and over again) is 'parse. ..i lost count..



Quicky parsing a string in newlisp cant be done without regex, or without inteferance of a pre-eval.

( And I believe a language should stay nice to look at ;-)



The pre-eval of str-data is something you quickly forget. The awkward part in parse is this

i.e. the octal issue, its already too late when its discovered...everyone runs into it at one time...



It would make a great improvement to useability versus expectation to see 'parse having an

extra parameter like: 'nil which indicated 'parse to handle its string being "dumb" without a pre-eval

of the str-data itself.



syntax: (parse str-data [str-break [int-option]] 'nil)



I believe it simply has many advantages having 'parse for quick & dirty use for str-data and

pass regex-crypto for simple things...



Hope its something you can consider? ;-)



Grt, Norman
-- (define? (Cornflakes))

Lutz

#1
Not sure what you mean with pre-eval of strings? can you give an example of how it behaves now and how you suggest, it should behave?

newdep

#2
Hi Lutz,



Well..



"... When no str-break is given, parse tokenizes according to newLISP's internal parsing rules...."



I think.. Im confused here.. Or by a different parser or by an older version of newlisp.



...issue closed for me..sorry for the interruption.. Ill stick a YellowIsh paper right in the middle of my

monitor to always add a str-break with parse and not leave it empty! ;-)
-- (define? (Cornflakes))