alex/rply — pull request #9 by olasd (2013-04-10 20:24:55+00:00)
Title: Add the line and column numbers to the lexemes' SourcePositions

Hi,

I'm trying to rewrite the https://github.com/paultag/hy parser using rply. To do so keeping the compatibility, I need the line/column numbers on the lexemes.

I saw the TODO in the code, so I took a stab at this.

I'm not sure I like how I get the linebreaks at the time the LexerStream is created, but I'm not sure there is another way.

Enjoy!