Closed shad7 closed 8 years ago
Thanks for the sharing. Yeah, I had considered PyParser initially, but ANTLR3 won out. I think it was the elegance. Either way, both would be a considerable amount of work.
This project could be interesting, performance wise: https://pypi.python.org/pypi/grako . Since it is pure Python, it could be optimized under PyPy. And they have this: https://pypi.python.org/pypi/grako/2.4.2#antlr2grako .
Interesting. Worthy of bookmarking at least. Thank you.
On Tue, May 27, 2014 at 4:44 PM, David Blewett notifications@github.comwrote:
This project could be interesting, performance wise: https://pypi.python.org/pypi/grako . Since it is pure Python, it could be optimized under PyPy.
— Reply to this email directly or view it on GitHubhttps://github.com/nemonik/Intellect/issues/9#issuecomment-44332833 .
Personally, I've been watching https://github.com/ericvergnaud/antlr4/tree/master/python3-runtime/src/antlr4 and there is another developer working on a Python 2.7 port... But if a 3 port exists... a 2.7 should't be too difficult.
I've been watching this thread too
https://groups.google.com/d/topic/antlr-discussion/sFH5Y0QO4HA
Not sure how committed to ANTLR you are, but after reviewing the work you had done, and then even going down the path of using ANTLR directly and the lack of a python runtime that is not so out dated, I started looking for alternatives.
You could easily replace ANTLR with pyparsing (http://pyparsing.wikispaces.com/) such that it is used to express the grammar and handle parsing, and the corresponding creation of your objects, such that you focus on the other aspects while avoiding the need to completely rewrite the runtime for ANTLR.
Just wanted to share. Good luck!