summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux2024-09-02 18:17:34 +0200
committerQuentin Carbonneaux2024-09-02 18:18:54 +0200
commit3bea0b61a5f24a00927bb26f9fa569d95c609fcf (patch)
tree8d1cffa61eb1cab71e1c5161a56f80a1e9748813
parente187e988d52f6699c9350f007d9eef7908692350 (diff)
fix a nonassoc bug
I am not sure if the mirror thing should be implemented in the else branch. This fix makes a clean pgsql yacc parser go through.
-rw-r--r--yacc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/yacc.c b/yacc.c
index 760465d..6de46fb 100644
--- a/yacc.c
+++ b/yacc.c
@@ -444,7 +444,7 @@ tblset(int *tbl, Item *i, Term *t)
s = t->rule->rhs[t->dot];
if (s!=S) {
/* shift */
- if (s>=ntk)
+ if (s>=ntk || tbl[s]==-1)
return;
assert(i->gtbl[s]);
act = ARight;