Consider the following g-code:
This results in a single G01 command with 4 arguments (X1.0 Y2.0 X3.0 Y4.0) rather than two complete commands.
If the second line has a comment at the end, the file parses properly because comments consider the newline.