On Mon, Apr 3, 2017 at 8:57 AM, Neil Girdhar <[email protected]> wrote:

> I've tried PyParsing.  I haven't tried Grako.
>

Caveat: I'm the author of Grako.

It's very easy to do complex parsing with Grako. The grammar can be
embedded in a Python string, and the compiled grammar can be used for
parsing without generating any Python code. Most of the unit tests under
the distribution's grako/grako/test use those features.

https://pypi.org/project/grako/

One of the ways in which a top-down grammar (as those accepted by Grako)
can be used is to organize a series of regular expressions into a tree to
handle complex cases with clarity.


-- 
Juancarlo *Añez*
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to