LineReader is a wrapper around StringReader that counts line numbers. This is not currently used by the parser, but will be used by the apply functions.