Bugfix: Current line count was not updated; also renamed it to nextLineNo.

This is because we are likely to use this counter to form an error context
BEFORE reading the line.
Minor refactoring: moved public static method before private methods
Minor refactoring: Marked some parsing methods as const