aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2010-03-05 09:05:05 +0000
committerErlang/OTP <[email protected]>2010-03-05 09:05:05 +0000
commit15f7dc0645216b21c7f3165372638080bb86cacb (patch)
tree747c33479757ff60df285e37721459937fade62c /lib/parsetools/src
parent4ca96c184819541fd9f67fc954d5dd9edb43e609 (diff)
downloadotp-15f7dc0645216b21c7f3165372638080bb86cacb.tar.gz
otp-15f7dc0645216b21c7f3165372638080bb86cacb.tar.bz2
otp-15f7dc0645216b21c7f3165372638080bb86cacb.zip
OTP-8486 parsetools: yecc bug
A bug introduced in Parsetools 1.4.4 (R12B-2) has been fixed. (Thanks to Manolis Papadakis.)
Diffstat (limited to 'lib/parsetools/src')
-rw-r--r--lib/parsetools/src/yecc.erl8
1 files changed, 5 insertions, 3 deletions
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))],