> which would be syntactically valid.
Not necessarily.
Usually, we're used to seeing something like:
print("Something")
But there are statement based languages where instead you have:
print "Something"
Still simple enough to parse.
However, what about user function calls?
something 1 2
3 4
If a newline doesn't break a call, and you don't depend on indenting, but actually the arity of the original function definition, accidentally writing:
someting 1, 2
3 4
Can be impossible to parse correctly, especially if said language also supports first-class functions.
func apply with func:caller array:values
do
...code...
done
aply + list
do
10 10 10 10
done
The syntax in the above example is still correct, but because the arity of 'aply' can't be determined, the parser can't actually continue.
The grammar might be a little insane, but I've had to work with similar grammars in several financial languages. And the parser does poop out, and when it does, you really want a nice error to result.