This matches the type used for positions in text fragments.
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.