pe
pe copied to clipboard
Dump and load parser objects
For a serious user of pe in some other package, the startup time to parse and optimize a grammar can become significant, particularly for larger grammars. It would therefore be helpful to be able to save and restore the parser object. This could probably be done with pickle, but it might be better to print out a Python module that constructs the parser directly (which is much faster than parsing and optimizing a new one). This could also make the parser object more inspectable.