Projects / pyPEG


pyPEG is a quick and easy solution for creating a parser in Python programs. pyPEG uses a PEG language in Python data structures to parse, so it can be used dynamically to parse nearly every context free language. The output is a plain Python data structure called pyAST, or, as an alternative, XML.


Last announcement

pyC11 published 05 May 2013 07:05

pyC11 is a grammar to parse programs in the C programming language following ISO/IEC 9899:2011. It is written using pyPEG, a parsing framework for Python. The grammar supports Python 2.7 and 3.x. The test bench requires py.test. This is an initial upload. The grammar is incomplete. Parsing C expressions works, but parsing complete C programs does not work yet. The Freecode page: The Bitbucket repository:

Recent releases

  •  10 Jan 2014 10:31

    Release Notes: This release supports keeping automatically-removed feeble things in the AST, like whitespace or comments.

    •  10 Aug 2013 20:42

      Release Notes: This maintenance release fixes some small bugs which occurred when Symbol.check_keywords = True and adds the omit() function.

      •  03 May 2013 20:55

        Release Notes: Feature enhancements are provided, like a method for memory cache clearing and improving composing and text representation. Some small bugs are fixed.

        •  09 Feb 2013 18:44

          Release Notes: This release adds the ability to have class int as grammar, supporting optional attributes in xml2thing() and thing2xml().

          •  10 Dec 2012 08:43

            Release Notes: Implements a portable way to have new style function declarations without syntax errors in Python 2.7. Extends the synopsis of the csl() function. Minor documentation enhancements. Code cleanup.


            Project Spotlight


            A Fluent OpenStack client API for Java.


            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.