From 3bea0b61a5f24a00927bb26f9fa569d95c609fcf Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Mon, 2 Sep 2024 18:17:34 +0200 Subject: 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. --- yacc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3