Parse the lines immediately after they are read

This particular change in code has a side effect similar to the one Font
Tools have, that is, when the classes start not with a name but a plus
sign, the glyphs that follow will be asigned to the last built-in class.
Exit with error on premature end of file
Report line numbers in error messages
Prevent an infinite loop on empty input file