PyParsec is an object-based parser combinator library for Python.
This library is currently under development, and may have some bugs.
PyParsec supports Python 3, and does not support Python 2.
When you want to create large expressions, you can construct parsers by combining Combinator methods.
Parsers are made as 'usual Python classes' so you can write them in your Python codes.
>>> from pyparsec.primitives import symbol >>> from pyparsec.char_parser import pfloat >>> parser = symbol('a') >>> parser.parse("abcde").result() ('a', 'bcde') >>> p = symbol('(') >>> q = symbol(')') >>> p.pandr(parser).pandl(q).pconv(lambda s: s.upper()).parse("(a)bcde").result() ('A', 'bcde')
Copyright (c) 2011-2013, Gab_km
Version 0.7 is licensed under the MIT License.