>A statement break into mutliple lines if it is not complete,
>i.e. "if the last token on a line is an operator or comma".
>But you can also use \ as the last character on the line, to
>continue on the next line.
>
>a = 2 +
>    3
>is equivalent to a=2+3
>
>a = 2  \
>    + 3
>
>here you need the \ at the end of the line.

While it's nice that you can do this, can someone explain why it is
that the Ruby parser can't work out that a statement is not finished,
as, say, a C++ or Java parser can?

I assume it makes the parsing a little easier, but I do find it a pain
each time I get a syntax error because of this sort of thing and it
takes me a while to realise what the problem is.