Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: grammar triviality with '&&'



On 03/01/2015 10:48 AM, Bart Schaefer wrote:
On Mar 1,  9:01am, Ray Andrews wrote:
}
} I see, so it's not a 'hard' syntactic issue

Actually it IS a "hard" syntactic issue, in the sense that the grammar
for all *nix shells [1] both immemorial and standard, formally defines
newline as equivalent to semicolon.

I see. If newline == semicolon, then the acceptable variations in line wrap that I've noticed have simply been within that rule and there is no look ahead as I presumed. This is a good thing to know. As usual I refer in my head back to C where line wrap issues virtually never exist, but that's obviously far more complicated to parse. What that rule looses in formatting flexibility it gains in brevity and easier parsing
so it becomes clear why an interpreted language makes that choice.




Messages sorted by: Reverse Date, Date, Thread, Author