[guido at python.net] > wrote: > > Sure, but bytecode evolves slowly enough to be useful for Dan; given > > that the only parse tree format we have is *intricately* linked with > > the Python parser and (at least part of) its runtime, > [AMK] > It is? Both translators are using the compiler package, not > the parser > module; can it be said to be intricately linked with the runtime? > Admittedly it uses the parser module underneath, but the AST > representation > itself is pretty generic, isn't it? > As Michal touched on earlier, I wrote a hand-coded pure-python parser that plugs into the compiler package. It takes about 1.5-2x as long to compile vs using the native parser module. The resultant tuples can also be shoved back into genuine parse trees via parser.sequence2ast(). So yeah, it's not that big of a deal to generate AST trees without the runtime (until some crazy function attribute syntax gets added to python, that is) http://www.cathoderaymission.net/~logistix/python/pparser.py -Grant
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4