Paul Gilmartin wrote:
>Whose moronic design fails to treat a command delimiter appearing in a 
delimited string as plain text?

>However, I would expect that:
>    c 'wombat' 'foo;bar'

>would change every occurrence of the 6-character delimited string on the 
left to the 7-character delimited string, including the semicolon, on the right.

The parser, working from left to right, upon encountering a delimiter, will 
stop 
parsing and treat everything to the left of the delimiter as a full set of 
words 
to be executed/processed/etc.

Then the rest of string to the right of that delimiter, are then processed. 
Repeat/wash/rinse upon the very last character.

It seemed to me that delimiter act as an overiding thing to stop parsing at all.

IMNHO, the parser should be rewritten so that upon encountering a quote, a 
flag should be set, and reset upon encountering the next quote. In that way, 
when encountering a delimiter, while this flag is set, can then be treated as a 
literal string.

Parse sequence (for posting here, I start at second set of quotes):

'          <--- set flag on
foo;bar <--- treat this as inside quote
'          <--- set flag off

But then my opinion is as always worthless here... ;-D

Groete / Greetings
Elardus Engelbrecht

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to