{-# OPTIONS_GHC -w #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-} {-# LANGUAGE PatternSynonyms #-} module Language.EO.Phi.Syntax.Par ( happyError , myLexer , pProgram , pMetaId , pObject , pBinding , pListBinding , pAttribute , pRuleAttribute , pPeeledObject , pObjectHead , pObjectAction , pListObjectAction ) where import Prelude import qualified Language.EO.Phi.Syntax.Abs import Language.EO.Phi.Syntax.Lex import qualified Data.Array as Happy_Data_Array import qualified Data.Bits as Bits import Control.Applicative(Applicative(..)) import Control.Monad (ap) -- parser produced by Happy Version 1.20.1.1 data HappyAbsSyn = HappyTerminal (Token) | HappyErrorToken Prelude.Int | HappyAbsSyn14 (Language.EO.Phi.Syntax.Abs.Bytes) | HappyAbsSyn15 (Language.EO.Phi.Syntax.Abs.Function) | HappyAbsSyn16 (Language.EO.Phi.Syntax.Abs.LabelId) | HappyAbsSyn17 (Language.EO.Phi.Syntax.Abs.AlphaIndex) | HappyAbsSyn18 (Language.EO.Phi.Syntax.Abs.LabelMetaId) | HappyAbsSyn19 (Language.EO.Phi.Syntax.Abs.TailMetaId) | HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.BindingsMetaId) | HappyAbsSyn21 (Language.EO.Phi.Syntax.Abs.ObjectMetaId) | HappyAbsSyn22 (Language.EO.Phi.Syntax.Abs.BytesMetaId) | HappyAbsSyn23 (Language.EO.Phi.Syntax.Abs.MetaFunctionName) | HappyAbsSyn24 (Language.EO.Phi.Syntax.Abs.Program) | HappyAbsSyn25 (Language.EO.Phi.Syntax.Abs.MetaId) | HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.Object) | HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.Binding) | HappyAbsSyn28 ([Language.EO.Phi.Syntax.Abs.Binding]) | HappyAbsSyn29 (Language.EO.Phi.Syntax.Abs.Attribute) | HappyAbsSyn30 (Language.EO.Phi.Syntax.Abs.RuleAttribute) | HappyAbsSyn31 (Language.EO.Phi.Syntax.Abs.PeeledObject) | HappyAbsSyn32 (Language.EO.Phi.Syntax.Abs.ObjectHead) | HappyAbsSyn33 (Language.EO.Phi.Syntax.Abs.ObjectAction) | HappyAbsSyn34 ([Language.EO.Phi.Syntax.Abs.ObjectAction]) {- to allow type-synonyms as our monads (likely - with explicitly-specified bind and return) - in Haskell98, it seems that with - /type M a = .../, then /(HappyReduction M)/ - is not allowed. But Happy is a - code-generator that can just substitute it. type HappyReduction m = Prelude.Int -> (Token) -> HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> m HappyAbsSyn) -> [HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> m HappyAbsSyn)] -> HappyStk HappyAbsSyn -> [(Token)] -> m HappyAbsSyn -} action_0, action_1, action_2, action_3, action_4, action_5, action_6, action_7, action_8, action_9, action_10, action_11, action_12, action_13, action_14, action_15, action_16, action_17, action_18, action_19, action_20, action_21, action_22, action_23, action_24, action_25, action_26, action_27, action_28, action_29, action_30, action_31, action_32, action_33, action_34, action_35, action_36, action_37, action_38, action_39, action_40, action_41, action_42, action_43, action_44, action_45, action_46, action_47, action_48, action_49, action_50, action_51, action_52, action_53, action_54, action_55, action_56, action_57, action_58, action_59, action_60, action_61, action_62, action_63, action_64, action_65, action_66, action_67, action_68, action_69, action_70, action_71, action_72, action_73, action_74, action_75, action_76, action_77, action_78, action_79, action_80, action_81, action_82, action_83, action_84, action_85, action_86, action_87, action_88, action_89, action_90, action_91, action_92, action_93, action_94, action_95, action_96, action_97, action_98, action_99, action_100, action_101, action_102, action_103, action_104 :: () => Prelude.Int -> ({-HappyReduction (Err) = -} Prelude.Int -> (Token) -> HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> (Err) HappyAbsSyn) -> [HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> (Err) HappyAbsSyn)] -> HappyStk HappyAbsSyn -> [(Token)] -> (Err) HappyAbsSyn) happyReduce_11, happyReduce_12, happyReduce_13, happyReduce_14, happyReduce_15, happyReduce_16, happyReduce_17, happyReduce_18, happyReduce_19, happyReduce_20, happyReduce_21, happyReduce_22, happyReduce_23, happyReduce_24, happyReduce_25, happyReduce_26, happyReduce_27, happyReduce_28, happyReduce_29, happyReduce_30, happyReduce_31, happyReduce_32, happyReduce_33, happyReduce_34, happyReduce_35, happyReduce_36, happyReduce_37, happyReduce_38, happyReduce_39, happyReduce_40, happyReduce_41, happyReduce_42, happyReduce_43, happyReduce_44, happyReduce_45, happyReduce_46, happyReduce_47, happyReduce_48, happyReduce_49, happyReduce_50, happyReduce_51, happyReduce_52, happyReduce_53, happyReduce_54, happyReduce_55, happyReduce_56, happyReduce_57, happyReduce_58, happyReduce_59, happyReduce_60, happyReduce_61, happyReduce_62, happyReduce_63 :: () => ({-HappyReduction (Err) = -} Prelude.Int -> (Token) -> HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> (Err) HappyAbsSyn) -> [HappyState (Token) (HappyStk HappyAbsSyn -> [(Token)] -> (Err) HappyAbsSyn)] -> HappyStk HappyAbsSyn -> [(Token)] -> (Err) HappyAbsSyn) happyExpList :: Happy_Data_Array.Array Prelude.Int Prelude.Int happyExpList = Happy_Data_Array.listArray (0,215) ([0,0,512,0,0,0,0,57344,3,0,0,389,20,0,0,32874,11,0,0,424,46,0,0,1536,56,0,0,6784,224,0,0,5120,6,0,0,20480,24,0,0,272,0,0,0,1088,0,0,0,0,8192,0,0,0,0,0,0,4096,1,0,0,0,0,0,0,0,27136,2944,0,0,32768,3585,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6784,736,0,0,0,0,0,0,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,8,0,0,0,1024,0,0,0,4096,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,212,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,424,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,40960,47110,0,0,0,512,0,0,0,32874,11,0,0,0,16,0,0,1536,56,0,0,1024,0,0,0,5120,20486,0,0,0,256,0,0,0,528,2,0,0,453,20,0,0,32874,11,0,0,0,0,0,0,32768,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14080,0,0,0,0,512,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,128,0,0,16384,0,0,0,0,0,0,0,0,6224,320,0,0,0,0,0,16384,29,0,0,0,0,0,0,0,0,0,0,0 ]) {-# NOINLINE happyExpListPerState #-} happyExpListPerState st = token_strs_expected where token_strs = ["error","%dummy","%start_pProgram","%start_pMetaId","%start_pObject","%start_pBinding","%start_pListBinding","%start_pAttribute","%start_pRuleAttribute","%start_pPeeledObject","%start_pObjectHead","%start_pObjectAction","%start_pListObjectAction","Bytes","Function","LabelId","AlphaIndex","LabelMetaId","TailMetaId","BindingsMetaId","ObjectMetaId","BytesMetaId","MetaFunctionName","Program","MetaId","Object","Binding","ListBinding","Attribute","RuleAttribute","PeeledObject","ObjectHead","ObjectAction","ListObjectAction","'('","')'","'*'","','","'.'","'['","']'","'{'","'}'","'\916'","'\934'","'\955'","'\958'","'\961'","'\966'","'\8614'","'\8709'","'\8869'","'\10214'","'\10215'","'\10509'","L_Bytes","L_Function","L_LabelId","L_AlphaIndex","L_LabelMetaId","L_TailMetaId","L_BindingsMetaId","L_ObjectMetaId","L_BytesMetaId","L_MetaFunctionName","%eof"] bit_start = st Prelude.* 66 bit_end = (st Prelude.+ 1) Prelude.* 66 read_bit = readArrayBit happyExpList bits = Prelude.map read_bit [bit_start..bit_end Prelude.- 1] bits_indexed = Prelude.zip bits [0..65] token_strs_expected = Prelude.concatMap f bits_indexed f (Prelude.False, _) = [] f (Prelude.True, nr) = [token_strs Prelude.!! nr] action_0 (42) = happyShift action_64 action_0 (24) = happyGoto action_63 action_0 _ = happyFail (happyExpListPerState 0) action_1 (60) = happyShift action_36 action_1 (61) = happyShift action_61 action_1 (62) = happyShift action_44 action_1 (63) = happyShift action_53 action_1 (64) = happyShift action_62 action_1 (18) = happyGoto action_55 action_1 (19) = happyGoto action_56 action_1 (20) = happyGoto action_57 action_1 (21) = happyGoto action_58 action_1 (22) = happyGoto action_59 action_1 (25) = happyGoto action_60 action_1 _ = happyFail (happyExpListPerState 1) action_2 (45) = happyShift action_49 action_2 (47) = happyShift action_50 action_2 (52) = happyShift action_51 action_2 (53) = happyShift action_52 action_2 (63) = happyShift action_53 action_2 (65) = happyShift action_54 action_2 (21) = happyGoto action_46 action_2 (23) = happyGoto action_47 action_2 (26) = happyGoto action_48 action_2 _ = happyFail (happyExpListPerState 2) action_3 (44) = happyShift action_42 action_3 (46) = happyShift action_43 action_3 (48) = happyShift action_32 action_3 (49) = happyShift action_33 action_3 (58) = happyShift action_34 action_3 (59) = happyShift action_35 action_3 (60) = happyShift action_36 action_3 (62) = happyShift action_44 action_3 (16) = happyGoto action_25 action_3 (17) = happyGoto action_26 action_3 (18) = happyGoto action_27 action_3 (20) = happyGoto action_38 action_3 (27) = happyGoto action_45 action_3 (29) = happyGoto action_41 action_3 _ = happyFail (happyExpListPerState 3) action_4 (44) = happyShift action_42 action_4 (46) = happyShift action_43 action_4 (48) = happyShift action_32 action_4 (49) = happyShift action_33 action_4 (58) = happyShift action_34 action_4 (59) = happyShift action_35 action_4 (60) = happyShift action_36 action_4 (62) = happyShift action_44 action_4 (16) = happyGoto action_25 action_4 (17) = happyGoto action_26 action_4 (18) = happyGoto action_27 action_4 (20) = happyGoto action_38 action_4 (27) = happyGoto action_39 action_4 (28) = happyGoto action_40 action_4 (29) = happyGoto action_41 action_4 _ = happyReduce_44 action_5 (48) = happyShift action_32 action_5 (49) = happyShift action_33 action_5 (58) = happyShift action_34 action_5 (59) = happyShift action_35 action_5 (60) = happyShift action_36 action_5 (16) = happyGoto action_25 action_5 (17) = happyGoto action_26 action_5 (18) = happyGoto action_27 action_5 (29) = happyGoto action_37 action_5 _ = happyFail (happyExpListPerState 5) action_6 (44) = happyShift action_30 action_6 (46) = happyShift action_31 action_6 (48) = happyShift action_32 action_6 (49) = happyShift action_33 action_6 (58) = happyShift action_34 action_6 (59) = happyShift action_35 action_6 (60) = happyShift action_36 action_6 (16) = happyGoto action_25 action_6 (17) = happyGoto action_26 action_6 (18) = happyGoto action_27 action_6 (29) = happyGoto action_28 action_6 (30) = happyGoto action_29 action_6 _ = happyFail (happyExpListPerState 6) action_7 (45) = happyShift action_19 action_7 (47) = happyShift action_20 action_7 (52) = happyShift action_21 action_7 (53) = happyShift action_22 action_7 (31) = happyGoto action_23 action_7 (32) = happyGoto action_24 action_7 _ = happyFail (happyExpListPerState 7) action_8 (45) = happyShift action_19 action_8 (47) = happyShift action_20 action_8 (52) = happyShift action_21 action_8 (53) = happyShift action_22 action_8 (32) = happyGoto action_18 action_8 _ = happyFail (happyExpListPerState 8) action_9 (35) = happyShift action_15 action_9 (39) = happyShift action_16 action_9 (33) = happyGoto action_17 action_9 _ = happyFail (happyExpListPerState 9) action_10 (35) = happyShift action_15 action_10 (39) = happyShift action_16 action_10 (33) = happyGoto action_13 action_10 (34) = happyGoto action_14 action_10 _ = happyReduce_62 action_11 (56) = happyShift action_12 action_11 _ = happyFail (happyExpListPerState 11) action_12 _ = happyReduce_11 action_13 (35) = happyShift action_15 action_13 (39) = happyShift action_16 action_13 (33) = happyGoto action_13 action_13 (34) = happyGoto action_80 action_13 _ = happyReduce_62 action_14 (66) = happyAccept action_14 _ = happyFail (happyExpListPerState 14) action_15 (44) = happyShift action_42 action_15 (46) = happyShift action_43 action_15 (48) = happyShift action_32 action_15 (49) = happyShift action_33 action_15 (58) = happyShift action_34 action_15 (59) = happyShift action_35 action_15 (60) = happyShift action_36 action_15 (62) = happyShift action_44 action_15 (16) = happyGoto action_25 action_15 (17) = happyGoto action_26 action_15 (18) = happyGoto action_27 action_15 (20) = happyGoto action_38 action_15 (27) = happyGoto action_39 action_15 (28) = happyGoto action_79 action_15 (29) = happyGoto action_41 action_15 _ = happyReduce_44 action_16 (48) = happyShift action_32 action_16 (49) = happyShift action_33 action_16 (58) = happyShift action_34 action_16 (59) = happyShift action_35 action_16 (60) = happyShift action_36 action_16 (16) = happyGoto action_25 action_16 (17) = happyGoto action_26 action_16 (18) = happyGoto action_27 action_16 (29) = happyGoto action_78 action_16 _ = happyFail (happyExpListPerState 16) action_17 (66) = happyAccept action_17 _ = happyFail (happyExpListPerState 17) action_18 (66) = happyAccept action_18 _ = happyFail (happyExpListPerState 18) action_19 _ = happyReduce_57 action_20 _ = happyReduce_58 action_21 _ = happyReduce_59 action_22 (44) = happyShift action_42 action_22 (46) = happyShift action_43 action_22 (48) = happyShift action_32 action_22 (49) = happyShift action_33 action_22 (58) = happyShift action_34 action_22 (59) = happyShift action_35 action_22 (60) = happyShift action_36 action_22 (62) = happyShift action_44 action_22 (16) = happyGoto action_25 action_22 (17) = happyGoto action_26 action_22 (18) = happyGoto action_27 action_22 (20) = happyGoto action_38 action_22 (27) = happyGoto action_39 action_22 (28) = happyGoto action_77 action_22 (29) = happyGoto action_41 action_22 _ = happyReduce_44 action_23 (66) = happyAccept action_23 _ = happyFail (happyExpListPerState 23) action_24 (35) = happyShift action_15 action_24 (39) = happyShift action_16 action_24 (33) = happyGoto action_13 action_24 (34) = happyGoto action_76 action_24 _ = happyReduce_62 action_25 _ = happyReduce_49 action_26 _ = happyReduce_50 action_27 _ = happyReduce_51 action_28 _ = happyReduce_52 action_29 (66) = happyAccept action_29 _ = happyFail (happyExpListPerState 29) action_30 _ = happyReduce_53 action_31 _ = happyReduce_54 action_32 _ = happyReduce_48 action_33 _ = happyReduce_47 action_34 _ = happyReduce_13 action_35 _ = happyReduce_14 action_36 _ = happyReduce_15 action_37 (66) = happyAccept action_37 _ = happyFail (happyExpListPerState 37) action_38 _ = happyReduce_42 action_39 (38) = happyShift action_75 action_39 _ = happyReduce_45 action_40 (66) = happyAccept action_40 _ = happyFail (happyExpListPerState 40) action_41 (50) = happyShift action_74 action_41 _ = happyFail (happyExpListPerState 41) action_42 (55) = happyShift action_73 action_42 _ = happyFail (happyExpListPerState 42) action_43 (55) = happyShift action_72 action_43 _ = happyFail (happyExpListPerState 43) action_44 _ = happyReduce_17 action_45 (66) = happyAccept action_45 _ = happyFail (happyExpListPerState 45) action_46 _ = happyReduce_34 action_47 (35) = happyShift action_71 action_47 _ = happyFail (happyExpListPerState 47) action_48 (35) = happyShift action_67 action_48 (37) = happyShift action_68 action_48 (39) = happyShift action_69 action_48 (40) = happyShift action_70 action_48 (66) = happyAccept action_48 _ = happyFail (happyExpListPerState 48) action_49 _ = happyReduce_30 action_50 _ = happyReduce_31 action_51 _ = happyReduce_32 action_52 (44) = happyShift action_42 action_52 (46) = happyShift action_43 action_52 (48) = happyShift action_32 action_52 (49) = happyShift action_33 action_52 (58) = happyShift action_34 action_52 (59) = happyShift action_35 action_52 (60) = happyShift action_36 action_52 (62) = happyShift action_44 action_52 (16) = happyGoto action_25 action_52 (17) = happyGoto action_26 action_52 (18) = happyGoto action_27 action_52 (20) = happyGoto action_38 action_52 (27) = happyGoto action_39 action_52 (28) = happyGoto action_66 action_52 (29) = happyGoto action_41 action_52 _ = happyReduce_44 action_53 _ = happyReduce_18 action_54 _ = happyReduce_20 action_55 _ = happyReduce_22 action_56 _ = happyReduce_23 action_57 _ = happyReduce_24 action_58 _ = happyReduce_25 action_59 _ = happyReduce_26 action_60 (66) = happyAccept action_60 _ = happyFail (happyExpListPerState 60) action_61 _ = happyReduce_16 action_62 _ = happyReduce_19 action_63 (66) = happyAccept action_63 _ = happyFail (happyExpListPerState 63) action_64 (53) = happyShift action_65 action_64 _ = happyFail (happyExpListPerState 64) action_65 (44) = happyShift action_42 action_65 (46) = happyShift action_43 action_65 (48) = happyShift action_32 action_65 (49) = happyShift action_33 action_65 (58) = happyShift action_34 action_65 (59) = happyShift action_35 action_65 (60) = happyShift action_36 action_65 (62) = happyShift action_44 action_65 (16) = happyGoto action_25 action_65 (17) = happyGoto action_26 action_65 (18) = happyGoto action_27 action_65 (20) = happyGoto action_38 action_65 (27) = happyGoto action_39 action_65 (28) = happyGoto action_97 action_65 (29) = happyGoto action_41 action_65 _ = happyReduce_44 action_66 (54) = happyShift action_96 action_66 _ = happyFail (happyExpListPerState 66) action_67 (44) = happyShift action_42 action_67 (46) = happyShift action_43 action_67 (48) = happyShift action_32 action_67 (49) = happyShift action_33 action_67 (58) = happyShift action_34 action_67 (59) = happyShift action_35 action_67 (60) = happyShift action_36 action_67 (62) = happyShift action_44 action_67 (16) = happyGoto action_25 action_67 (17) = happyGoto action_26 action_67 (18) = happyGoto action_27 action_67 (20) = happyGoto action_38 action_67 (27) = happyGoto action_39 action_67 (28) = happyGoto action_95 action_67 (29) = happyGoto action_41 action_67 _ = happyReduce_44 action_68 (61) = happyShift action_61 action_68 (19) = happyGoto action_94 action_68 _ = happyFail (happyExpListPerState 68) action_69 (48) = happyShift action_32 action_69 (49) = happyShift action_33 action_69 (58) = happyShift action_34 action_69 (59) = happyShift action_35 action_69 (60) = happyShift action_36 action_69 (16) = happyGoto action_25 action_69 (17) = happyGoto action_26 action_69 (18) = happyGoto action_27 action_69 (29) = happyGoto action_93 action_69 _ = happyFail (happyExpListPerState 69) action_70 (47) = happyShift action_92 action_70 _ = happyFail (happyExpListPerState 70) action_71 (45) = happyShift action_49 action_71 (47) = happyShift action_50 action_71 (52) = happyShift action_51 action_71 (53) = happyShift action_52 action_71 (63) = happyShift action_53 action_71 (65) = happyShift action_54 action_71 (21) = happyGoto action_46 action_71 (23) = happyGoto action_47 action_71 (26) = happyGoto action_91 action_71 _ = happyFail (happyExpListPerState 71) action_72 (57) = happyShift action_90 action_72 (15) = happyGoto action_89 action_72 _ = happyFail (happyExpListPerState 72) action_73 (51) = happyShift action_88 action_73 (56) = happyShift action_12 action_73 (64) = happyShift action_62 action_73 (14) = happyGoto action_86 action_73 (22) = happyGoto action_87 action_73 _ = happyFail (happyExpListPerState 73) action_74 (45) = happyShift action_49 action_74 (47) = happyShift action_50 action_74 (51) = happyShift action_85 action_74 (52) = happyShift action_51 action_74 (53) = happyShift action_52 action_74 (63) = happyShift action_53 action_74 (65) = happyShift action_54 action_74 (21) = happyGoto action_46 action_74 (23) = happyGoto action_47 action_74 (26) = happyGoto action_84 action_74 _ = happyFail (happyExpListPerState 74) action_75 (44) = happyShift action_42 action_75 (46) = happyShift action_43 action_75 (48) = happyShift action_32 action_75 (49) = happyShift action_33 action_75 (58) = happyShift action_34 action_75 (59) = happyShift action_35 action_75 (60) = happyShift action_36 action_75 (62) = happyShift action_44 action_75 (16) = happyGoto action_25 action_75 (17) = happyGoto action_26 action_75 (18) = happyGoto action_27 action_75 (20) = happyGoto action_38 action_75 (27) = happyGoto action_39 action_75 (28) = happyGoto action_83 action_75 (29) = happyGoto action_41 action_75 _ = happyReduce_44 action_76 _ = happyReduce_55 action_77 (54) = happyShift action_82 action_77 _ = happyFail (happyExpListPerState 77) action_78 _ = happyReduce_61 action_79 (36) = happyShift action_81 action_79 _ = happyFail (happyExpListPerState 79) action_80 _ = happyReduce_63 action_81 _ = happyReduce_60 action_82 _ = happyReduce_56 action_83 _ = happyReduce_46 action_84 (35) = happyShift action_67 action_84 (37) = happyShift action_68 action_84 (39) = happyShift action_69 action_84 (40) = happyShift action_70 action_84 _ = happyReduce_37 action_85 _ = happyReduce_38 action_86 _ = happyReduce_39 action_87 _ = happyReduce_43 action_88 _ = happyReduce_40 action_89 _ = happyReduce_41 action_90 _ = happyReduce_12 action_91 (35) = happyShift action_67 action_91 (36) = happyShift action_101 action_91 (37) = happyShift action_68 action_91 (39) = happyShift action_69 action_91 (40) = happyShift action_70 action_91 _ = happyFail (happyExpListPerState 91) action_92 (50) = happyShift action_100 action_92 _ = happyFail (happyExpListPerState 92) action_93 _ = happyReduce_29 action_94 _ = happyReduce_35 action_95 (36) = happyShift action_99 action_95 _ = happyFail (happyExpListPerState 95) action_96 _ = happyReduce_27 action_97 (54) = happyShift action_98 action_97 _ = happyFail (happyExpListPerState 97) action_98 (43) = happyShift action_103 action_98 _ = happyFail (happyExpListPerState 98) action_99 _ = happyReduce_28 action_100 (45) = happyShift action_49 action_100 (47) = happyShift action_50 action_100 (52) = happyShift action_51 action_100 (53) = happyShift action_52 action_100 (63) = happyShift action_53 action_100 (65) = happyShift action_54 action_100 (21) = happyGoto action_46 action_100 (23) = happyGoto action_47 action_100 (26) = happyGoto action_102 action_100 _ = happyFail (happyExpListPerState 100) action_101 _ = happyReduce_36 action_102 (35) = happyShift action_67 action_102 (37) = happyShift action_68 action_102 (39) = happyShift action_69 action_102 (40) = happyShift action_70 action_102 (41) = happyShift action_104 action_102 _ = happyFail (happyExpListPerState 102) action_103 _ = happyReduce_21 action_104 _ = happyReduce_33 happyReduce_11 = happySpecReduce_1 14 happyReduction_11 happyReduction_11 (HappyTerminal (PT _ (T_Bytes happy_var_1))) = HappyAbsSyn14 (Language.EO.Phi.Syntax.Abs.Bytes happy_var_1 ) happyReduction_11 _ = notHappyAtAll happyReduce_12 = happySpecReduce_1 15 happyReduction_12 happyReduction_12 (HappyTerminal (PT _ (T_Function happy_var_1))) = HappyAbsSyn15 (Language.EO.Phi.Syntax.Abs.Function happy_var_1 ) happyReduction_12 _ = notHappyAtAll happyReduce_13 = happySpecReduce_1 16 happyReduction_13 happyReduction_13 (HappyTerminal (PT _ (T_LabelId happy_var_1))) = HappyAbsSyn16 (Language.EO.Phi.Syntax.Abs.LabelId happy_var_1 ) happyReduction_13 _ = notHappyAtAll happyReduce_14 = happySpecReduce_1 17 happyReduction_14 happyReduction_14 (HappyTerminal (PT _ (T_AlphaIndex happy_var_1))) = HappyAbsSyn17 (Language.EO.Phi.Syntax.Abs.AlphaIndex happy_var_1 ) happyReduction_14 _ = notHappyAtAll happyReduce_15 = happySpecReduce_1 18 happyReduction_15 happyReduction_15 (HappyTerminal (PT _ (T_LabelMetaId happy_var_1))) = HappyAbsSyn18 (Language.EO.Phi.Syntax.Abs.LabelMetaId happy_var_1 ) happyReduction_15 _ = notHappyAtAll happyReduce_16 = happySpecReduce_1 19 happyReduction_16 happyReduction_16 (HappyTerminal (PT _ (T_TailMetaId happy_var_1))) = HappyAbsSyn19 (Language.EO.Phi.Syntax.Abs.TailMetaId happy_var_1 ) happyReduction_16 _ = notHappyAtAll happyReduce_17 = happySpecReduce_1 20 happyReduction_17 happyReduction_17 (HappyTerminal (PT _ (T_BindingsMetaId happy_var_1))) = HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.BindingsMetaId happy_var_1 ) happyReduction_17 _ = notHappyAtAll happyReduce_18 = happySpecReduce_1 21 happyReduction_18 happyReduction_18 (HappyTerminal (PT _ (T_ObjectMetaId happy_var_1))) = HappyAbsSyn21 (Language.EO.Phi.Syntax.Abs.ObjectMetaId happy_var_1 ) happyReduction_18 _ = notHappyAtAll happyReduce_19 = happySpecReduce_1 22 happyReduction_19 happyReduction_19 (HappyTerminal (PT _ (T_BytesMetaId happy_var_1))) = HappyAbsSyn22 (Language.EO.Phi.Syntax.Abs.BytesMetaId happy_var_1 ) happyReduction_19 _ = notHappyAtAll happyReduce_20 = happySpecReduce_1 23 happyReduction_20 happyReduction_20 (HappyTerminal (PT _ (T_MetaFunctionName happy_var_1))) = HappyAbsSyn23 (Language.EO.Phi.Syntax.Abs.MetaFunctionName happy_var_1 ) happyReduction_20 _ = notHappyAtAll happyReduce_21 = happyReduce 5 24 happyReduction_21 happyReduction_21 (_ `HappyStk` _ `HappyStk` (HappyAbsSyn28 happy_var_3) `HappyStk` _ `HappyStk` _ `HappyStk` happyRest) = HappyAbsSyn24 (Language.EO.Phi.Syntax.Abs.Program happy_var_3 ) `HappyStk` happyRest happyReduce_22 = happySpecReduce_1 25 happyReduction_22 happyReduction_22 (HappyAbsSyn18 happy_var_1) = HappyAbsSyn25 (Language.EO.Phi.Syntax.Abs.MetaIdLabel happy_var_1 ) happyReduction_22 _ = notHappyAtAll happyReduce_23 = happySpecReduce_1 25 happyReduction_23 happyReduction_23 (HappyAbsSyn19 happy_var_1) = HappyAbsSyn25 (Language.EO.Phi.Syntax.Abs.MetaIdTail happy_var_1 ) happyReduction_23 _ = notHappyAtAll happyReduce_24 = happySpecReduce_1 25 happyReduction_24 happyReduction_24 (HappyAbsSyn20 happy_var_1) = HappyAbsSyn25 (Language.EO.Phi.Syntax.Abs.MetaIdBindings happy_var_1 ) happyReduction_24 _ = notHappyAtAll happyReduce_25 = happySpecReduce_1 25 happyReduction_25 happyReduction_25 (HappyAbsSyn21 happy_var_1) = HappyAbsSyn25 (Language.EO.Phi.Syntax.Abs.MetaIdObject happy_var_1 ) happyReduction_25 _ = notHappyAtAll happyReduce_26 = happySpecReduce_1 25 happyReduction_26 happyReduction_26 (HappyAbsSyn22 happy_var_1) = HappyAbsSyn25 (Language.EO.Phi.Syntax.Abs.MetaIdBytes happy_var_1 ) happyReduction_26 _ = notHappyAtAll happyReduce_27 = happySpecReduce_3 26 happyReduction_27 happyReduction_27 _ (HappyAbsSyn28 happy_var_2) _ = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.Formation happy_var_2 ) happyReduction_27 _ _ _ = notHappyAtAll happyReduce_28 = happyReduce 4 26 happyReduction_28 happyReduction_28 (_ `HappyStk` (HappyAbsSyn28 happy_var_3) `HappyStk` _ `HappyStk` (HappyAbsSyn26 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.Application happy_var_1 happy_var_3 ) `HappyStk` happyRest happyReduce_29 = happySpecReduce_3 26 happyReduction_29 happyReduction_29 (HappyAbsSyn29 happy_var_3) _ (HappyAbsSyn26 happy_var_1) = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.ObjectDispatch happy_var_1 happy_var_3 ) happyReduction_29 _ _ _ = notHappyAtAll happyReduce_30 = happySpecReduce_1 26 happyReduction_30 happyReduction_30 _ = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.GlobalObject ) happyReduce_31 = happySpecReduce_1 26 happyReduction_31 happyReduction_31 _ = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.ThisObject ) happyReduce_32 = happySpecReduce_1 26 happyReduction_32 happyReduction_32 _ = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.Termination ) happyReduce_33 = happyReduce 6 26 happyReduction_33 happyReduction_33 (_ `HappyStk` (HappyAbsSyn26 happy_var_5) `HappyStk` _ `HappyStk` _ `HappyStk` _ `HappyStk` (HappyAbsSyn26 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.MetaSubstThis happy_var_1 happy_var_5 ) `HappyStk` happyRest happyReduce_34 = happySpecReduce_1 26 happyReduction_34 happyReduction_34 (HappyAbsSyn21 happy_var_1) = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.MetaObject happy_var_1 ) happyReduction_34 _ = notHappyAtAll happyReduce_35 = happySpecReduce_3 26 happyReduction_35 happyReduction_35 (HappyAbsSyn19 happy_var_3) _ (HappyAbsSyn26 happy_var_1) = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.MetaTailContext happy_var_1 happy_var_3 ) happyReduction_35 _ _ _ = notHappyAtAll happyReduce_36 = happyReduce 4 26 happyReduction_36 happyReduction_36 (_ `HappyStk` (HappyAbsSyn26 happy_var_3) `HappyStk` _ `HappyStk` (HappyAbsSyn23 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.MetaFunction happy_var_1 happy_var_3 ) `HappyStk` happyRest happyReduce_37 = happySpecReduce_3 27 happyReduction_37 happyReduction_37 (HappyAbsSyn26 happy_var_3) _ (HappyAbsSyn29 happy_var_1) = HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.AlphaBinding happy_var_1 happy_var_3 ) happyReduction_37 _ _ _ = notHappyAtAll happyReduce_38 = happySpecReduce_3 27 happyReduction_38 happyReduction_38 _ _ (HappyAbsSyn29 happy_var_1) = HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.EmptyBinding happy_var_1 ) happyReduction_38 _ _ _ = notHappyAtAll happyReduce_39 = happySpecReduce_3 27 happyReduction_39 happyReduction_39 (HappyAbsSyn14 happy_var_3) _ _ = HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.DeltaBinding happy_var_3 ) happyReduction_39 _ _ _ = notHappyAtAll happyReduce_40 = happySpecReduce_3 27 happyReduction_40 happyReduction_40 _ _ _ = HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.DeltaEmptyBinding ) happyReduce_41 = happySpecReduce_3 27 happyReduction_41 happyReduction_41 (HappyAbsSyn15 happy_var_3) _ _ = HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.LambdaBinding happy_var_3 ) happyReduction_41 _ _ _ = notHappyAtAll happyReduce_42 = happySpecReduce_1 27 happyReduction_42 happyReduction_42 (HappyAbsSyn20 happy_var_1) = HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.MetaBindings happy_var_1 ) happyReduction_42 _ = notHappyAtAll happyReduce_43 = happySpecReduce_3 27 happyReduction_43 happyReduction_43 (HappyAbsSyn22 happy_var_3) _ _ = HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.MetaDeltaBinding happy_var_3 ) happyReduction_43 _ _ _ = notHappyAtAll happyReduce_44 = happySpecReduce_0 28 happyReduction_44 happyReduction_44 = HappyAbsSyn28 ([] ) happyReduce_45 = happySpecReduce_1 28 happyReduction_45 happyReduction_45 (HappyAbsSyn27 happy_var_1) = HappyAbsSyn28 ((:[]) happy_var_1 ) happyReduction_45 _ = notHappyAtAll happyReduce_46 = happySpecReduce_3 28 happyReduction_46 happyReduction_46 (HappyAbsSyn28 happy_var_3) _ (HappyAbsSyn27 happy_var_1) = HappyAbsSyn28 ((:) happy_var_1 happy_var_3 ) happyReduction_46 _ _ _ = notHappyAtAll happyReduce_47 = happySpecReduce_1 29 happyReduction_47 happyReduction_47 _ = HappyAbsSyn29 (Language.EO.Phi.Syntax.Abs.Phi ) happyReduce_48 = happySpecReduce_1 29 happyReduction_48 happyReduction_48 _ = HappyAbsSyn29 (Language.EO.Phi.Syntax.Abs.Rho ) happyReduce_49 = happySpecReduce_1 29 happyReduction_49 happyReduction_49 (HappyAbsSyn16 happy_var_1) = HappyAbsSyn29 (Language.EO.Phi.Syntax.Abs.Label happy_var_1 ) happyReduction_49 _ = notHappyAtAll happyReduce_50 = happySpecReduce_1 29 happyReduction_50 happyReduction_50 (HappyAbsSyn17 happy_var_1) = HappyAbsSyn29 (Language.EO.Phi.Syntax.Abs.Alpha happy_var_1 ) happyReduction_50 _ = notHappyAtAll happyReduce_51 = happySpecReduce_1 29 happyReduction_51 happyReduction_51 (HappyAbsSyn18 happy_var_1) = HappyAbsSyn29 (Language.EO.Phi.Syntax.Abs.MetaAttr happy_var_1 ) happyReduction_51 _ = notHappyAtAll happyReduce_52 = happySpecReduce_1 30 happyReduction_52 happyReduction_52 (HappyAbsSyn29 happy_var_1) = HappyAbsSyn30 (Language.EO.Phi.Syntax.Abs.ObjectAttr happy_var_1 ) happyReduction_52 _ = notHappyAtAll happyReduce_53 = happySpecReduce_1 30 happyReduction_53 happyReduction_53 _ = HappyAbsSyn30 (Language.EO.Phi.Syntax.Abs.DeltaAttr ) happyReduce_54 = happySpecReduce_1 30 happyReduction_54 happyReduction_54 _ = HappyAbsSyn30 (Language.EO.Phi.Syntax.Abs.LambdaAttr ) happyReduce_55 = happySpecReduce_2 31 happyReduction_55 happyReduction_55 (HappyAbsSyn34 happy_var_2) (HappyAbsSyn32 happy_var_1) = HappyAbsSyn31 (Language.EO.Phi.Syntax.Abs.PeeledObject happy_var_1 happy_var_2 ) happyReduction_55 _ _ = notHappyAtAll happyReduce_56 = happySpecReduce_3 32 happyReduction_56 happyReduction_56 _ (HappyAbsSyn28 happy_var_2) _ = HappyAbsSyn32 (Language.EO.Phi.Syntax.Abs.HeadFormation happy_var_2 ) happyReduction_56 _ _ _ = notHappyAtAll happyReduce_57 = happySpecReduce_1 32 happyReduction_57 happyReduction_57 _ = HappyAbsSyn32 (Language.EO.Phi.Syntax.Abs.HeadGlobal ) happyReduce_58 = happySpecReduce_1 32 happyReduction_58 happyReduction_58 _ = HappyAbsSyn32 (Language.EO.Phi.Syntax.Abs.HeadThis ) happyReduce_59 = happySpecReduce_1 32 happyReduction_59 happyReduction_59 _ = HappyAbsSyn32 (Language.EO.Phi.Syntax.Abs.HeadTermination ) happyReduce_60 = happySpecReduce_3 33 happyReduction_60 happyReduction_60 _ (HappyAbsSyn28 happy_var_2) _ = HappyAbsSyn33 (Language.EO.Phi.Syntax.Abs.ActionApplication happy_var_2 ) happyReduction_60 _ _ _ = notHappyAtAll happyReduce_61 = happySpecReduce_2 33 happyReduction_61 happyReduction_61 (HappyAbsSyn29 happy_var_2) _ = HappyAbsSyn33 (Language.EO.Phi.Syntax.Abs.ActionDispatch happy_var_2 ) happyReduction_61 _ _ = notHappyAtAll happyReduce_62 = happySpecReduce_0 34 happyReduction_62 happyReduction_62 = HappyAbsSyn34 ([] ) happyReduce_63 = happySpecReduce_2 34 happyReduction_63 happyReduction_63 (HappyAbsSyn34 happy_var_2) (HappyAbsSyn33 happy_var_1) = HappyAbsSyn34 ((:) happy_var_1 happy_var_2 ) happyReduction_63 _ _ = notHappyAtAll happyNewToken action sts stk [] = action 66 66 notHappyAtAll (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 { PT _ (TS _ 1) -> cont 35; PT _ (TS _ 2) -> cont 36; PT _ (TS _ 3) -> cont 37; PT _ (TS _ 4) -> cont 38; PT _ (TS _ 5) -> cont 39; PT _ (TS _ 6) -> cont 40; PT _ (TS _ 7) -> cont 41; PT _ (TS _ 8) -> cont 42; PT _ (TS _ 9) -> cont 43; PT _ (TS _ 10) -> cont 44; PT _ (TS _ 11) -> cont 45; PT _ (TS _ 12) -> cont 46; PT _ (TS _ 13) -> cont 47; PT _ (TS _ 14) -> cont 48; PT _ (TS _ 15) -> cont 49; PT _ (TS _ 16) -> cont 50; PT _ (TS _ 17) -> cont 51; PT _ (TS _ 18) -> cont 52; PT _ (TS _ 19) -> cont 53; PT _ (TS _ 20) -> cont 54; PT _ (TS _ 21) -> cont 55; PT _ (T_Bytes happy_dollar_dollar) -> cont 56; PT _ (T_Function happy_dollar_dollar) -> cont 57; PT _ (T_LabelId happy_dollar_dollar) -> cont 58; PT _ (T_AlphaIndex happy_dollar_dollar) -> cont 59; PT _ (T_LabelMetaId happy_dollar_dollar) -> cont 60; PT _ (T_TailMetaId happy_dollar_dollar) -> cont 61; PT _ (T_BindingsMetaId happy_dollar_dollar) -> cont 62; PT _ (T_ObjectMetaId happy_dollar_dollar) -> cont 63; PT _ (T_BytesMetaId happy_dollar_dollar) -> cont 64; PT _ (T_MetaFunctionName happy_dollar_dollar) -> cont 65; _ -> happyError' ((tk:tks), []) } happyError_ explist 66 tk tks = happyError' (tks, explist) happyError_ explist _ tk tks = happyError' ((tk:tks), explist) happyThen :: () => Err a -> (a -> Err b) -> Err b happyThen = ((>>=)) happyReturn :: () => a -> Err a happyReturn = (return) happyThen1 m k tks = ((>>=)) m (\a -> k a tks) happyReturn1 :: () => a -> b -> Err a happyReturn1 = \a tks -> (return) a happyError' :: () => ([(Token)], [Prelude.String]) -> Err a happyError' = (\(tokens, _) -> happyError tokens) pProgram tks = happySomeParser where happySomeParser = happyThen (happyParse action_0 tks) (\x -> case x of {HappyAbsSyn24 z -> happyReturn z; _other -> notHappyAtAll }) pMetaId tks = happySomeParser where happySomeParser = happyThen (happyParse action_1 tks) (\x -> case x of {HappyAbsSyn25 z -> happyReturn z; _other -> notHappyAtAll }) pObject tks = happySomeParser where happySomeParser = happyThen (happyParse action_2 tks) (\x -> case x of {HappyAbsSyn26 z -> happyReturn z; _other -> notHappyAtAll }) pBinding tks = happySomeParser where happySomeParser = happyThen (happyParse action_3 tks) (\x -> case x of {HappyAbsSyn27 z -> happyReturn z; _other -> notHappyAtAll }) pListBinding tks = happySomeParser where happySomeParser = happyThen (happyParse action_4 tks) (\x -> case x of {HappyAbsSyn28 z -> happyReturn z; _other -> notHappyAtAll }) pAttribute tks = happySomeParser where happySomeParser = happyThen (happyParse action_5 tks) (\x -> case x of {HappyAbsSyn29 z -> happyReturn z; _other -> notHappyAtAll }) pRuleAttribute tks = happySomeParser where happySomeParser = happyThen (happyParse action_6 tks) (\x -> case x of {HappyAbsSyn30 z -> happyReturn z; _other -> notHappyAtAll }) pPeeledObject tks = happySomeParser where happySomeParser = happyThen (happyParse action_7 tks) (\x -> case x of {HappyAbsSyn31 z -> happyReturn z; _other -> notHappyAtAll }) pObjectHead tks = happySomeParser where happySomeParser = happyThen (happyParse action_8 tks) (\x -> case x of {HappyAbsSyn32 z -> happyReturn z; _other -> notHappyAtAll }) pObjectAction tks = happySomeParser where happySomeParser = happyThen (happyParse action_9 tks) (\x -> case x of {HappyAbsSyn33 z -> happyReturn z; _other -> notHappyAtAll }) pListObjectAction tks = happySomeParser where happySomeParser = happyThen (happyParse action_10 tks) (\x -> case x of {HappyAbsSyn34 z -> happyReturn z; _other -> notHappyAtAll }) happySeq = happyDontSeq type Err = Either String happyError :: [Token] -> Err a happyError ts = Left $ "syntax error at " ++ tokenPos ts ++ case ts of [] -> [] [Err _] -> " due to lexer error" t:_ -> " before `" ++ (prToken t) ++ "'" myLexer :: String -> [Token] myLexer = tokens {-# LINE 1 "templates/GenericTemplate.hs" #-} -- $Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp $ data Happy_IntList = HappyCons Prelude.Int Happy_IntList infixr 9 `HappyStk` data HappyStk a = HappyStk a (HappyStk a) ----------------------------------------------------------------------------- -- starting the parse happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll ----------------------------------------------------------------------------- -- Accepting the parse -- If the current token is ERROR_TOK, it means we've just accepted a partial -- parse (a %partial parser). We must ignore the saved token on the top of -- the stack in this case. happyAccept (1) tk st sts (_ `HappyStk` ans `HappyStk` _) = happyReturn1 ans happyAccept j tk st sts (HappyStk ans _) = (happyReturn1 ans) ----------------------------------------------------------------------------- -- Arrays only: do the next action indexShortOffAddr arr off = arr Happy_Data_Array.! off {-# INLINE happyLt #-} happyLt x y = (x Prelude.< y) readArrayBit arr bit = Bits.testBit (indexShortOffAddr arr (bit `Prelude.div` 16)) (bit `Prelude.mod` 16) ----------------------------------------------------------------------------- -- HappyState data type (not arrays) newtype HappyState b c = HappyState (Prelude.Int -> -- token number Prelude.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') = let r = fn v1 in happySeq r (action nt j tk st sts (r `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') = let r = fn v1 v2 in happySeq r (action nt j tk st sts (r `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') = let r = fn v1 v2 v3 in happySeq r (action nt j tk st sts (r `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 = case happyDrop (k Prelude.- ((1) :: Prelude.Int)) sts of sts1@(((st1@(HappyState (action))):(_))) -> let r = fn stk in -- it doesn't hurt to always seq here... happyDoSeq r (action nt j tk st1 sts1 r) happyMonadReduce k nt fn (1) tk st sts stk = happyFail [] (1) tk st sts stk happyMonadReduce k nt fn j tk st sts stk = case happyDrop k ((st):(sts)) of sts1@(((st1@(HappyState (action))):(_))) -> let drop_stk = happyDropStk k stk in happyThen1 (fn stk tk) (\r -> action nt j tk st1 sts1 (r `HappyStk` drop_stk)) happyMonad2Reduce k nt fn (1) tk st sts stk = happyFail [] (1) tk st sts stk happyMonad2Reduce k nt fn j tk st sts stk = case happyDrop k ((st):(sts)) of sts1@(((st1@(HappyState (action))):(_))) -> let drop_stk = happyDropStk k stk _ = nt :: Prelude.Int new_state = action in happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk)) happyDrop (0) l = l happyDrop n ((_):(t)) = happyDrop (n Prelude.- ((1) :: Prelude.Int)) t happyDropStk (0) l = l happyDropStk n (x `HappyStk` xs) = happyDropStk (n Prelude.- ((1)::Prelude.Int)) xs ----------------------------------------------------------------------------- -- Moving to a new state after a reduction happyGoto action j tk st = action j j tk (HappyState action) ----------------------------------------------------------------------------- -- Error recovery (ERROR_TOK is the error token) -- parse error if we are in recovery and we fail again happyFail explist (1) tk old_st _ stk@(x `HappyStk` _) = let i = (case x of { HappyErrorToken (i) -> i }) in -- trace "failing" $ happyError_ explist i tk {- 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 ERROR_TOK tk old_st CONS(HAPPYSTATE(action),sts) (saved_tok `HappyStk` _ `HappyStk` stk) = -- trace ("discarding state, depth " ++ show (length stk)) $ DO_ACTION(action,ERROR_TOK,tk,sts,(saved_tok`HappyStk`stk)) -} -- Enter error recovery: generate an error token, -- save the old token and carry on. happyFail explist 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 :: a notHappyAtAll = Prelude.error "Internal Happy error\n" ----------------------------------------------------------------------------- -- Hack to get the typechecker to accept our action functions ----------------------------------------------------------------------------- -- Seq-ing. If the --strict flag is given, then Happy emits -- happySeq = happyDoSeq -- otherwise it emits -- happySeq = happyDontSeq happyDoSeq, happyDontSeq :: a -> b -> b happyDoSeq a b = a `Prelude.seq` b happyDontSeq a b = b ----------------------------------------------------------------------------- -- 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.