{-# OPTIONS_GHC -w #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-} {-# LANGUAGE PatternSynonyms #-} module Language.EO.Phi.Syntax.Par ( happyError , myLexer , pProgram , 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 | HappyAbsSyn13 (Language.EO.Phi.Syntax.Abs.Bytes) | HappyAbsSyn14 (Language.EO.Phi.Syntax.Abs.Function) | HappyAbsSyn15 (Language.EO.Phi.Syntax.Abs.LabelId) | HappyAbsSyn16 (Language.EO.Phi.Syntax.Abs.AlphaIndex) | HappyAbsSyn17 (Language.EO.Phi.Syntax.Abs.MetaId) | HappyAbsSyn18 (Language.EO.Phi.Syntax.Abs.MetaFunctionName) | HappyAbsSyn19 (Language.EO.Phi.Syntax.Abs.Program) | HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.Object) | HappyAbsSyn21 (Language.EO.Phi.Syntax.Abs.Binding) | HappyAbsSyn22 ([Language.EO.Phi.Syntax.Abs.Binding]) | HappyAbsSyn23 (Language.EO.Phi.Syntax.Abs.Attribute) | HappyAbsSyn24 (Language.EO.Phi.Syntax.Abs.RuleAttribute) | HappyAbsSyn25 (Language.EO.Phi.Syntax.Abs.PeeledObject) | HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.ObjectHead) | HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.ObjectAction) | HappyAbsSyn28 ([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 :: () => 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_10, 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 :: () => ({-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,196) ([0,0,1,0,0,9216,6168,0,0,237,7,0,30336,896,0,0,49210,1,0,7584,224,0,8192,193,0,0,24720,0,0,144,0,0,18432,0,0,0,0,64,0,0,0,0,0,9,0,0,0,0,0,0,3792,112,0,16384,14343,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7584,224,0,0,0,0,8192,1,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,64,0,0,0,0,0,0,0,1,0,0,4096,0,0,0,8,0,0,0,0,0,0,0,0,32,0,0,36864,0,0,0,0,0,0,0,0,0,0,0,0,0,16384,49211,1,0,0,0,0,0,0,0,0,16384,0,0,46080,7171,0,0,8192,0,0,60672,1792,0,0,32884,3,0,1152,771,0,0,4096,0,0,8192,68,0,36864,24688,0,0,948,28,0,0,0,0,0,4096,0,0,0,0,0,512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45056,0,0,0,0,0,0,2048,0,0,0,0,0,0,0,1024,0,0,16,0,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_pObject","%start_pBinding","%start_pListBinding","%start_pAttribute","%start_pRuleAttribute","%start_pPeeledObject","%start_pObjectHead","%start_pObjectAction","%start_pListObjectAction","Bytes","Function","LabelId","AlphaIndex","MetaId","MetaFunctionName","Program","Object","Binding","ListBinding","Attribute","RuleAttribute","PeeledObject","ObjectHead","ObjectAction","ListObjectAction","'('","')'","','","'.'","'{'","'}'","'\916'","'\934'","'\955'","'\957'","'\958'","'\961'","'\963'","'\966'","'\8614'","'\8709'","'\8869'","'\10214'","'\10215'","'\10509'","L_Bytes","L_Function","L_LabelId","L_AlphaIndex","L_MetaId","L_MetaFunctionName","%eof"] bit_start = st Prelude.* 55 bit_end = (st Prelude.+ 1) Prelude.* 55 read_bit = readArrayBit happyExpList bits = Prelude.map read_bit [bit_start..bit_end Prelude.- 1] bits_indexed = Prelude.zip bits [0..54] token_strs_expected = Prelude.concatMap f bits_indexed f (Prelude.False, _) = [] f (Prelude.True, nr) = [token_strs Prelude.!! nr] action_0 (33) = happyShift action_55 action_0 (19) = happyGoto action_54 action_0 _ = happyFail (happyExpListPerState 0) action_1 (36) = happyShift action_49 action_1 (39) = happyShift action_50 action_1 (45) = happyShift action_51 action_1 (46) = happyShift action_52 action_1 (53) = happyShift action_37 action_1 (54) = happyShift action_53 action_1 (17) = happyGoto action_46 action_1 (18) = happyGoto action_47 action_1 (20) = happyGoto action_48 action_1 _ = happyFail (happyExpListPerState 1) action_2 (35) = happyShift action_43 action_2 (37) = happyShift action_44 action_2 (38) = happyShift action_31 action_2 (40) = happyShift action_32 action_2 (41) = happyShift action_33 action_2 (42) = happyShift action_34 action_2 (51) = happyShift action_35 action_2 (52) = happyShift action_36 action_2 (53) = happyShift action_37 action_2 (15) = happyGoto action_24 action_2 (16) = happyGoto action_25 action_2 (17) = happyGoto action_39 action_2 (21) = happyGoto action_45 action_2 (23) = happyGoto action_42 action_2 _ = happyFail (happyExpListPerState 2) action_3 (35) = happyShift action_43 action_3 (37) = happyShift action_44 action_3 (38) = happyShift action_31 action_3 (40) = happyShift action_32 action_3 (41) = happyShift action_33 action_3 (42) = happyShift action_34 action_3 (51) = happyShift action_35 action_3 (52) = happyShift action_36 action_3 (53) = happyShift action_37 action_3 (15) = happyGoto action_24 action_3 (16) = happyGoto action_25 action_3 (17) = happyGoto action_39 action_3 (21) = happyGoto action_40 action_3 (22) = happyGoto action_41 action_3 (23) = happyGoto action_42 action_3 _ = happyReduce_32 action_4 (38) = happyShift action_31 action_4 (40) = happyShift action_32 action_4 (41) = happyShift action_33 action_4 (42) = happyShift action_34 action_4 (51) = happyShift action_35 action_4 (52) = happyShift action_36 action_4 (53) = happyShift action_37 action_4 (15) = happyGoto action_24 action_4 (16) = happyGoto action_25 action_4 (17) = happyGoto action_26 action_4 (23) = happyGoto action_38 action_4 _ = happyFail (happyExpListPerState 4) action_5 (35) = happyShift action_29 action_5 (37) = happyShift action_30 action_5 (38) = happyShift action_31 action_5 (40) = happyShift action_32 action_5 (41) = happyShift action_33 action_5 (42) = happyShift action_34 action_5 (51) = happyShift action_35 action_5 (52) = happyShift action_36 action_5 (53) = happyShift action_37 action_5 (15) = happyGoto action_24 action_5 (16) = happyGoto action_25 action_5 (17) = happyGoto action_26 action_5 (23) = happyGoto action_27 action_5 (24) = happyGoto action_28 action_5 _ = happyFail (happyExpListPerState 5) action_6 (36) = happyShift action_18 action_6 (39) = happyShift action_19 action_6 (45) = happyShift action_20 action_6 (46) = happyShift action_21 action_6 (25) = happyGoto action_22 action_6 (26) = happyGoto action_23 action_6 _ = happyFail (happyExpListPerState 6) action_7 (36) = happyShift action_18 action_7 (39) = happyShift action_19 action_7 (45) = happyShift action_20 action_7 (46) = happyShift action_21 action_7 (26) = happyGoto action_17 action_7 _ = happyFail (happyExpListPerState 7) action_8 (29) = happyShift action_14 action_8 (32) = happyShift action_15 action_8 (27) = happyGoto action_16 action_8 _ = happyFail (happyExpListPerState 8) action_9 (29) = happyShift action_14 action_9 (32) = happyShift action_15 action_9 (27) = happyGoto action_12 action_9 (28) = happyGoto action_13 action_9 _ = happyReduce_52 action_10 (49) = happyShift action_11 action_10 _ = happyFail (happyExpListPerState 10) action_11 _ = happyReduce_10 action_12 (29) = happyShift action_14 action_12 (32) = happyShift action_15 action_12 (27) = happyGoto action_12 action_12 (28) = happyGoto action_69 action_12 _ = happyReduce_52 action_13 (55) = happyAccept action_13 _ = happyFail (happyExpListPerState 13) action_14 (35) = happyShift action_43 action_14 (37) = happyShift action_44 action_14 (38) = happyShift action_31 action_14 (40) = happyShift action_32 action_14 (41) = happyShift action_33 action_14 (42) = happyShift action_34 action_14 (51) = happyShift action_35 action_14 (52) = happyShift action_36 action_14 (53) = happyShift action_37 action_14 (15) = happyGoto action_24 action_14 (16) = happyGoto action_25 action_14 (17) = happyGoto action_39 action_14 (21) = happyGoto action_40 action_14 (22) = happyGoto action_68 action_14 (23) = happyGoto action_42 action_14 _ = happyReduce_32 action_15 (38) = happyShift action_31 action_15 (40) = happyShift action_32 action_15 (41) = happyShift action_33 action_15 (42) = happyShift action_34 action_15 (51) = happyShift action_35 action_15 (52) = happyShift action_36 action_15 (53) = happyShift action_37 action_15 (15) = happyGoto action_24 action_15 (16) = happyGoto action_25 action_15 (17) = happyGoto action_26 action_15 (23) = happyGoto action_67 action_15 _ = happyFail (happyExpListPerState 15) action_16 (55) = happyAccept action_16 _ = happyFail (happyExpListPerState 16) action_17 (55) = happyAccept action_17 _ = happyFail (happyExpListPerState 17) action_18 _ = happyReduce_47 action_19 _ = happyReduce_48 action_20 _ = happyReduce_49 action_21 (35) = happyShift action_43 action_21 (37) = happyShift action_44 action_21 (38) = happyShift action_31 action_21 (40) = happyShift action_32 action_21 (41) = happyShift action_33 action_21 (42) = happyShift action_34 action_21 (51) = happyShift action_35 action_21 (52) = happyShift action_36 action_21 (53) = happyShift action_37 action_21 (15) = happyGoto action_24 action_21 (16) = happyGoto action_25 action_21 (17) = happyGoto action_39 action_21 (21) = happyGoto action_40 action_21 (22) = happyGoto action_66 action_21 (23) = happyGoto action_42 action_21 _ = happyReduce_32 action_22 (55) = happyAccept action_22 _ = happyFail (happyExpListPerState 22) action_23 (29) = happyShift action_14 action_23 (32) = happyShift action_15 action_23 (27) = happyGoto action_12 action_23 (28) = happyGoto action_65 action_23 _ = happyReduce_52 action_24 _ = happyReduce_39 action_25 _ = happyReduce_40 action_26 _ = happyReduce_41 action_27 _ = happyReduce_42 action_28 (55) = happyAccept action_28 _ = happyFail (happyExpListPerState 28) action_29 _ = happyReduce_43 action_30 _ = happyReduce_44 action_31 _ = happyReduce_38 action_32 _ = happyReduce_36 action_33 _ = happyReduce_37 action_34 _ = happyReduce_35 action_35 _ = happyReduce_12 action_36 _ = happyReduce_13 action_37 _ = happyReduce_14 action_38 (55) = happyAccept action_38 _ = happyFail (happyExpListPerState 38) action_39 (43) = happyReduce_41 action_39 _ = happyReduce_30 action_40 (31) = happyShift action_64 action_40 _ = happyReduce_33 action_41 (55) = happyAccept action_41 _ = happyFail (happyExpListPerState 41) action_42 (43) = happyShift action_63 action_42 _ = happyFail (happyExpListPerState 42) action_43 (48) = happyShift action_62 action_43 _ = happyFail (happyExpListPerState 43) action_44 (48) = happyShift action_61 action_44 _ = happyFail (happyExpListPerState 44) action_45 (55) = happyAccept action_45 _ = happyFail (happyExpListPerState 45) action_46 _ = happyReduce_23 action_47 (29) = happyShift action_60 action_47 _ = happyFail (happyExpListPerState 47) action_48 (29) = happyShift action_58 action_48 (32) = happyShift action_59 action_48 (55) = happyAccept action_48 _ = happyFail (happyExpListPerState 48) action_49 _ = happyReduce_20 action_50 _ = happyReduce_21 action_51 _ = happyReduce_22 action_52 (35) = happyShift action_43 action_52 (37) = happyShift action_44 action_52 (38) = happyShift action_31 action_52 (40) = happyShift action_32 action_52 (41) = happyShift action_33 action_52 (42) = happyShift action_34 action_52 (51) = happyShift action_35 action_52 (52) = happyShift action_36 action_52 (53) = happyShift action_37 action_52 (15) = happyGoto action_24 action_52 (16) = happyGoto action_25 action_52 (17) = happyGoto action_39 action_52 (21) = happyGoto action_40 action_52 (22) = happyGoto action_57 action_52 (23) = happyGoto action_42 action_52 _ = happyReduce_32 action_53 _ = happyReduce_15 action_54 (55) = happyAccept action_54 _ = happyFail (happyExpListPerState 54) action_55 (46) = happyShift action_56 action_55 _ = happyFail (happyExpListPerState 55) action_56 (35) = happyShift action_43 action_56 (37) = happyShift action_44 action_56 (38) = happyShift action_31 action_56 (40) = happyShift action_32 action_56 (41) = happyShift action_33 action_56 (42) = happyShift action_34 action_56 (51) = happyShift action_35 action_56 (52) = happyShift action_36 action_56 (53) = happyShift action_37 action_56 (15) = happyGoto action_24 action_56 (16) = happyGoto action_25 action_56 (17) = happyGoto action_39 action_56 (21) = happyGoto action_40 action_56 (22) = happyGoto action_84 action_56 (23) = happyGoto action_42 action_56 _ = happyReduce_32 action_57 (47) = happyShift action_83 action_57 _ = happyFail (happyExpListPerState 57) action_58 (35) = happyShift action_43 action_58 (37) = happyShift action_44 action_58 (38) = happyShift action_31 action_58 (40) = happyShift action_32 action_58 (41) = happyShift action_33 action_58 (42) = happyShift action_34 action_58 (51) = happyShift action_35 action_58 (52) = happyShift action_36 action_58 (53) = happyShift action_37 action_58 (15) = happyGoto action_24 action_58 (16) = happyGoto action_25 action_58 (17) = happyGoto action_39 action_58 (21) = happyGoto action_40 action_58 (22) = happyGoto action_82 action_58 (23) = happyGoto action_42 action_58 _ = happyReduce_32 action_59 (38) = happyShift action_31 action_59 (40) = happyShift action_32 action_59 (41) = happyShift action_33 action_59 (42) = happyShift action_34 action_59 (51) = happyShift action_35 action_59 (52) = happyShift action_36 action_59 (53) = happyShift action_37 action_59 (15) = happyGoto action_24 action_59 (16) = happyGoto action_25 action_59 (17) = happyGoto action_26 action_59 (23) = happyGoto action_81 action_59 _ = happyFail (happyExpListPerState 59) action_60 (36) = happyShift action_49 action_60 (39) = happyShift action_50 action_60 (45) = happyShift action_51 action_60 (46) = happyShift action_52 action_60 (53) = happyShift action_37 action_60 (54) = happyShift action_53 action_60 (17) = happyGoto action_46 action_60 (18) = happyGoto action_47 action_60 (20) = happyGoto action_80 action_60 _ = happyFail (happyExpListPerState 60) action_61 (50) = happyShift action_79 action_61 (14) = happyGoto action_78 action_61 _ = happyFail (happyExpListPerState 61) action_62 (44) = happyShift action_77 action_62 (49) = happyShift action_11 action_62 (53) = happyShift action_37 action_62 (13) = happyGoto action_75 action_62 (17) = happyGoto action_76 action_62 _ = happyFail (happyExpListPerState 62) action_63 (36) = happyShift action_49 action_63 (39) = happyShift action_50 action_63 (44) = happyShift action_74 action_63 (45) = happyShift action_51 action_63 (46) = happyShift action_52 action_63 (53) = happyShift action_37 action_63 (54) = happyShift action_53 action_63 (17) = happyGoto action_46 action_63 (18) = happyGoto action_47 action_63 (20) = happyGoto action_73 action_63 _ = happyFail (happyExpListPerState 63) action_64 (35) = happyShift action_43 action_64 (37) = happyShift action_44 action_64 (38) = happyShift action_31 action_64 (40) = happyShift action_32 action_64 (41) = happyShift action_33 action_64 (42) = happyShift action_34 action_64 (51) = happyShift action_35 action_64 (52) = happyShift action_36 action_64 (53) = happyShift action_37 action_64 (15) = happyGoto action_24 action_64 (16) = happyGoto action_25 action_64 (17) = happyGoto action_39 action_64 (21) = happyGoto action_40 action_64 (22) = happyGoto action_72 action_64 (23) = happyGoto action_42 action_64 _ = happyReduce_32 action_65 _ = happyReduce_45 action_66 (47) = happyShift action_71 action_66 _ = happyFail (happyExpListPerState 66) action_67 _ = happyReduce_51 action_68 (30) = happyShift action_70 action_68 _ = happyFail (happyExpListPerState 68) action_69 _ = happyReduce_53 action_70 _ = happyReduce_50 action_71 _ = happyReduce_46 action_72 _ = happyReduce_34 action_73 (29) = happyShift action_58 action_73 (32) = happyShift action_59 action_73 _ = happyReduce_25 action_74 _ = happyReduce_26 action_75 _ = happyReduce_27 action_76 _ = happyReduce_31 action_77 _ = happyReduce_28 action_78 _ = happyReduce_29 action_79 _ = happyReduce_11 action_80 (29) = happyShift action_58 action_80 (30) = happyShift action_87 action_80 (32) = happyShift action_59 action_80 _ = happyFail (happyExpListPerState 80) action_81 _ = happyReduce_19 action_82 (30) = happyShift action_86 action_82 _ = happyFail (happyExpListPerState 82) action_83 _ = happyReduce_17 action_84 (47) = happyShift action_85 action_84 _ = happyFail (happyExpListPerState 84) action_85 (34) = happyShift action_88 action_85 _ = happyFail (happyExpListPerState 85) action_86 _ = happyReduce_18 action_87 _ = happyReduce_24 action_88 _ = happyReduce_16 happyReduce_10 = happySpecReduce_1 13 happyReduction_10 happyReduction_10 (HappyTerminal (PT _ (T_Bytes happy_var_1))) = HappyAbsSyn13 (Language.EO.Phi.Syntax.Abs.Bytes happy_var_1 ) happyReduction_10 _ = notHappyAtAll happyReduce_11 = happySpecReduce_1 14 happyReduction_11 happyReduction_11 (HappyTerminal (PT _ (T_Function happy_var_1))) = HappyAbsSyn14 (Language.EO.Phi.Syntax.Abs.Function happy_var_1 ) happyReduction_11 _ = notHappyAtAll happyReduce_12 = happySpecReduce_1 15 happyReduction_12 happyReduction_12 (HappyTerminal (PT _ (T_LabelId happy_var_1))) = HappyAbsSyn15 (Language.EO.Phi.Syntax.Abs.LabelId happy_var_1 ) happyReduction_12 _ = notHappyAtAll happyReduce_13 = happySpecReduce_1 16 happyReduction_13 happyReduction_13 (HappyTerminal (PT _ (T_AlphaIndex happy_var_1))) = HappyAbsSyn16 (Language.EO.Phi.Syntax.Abs.AlphaIndex happy_var_1 ) happyReduction_13 _ = notHappyAtAll happyReduce_14 = happySpecReduce_1 17 happyReduction_14 happyReduction_14 (HappyTerminal (PT _ (T_MetaId happy_var_1))) = HappyAbsSyn17 (Language.EO.Phi.Syntax.Abs.MetaId happy_var_1 ) happyReduction_14 _ = notHappyAtAll happyReduce_15 = happySpecReduce_1 18 happyReduction_15 happyReduction_15 (HappyTerminal (PT _ (T_MetaFunctionName happy_var_1))) = HappyAbsSyn18 (Language.EO.Phi.Syntax.Abs.MetaFunctionName happy_var_1 ) happyReduction_15 _ = notHappyAtAll happyReduce_16 = happyReduce 5 19 happyReduction_16 happyReduction_16 (_ `HappyStk` _ `HappyStk` (HappyAbsSyn22 happy_var_3) `HappyStk` _ `HappyStk` _ `HappyStk` happyRest) = HappyAbsSyn19 (Language.EO.Phi.Syntax.Abs.Program happy_var_3 ) `HappyStk` happyRest happyReduce_17 = happySpecReduce_3 20 happyReduction_17 happyReduction_17 _ (HappyAbsSyn22 happy_var_2) _ = HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.Formation happy_var_2 ) happyReduction_17 _ _ _ = notHappyAtAll happyReduce_18 = happyReduce 4 20 happyReduction_18 happyReduction_18 (_ `HappyStk` (HappyAbsSyn22 happy_var_3) `HappyStk` _ `HappyStk` (HappyAbsSyn20 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.Application happy_var_1 happy_var_3 ) `HappyStk` happyRest happyReduce_19 = happySpecReduce_3 20 happyReduction_19 happyReduction_19 (HappyAbsSyn23 happy_var_3) _ (HappyAbsSyn20 happy_var_1) = HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.ObjectDispatch happy_var_1 happy_var_3 ) happyReduction_19 _ _ _ = notHappyAtAll happyReduce_20 = happySpecReduce_1 20 happyReduction_20 happyReduction_20 _ = HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.GlobalObject ) happyReduce_21 = happySpecReduce_1 20 happyReduction_21 happyReduction_21 _ = HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.ThisObject ) happyReduce_22 = happySpecReduce_1 20 happyReduction_22 happyReduction_22 _ = HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.Termination ) happyReduce_23 = happySpecReduce_1 20 happyReduction_23 happyReduction_23 (HappyAbsSyn17 happy_var_1) = HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.MetaObject happy_var_1 ) happyReduction_23 _ = notHappyAtAll happyReduce_24 = happyReduce 4 20 happyReduction_24 happyReduction_24 (_ `HappyStk` (HappyAbsSyn20 happy_var_3) `HappyStk` _ `HappyStk` (HappyAbsSyn18 happy_var_1) `HappyStk` happyRest) = HappyAbsSyn20 (Language.EO.Phi.Syntax.Abs.MetaFunction happy_var_1 happy_var_3 ) `HappyStk` happyRest happyReduce_25 = happySpecReduce_3 21 happyReduction_25 happyReduction_25 (HappyAbsSyn20 happy_var_3) _ (HappyAbsSyn23 happy_var_1) = HappyAbsSyn21 (Language.EO.Phi.Syntax.Abs.AlphaBinding happy_var_1 happy_var_3 ) happyReduction_25 _ _ _ = notHappyAtAll happyReduce_26 = happySpecReduce_3 21 happyReduction_26 happyReduction_26 _ _ (HappyAbsSyn23 happy_var_1) = HappyAbsSyn21 (Language.EO.Phi.Syntax.Abs.EmptyBinding happy_var_1 ) happyReduction_26 _ _ _ = notHappyAtAll happyReduce_27 = happySpecReduce_3 21 happyReduction_27 happyReduction_27 (HappyAbsSyn13 happy_var_3) _ _ = HappyAbsSyn21 (Language.EO.Phi.Syntax.Abs.DeltaBinding happy_var_3 ) happyReduction_27 _ _ _ = notHappyAtAll happyReduce_28 = happySpecReduce_3 21 happyReduction_28 happyReduction_28 _ _ _ = HappyAbsSyn21 (Language.EO.Phi.Syntax.Abs.DeltaEmptyBinding ) happyReduce_29 = happySpecReduce_3 21 happyReduction_29 happyReduction_29 (HappyAbsSyn14 happy_var_3) _ _ = HappyAbsSyn21 (Language.EO.Phi.Syntax.Abs.LambdaBinding happy_var_3 ) happyReduction_29 _ _ _ = notHappyAtAll happyReduce_30 = happySpecReduce_1 21 happyReduction_30 happyReduction_30 (HappyAbsSyn17 happy_var_1) = HappyAbsSyn21 (Language.EO.Phi.Syntax.Abs.MetaBindings happy_var_1 ) happyReduction_30 _ = notHappyAtAll happyReduce_31 = happySpecReduce_3 21 happyReduction_31 happyReduction_31 (HappyAbsSyn17 happy_var_3) _ _ = HappyAbsSyn21 (Language.EO.Phi.Syntax.Abs.MetaDeltaBinding happy_var_3 ) happyReduction_31 _ _ _ = notHappyAtAll happyReduce_32 = happySpecReduce_0 22 happyReduction_32 happyReduction_32 = HappyAbsSyn22 ([] ) happyReduce_33 = happySpecReduce_1 22 happyReduction_33 happyReduction_33 (HappyAbsSyn21 happy_var_1) = HappyAbsSyn22 ((:[]) happy_var_1 ) happyReduction_33 _ = notHappyAtAll happyReduce_34 = happySpecReduce_3 22 happyReduction_34 happyReduction_34 (HappyAbsSyn22 happy_var_3) _ (HappyAbsSyn21 happy_var_1) = HappyAbsSyn22 ((:) happy_var_1 happy_var_3 ) happyReduction_34 _ _ _ = notHappyAtAll happyReduce_35 = happySpecReduce_1 23 happyReduction_35 happyReduction_35 _ = HappyAbsSyn23 (Language.EO.Phi.Syntax.Abs.Phi ) happyReduce_36 = happySpecReduce_1 23 happyReduction_36 happyReduction_36 _ = HappyAbsSyn23 (Language.EO.Phi.Syntax.Abs.Rho ) happyReduce_37 = happySpecReduce_1 23 happyReduction_37 happyReduction_37 _ = HappyAbsSyn23 (Language.EO.Phi.Syntax.Abs.Sigma ) happyReduce_38 = happySpecReduce_1 23 happyReduction_38 happyReduction_38 _ = HappyAbsSyn23 (Language.EO.Phi.Syntax.Abs.VTX ) happyReduce_39 = happySpecReduce_1 23 happyReduction_39 happyReduction_39 (HappyAbsSyn15 happy_var_1) = HappyAbsSyn23 (Language.EO.Phi.Syntax.Abs.Label happy_var_1 ) happyReduction_39 _ = notHappyAtAll happyReduce_40 = happySpecReduce_1 23 happyReduction_40 happyReduction_40 (HappyAbsSyn16 happy_var_1) = HappyAbsSyn23 (Language.EO.Phi.Syntax.Abs.Alpha happy_var_1 ) happyReduction_40 _ = notHappyAtAll happyReduce_41 = happySpecReduce_1 23 happyReduction_41 happyReduction_41 (HappyAbsSyn17 happy_var_1) = HappyAbsSyn23 (Language.EO.Phi.Syntax.Abs.MetaAttr happy_var_1 ) happyReduction_41 _ = notHappyAtAll happyReduce_42 = happySpecReduce_1 24 happyReduction_42 happyReduction_42 (HappyAbsSyn23 happy_var_1) = HappyAbsSyn24 (Language.EO.Phi.Syntax.Abs.ObjectAttr happy_var_1 ) happyReduction_42 _ = notHappyAtAll happyReduce_43 = happySpecReduce_1 24 happyReduction_43 happyReduction_43 _ = HappyAbsSyn24 (Language.EO.Phi.Syntax.Abs.DeltaAttr ) happyReduce_44 = happySpecReduce_1 24 happyReduction_44 happyReduction_44 _ = HappyAbsSyn24 (Language.EO.Phi.Syntax.Abs.LambdaAttr ) happyReduce_45 = happySpecReduce_2 25 happyReduction_45 happyReduction_45 (HappyAbsSyn28 happy_var_2) (HappyAbsSyn26 happy_var_1) = HappyAbsSyn25 (Language.EO.Phi.Syntax.Abs.PeeledObject happy_var_1 happy_var_2 ) happyReduction_45 _ _ = notHappyAtAll happyReduce_46 = happySpecReduce_3 26 happyReduction_46 happyReduction_46 _ (HappyAbsSyn22 happy_var_2) _ = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.HeadFormation happy_var_2 ) happyReduction_46 _ _ _ = notHappyAtAll happyReduce_47 = happySpecReduce_1 26 happyReduction_47 happyReduction_47 _ = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.HeadGlobal ) happyReduce_48 = happySpecReduce_1 26 happyReduction_48 happyReduction_48 _ = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.HeadThis ) happyReduce_49 = happySpecReduce_1 26 happyReduction_49 happyReduction_49 _ = HappyAbsSyn26 (Language.EO.Phi.Syntax.Abs.HeadTermination ) happyReduce_50 = happySpecReduce_3 27 happyReduction_50 happyReduction_50 _ (HappyAbsSyn22 happy_var_2) _ = HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.ActionApplication happy_var_2 ) happyReduction_50 _ _ _ = notHappyAtAll happyReduce_51 = happySpecReduce_2 27 happyReduction_51 happyReduction_51 (HappyAbsSyn23 happy_var_2) _ = HappyAbsSyn27 (Language.EO.Phi.Syntax.Abs.ActionDispatch happy_var_2 ) happyReduction_51 _ _ = notHappyAtAll happyReduce_52 = happySpecReduce_0 28 happyReduction_52 happyReduction_52 = HappyAbsSyn28 ([] ) happyReduce_53 = happySpecReduce_2 28 happyReduction_53 happyReduction_53 (HappyAbsSyn28 happy_var_2) (HappyAbsSyn27 happy_var_1) = HappyAbsSyn28 ((:) happy_var_1 happy_var_2 ) happyReduction_53 _ _ = notHappyAtAll happyNewToken action sts stk [] = action 55 55 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 29; PT _ (TS _ 2) -> cont 30; PT _ (TS _ 3) -> cont 31; PT _ (TS _ 4) -> cont 32; PT _ (TS _ 5) -> cont 33; PT _ (TS _ 6) -> cont 34; PT _ (TS _ 7) -> cont 35; PT _ (TS _ 8) -> cont 36; PT _ (TS _ 9) -> cont 37; PT _ (TS _ 10) -> cont 38; PT _ (TS _ 11) -> cont 39; PT _ (TS _ 12) -> cont 40; PT _ (TS _ 13) -> cont 41; PT _ (TS _ 14) -> cont 42; PT _ (TS _ 15) -> cont 43; PT _ (TS _ 16) -> cont 44; PT _ (TS _ 17) -> cont 45; PT _ (TS _ 18) -> cont 46; PT _ (TS _ 19) -> cont 47; PT _ (TS _ 20) -> cont 48; PT _ (T_Bytes happy_dollar_dollar) -> cont 49; PT _ (T_Function happy_dollar_dollar) -> cont 50; PT _ (T_LabelId happy_dollar_dollar) -> cont 51; PT _ (T_AlphaIndex happy_dollar_dollar) -> cont 52; PT _ (T_MetaId happy_dollar_dollar) -> cont 53; PT _ (T_MetaFunctionName happy_dollar_dollar) -> cont 54; _ -> happyError' ((tk:tks), []) } happyError_ explist 55 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 {HappyAbsSyn19 z -> happyReturn z; _other -> notHappyAtAll }) pObject tks = happySomeParser where happySomeParser = happyThen (happyParse action_1 tks) (\x -> case x of {HappyAbsSyn20 z -> happyReturn z; _other -> notHappyAtAll }) pBinding tks = happySomeParser where happySomeParser = happyThen (happyParse action_2 tks) (\x -> case x of {HappyAbsSyn21 z -> happyReturn z; _other -> notHappyAtAll }) pListBinding tks = happySomeParser where happySomeParser = happyThen (happyParse action_3 tks) (\x -> case x of {HappyAbsSyn22 z -> happyReturn z; _other -> notHappyAtAll }) pAttribute tks = happySomeParser where happySomeParser = happyThen (happyParse action_4 tks) (\x -> case x of {HappyAbsSyn23 z -> happyReturn z; _other -> notHappyAtAll }) pRuleAttribute tks = happySomeParser where happySomeParser = happyThen (happyParse action_5 tks) (\x -> case x of {HappyAbsSyn24 z -> happyReturn z; _other -> notHappyAtAll }) pPeeledObject tks = happySomeParser where happySomeParser = happyThen (happyParse action_6 tks) (\x -> case x of {HappyAbsSyn25 z -> happyReturn z; _other -> notHappyAtAll }) pObjectHead tks = happySomeParser where happySomeParser = happyThen (happyParse action_7 tks) (\x -> case x of {HappyAbsSyn26 z -> happyReturn z; _other -> notHappyAtAll }) pObjectAction tks = happySomeParser where happySomeParser = happyThen (happyParse action_8 tks) (\x -> case x of {HappyAbsSyn27 z -> happyReturn z; _other -> notHappyAtAll }) pListObjectAction tks = happySomeParser where happySomeParser = happyThen (happyParse action_9 tks) (\x -> case x of {HappyAbsSyn28 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.