Lol that I what I typed. Your email joined the lines. Find "foo [new line] bar"
CharlesSent from a mobile; please excuse the brevity. -------- Original message --------From: Paul Gilmartin <[email protected]> Date: 3/15/18 10:18 AM (GMT-08:00) To: [email protected] Subject: Re: Two string instruction questions On 2018-03-15, at 11:02:17, Charles Mills wrote: > Your points are good but FWIW ; is a command separator and at a "higher >level" than quoted string parsing. > Find "foo;bar" is for better or worse exactly the same as > Find "foobar" > I believe not. Find "foo;bar" is the same as Find "foo bar" ... both of which are reported as syntax errors. Very bad design. A "higher level" executive has no business performing a bottom-up parse of commands it passes to a lower level processor. At least it should support an escape convention, such as: Find "foo\;bar" ... with the "\" protecting the ";". The command passed to the lower level would then simply be: Find "foo;bar" But that couldn't be done with a simple TRT. Oh, my gosh! Think of the performance implications of doing it right! Feedback from a parser to its lexical analyzer is generally deemed harmful (but consider PL/I!) OTOH, the lexical analyzer should not impose limitations on the parser's syntax. > printf( "foo;bar\n" ); /* in C */ > C's lexical analyzer knows enough to recognize that the second ";", but not the first, is a token separator. -- gil
