1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-15 03:14:23 +00:00
freebsd-ports/devel/tpg/pkg-descr
Ying-Chieh Liao 8fff289bbb add tpg 0.1.6
Toy Parser Generator -- A parser generator in Python
2002-03-15 12:24:15 +00:00

16 lines
898 B
Plaintext

Toy Parser Generator is a lexical and syntactic parser generator for Python.
This generator was born from a simple statement: YACC is to complex to use
in simple cases (calculators, configuration files, small programming
languages, ...).
TPG can very simply write parsers that are usefull for most every day needs
(even if it can't make your coffee). With a very clear and simple syntax, you
can write an attributed grammar that is translated into a recursive descendant
parser. TPG generated code is very closed to the original grammar. This means
that the parser works "like" the grammar. A grammar rule can be seen as a
method of the parser class, symbols as method calls, attributes as method
parameters and semantic values as return values. You can also add Python code
directly into grammar rules and build abstract syntax trees while parsing.
WWW: http://christophe.delord.free.fr/en/tpg/