This is a lexer for Python. I wrote this because I felt none of
the available lexers fit in very well with python. Some abused the
language by doing things like using docstrings for expressions,
some had performance issues, and some required the developer to run
a file through a utility to produce the actual Python script. I felt
it could be done better, and this is the result.
It improves performance by automatically merging regular
expressions (as function call overhead is substantial in Python),
and there is a simple, Python-friendly interface to building the
lexer that doesn't require the file to be converted to Python.
This is BSD licensed (2 clause).
single file