]> git.saurik.com Git - bison.git/blobdiff - src/conflicts.c
grammar: warn about unused precedence for symbols
[bison.git] / src / conflicts.c
index 885bd78f2154f07a08e1ffad36ca68aee02170f2..5744ac366daa234495b0e36007143c5d48ceecb6 100644 (file)
@@ -276,11 +276,13 @@ resolve_sr_conflict (state *s, int ruleno, symbol **errors, int *nerrs)
            The precedence of shifting is that of token i.  */
         if (symbols[i]->prec < redprec)
           {
+            register_precedence (redrule->prec->number, i);
             log_resolution (redrule, i, reduce_resolution);
             flush_shift (s, i);
           }
         else if (symbols[i]->prec > redprec)
           {
+            register_precedence (i, redrule->prec->number);
             log_resolution (redrule, i, shift_resolution);
             flush_reduce (lookahead_tokens, i);
           }