I Use This!
Activity Not Available
Analyzed over 1 year ago. based on code collected over 1 year ago.

Project Summary

This is not yet another parser. Tinyap takes some text and an a grammar describing AST as inputs, and outputs another AST that describes the text contents, according to the provided grammar.

Basically, tinyap is a recursive descent parser with backup. Thus, it's able to recognize any LL(k) language. When a parse is successful, tinyap outputs an Abstract Syntax Tree (AST) that represents the input text in a structured manner.

Unlike most parsers, its code isn't factory-calibrated for a particular grammar. Instead, the grammar is data. Tinyap uses an AST that represents a grammar to parse its input text. This grammar AST is structured according to tinyap's grammar description language.

This parser is meant to allow quick and easy development of new languages and the corresponding interpreters or compilers, by defining a single tool and library to parse the source grammar as well as the source text according to the source grammar and walk the resulting ASTs.

The factory default for the grammar AST is the grammar description language itself. So one can parse a grammar description and directly use the parse output to parse some other text written in the described language. Tinyap also features a plugin mechanism for grammars, which allows for dynamic modular grammars. The ASTs tinyap produces can be serialized to and deserialized from buffers and files.

Finally, tinyap provides an interface to walk down the ASTs and makes it easy to write external plugins to visit the nodes, e.g. a compiler, an interpreter, a static evaluator, a renderer...

You can have a look at an extensive use of tinyap at http://code.google.com/p/tinyaml where tinyap is used to parse compile and extend a base meta-language.

A tutorial is available here : http://beublo23.free.fr/doxygen/tinyap/Tutorial.html

Until further request, C++ and Java API are more or less discontinued.

Contact me at damien dot leroux at gmail dot com for feedback, suggestions, requests or to help improving the code.


abstract ast bnf c ebnf grammar java parser parsing

In a Nutshell, tinyap...

Quick Reference

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    anyone with an Open Hub account can update a project's tags
  • ...
    there are over 3,000 projects on the Open Hub with security vulnerabilities reported against them
  • ...
    learn about Open Hub updates and features on the Open Hub blog


shell script
6 Other

30 Day Summary

Apr 9 2016 — May 9 2016

12 Month Summary

May 9 2015 — May 9 2016


Be the first to rate this project
Click to add your rating
Review this Project!