- orphan:
Examples#
TatSu#
The file grammar/tatsu.tatsu contains a grammar for the 竜 TatSu grammar
language written in the same language. The grammar is used in the
bootstrap test suite to prove that 竜 TatSu can generate a parser to
parse its own language. The parser output from the tests si made the main parser every time 竜 TatSu is stable (see tatsu/bootstrap.py for
the generated parser).
竜 TatSu uses 竜 TatSu to translate grammars into parsers, so it is a good example of end-to-end translation.
Calc#
The project examples/calc implements a calculator for simple
expressions, and is written as a tutorial over most of the features
provided by 竜 TatSu.
g2e#
The project examples/g2e contains an example ANTLR to 竜 TatSu grammar
translation. The project uses g2e to generate a 竜 TatSu grammar
from the Python3.g4 ANTLR grammar. Because the model classes used are
竜 TatSu’s own (grammars.*), the same strategy can be used to
generate a parser from any other ANTLR grammar. Please take a look at the
examples README to know about limitations.