List of Figures

3.1 Grammar for expressions
3.2 Terminal symbol definition for expressions
3.3 Grammar of the expression recognizer
3.4 make_op function
3.5 Token definitions with functions
3.6 Return values for (non) terminal symbols
3.7 Expression recognizer and evaluator
3.8 Writting TPG grammars in Python
3.9 Complete Python script with expression parser
4.1 Grammar embeding example
4.2 Parser usage example
5.1 TPG grammar structure
5.2 Code indentation examples
6.1 Token definition examples
6.2 Inline token definition examples
6.3 Token usage examples
6.4 Token usage examples
7.1 Rule declaration
7.2 Precedence in TPG expressions
7.3 AST example
7.4 AST update example
7.5 Backtracking with WrongToken example
7.6 Backtracking with the check method example
7.7 Backtracking with the check keyword example
7.8 Error reporting the error method example
7.9 Error reporting the error keyword example
9.1 Verbose parser example