Activity Not Available
1
I Use This!

Project Summary

Analyzed 5 months ago. based on code collected 5 months ago.

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.

Share

In a Nutshell, tinyap...

Languages

Languages?height=75&width=75
Autoconf
34%
shell script
21%
C
27%
6 Other
18%

Lines of Code

Activity

30 Day Summary

Apr 9 2016 — May 9 2016

12 Month Summary

May 9 2015 — May 9 2016

Community

Ratings

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