Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Core 2.6 - Last minute requests - take your chance!

From: joel:neely:fedex at: 7-Apr-2002 7:55

1) Fixing inconsistencies/bugs in parsing of strings containing quotation marks, as in:
>> parse/all {this "is a
{ " test "of parsing" with { embedded "quotation marks"} " " == ["this" "is a^/" "test" "of parsing" "with^/embedded" "quotation marks"]
>>
The documented meaning of the /ALL refinement would lead one to expect the result to be: [{this} {"is} {a^/"} {test} {"of} {parsing"} {with^/} {embedded} {"quotation} {marks"}] The failure to break on some of the spaces and the silent destruction of the quotation marks make PARSE of limited value when parsing strings that do contain quotation marks and for which the programmer needs complete control of the parsing. If there's some reason (which I can't guess at) for the above inconsistency, then this problem could be remedied by 1) correcting the documentation to explain what PARSE is actually intended to do, and 2) adding a new refinement, such as /RAW, which explicitly means "do not attach special behavior to *ANY* characters in the parsed string, but leave that up to the PARSE rules written by the programmer" and -- of course -- "retain all characters in the parsed string". 2) Fixing the *VERY* troubling mangling of arguments from the command line: rebol this is "a test" of arguments
>> system/script/args
== "is a test of arguments" which renders it unnecessarily difficult to pass argument strings into a program in consistent fashion with normal command line processing in Unix, Linux, msdos, etc. This should provide the "raw" console argument string without destruction of contents. Note that
>> system/options/args
== ["is" "a test" "of" "arguments"] appears to be related to the first issue in this email. If this is the reason that PARSE behaves as described in the first issue, then this seems like a case of the tail wagging the dog. -jn- Petr Krenzelok wrote:
> Hello list, > > Core 2.6 is really near now, so we all have last chance to > post bug reports, enhancement request, to be included in 2.6. > Post it as a reply to this message... >
-- ; Joel Neely joeldotneelyatfedexdotcom REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]