Date : Mon, 27 Jan 2014 21:29:41 +0000
From : robert@... (Rob)
Subject: Crunching BASIC code
On 27 January 2014 18:38, J.G.Harston <jgh@...> wrote:
> outside quoted strings, is it correct that any spaces immediately
> before a token and immediately after a token can be stripped out, eg:
>
> (spc)(spc)[token](spc)(spc)[token](spc)[token] etc. can be safely
> crunched to:
> [token][token][token] etc.
That should be fine.
>
> Similarly, is it correct that spaces before and after an arithmetic
> operator can be stripped, eg
>
> (anything)(spaces)+(spaces)(anything)(spaces)*(spaces)(anything) can be
> safely crunched to:
> (anything)+(anything)*(anything)
I have a feeling that there can be issues with e.g. -ve numbers, or
other items that include an arithmetic operator, where a space
provides context, but I can't quite remember the details!
Rob