| 1 |
The first effect of the precedence directives is to assign precedence levels |
| 2 |
to the terminal symbols declared. The second effect is to assign precedence |
| 3 |
levels to certain rules: each rule gets its precedence from the last terminal |
| 4 |
symbol mentioned in the components. (You can also specify explicitly the |
| 5 |
precedence of a rule. See section ref(CONDEP)). |
| 6 |
|
| 7 |
Finally, the resolution of conflicts works by comparing the precedence of the |
| 8 |
rule being considered with that of the look-ahead token. If the token's |
| 9 |
precedence is higher, the choice is to shift. If the rule's precedence is |
| 10 |
higher, the choice is to reduce. If they have equal precedence, the choice is |
| 11 |
made based on the associativity of that precedence level. The verbose output |
| 12 |
file made by `tt(-V)' (see section ref(INVOKING)) shows how each conflict was |
| 13 |
resolved. |
| 14 |
|
| 15 |
Not all rules and not all tokens have precedence. If either the rule or the |
| 16 |
look-ahead token has no precedence, then the default is to shift. |
| 17 |
|