Feature request: parse

Pondering the philosophy behind the language
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Feature request: parse

Post by 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
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Feature request: parse

Post by Lutz »

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

Re: Feature request: parse

Post by newdep »

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))

Locked