Feature request: parse

Pondering the philosophy behind the language

Feature request: parse

Postby newdep » Sun May 06, 2012 3:36 pm

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))
newdep
 
Posts: 2019
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Re: Feature request: parse

Postby Lutz » Mon May 07, 2012 2:55 pm

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?
Lutz
 
Posts: 5259
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: Feature request: parse

Postby newdep » Mon May 07, 2012 5:29 pm

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))
newdep
 
Posts: 2019
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands


Return to Whither newLISP?

Who is online

Users browsing this forum: No registered users and 2 guests

cron