From 2876dcf244aae918b592e6888fa0990bc9b46c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Wed, 18 Nov 1998 23:08:53 +0100 Subject: [PATCH] Fixed bug in shift-reduce resolver. Rev: lib/modules/LR.pmod/parser.pike:1.18 --- lib/modules/LR.pmod/parser.pike | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/modules/LR.pmod/parser.pike b/lib/modules/LR.pmod/parser.pike index fae1d7c58b..4301bb6e13 100644 --- a/lib/modules/LR.pmod/parser.pike +++ b/lib/modules/LR.pmod/parser.pike @@ -1,5 +1,5 @@ /* - * $Id: parser.pike,v 1.17 1998/11/18 21:52:34 grubba Exp $ + * $Id: parser.pike,v 1.18 1998/11/18 22:08:53 grubba Exp $ * * A BNF-grammar in Pike. * Compiles to a LALR(1) state-machine. @@ -9,7 +9,7 @@ //. //. File: parser.pike -//. RCSID: $Id: parser.pike,v 1.17 1998/11/18 21:52:34 grubba Exp $ +//. RCSID: $Id: parser.pike,v 1.18 1998/11/18 22:08:53 grubba Exp $ //. Author: Henrik Grubbstr�m (grubba@infovav.se) //. //. Synopsis: LALR(1) parser and compiler. @@ -934,6 +934,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts) i->r->pri->value, pri->value)); } i->direct_lookahead = (<>); + i->next_state = 0; } else if ((pri->assoc <= 0) && (reduce_pri->value == pri->value)) { if (verbose) { @@ -943,6 +944,7 @@ static private int repair(object(kernel) state, multiset(int|string) conflicts) symbol_to_string(symbol))); } i->direct_lookahead = (<>); + i->next_state = 0; } else { if (verbose) { werror(sprintf("Kept item\n%s\n" -- GitLab