TL;DR: I believe the native parser (at
https://github.com/jmillikan/lambda-py/tree/lex-ragg) is ready to start using, if someone wants to merge it. It requires Danny Yoo's parser framework Ragg (
https://github.com/dyoo/ragg). I just pulled brownplt/master, so lex-ragg should merge back in quietly, and everything *should* work as before, including all invocations of python-main. I will be around to yell at since it's likely I've screwed up *something*.
As tested, it works 'the same' - output matches or both parsers fail - as the python 3.2 parser for all python files in tests and base/pylib, except one. On tests/scope/nonlocal-from-class-body.py, the python parser checks for existence of nonlocal variables. The native parser does not, which I assume is what's wanted. Features not yet implemented *and* not used in the tests include argument annotations and multiple slice indexes. The python parser is still available in case the native parser proves broken or too slow for some case (e.g. modules/unittest/test_builtin.py when string representation is resolved).
New options in python-main (as far as I know, all current invocations will still work 'as-is'):
--native-parser: use native parser (default)
--python-parser: use python parser (requires --python-path)
--test-parser: Perform a noisy comparison of the two parsers on stdin (requires --python-path)
--test-native-parser: Perform a quieter comparison (no output -> all match) on a test directory (require --python-path)
To support both parsers, occurrences of parse-python/port have been replaced with the parser parameter from "parser/parser.rkt": ((parser) port) instead of (parse-python/port port python-path). The native parser calls the lexer directly.
On ragg and performance: The ragg master works fine on the current tests, but I'm using a slightly mangled version with better performance on (at least) long tuple/array literals. I've provided a .plt for this in case it is needed - let me know if this is not packaged right. (see bug report on ragg for details.)