> I looked at that (and more) some time ago. For our tooling > I created a wrapper around Ply. The feature of this wrapper are: > > - Class oriented PlyScanner and PlyParser classes. > > - Different modes (normal/debug/opt), which set different > settings of Ply. > > - Table file creation is always done in the same directory > as the source files. > > - Table files can be created for multiple classes in a single > file, with different start symbols. > > - Automatic parse/scan error exceptions with line numbers > (without enabling the (slow) option to let ply track line > numbers). > > - White-space is automatically skipped in the scanners (can > be modified by derived classes). > > - Functions to generate/remove the table files. > > - We always install the tooling we create on a central > machine to which all students have read access. However, > the students don't have write access and therefore can't > generate the table files. We have *_gentables.py files > that are used by the setup program to generate the table > files. > > - Derived classes should only need to specify: > > - list of tokens (scanner) > - t_* (scanner) > - p_* (parser) > > The plywrapper.py file is standalone and only needs Ply, except > for the exception base class from one other file in our tooling. > However, one could easily change it to inherit from StandardError > instead... > <snip>
Dennis, This is great, thanks a lot for sharing the code for PlyWrapper. I will certainly have a look and see what I can gather from it for my own parser development with PLY. Eli --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ply-hack" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/ply-hack?hl=en -~----------~----~----~----~------~----~------~--~---
