doctrine / lexer

Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
https://www.doctrine-project.org/projects/lexer.html
MIT License
11.07k stars 60 forks source link

Allow the lexer to return the original string #4

Closed chx closed 10 years ago

chx commented 11 years ago

Together with https://github.com/doctrine/annotations/pull/14 allows for better annotation error reporting.

We need to store the input string because the preg_split throws away the patterns from getNonCatchablePatterns() including line breaks.

guilhermeblanco commented 10 years ago

Added support here: https://github.com/doctrine/lexer/commit/57d5a024b48709c56ce5bb93072948359220f36c