-- parser produced by Happy Version 1.11 module Parser(parseHDoc, ParsedHDoc) where import Scanner import HDocDefs import HsSyn import Alex import List (intersperse) import Maybe (Maybe(..), listToMaybe, maybeToList) import Monad (liftM) data HappyAbsSyn t5 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t28 t30 = HappyTerminal Token | HappyErrorToken Int | HappyAbsSyn4 (ParsedHDoc) | HappyAbsSyn5 t5 | HappyAbsSyn6 (ModuleDoc -> CommentAssoc) | HappyAbsSyn7 ([HDoc] -> CommentAssoc) | HappyAbsSyn8 t8 | HappyAbsSyn9 t9 | HappyAbsSyn10 t10 | HappyAbsSyn11 t11 | HappyAbsSyn12 t12 | HappyAbsSyn13 t13 | HappyAbsSyn14 t14 | HappyAbsSyn15 t15 | HappyAbsSyn16 t16 | HappyAbsSyn17 t17 | HappyAbsSyn18 t18 | HappyAbsSyn19 t19 | HappyAbsSyn20 t20 | HappyAbsSyn21 t21 | HappyAbsSyn22 t22 | HappyAbsSyn23 t23 | HappyAbsSyn24 t24 | HappyAbsSyn25 t25 | HappyAbsSyn26 (HDocText) | HappyAbsSyn28 t28 | HappyAbsSyn29 ([TagAttr]) | HappyAbsSyn30 t30 action_0 (31) = happyShift action_5 action_0 (33) = happyShift action_6 action_0 (4) = happyGoto action_7 action_0 (5) = happyGoto action_2 action_0 (6) = happyGoto action_3 action_0 (7) = happyGoto action_4 action_0 _ = happyReduce_2 action_1 (31) = happyShift action_5 action_1 (33) = happyShift action_6 action_1 (5) = happyGoto action_2 action_1 (6) = happyGoto action_3 action_1 (7) = happyGoto action_4 action_1 _ = happyFail action_2 _ = happyReduce_1 action_3 (31) = happyShift action_5 action_3 (33) = happyShift action_6 action_3 (5) = happyGoto action_14 action_3 (6) = happyGoto action_3 action_3 (7) = happyGoto action_4 action_3 _ = happyReduce_2 action_4 (58) = happyShift action_11 action_4 (26) = happyGoto action_13 action_4 (27) = happyGoto action_9 action_4 (30) = happyGoto action_10 action_4 _ = happyReduce_63 action_5 (62) = happyShift action_12 action_5 _ = happyReduce_11 action_6 (58) = happyShift action_11 action_6 (26) = happyGoto action_8 action_6 (27) = happyGoto action_9 action_6 (30) = happyGoto action_10 action_6 _ = happyReduce_63 action_7 (63) = happyAccept action_7 _ = happyFail action_8 (32) = happyShift action_34 action_8 _ = happyFail action_9 (50) = happyShift action_30 action_9 (51) = happyShift action_31 action_9 (56) = happyShift action_32 action_9 (57) = happyShift action_33 action_9 (28) = happyGoto action_29 action_9 _ = happyReduce_62 action_10 (58) = happyShift action_28 action_10 (27) = happyGoto action_27 action_10 _ = happyReduce_63 action_11 _ = happyReduce_72 action_12 _ = happyReduce_12 action_13 (34) = happyShift action_21 action_13 (35) = happyShift action_22 action_13 (36) = happyShift action_23 action_13 (37) = happyShift action_24 action_13 (59) = happyShift action_25 action_13 (60) = happyShift action_26 action_13 (8) = happyGoto action_15 action_13 (9) = happyGoto action_16 action_13 (10) = happyGoto action_17 action_13 (11) = happyGoto action_18 action_13 (12) = happyGoto action_19 action_13 (13) = happyGoto action_20 action_13 _ = happyReduce_17 action_14 _ = happyReduce_3 action_15 (9) = happyGoto action_59 action_15 _ = happyReduce_17 action_16 (32) = happyShift action_57 action_16 (61) = happyShift action_58 action_16 _ = happyFail action_17 (9) = happyGoto action_56 action_17 _ = happyReduce_17 action_18 (37) = happyShift action_24 action_18 (10) = happyGoto action_55 action_18 (11) = happyGoto action_18 action_18 _ = happyReduce_19 action_19 (35) = happyShift action_22 action_19 (36) = happyShift action_23 action_19 (9) = happyGoto action_53 action_19 (13) = happyGoto action_54 action_19 _ = happyReduce_17 action_20 (9) = happyGoto action_52 action_20 _ = happyReduce_17 action_21 (42) = happyShift action_45 action_21 (44) = happyShift action_46 action_21 (48) = happyShift action_47 action_21 (49) = happyShift action_48 action_21 (20) = happyGoto action_51 action_21 (21) = happyGoto action_41 action_21 (22) = happyGoto action_42 action_21 (23) = happyGoto action_43 action_21 _ = happyFail action_22 (42) = happyShift action_45 action_22 (44) = happyShift action_46 action_22 (48) = happyShift action_47 action_22 (49) = happyShift action_48 action_22 (58) = happyShift action_11 action_22 (20) = happyGoto action_49 action_22 (21) = happyGoto action_41 action_22 (22) = happyGoto action_42 action_22 (23) = happyGoto action_43 action_22 (26) = happyGoto action_50 action_22 (27) = happyGoto action_9 action_22 (30) = happyGoto action_10 action_22 _ = happyReduce_63 action_23 (42) = happyShift action_45 action_23 (44) = happyShift action_46 action_23 (48) = happyShift action_47 action_23 (49) = happyShift action_48 action_23 (58) = happyShift action_11 action_23 (20) = happyGoto action_40 action_23 (21) = happyGoto action_41 action_23 (22) = happyGoto action_42 action_23 (23) = happyGoto action_43 action_23 (26) = happyGoto action_44 action_23 (27) = happyGoto action_9 action_23 (30) = happyGoto action_10 action_23 _ = happyReduce_63 action_24 (49) = happyShift action_39 action_24 _ = happyFail action_25 (58) = happyShift action_11 action_25 (26) = happyGoto action_38 action_25 (27) = happyGoto action_9 action_25 (30) = happyGoto action_10 action_25 _ = happyReduce_63 action_26 (58) = happyShift action_11 action_26 (26) = happyGoto action_37 action_26 (27) = happyGoto action_9 action_26 (30) = happyGoto action_10 action_26 _ = happyReduce_63 action_27 (50) = happyShift action_30 action_27 (51) = happyShift action_31 action_27 (56) = happyShift action_32 action_27 (57) = happyShift action_33 action_27 (28) = happyGoto action_29 action_27 _ = happyReduce_61 action_28 _ = happyReduce_73 action_29 (58) = happyShift action_11 action_29 (30) = happyGoto action_36 action_29 _ = happyReduce_65 action_30 _ = happyReduce_66 action_31 (29) = happyGoto action_35 action_31 _ = happyReduce_70 action_32 _ = happyReduce_68 action_33 _ = happyReduce_67 action_34 _ = happyReduce_4 action_35 (53) = happyShift action_83 action_35 (58) = happyShift action_11 action_35 (26) = happyGoto action_82 action_35 (27) = happyGoto action_9 action_35 (30) = happyGoto action_10 action_35 _ = happyReduce_63 action_36 (58) = happyShift action_28 action_36 _ = happyReduce_64 action_37 (59) = happyShift action_81 action_37 _ = happyReduce_14 action_38 (60) = happyShift action_80 action_38 _ = happyReduce_13 action_39 (42) = happyShift action_45 action_39 (44) = happyShift action_46 action_39 (46) = happyShift action_79 action_39 (48) = happyShift action_47 action_39 (49) = happyShift action_69 action_39 (58) = happyShift action_11 action_39 (23) = happyGoto action_67 action_39 (24) = happyGoto action_77 action_39 (26) = happyGoto action_78 action_39 (27) = happyGoto action_9 action_39 (30) = happyGoto action_10 action_39 _ = happyReduce_63 action_40 (58) = happyShift action_11 action_40 (26) = happyGoto action_76 action_40 (27) = happyGoto action_9 action_40 (30) = happyGoto action_10 action_40 _ = happyReduce_63 action_41 (38) = happyShift action_75 action_41 _ = happyReduce_45 action_42 (39) = happyShift action_73 action_42 (40) = happyShift action_74 action_42 _ = happyReduce_47 action_43 _ = happyReduce_51 action_44 _ = happyReduce_28 action_45 (42) = happyShift action_45 action_45 (44) = happyShift action_46 action_45 (48) = happyShift action_47 action_45 (49) = happyShift action_48 action_45 (20) = happyGoto action_71 action_45 (21) = happyGoto action_41 action_45 (22) = happyGoto action_42 action_45 (23) = happyGoto action_43 action_45 (25) = happyGoto action_72 action_45 _ = happyReduce_58 action_46 (42) = happyShift action_45 action_46 (44) = happyShift action_46 action_46 (48) = happyShift action_47 action_46 (49) = happyShift action_48 action_46 (20) = happyGoto action_70 action_46 (21) = happyGoto action_41 action_46 (22) = happyGoto action_42 action_46 (23) = happyGoto action_43 action_46 _ = happyFail action_47 _ = happyReduce_53 action_48 (42) = happyShift action_45 action_48 (44) = happyShift action_46 action_48 (48) = happyShift action_47 action_48 (49) = happyShift action_69 action_48 (23) = happyGoto action_67 action_48 (24) = happyGoto action_68 action_48 _ = happyReduce_52 action_49 (58) = happyShift action_11 action_49 (26) = happyGoto action_66 action_49 (27) = happyGoto action_9 action_49 (30) = happyGoto action_10 action_49 _ = happyReduce_63 action_50 _ = happyReduce_26 action_51 (58) = happyShift action_11 action_51 (26) = happyGoto action_65 action_51 (27) = happyGoto action_9 action_51 (30) = happyGoto action_10 action_51 _ = happyReduce_63 action_52 (32) = happyShift action_64 action_52 (61) = happyShift action_58 action_52 _ = happyFail action_53 (32) = happyShift action_63 action_53 (61) = happyShift action_58 action_53 _ = happyFail action_54 (9) = happyGoto action_62 action_54 _ = happyReduce_17 action_55 _ = happyReduce_20 action_56 (32) = happyShift action_61 action_56 (61) = happyShift action_58 action_56 _ = happyFail action_57 _ = happyReduce_5 action_58 _ = happyReduce_18 action_59 (32) = happyShift action_60 action_59 (61) = happyShift action_58 action_59 _ = happyFail action_60 _ = happyReduce_10 action_61 _ = happyReduce_6 action_62 (32) = happyShift action_105 action_62 (61) = happyShift action_58 action_62 _ = happyFail action_63 _ = happyReduce_7 action_64 _ = happyReduce_8 action_65 (34) = happyShift action_21 action_65 (12) = happyGoto action_104 action_65 _ = happyReduce_24 action_66 _ = happyReduce_27 action_67 (42) = happyShift action_45 action_67 (44) = happyShift action_46 action_67 (48) = happyShift action_47 action_67 (49) = happyShift action_69 action_67 (23) = happyGoto action_67 action_67 (24) = happyGoto action_103 action_67 _ = happyReduce_56 action_68 _ = happyReduce_50 action_69 _ = happyReduce_52 action_70 (45) = happyShift action_102 action_70 _ = happyFail action_71 (41) = happyShift action_101 action_71 _ = happyReduce_59 action_72 (43) = happyShift action_100 action_72 _ = happyFail action_73 (42) = happyShift action_45 action_73 (44) = happyShift action_46 action_73 (48) = happyShift action_47 action_73 (49) = happyShift action_48 action_73 (21) = happyGoto action_99 action_73 (22) = happyGoto action_42 action_73 (23) = happyGoto action_43 action_73 _ = happyFail action_74 (42) = happyShift action_45 action_74 (44) = happyShift action_46 action_74 (48) = happyShift action_47 action_74 (49) = happyShift action_48 action_74 (21) = happyGoto action_98 action_74 (22) = happyGoto action_42 action_74 (23) = happyGoto action_43 action_74 _ = happyFail action_75 (42) = happyShift action_94 action_75 (44) = happyShift action_95 action_75 (48) = happyShift action_96 action_75 (49) = happyShift action_97 action_75 (14) = happyGoto action_90 action_75 (15) = happyGoto action_91 action_75 (16) = happyGoto action_92 action_75 (17) = happyGoto action_93 action_75 _ = happyFail action_76 _ = happyReduce_29 action_77 (58) = happyShift action_11 action_77 (26) = happyGoto action_89 action_77 (27) = happyGoto action_9 action_77 (30) = happyGoto action_10 action_77 _ = happyReduce_63 action_78 _ = happyReduce_21 action_79 (42) = happyShift action_45 action_79 (44) = happyShift action_46 action_79 (48) = happyShift action_47 action_79 (49) = happyShift action_48 action_79 (20) = happyGoto action_71 action_79 (21) = happyGoto action_41 action_79 (22) = happyGoto action_42 action_79 (23) = happyGoto action_43 action_79 (25) = happyGoto action_88 action_79 _ = happyReduce_58 action_80 (58) = happyShift action_11 action_80 (26) = happyGoto action_87 action_80 (27) = happyGoto action_9 action_80 (30) = happyGoto action_10 action_80 _ = happyReduce_63 action_81 (58) = happyShift action_11 action_81 (26) = happyGoto action_86 action_81 (27) = happyGoto action_9 action_81 (30) = happyGoto action_10 action_81 _ = happyReduce_63 action_82 (52) = happyShift action_85 action_82 _ = happyFail action_83 (54) = happyShift action_84 action_83 _ = happyFail action_84 (55) = happyShift action_116 action_84 _ = happyFail action_85 _ = happyReduce_69 action_86 _ = happyReduce_16 action_87 _ = happyReduce_15 action_88 (47) = happyShift action_115 action_88 _ = happyFail action_89 _ = happyReduce_22 action_90 _ = happyReduce_46 action_91 (39) = happyShift action_114 action_91 _ = happyReduce_30 action_92 (40) = happyShift action_113 action_92 _ = happyReduce_32 action_93 _ = happyReduce_35 action_94 (42) = happyShift action_94 action_94 (44) = happyShift action_95 action_94 (48) = happyShift action_96 action_94 (49) = happyShift action_97 action_94 (15) = happyGoto action_111 action_94 (16) = happyGoto action_92 action_94 (17) = happyGoto action_93 action_94 (19) = happyGoto action_112 action_94 _ = happyReduce_42 action_95 (42) = happyShift action_94 action_95 (44) = happyShift action_95 action_95 (48) = happyShift action_96 action_95 (49) = happyShift action_97 action_95 (15) = happyGoto action_110 action_95 (16) = happyGoto action_92 action_95 (17) = happyGoto action_93 action_95 _ = happyFail action_96 _ = happyReduce_38 action_97 (42) = happyShift action_94 action_97 (44) = happyShift action_95 action_97 (48) = happyShift action_96 action_97 (49) = happyShift action_109 action_97 (17) = happyGoto action_107 action_97 (18) = happyGoto action_108 action_97 _ = happyReduce_39 action_98 _ = happyReduce_48 action_99 _ = happyReduce_49 action_100 _ = happyReduce_55 action_101 (42) = happyShift action_45 action_101 (44) = happyShift action_46 action_101 (48) = happyShift action_47 action_101 (49) = happyShift action_48 action_101 (20) = happyGoto action_71 action_101 (21) = happyGoto action_41 action_101 (22) = happyGoto action_42 action_101 (23) = happyGoto action_43 action_101 (25) = happyGoto action_106 action_101 _ = happyReduce_58 action_102 _ = happyReduce_54 action_103 _ = happyReduce_57 action_104 _ = happyReduce_25 action_105 _ = happyReduce_9 action_106 _ = happyReduce_60 action_107 (42) = happyShift action_94 action_107 (44) = happyShift action_95 action_107 (48) = happyShift action_96 action_107 (49) = happyShift action_109 action_107 (17) = happyGoto action_107 action_107 (18) = happyGoto action_123 action_107 _ = happyReduce_40 action_108 _ = happyReduce_34 action_109 _ = happyReduce_39 action_110 (45) = happyShift action_122 action_110 _ = happyFail action_111 (41) = happyShift action_121 action_111 _ = happyReduce_43 action_112 (43) = happyShift action_120 action_112 _ = happyFail action_113 (42) = happyShift action_94 action_113 (44) = happyShift action_95 action_113 (48) = happyShift action_96 action_113 (49) = happyShift action_97 action_113 (15) = happyGoto action_119 action_113 (16) = happyGoto action_92 action_113 (17) = happyGoto action_93 action_113 _ = happyFail action_114 (42) = happyShift action_94 action_114 (44) = happyShift action_95 action_114 (48) = happyShift action_96 action_114 (49) = happyShift action_97 action_114 (15) = happyGoto action_118 action_114 (16) = happyGoto action_92 action_114 (17) = happyGoto action_93 action_114 _ = happyFail action_115 (58) = happyShift action_11 action_115 (26) = happyGoto action_117 action_115 (27) = happyGoto action_9 action_115 (30) = happyGoto action_10 action_115 _ = happyReduce_63 action_116 _ = happyReduce_71 action_117 _ = happyReduce_23 action_118 _ = happyReduce_31 action_119 _ = happyReduce_33 action_120 _ = happyReduce_37 action_121 (42) = happyShift action_94 action_121 (44) = happyShift action_95 action_121 (48) = happyShift action_96 action_121 (49) = happyShift action_97 action_121 (15) = happyGoto action_111 action_121 (16) = happyGoto action_92 action_121 (17) = happyGoto action_93 action_121 (19) = happyGoto action_124 action_121 _ = happyReduce_42 action_122 _ = happyReduce_36 action_123 _ = happyReduce_41 action_124 _ = happyReduce_44 happyReduce_1 = happyMonadReduce 1 4 happyReduction_1 happyReduction_1 ((HappyAbsSyn5 happy_var_1) `HappyStk` happyRest) = happyThen ( Right happy_var_1 ) (\r -> happyReturn (HappyAbsSyn4 r)) happyReduce_2 = happySpecReduce_0 5 happyReduction_2 happyReduction_2 = HappyAbsSyn5 (\md -> [] ) happyReduce_3 = happySpecReduce_2 5 happyReduction_3 happyReduction_3 (HappyAbsSyn5 happy_var_2) (HappyAbsSyn6 happy_var_1) = HappyAbsSyn5 (\md -> happy_var_1 md : happy_var_2 md ) happyReduction_3 _ _ = notHappyAtAll happyReduce_4 = happySpecReduce_3 6 happyReduction_4 happyReduction_4 _ (HappyAbsSyn26 happy_var_2) (HappyTerminal (BeginHDocCons happy_var_1 _)) = HappyAbsSyn6 (let gt = GenT { gtDescription=happy_var_2, gtSee=[] } in \md -> Positional (HDocConsLoc (sl happy_var_1) [HDoc gt ConstructorTags]) ) happyReduction_4 _ _ _ = notHappyAtAll happyReduce_5 = happyReduce 4 6 happyReduction_5 happyReduction_5 (_ `HappyStk` (HappyAbsSyn9 happy_var_3) `HappyStk` (HappyAbsSyn26 happy_var_2) `HappyStk` (HappyAbsSyn7 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn6 (let gt = GenT { gtDescription = happy_var_2, gtSee = happy_var_3 } in \md -> happy_var_1 [HDoc gt (ModuleTags $ MT {mtAuthor = [], mtVersion = [] }), HDoc gt (FunctionTags $ FT {ftParam = [],ftReturn = Nothing}), HDoc gt (DataTags $ DT {dtCons = []}), HDoc gt TypeTags, HDoc gt ClassInstTags] ) `HappyStk` happyRest happyReduce_6 = happyReduce 5 6 happyReduction_6 happyReduction_6 (_ `HappyStk` (HappyAbsSyn9 happy_var_4) `HappyStk` (HappyAbsSyn10 happy_var_3) `HappyStk` (HappyAbsSyn26 happy_var_2) `HappyStk` (HappyAbsSyn7 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn6 (let gt = GenT { gtDescription = happy_var_2, gtSee = happy_var_4 } in \md -> happy_var_1 [HDoc gt (DataTags $ DT {dtCons = happy_var_3 md})] ) `HappyStk` happyRest happyReduce_7 = happyReduce 5 6 happyReduction_7 happyReduction_7 (_ `HappyStk` (HappyAbsSyn9 happy_var_4) `HappyStk` (HappyAbsSyn12 happy_var_3) `HappyStk` (HappyAbsSyn26 happy_var_2) `HappyStk` (HappyAbsSyn7 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn6 (let gt = GenT { gtDescription = happy_var_2, gtSee = happy_var_4 } in \md -> happy_var_1 [HDoc gt (FunctionTags $FT { ftParam = happy_var_3 md, ftReturn = Nothing })] ) `HappyStk` happyRest happyReduce_8 = happyReduce 5 6 happyReduction_8 happyReduction_8 (_ `HappyStk` (HappyAbsSyn9 happy_var_4) `HappyStk` (HappyAbsSyn13 happy_var_3) `HappyStk` (HappyAbsSyn26 happy_var_2) `HappyStk` (HappyAbsSyn7 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn6 (let gt = GenT { gtDescription = happy_var_2, gtSee = happy_var_4 } in \md -> happy_var_1 [HDoc gt (FunctionTags $ FT { ftParam = [], ftReturn = happy_var_3 md })] ) `HappyStk` happyRest happyReduce_9 = happyReduce 6 6 happyReduction_9 happyReduction_9 (_ `HappyStk` (HappyAbsSyn9 happy_var_5) `HappyStk` (HappyAbsSyn13 happy_var_4) `HappyStk` (HappyAbsSyn12 happy_var_3) `HappyStk` (HappyAbsSyn26 happy_var_2) `HappyStk` (HappyAbsSyn7 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn6 (let gt = GenT { gtDescription = happy_var_2, gtSee = happy_var_5 } in \md -> happy_var_1 [HDoc gt (FunctionTags $ FT { ftParam = happy_var_3 md, ftReturn = happy_var_4 md })] ) `HappyStk` happyRest happyReduce_10 = happyReduce 5 6 happyReduction_10 happyReduction_10 (_ `HappyStk` (HappyAbsSyn9 happy_var_4) `HappyStk` (HappyAbsSyn8 happy_var_3) `HappyStk` (HappyAbsSyn26 happy_var_2) `HappyStk` (HappyAbsSyn7 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn6 (let { gt = GenT { gtDescription = happy_var_2, gtSee = happy_var_4 }; (au, ver) = happy_var_3 } in \md -> happy_var_1 [HDoc gt (ModuleTags $ MT {mtAuthor = au, mtVersion = ver })] ) `HappyStk` happyRest happyReduce_11 = happySpecReduce_1 7 happyReduction_11 happyReduction_11 (HappyTerminal (BeginHDoc happy_var_1 _)) = HappyAbsSyn7 (\hds -> Positional (HDocLoc (sl happy_var_1) hds) ) happyReduction_11 _ = notHappyAtAll happyReduce_12 = happySpecReduce_2 7 happyReduction_12 happyReduction_12 (HappyTerminal (AtDoc _ _ happy_var_2)) _ = HappyAbsSyn7 (\hds -> PerName (hsQNameFromString happy_var_2) hds ) happyReduction_12 _ _ = notHappyAtAll happyReduce_13 = happySpecReduce_2 8 happyReduction_13 happyReduction_13 (HappyAbsSyn26 happy_var_2) _ = HappyAbsSyn8 ((happy_var_2, []) ) happyReduction_13 _ _ = notHappyAtAll happyReduce_14 = happySpecReduce_2 8 happyReduction_14 happyReduction_14 (HappyAbsSyn26 happy_var_2) _ = HappyAbsSyn8 (([], happy_var_2) ) happyReduction_14 _ _ = notHappyAtAll happyReduce_15 = happyReduce 4 8 happyReduction_15 happyReduction_15 ((HappyAbsSyn26 happy_var_4) `HappyStk` _ `HappyStk` (HappyAbsSyn26 happy_var_2) `HappyStk` _ `HappyStk` happyRest) = HappyAbsSyn8 ((happy_var_2, happy_var_4) ) `HappyStk` happyRest happyReduce_16 = happyReduce 4 8 happyReduction_16 happyReduction_16 ((HappyAbsSyn26 happy_var_4) `HappyStk` _ `HappyStk` (HappyAbsSyn26 happy_var_2) `HappyStk` _ `HappyStk` happyRest) = HappyAbsSyn8 ((happy_var_4, happy_var_2) ) `HappyStk` happyRest happyReduce_17 = happySpecReduce_0 9 happyReduction_17 happyReduction_17 = HappyAbsSyn9 ([] ) happyReduce_18 = happySpecReduce_2 9 happyReduction_18 happyReduction_18 (HappyTerminal (AtSee _ _ happy_var_2)) (HappyAbsSyn9 happy_var_1) = HappyAbsSyn9 (happy_var_1 ++ [happy_var_2] ) happyReduction_18 _ _ = notHappyAtAll happyReduce_19 = happySpecReduce_1 10 happyReduction_19 happyReduction_19 (HappyAbsSyn11 happy_var_1) = HappyAbsSyn10 (\md -> [happy_var_1 md] ) happyReduction_19 _ = notHappyAtAll happyReduce_20 = happySpecReduce_2 10 happyReduction_20 happyReduction_20 (HappyAbsSyn10 happy_var_2) (HappyAbsSyn11 happy_var_1) = HappyAbsSyn10 (\md -> happy_var_1 md : happy_var_2 md ) happyReduction_20 _ _ = notHappyAtAll happyReduce_21 = happySpecReduce_3 11 happyReduction_21 happyReduction_21 (HappyAbsSyn26 happy_var_3) (HappyTerminal (Conid _ _ happy_var_2)) _ = HappyAbsSyn11 (\md -> ConstructorDoc (Constructor happy_var_2 [] Nothing [] []) happy_var_3 ) happyReduction_21 _ _ _ = notHappyAtAll happyReduce_22 = happyReduce 4 11 happyReduction_22 happyReduction_22 ((HappyAbsSyn26 happy_var_4) `HappyStk` (HappyAbsSyn24 happy_var_3) `HappyStk` (HappyTerminal (Conid _ _ happy_var_2)) `HappyStk` _ `HappyStk` happyRest) = HappyAbsSyn11 (\md -> let ty = happy_var_3 md in ConstructorDoc (Constructor happy_var_2 [] Nothing ty (map extractType ty)) happy_var_4 ) `HappyStk` happyRest happyReduce_23 = happyReduce 6 11 happyReduction_23 happyReduction_23 ((HappyAbsSyn26 happy_var_6) `HappyStk` _ `HappyStk` (HappyAbsSyn25 happy_var_4) `HappyStk` _ `HappyStk` (HappyTerminal (Conid _ _ happy_var_2)) `HappyStk` _ `HappyStk` happyRest) = HappyAbsSyn11 (\md -> ConstructorDoc (Labelled happy_var_2 (happy_var_4 md)) happy_var_6 ) `HappyStk` happyRest happyReduce_24 = happySpecReduce_3 12 happyReduction_24 happyReduction_24 (HappyAbsSyn26 happy_var_3) (HappyAbsSyn20 happy_var_2) _ = HappyAbsSyn12 (\md -> [(happy_var_2 md, happy_var_3)] ) happyReduction_24 _ _ _ = notHappyAtAll happyReduce_25 = happyReduce 4 12 happyReduction_25 happyReduction_25 ((HappyAbsSyn12 happy_var_4) `HappyStk` (HappyAbsSyn26 happy_var_3) `HappyStk` (HappyAbsSyn20 happy_var_2) `HappyStk` _ `HappyStk` happyRest) = HappyAbsSyn12 (\md -> (happy_var_2 md,happy_var_3) : happy_var_4 md ) `HappyStk` happyRest happyReduce_26 = happySpecReduce_2 13 happyReduction_26 happyReduction_26 (HappyAbsSyn26 happy_var_2) _ = HappyAbsSyn13 (\md -> Just (Nothing, happy_var_2,Functional) ) happyReduction_26 _ _ = notHappyAtAll happyReduce_27 = happySpecReduce_3 13 happyReduction_27 happyReduction_27 (HappyAbsSyn26 happy_var_3) (HappyAbsSyn20 happy_var_2) _ = HappyAbsSyn13 (\md -> Just (Just (happy_var_2 md),happy_var_3,Functional) ) happyReduction_27 _ _ _ = notHappyAtAll happyReduce_28 = happySpecReduce_2 13 happyReduction_28 happyReduction_28 (HappyAbsSyn26 happy_var_2) _ = HappyAbsSyn13 (\md -> Just (Nothing, happy_var_2,Monadic) ) happyReduction_28 _ _ = notHappyAtAll happyReduce_29 = happySpecReduce_3 13 happyReduction_29 happyReduction_29 (HappyAbsSyn26 happy_var_3) (HappyAbsSyn20 happy_var_2) _ = HappyAbsSyn13 (\md -> Just (Just (happy_var_2 md),happy_var_3,Monadic) ) happyReduction_29 _ _ _ = notHappyAtAll happyReduce_30 = happySpecReduce_1 14 happyReduction_30 happyReduction_30 (HappyAbsSyn15 happy_var_1) = HappyAbsSyn14 (\md -> happy_var_1 md ) happyReduction_30 _ = notHappyAtAll happyReduce_31 = happySpecReduce_3 14 happyReduction_31 happyReduction_31 (HappyAbsSyn15 happy_var_3) _ (HappyAbsSyn15 happy_var_1) = HappyAbsSyn14 (\md -> Context (happy_var_1 md) (happy_var_3 md) ) happyReduction_31 _ _ _ = notHappyAtAll happyReduce_32 = happySpecReduce_1 15 happyReduction_32 happyReduction_32 (HappyAbsSyn16 happy_var_1) = HappyAbsSyn15 (\md -> happy_var_1 md ) happyReduction_32 _ = notHappyAtAll happyReduce_33 = happySpecReduce_3 15 happyReduction_33 happyReduction_33 (HappyAbsSyn15 happy_var_3) _ (HappyAbsSyn16 happy_var_1) = HappyAbsSyn15 (\md -> Fun (happy_var_1 md) (happy_var_3 md) ) happyReduction_33 _ _ _ = notHappyAtAll happyReduce_34 = happySpecReduce_2 16 happyReduction_34 happyReduction_34 (HappyAbsSyn18 happy_var_2) (HappyTerminal (Conid _ _ happy_var_1)) = HappyAbsSyn16 (\md -> Con (lookupTypeId md (hsQNameFromString happy_var_1)) (happy_var_2 md) ) happyReduction_34 _ _ = notHappyAtAll happyReduce_35 = happySpecReduce_1 16 happyReduction_35 happyReduction_35 (HappyAbsSyn17 happy_var_1) = HappyAbsSyn16 (\md -> happy_var_1 md ) happyReduction_35 _ = notHappyAtAll happyReduce_36 = happySpecReduce_3 17 happyReduction_36 happyReduction_36 _ (HappyAbsSyn15 happy_var_2) _ = HappyAbsSyn17 (\md -> List (happy_var_2 md) ) happyReduction_36 _ _ _ = notHappyAtAll happyReduce_37 = happySpecReduce_3 17 happyReduction_37 happyReduction_37 _ (HappyAbsSyn19 happy_var_2) _ = HappyAbsSyn17 (\md -> let tl = happy_var_2 md in if length tl == 1 then head tl else Tuple tl ) happyReduction_37 _ _ _ = notHappyAtAll happyReduce_38 = happySpecReduce_1 17 happyReduction_38 happyReduction_38 (HappyTerminal (Ident _ _ happy_var_1)) = HappyAbsSyn17 (\md -> Simple (lookupTypeId md (hsQNameFromString happy_var_1)) ) happyReduction_38 _ = notHappyAtAll happyReduce_39 = happySpecReduce_1 17 happyReduction_39 happyReduction_39 (HappyTerminal (Conid _ _ happy_var_1)) = HappyAbsSyn17 (\md -> Simple (lookupTypeId md (hsQNameFromString happy_var_1)) ) happyReduction_39 _ = notHappyAtAll happyReduce_40 = happySpecReduce_1 18 happyReduction_40 happyReduction_40 (HappyAbsSyn17 happy_var_1) = HappyAbsSyn18 (\md -> [happy_var_1 md] ) happyReduction_40 _ = notHappyAtAll happyReduce_41 = happySpecReduce_2 18 happyReduction_41 happyReduction_41 (HappyAbsSyn18 happy_var_2) (HappyAbsSyn17 happy_var_1) = HappyAbsSyn18 (\md -> (happy_var_1 md) : (happy_var_2 md) ) happyReduction_41 _ _ = notHappyAtAll happyReduce_42 = happySpecReduce_0 19 happyReduction_42 happyReduction_42 = HappyAbsSyn19 (\md -> [] ) happyReduce_43 = happySpecReduce_1 19 happyReduction_43 happyReduction_43 (HappyAbsSyn15 happy_var_1) = HappyAbsSyn19 (\md -> [happy_var_1 md] ) happyReduction_43 _ = notHappyAtAll happyReduce_44 = happySpecReduce_3 19 happyReduction_44 happyReduction_44 (HappyAbsSyn19 happy_var_3) _ (HappyAbsSyn15 happy_var_1) = HappyAbsSyn19 (\md -> happy_var_1 md : happy_var_3 md ) happyReduction_44 _ _ _ = notHappyAtAll happyReduce_45 = happySpecReduce_1 20 happyReduction_45 happyReduction_45 (HappyAbsSyn21 happy_var_1) = HappyAbsSyn20 (happy_var_1 ) happyReduction_45 _ = notHappyAtAll happyReduce_46 = happySpecReduce_3 20 happyReduction_46 happyReduction_46 (HappyAbsSyn14 happy_var_3) _ (HappyAbsSyn21 happy_var_1) = HappyAbsSyn20 (\md -> Typed (happy_var_1 md) (happy_var_3 md) ) happyReduction_46 _ _ _ = notHappyAtAll happyReduce_47 = happySpecReduce_1 21 happyReduction_47 happyReduction_47 (HappyAbsSyn22 happy_var_1) = HappyAbsSyn21 (happy_var_1 ) happyReduction_47 _ = notHappyAtAll happyReduce_48 = happySpecReduce_3 21 happyReduction_48 happyReduction_48 (HappyAbsSyn21 happy_var_3) _ (HappyAbsSyn22 happy_var_1) = HappyAbsSyn21 (\md -> FunT (happy_var_1 md) (happy_var_3 md) ) happyReduction_48 _ _ _ = notHappyAtAll happyReduce_49 = happySpecReduce_3 21 happyReduction_49 happyReduction_49 (HappyAbsSyn21 happy_var_3) _ (HappyAbsSyn22 happy_var_1) = HappyAbsSyn21 (\md -> ContextT (happy_var_1 md) (happy_var_3 md) ) happyReduction_49 _ _ _ = notHappyAtAll happyReduce_50 = happySpecReduce_2 22 happyReduction_50 happyReduction_50 (HappyAbsSyn24 happy_var_2) (HappyTerminal (Conid _ _ happy_var_1)) = HappyAbsSyn22 (\md -> ConT happy_var_1 (happy_var_2 md) ) happyReduction_50 _ _ = notHappyAtAll happyReduce_51 = happySpecReduce_1 22 happyReduction_51 happyReduction_51 (HappyAbsSyn23 happy_var_1) = HappyAbsSyn22 (happy_var_1 ) happyReduction_51 _ = notHappyAtAll happyReduce_52 = happySpecReduce_1 23 happyReduction_52 happyReduction_52 (HappyTerminal (Conid _ _ happy_var_1)) = HappyAbsSyn23 (\md -> SimpleT happy_var_1 ) happyReduction_52 _ = notHappyAtAll happyReduce_53 = happySpecReduce_1 23 happyReduction_53 happyReduction_53 (HappyTerminal (Ident _ _ happy_var_1)) = HappyAbsSyn23 (\md -> SimpleT happy_var_1 ) happyReduction_53 _ = notHappyAtAll happyReduce_54 = happySpecReduce_3 23 happyReduction_54 happyReduction_54 _ (HappyAbsSyn20 happy_var_2) _ = HappyAbsSyn23 (\md -> ListT (happy_var_2 md) ) happyReduction_54 _ _ _ = notHappyAtAll happyReduce_55 = happySpecReduce_3 23 happyReduction_55 happyReduction_55 _ (HappyAbsSyn25 happy_var_2) _ = HappyAbsSyn23 (\md -> let tl = happy_var_2 md in if length tl == 1 then head tl else TupleT tl ) happyReduction_55 _ _ _ = notHappyAtAll happyReduce_56 = happySpecReduce_1 24 happyReduction_56 happyReduction_56 (HappyAbsSyn23 happy_var_1) = HappyAbsSyn24 (\md -> [happy_var_1 md] ) happyReduction_56 _ = notHappyAtAll happyReduce_57 = happySpecReduce_2 24 happyReduction_57 happyReduction_57 (HappyAbsSyn24 happy_var_2) (HappyAbsSyn23 happy_var_1) = HappyAbsSyn24 (\md -> happy_var_1 md : happy_var_2 md ) happyReduction_57 _ _ = notHappyAtAll happyReduce_58 = happySpecReduce_0 25 happyReduction_58 happyReduction_58 = HappyAbsSyn25 (\md -> [] ) happyReduce_59 = happySpecReduce_1 25 happyReduction_59 happyReduction_59 (HappyAbsSyn20 happy_var_1) = HappyAbsSyn25 (\md -> [happy_var_1 md] ) happyReduction_59 _ = notHappyAtAll happyReduce_60 = happySpecReduce_3 25 happyReduction_60 happyReduction_60 (HappyAbsSyn25 happy_var_3) _ (HappyAbsSyn20 happy_var_1) = HappyAbsSyn25 (\md -> happy_var_1 md : happy_var_3 md ) happyReduction_60 _ _ _ = notHappyAtAll happyReduce_61 = happySpecReduce_2 26 happyReduction_61 happyReduction_61 (HappyAbsSyn26 happy_var_2) _ = HappyAbsSyn26 (happy_var_2 ) happyReduction_61 _ _ = notHappyAtAll happyReduce_62 = happySpecReduce_1 26 happyReduction_62 happyReduction_62 (HappyAbsSyn26 happy_var_1) = HappyAbsSyn26 (happy_var_1 ) happyReduction_62 _ = notHappyAtAll happyReduce_63 = happySpecReduce_0 27 happyReduction_63 happyReduction_63 = HappyAbsSyn26 ([] ) happyReduce_64 = happySpecReduce_3 27 happyReduction_64 happyReduction_64 (HappyAbsSyn30 happy_var_3) (HappyAbsSyn28 happy_var_2) (HappyAbsSyn26 happy_var_1) = HappyAbsSyn26 (happy_var_1 ++ [happy_var_2,happy_var_3] ) happyReduction_64 _ _ _ = notHappyAtAll happyReduce_65 = happySpecReduce_2 27 happyReduction_65 happyReduction_65 (HappyAbsSyn28 happy_var_2) (HappyAbsSyn26 happy_var_1) = HappyAbsSyn26 (happy_var_1 ++ [happy_var_2] ) happyReduction_65 _ _ = notHappyAtAll happyReduce_66 = happySpecReduce_1 28 happyReduction_66 happyReduction_66 (HappyTerminal (SText _ _ happy_var_1)) = HappyAbsSyn28 (HdeText happy_var_1 ) happyReduction_66 _ = notHappyAtAll happyReduce_67 = happySpecReduce_1 28 happyReduction_67 happyReduction_67 (HappyTerminal (SUnicode _ _ happy_var_1)) = HappyAbsSyn28 (HdeUnicode happy_var_1 ) happyReduction_67 _ = notHappyAtAll happyReduce_68 = happySpecReduce_1 28 happyReduction_68 happyReduction_68 _ = HappyAbsSyn28 (HdeTag1 BrTag ) happyReduce_69 = happyMonadReduce 4 28 happyReduction_69 happyReduction_69 ((HappyTerminal (happy_var_4@(EndTag _ _ _))) `HappyStk` (HappyAbsSyn26 happy_var_3) `HappyStk` (HappyAbsSyn29 happy_var_2) `HappyStk` (HappyTerminal (happy_var_1@(BeginTag _ _ _))) `HappyStk` happyRest) = happyThen ( let { BeginTag p1 inp1 t1 = happy_var_1; EndTag p2 inp2 t2 = happy_var_4; Pn _ l1 _ = p1; Pn _ l2 _ = p2 } in if t1 == t2 then Right (HdeTag2 t1 happy_var_2 happy_var_3) else Left ("tag <" ++ nameOfTag t1 ++ "> in line " ++ show l1 ++ " is closed by in line " ++ show l2) ) (\r -> happyReturn (HappyAbsSyn28 r)) happyReduce_70 = happySpecReduce_0 29 happyReduction_70 happyReduction_70 = HappyAbsSyn29 ([] ) happyReduce_71 = happyMonadReduce 4 29 happyReduction_71 happyReduction_71 ((HappyTerminal (TagAttrValue _ _ happy_var_4)) `HappyStk` _ `HappyStk` (HappyTerminal (TagAttr _ _ happy_var_2)) `HappyStk` (HappyAbsSyn29 happy_var_1) `HappyStk` happyRest) = happyThen ( case attrToTagAttr happy_var_2 happy_var_4 of Right ta -> Right (happy_var_1 ++ [ta]) Left err -> Left err ) (\r -> happyReturn (HappyAbsSyn29 r)) happyReduce_72 = happySpecReduce_1 30 happyReduction_72 happyReduction_72 _ = HappyAbsSyn30 (HdeWhiteSpace ) happyReduce_73 = happySpecReduce_2 30 happyReduction_73 happyReduction_73 _ _ = HappyAbsSyn30 (HdeWhiteSpace ) happyNewToken action sts stk [] = action 63 63 (error "reading EOF!") (HappyState action) sts stk [] happyNewToken action sts stk (tk:tks) = let cont i = action i i tk (HappyState action) sts stk tks in case tk of { BeginHDoc happy_dollar_dollar _ -> cont 31; EndHDoc _ _ -> cont 32; BeginHDocCons happy_dollar_dollar _ -> cont 33; AtParam _ _ -> cont 34; AtReturn _ _ -> cont 35; AtMonadic _ _ -> cont 36; AtCons _ _ -> cont 37; HasType _ _ -> cont 38; Implies _ _ -> cont 39; Arrow _ _ -> cont 40; Comma _ _ -> cont 41; OParen _ _ -> cont 42; CParen _ _ -> cont 43; OBracket _ _ -> cont 44; CBracket _ _ -> cont 45; OBrace _ _ -> cont 46; CBrace _ _ -> cont 47; Ident _ _ happy_dollar_dollar -> cont 48; Conid _ _ happy_dollar_dollar -> cont 49; SText _ _ happy_dollar_dollar -> cont 50; happy_dollar_dollar@(BeginTag _ _ _) -> cont 51; happy_dollar_dollar@(EndTag _ _ _) -> cont 52; TagAttr _ _ happy_dollar_dollar -> cont 53; TagAttrEq _ _ -> cont 54; TagAttrValue _ _ happy_dollar_dollar -> cont 55; SBr _ _ -> cont 56; SUnicode _ _ happy_dollar_dollar -> cont 57; SWhiteSpace _ _ -> cont 58; AtAuthor _ _ -> cont 59; AtVersion _ _ -> cont 60; AtSee _ _ happy_dollar_dollar -> cont 61; AtDoc _ _ happy_dollar_dollar -> cont 62; } happyThen = (thenE) happyReturn = (Right) happyThen1 m k tks = (thenE) m (\a -> k a tks) happyReturn1 = \a tks -> (Right) a hDocParser tks = happyThen (happyParse action_0 tks) (\x -> case x of {HappyAbsSyn4 z -> happyReturn z; _other -> notHappyAtAll }) thenE :: Either String a -> (a -> Either String b) -> Either String b thenE (Right x) f = f x thenE (Left y) _ = Left y sl :: Posn -> SrcLoc sl (Pn _ y x) = SrcLoc y x happyError :: [Token] -> Either String a happyError [] = Left "parse error: not enough tokens\n" happyError (t:ts) = Left ("parse error in line " ++ show l ++ " before\n" ++ take 80 (remainingInput t)) where Pn _ l _ = pos t type ParsedHDoc = ModuleDoc -> [CommentAssoc] parseHDoc :: String -> Either String ParsedHDoc parseHDoc input = case scanError of "" -> hDocParser scanned se -> Left se where scanned = tokens input scanError = concat $ intersperse "\n" [e | ScanError e <- scanned] emptyMod :: ModuleDoc emptyMod = ModuleDoc { moduleName = "empty test module", descriptionM = [], authorM = [], versionM =[], seeTagsM = [], exports = [], imports = [], functions = [], datatypes = [], classes = [], instances = [], typesynonyms = [], appearsM = True, hiddenM = False } {-# LINE 1 "GenericTemplate.hs" #-} -- $Id: GenericTemplate.hs,v 1.18 2001/09/25 14:39:03 simonmar Exp $ {-# LINE 15 "GenericTemplate.hs" #-} infixr 9 `HappyStk` data HappyStk a = HappyStk a (HappyStk a) ----------------------------------------------------------------------------- -- starting the parse happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll ----------------------------------------------------------------------------- -- Accepting the parse happyAccept j tk st sts (HappyStk ans _) = (happyReturn1 ans) ----------------------------------------------------------------------------- -- Arrays only: do the next action {-# LINE 138 "GenericTemplate.hs" #-} ----------------------------------------------------------------------------- -- HappyState data type (not arrays) newtype HappyState b c = HappyState (Int -> -- token number Int -> -- token number (yes, again) b -> -- token semantic value HappyState b c -> -- current state [HappyState b c] -> -- state stack c) ----------------------------------------------------------------------------- -- Shifting a token happyShift new_state (1) tk st sts stk@(x `HappyStk` _) = let i = (case x of { HappyErrorToken (i) -> i }) in -- trace "shifting the error token" $ new_state i i tk (HappyState (new_state)) ((st):(sts)) (stk) happyShift new_state i tk st sts stk = happyNewToken new_state ((st):(sts)) ((HappyTerminal (tk))`HappyStk`stk) -- happyReduce is specialised for the common cases. happySpecReduce_0 i fn (1) tk st sts stk = happyFail (1) tk st sts stk happySpecReduce_0 nt fn j tk st@((HappyState (action))) sts stk = action nt j tk st ((st):(sts)) (fn `HappyStk` stk) happySpecReduce_1 i fn (1) tk st sts stk = happyFail (1) tk st sts stk happySpecReduce_1 nt fn j tk _ sts@(((st@(HappyState (action))):(_))) (v1`HappyStk`stk') = action nt j tk st sts (fn v1 `HappyStk` stk') happySpecReduce_2 i fn (1) tk st sts stk = happyFail (1) tk st sts stk happySpecReduce_2 nt fn j tk _ ((_):(sts@(((st@(HappyState (action))):(_))))) (v1`HappyStk`v2`HappyStk`stk') = action nt j tk st sts (fn v1 v2 `HappyStk` stk') happySpecReduce_3 i fn (1) tk st sts stk = happyFail (1) tk st sts stk happySpecReduce_3 nt fn j tk _ ((_):(((_):(sts@(((st@(HappyState (action))):(_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk') = action nt j tk st sts (fn v1 v2 v3 `HappyStk` stk') happyReduce k i fn (1) tk st sts stk = happyFail (1) tk st sts stk happyReduce k nt fn j tk st sts stk = action nt j tk st1 sts1 (fn stk) where sts1@(((st1@(HappyState (action))):(_))) = happyDrop k ((st):(sts)) happyMonadReduce k nt fn (1) tk st sts stk = happyFail (1) tk st sts stk happyMonadReduce k nt fn j tk st sts stk = happyThen1 (fn stk) (\r -> action nt j tk st1 sts1 (r `HappyStk` drop_stk)) where sts1@(((st1@(HappyState (action))):(_))) = happyDrop k ((st):(sts)) drop_stk = happyDropStk k stk happyDrop (0) l = l happyDrop n ((_):(t)) = happyDrop (n - ((1) :: Int)) t happyDropStk (0) l = l happyDropStk n (x `HappyStk` xs) = happyDropStk (n - ((1)::Int)) xs ----------------------------------------------------------------------------- -- Moving to a new state after a reduction happyGoto action j tk st = action j j tk (HappyState action) ----------------------------------------------------------------------------- -- Error recovery ((1) is the error token) -- parse error if we are in recovery and we fail again happyFail (1) tk old_st _ stk = -- trace "failing" $ happyError {- We don't need state discarding for our restricted implementation of "error". In fact, it can cause some bogus parses, so I've disabled it for now --SDM -- discard a state happyFail (1) tk old_st (((HappyState (action))):(sts)) (saved_tok `HappyStk` _ `HappyStk` stk) = -- trace ("discarding state, depth " ++ show (length stk)) $ action (1) (1) tk (HappyState (action)) sts ((saved_tok`HappyStk`stk)) -} -- Enter error recovery: generate an error token, -- save the old token and carry on. happyFail i tk (HappyState (action)) sts stk = -- trace "entering error recovery" $ action (1) (1) tk (HappyState (action)) sts ( (HappyErrorToken (i)) `HappyStk` stk) -- Internal happy errors: notHappyAtAll = error "Internal Happy error\n" ----------------------------------------------------------------------------- -- Hack to get the typechecker to accept our action functions ----------------------------------------------------------------------------- -- Don't inline any functions from the template. GHC has a nasty habit -- of deciding to inline happyGoto everywhere, which increases the size of -- the generated parser quite a bit. {-# NOINLINE happyShift #-} {-# NOINLINE happySpecReduce_0 #-} {-# NOINLINE happySpecReduce_1 #-} {-# NOINLINE happySpecReduce_2 #-} {-# NOINLINE happySpecReduce_3 #-} {-# NOINLINE happyReduce #-} {-# NOINLINE happyMonadReduce #-} {-# NOINLINE happyGoto #-} {-# NOINLINE happyFail #-} -- end of Happy Template.