MHordecki/easyply — pull request #1 by furrykef (2011-12-22 07:11:36+00:00)
Title: Can now use with classes, and some other things

I noticed that I can't use easyply if my parser is a class, so I modified it to work with classes and added corresponding unit tests. All unit tests pass for me (I'm using Python 2.7), but the code still doesn't work with my grammar (a 65816 assembler) and I'm not sure why. It just says "Rule 'wrapper' requires an argument" and don't feel like debugging it right now, so I'll just submit what I've got.

Some error messages I got were baffling until I checked the easyply source for the context. I've replaced them with exceptions that print more sensible messages. There's one for when processing a function without a docstring (happened because I'd changed p_error to px_error in my assembler), and one when t_error is called, showing what the unexpected character was.

I've removed README.rst from data_files in setup.py. When I installed using pip, it placed this file in my C:\Python27 directory -- definitely the wrong place for it. I asked in #python on freenode where it should go and somebody suggested I just take it out, so I did.

Are there any plans to support '|' in rules like PLY does? While it isn't strictly necessary, I like having it around.

Anyway, right now I'd rather focus on writing my assembler itself, so for the moment I'm afraid I should revert to pure PLY for it. I might revisit easyply later on, though. :)