Next: Multi-function Calc, Previous: Simple Error Recovery, Up: Examples [Contents][Index]
ltcalcThis example extends the infix notation calculator with location tracking. This feature will be used to improve the error messages. For the sake of clarity, this example is a simple integer calculator, since most of the work needed to use locations will be done in the lexical analyzer.
| • Ltcalc Declarations | Bison and C declarations for ltcalc. | |
| • Ltcalc Rules | Grammar rules for ltcalc, with explanations. | |
| • Ltcalc Lexer | The lexical analyzer. |