From 15f7dc0645216b21c7f3165372638080bb86cacb Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 5 Mar 2010 09:05:05 +0000 Subject: OTP-8486 parsetools: yecc bug A bug introduced in Parsetools 1.4.4 (R12B-2) has been fixed. (Thanks to Manolis Papadakis.) --- lib/parsetools/src/yecc.erl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/parsetools/src/yecc.erl') diff --git a/lib/parsetools/src/yecc.erl b/lib/parsetools/src/yecc.erl index 7fb6aae31a..c4a47d008f 100644 --- a/lib/parsetools/src/yecc.erl +++ b/lib/parsetools/src/yecc.erl @@ -2006,14 +2006,16 @@ output_actions(St0, StateJumps, StateInfo) -> %% Not all the clauses of the dispatcher function yeccpars2() can %% be reached. Only when shifting, that is, calling yeccpars1(), %% will yeccpars2() be called. - Y2CL = [NewState || {_State,{Actions,_J}} <- StateJumps, - {_LA, #shift{state = NewState}} <- Actions], + Y2CL = [NewState || {_State,{Actions,J}} <- StateJumps, + {_LA, #shift{state = NewState}} <- + (Actions + ++ [A || {_Tag,_To,Part} <- [J], A <- Part])], Y2CS = ordsets:from_list([0 | Y2CL]), Y2S = ordsets:from_list([S || {S,_} <- StateJumps]), NY2CS = ordsets:subtract(Y2S, Y2CS), Sel = [{S,true} || S <- ordsets:to_list(Y2CS)] ++ [{S,false} || S <- ordsets:to_list(NY2CS)], - + SelS = [{State,Called} || {{State,_JActions}, {State,Called}} <- lists:zip(StateJumps, lists:keysort(1, Sel))], -- cgit v1.2.3