Fork me on GitHub

tinyap by bl0b

A GLR-like parsing engine where the grammar is actually data. One build to parse them all. And you can augment the grammar at runtime. Also provides a framework to walk the resulting ASTs. C API and commandline frontend available.

tinyap uses a different approach to parsing. As a black box, it accepts a pair { source text, grammar AST } as inputs and outputs the AST resulting from the parse of the source text by the given grammar. The default grammar is the "grammar grammar", so one can write a textual BNF-like ruleset, feed it to tinyap, and use the output as the grammar AST to parse source text. Tinyap also provides a simple framework to make AST walking simple, with interpreters/compilers in mind. A command line frontend is provided to access almost all tinyap features from a terminal, and tinyap is also easily embedded in any C/C++ project thanks to its simple API.

Dependencies

pcre libc STL

License

GPL v2

Authors

Damien Leroux (damien.leroux@gmail.com)

Contact

(damien.leroux@gmail.com)

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/bl0b/tinyap