next up previous contents index
Next: Adding a new operator Up: Adding new features to Previous: Adding new features to   Contents   Index


First, if you do not know what ``yacc'' or ``bison'' do, how they do it and why, if you ignore what a lexical analyzer is, a regular expression or a LALR context-free grammar, a finite state machine or a stack automata, just don't touch the grammar.

This is important: the current grammar is clean. The precedence of every operator is clearly defined; the grammar has only one shift/reduce conflict, the classical ``dangling else'' ambiguity49. That's why there is an ``%expect 1'' directive. If you modify the grammar and add ambiguities, you are not supposed to solve them by increasing the expected number of conflicts. Do whatever is necessary (and clean) to remove them.

One last time: if you have never studied language theory and theoretical computer science, stop reading here!

Michel Arboi 2005-04-29