This is Plex, a lexical analysis module for
bytes; last updated 27 January 2007)
- Fixed problem with assignment to None for compatibility with Python 2.3 and later.
- Test suite now opens files using universal newlines mode.
- Updated reference output of test10 to expect True instead of 1.
Removed spurious newline from the end
of test12's input file, which was causing the test to fail.
Fixed bug causing argument of Rep or Rep1 to fail to match
following a newline.
Fixed bug causing Eol to fail to match at the
beginning of a line in some circumstances.
- Renamed Scanner.yield() to Scanner.produce() to
accommodate Python 2.3, where yield is a keyword.
- Changed test10 to not rely so much on details of string repr.
- Added import of types to Regexps.py
- Uncommented the non-inlined version of Scanner.next_char()
- Case() and NoCase() constructors for controlling case-sensitivity
of pattern matching.
- Range() constructor for patterns which match contiguous ranges of
- Support for traditional regular expression syntax.
- Building a Lexicon is about 4 times faster.
- The assumption of 8-bit character codes has been removed. It
should be Unicode-ready now.
- The scanner is unfortunately a whisker slower. Not quite sure why
- seems to be a consequence of change (4). Sorry about that! Hope to do
a C version soon, though.
Implementation is still currently in pure Python. The scanner is
about as fast as I can make it in Python. The examples/speedtest.py
script will give you an idea of the performance on your machine. If
enough people complain about the speed, I may rewrite the scanner in
C, which should improve things considerably.
- Documentation greatly expanded.
- Numerous examples and test cases added.
- NFA to DFA algorithm improved (i.e. it's correct now!)
Computer Science Department
University of Canterbury