Add startIndex and endIndex positional attributes to the parser

Add start and end positional attributes to the parser (see #53).

I can't figure out how to easily add some tests to the existing ones.