mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
conflicts: switch to partial order precedence system
Even though it is not yet fully deployed, this commit lays the ground for the partial order precedence system, by changing to a graph-based order and introducing precedence groups (only the default one can be used for now). * src/symtab.h (struct symbol): Removed extra fields * src/symtab.h: New function declarations * src/symtab.c: New functions for precedence and groups, new hash table for groups * src/AnnotationList.c, src/conflicts.c, src/gram.c, src/print-xml.c, * src/symtab.c: Adaptation to the new prec_node structure * tests/existing.at (GAWK LALR): Fix
This commit is contained in:
@@ -740,7 +740,7 @@ AnnotationList__computeDominantContribution (AnnotationList const *self,
|
||||
if (reduce_precedence
|
||||
&& (reduce_precedence < shift_precedence
|
||||
|| (reduce_precedence == shift_precedence
|
||||
&& token->content->assoc == right_assoc)))
|
||||
&& token->content->prec_node->assoc == right_assoc)))
|
||||
continue;
|
||||
if (!AnnotationList__stateMakesContribution (self, nitems, ci,
|
||||
lookaheads))
|
||||
@@ -748,7 +748,7 @@ AnnotationList__computeDominantContribution (AnnotationList const *self,
|
||||
/* This uneliminated reduction contributes, so see if it can cause
|
||||
an error action. */
|
||||
if (reduce_precedence == shift_precedence
|
||||
&& token->content->assoc == non_assoc)
|
||||
&& token->content->prec_node->assoc == non_assoc)
|
||||
{
|
||||
/* It's not possible to find split-stable domination over
|
||||
shift after a potential %nonassoc. */
|
||||
|
||||
Reference in New Issue
Block a user