Yapps2 2.1.1-17.1

An easy to use parser generator producing human-readable Python code
Yapps (Yet Another Python Parser System) is an easy to use parser generator that is written in Python and generates Python code. Yapps2 is simple, is easy to use, and produces human-readable parsers. It is not fast, powerful, or particularly flexible. Yapps is designed to be used when regular expressions are not enough and other parser systems are too much -- situations where you may write your own recursive descent parser.

Some unusual features of Yapps that may be of interest are:

 1. Yapps produces human-readable recursive descent parsers. There are several heuristics used to keep the generated code simple.
 2. Yapps produces context-sensitive scanners that pick tokens based on the type of tokens accepted by the parser. In some situations, token matching is ambiguous unless the context is taken into account.
 3. Yapps rules can pass arguments down to subrules, so subrules can use information (such as declarations) that was parsed at higher levels in the parsing process. These are sometimes called attribute grammars.

There are several disadvantages of using Yapps over another parser system:

 1. Yapps parsers are LL(1), which is less powerful in parsing power than LALR or SLR. There are some inconveniences having to do with LL(1) (such as the lack of operator precedence) that lead to more explicit grammars.
 2. The Yapps scanner can only read from strings, not from files, so it may not be useful if your input is large. However, it is possible to write a custom scanner for your application. (Note: the enhanced version of Yapps in Debian can read from files.)
 3. Yapps is not designed with efficiency in mind. It’s not the fastest parser available (nor is it the slowest).

last updated on:
May 4th, 2010, 17:17 GMT
price:
FREE!
developed by:
Amit Patel
homepage:
theory.stanford.edu
license type:
MIT/X Consortium License 
category:
ROOT \ Programming \ Code Generators

FREE!

In a hurry? Add it to your Download Basket!

user rating 1

5.0/5
 

0/5

Rate it!

Add your review!

SUBMIT