From e6fd325d0752bf8446da0f5ccdb3ef12a1d4b2bd Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 15 Sep 2004 14:36:27 +0000 Subject: [PATCH] introducing multiple inheritance --- grammars/multiple/City.gf | 7 +++++ grammars/multiple/CityEng.gf | 5 ++++ grammars/multiple/Math.gf | 7 +++++ grammars/multiple/MathEng.gf | 5 ++++ grammars/multiple/System.gf | 4 +++ grammars/multiple/SystemCity.gf | 4 +++ grammars/multiple/SystemCityEng.gf | 6 +++++ grammars/multiple/SystemEng.gf | 3 +++ grammars/multiple/SystemMath.gf | 4 +++ grammars/multiple/SystemMathEng.gf | 6 +++++ grammars/multiple/Top.gf | 7 +++++ grammars/multiple/TopCity.gf | 1 + grammars/multiple/TopCityEng.gf | 3 +++ grammars/multiple/TopEng.gf | 6 +++++ grammars/multiple/TopMath.gf | 1 + grammars/multiple/TopMathEng.gf | 3 +++ grammars/multiple/User.gf | 7 +++++ grammars/multiple/UserCity.gf | 5 ++++ grammars/multiple/UserCityEng.gf | 6 +++++ grammars/multiple/UserEng.gf | 5 ++++ grammars/multiple/UserMath.gf | 5 ++++ grammars/multiple/UserMathEng.gf | 6 +++++ grammars/multiple/UserUnionCity.gf | 1 + grammars/multiple/map.txt | 32 +++++++++++++++++++++++ lib/resource-0.6/english/ParadigmsEng.gf | 7 ++++- src/GF/Canon/AbsGFC.hs | 2 +- src/GF/Canon/CanonToGrammar.hs | 4 +-- src/GF/Canon/GFC.cf | 2 +- src/GF/Canon/MkGFC.hs | 6 ++--- src/GF/Canon/ParGFC.hs | 14 +++++----- src/GF/Canon/PrintGFC.hs | 2 +- src/GF/Compile/Compile.hs | 5 +++- src/GF/Compile/Extend.hs | 33 ++++++++++-------------- src/GF/Compile/GrammarToCanon.hs | 5 ++-- src/GF/Compile/MkResource.hs | 6 ++--- src/GF/Compile/MkUnion.hs | 2 +- src/GF/Compile/ModDeps.hs | 8 +++--- src/GF/Compile/Rebuild.hs | 8 +++--- src/GF/Compile/ShellState.hs | 7 +++-- src/GF/Infra/Modules.hs | 19 +++++++++----- src/GF/Shell/ShellCommands.hs | 1 - src/GF/Source/GrammarToSource.hs | 4 +-- src/GF/Source/SourceToGrammar.hs | 11 ++++---- src/Makefile | 3 ++- 44 files changed, 214 insertions(+), 74 deletions(-) create mode 100644 grammars/multiple/City.gf create mode 100644 grammars/multiple/CityEng.gf create mode 100644 grammars/multiple/Math.gf create mode 100644 grammars/multiple/MathEng.gf create mode 100644 grammars/multiple/System.gf create mode 100644 grammars/multiple/SystemCity.gf create mode 100644 grammars/multiple/SystemCityEng.gf create mode 100644 grammars/multiple/SystemEng.gf create mode 100644 grammars/multiple/SystemMath.gf create mode 100644 grammars/multiple/SystemMathEng.gf create mode 100644 grammars/multiple/Top.gf create mode 100644 grammars/multiple/TopCity.gf create mode 100644 grammars/multiple/TopCityEng.gf create mode 100644 grammars/multiple/TopEng.gf create mode 100644 grammars/multiple/TopMath.gf create mode 100644 grammars/multiple/TopMathEng.gf create mode 100644 grammars/multiple/User.gf create mode 100644 grammars/multiple/UserCity.gf create mode 100644 grammars/multiple/UserCityEng.gf create mode 100644 grammars/multiple/UserEng.gf create mode 100644 grammars/multiple/UserMath.gf create mode 100644 grammars/multiple/UserMathEng.gf create mode 100644 grammars/multiple/UserUnionCity.gf create mode 100644 grammars/multiple/map.txt diff --git a/grammars/multiple/City.gf b/grammars/multiple/City.gf new file mode 100644 index 000000000..b8023ac84 --- /dev/null +++ b/grammars/multiple/City.gf @@ -0,0 +1,7 @@ +abstract City = { + cat + City ; + fun + MkCity : String -> City ; +} ; + diff --git a/grammars/multiple/CityEng.gf b/grammars/multiple/CityEng.gf new file mode 100644 index 000000000..8c67ab675 --- /dev/null +++ b/grammars/multiple/CityEng.gf @@ -0,0 +1,5 @@ +concrete CityEng of City = open Prelude in { + lin + MkCity s = s ; +} ; + diff --git a/grammars/multiple/Math.gf b/grammars/multiple/Math.gf new file mode 100644 index 000000000..6e6a48db6 --- /dev/null +++ b/grammars/multiple/Math.gf @@ -0,0 +1,7 @@ +abstract Math = { + cat + Number ; + fun + MkNumber : Int -> Number ; +} ; + diff --git a/grammars/multiple/MathEng.gf b/grammars/multiple/MathEng.gf new file mode 100644 index 000000000..9d9bf3414 --- /dev/null +++ b/grammars/multiple/MathEng.gf @@ -0,0 +1,5 @@ +concrete MathEng of Math = open Prelude in { + lin + MkNumber i = i ; +} ; + diff --git a/grammars/multiple/System.gf b/grammars/multiple/System.gf new file mode 100644 index 000000000..b3587c106 --- /dev/null +++ b/grammars/multiple/System.gf @@ -0,0 +1,4 @@ +abstract System = { + cat Reply ; + fun Bye : Reply ; +} diff --git a/grammars/multiple/SystemCity.gf b/grammars/multiple/SystemCity.gf new file mode 100644 index 000000000..08196f73d --- /dev/null +++ b/grammars/multiple/SystemCity.gf @@ -0,0 +1,4 @@ +abstract SystemCity = System, City ** { + fun + RDistance : City -> City -> Int -> Reply ; +} ; \ No newline at end of file diff --git a/grammars/multiple/SystemCityEng.gf b/grammars/multiple/SystemCityEng.gf new file mode 100644 index 000000000..ddf15248a --- /dev/null +++ b/grammars/multiple/SystemCityEng.gf @@ -0,0 +1,6 @@ +concrete SystemCityEng of SystemCity = SystemEng, CityEng ** open + Prelude in { + lin + RDistance x y d = + ss (["the distance from"] ++ x.s ++ "to" ++ y.s ++ "is" ++ d.s) ; +} ; diff --git a/grammars/multiple/SystemEng.gf b/grammars/multiple/SystemEng.gf new file mode 100644 index 000000000..96f6d80c7 --- /dev/null +++ b/grammars/multiple/SystemEng.gf @@ -0,0 +1,3 @@ +concrete SystemEng of System = open Prelude in { + lin Bye = ss "bye" ; +} diff --git a/grammars/multiple/SystemMath.gf b/grammars/multiple/SystemMath.gf new file mode 100644 index 000000000..7e2173111 --- /dev/null +++ b/grammars/multiple/SystemMath.gf @@ -0,0 +1,4 @@ +abstract SystemMath = System, Math ** { + fun + RSum : Number -> Number -> Int -> Reply ; +} ; diff --git a/grammars/multiple/SystemMathEng.gf b/grammars/multiple/SystemMathEng.gf new file mode 100644 index 000000000..11aca7952 --- /dev/null +++ b/grammars/multiple/SystemMathEng.gf @@ -0,0 +1,6 @@ +concrete SystemMathEng of SystemMath = SystemEng, MathEng ** open + Prelude in { + lin + RSum x y d = + ss (["the sum of"] ++ x.s ++ "and" ++ y.s ++ "is" ++ d.s) ; +} ; diff --git a/grammars/multiple/Top.gf b/grammars/multiple/Top.gf new file mode 100644 index 000000000..67170f30a --- /dev/null +++ b/grammars/multiple/Top.gf @@ -0,0 +1,7 @@ +abstract Top = User, System ** { + cat + Move ; + fun + MUser : Query -> Move ; + MSystem : Reply -> Move ; +} diff --git a/grammars/multiple/TopCity.gf b/grammars/multiple/TopCity.gf new file mode 100644 index 000000000..894142b18 --- /dev/null +++ b/grammars/multiple/TopCity.gf @@ -0,0 +1 @@ +abstract TopCity = Top, UserCity, SystemCity ** {} ; diff --git a/grammars/multiple/TopCityEng.gf b/grammars/multiple/TopCityEng.gf new file mode 100644 index 000000000..ef1f01ade --- /dev/null +++ b/grammars/multiple/TopCityEng.gf @@ -0,0 +1,3 @@ +--# -path=.:../prelude + +concrete TopCityEng of TopCity = TopEng, UserCityEng, SystemCityEng ** {} ; diff --git a/grammars/multiple/TopEng.gf b/grammars/multiple/TopEng.gf new file mode 100644 index 000000000..6265ed2c3 --- /dev/null +++ b/grammars/multiple/TopEng.gf @@ -0,0 +1,6 @@ + +concrete TopEng of Top = UserEng, SystemEng ** open Prelude in { + lin + MUser q = q ; + MSystem r = r ; +} diff --git a/grammars/multiple/TopMath.gf b/grammars/multiple/TopMath.gf new file mode 100644 index 000000000..997e7299d --- /dev/null +++ b/grammars/multiple/TopMath.gf @@ -0,0 +1 @@ +abstract TopMath = Top, UserMath, SystemMath ** {} ; diff --git a/grammars/multiple/TopMathEng.gf b/grammars/multiple/TopMathEng.gf new file mode 100644 index 000000000..5f803b33a --- /dev/null +++ b/grammars/multiple/TopMathEng.gf @@ -0,0 +1,3 @@ +--# -path=.:../prelude + +concrete TopMathEng of TopMath = TopEng, UserMathEng, SystemMathEng ** {} ; diff --git a/grammars/multiple/User.gf b/grammars/multiple/User.gf new file mode 100644 index 000000000..6822d2e75 --- /dev/null +++ b/grammars/multiple/User.gf @@ -0,0 +1,7 @@ +abstract User = { + cat + Query ; + fun + QQuit : Query ; +} ; + diff --git a/grammars/multiple/UserCity.gf b/grammars/multiple/UserCity.gf new file mode 100644 index 000000000..ee650421d --- /dev/null +++ b/grammars/multiple/UserCity.gf @@ -0,0 +1,5 @@ +abstract UserCity = User, City ** { + fun + QDistance : City -> City -> Query ; +} ; + diff --git a/grammars/multiple/UserCityEng.gf b/grammars/multiple/UserCityEng.gf new file mode 100644 index 000000000..a30b81510 --- /dev/null +++ b/grammars/multiple/UserCityEng.gf @@ -0,0 +1,6 @@ +concrete UserCityEng of UserCity = UserEng, CityEng ** open Prelude in + { + lin + QDistance x y = ss (["what is the distance from"] ++ x.s ++ "to" ++ y.s) ; + } + diff --git a/grammars/multiple/UserEng.gf b/grammars/multiple/UserEng.gf new file mode 100644 index 000000000..fcc233ddd --- /dev/null +++ b/grammars/multiple/UserEng.gf @@ -0,0 +1,5 @@ +concrete UserEng of User = open Prelude in { + lin + QQuit = ss ["that's enough"] ; +} ; + diff --git a/grammars/multiple/UserMath.gf b/grammars/multiple/UserMath.gf new file mode 100644 index 000000000..0bb6ebf80 --- /dev/null +++ b/grammars/multiple/UserMath.gf @@ -0,0 +1,5 @@ +abstract UserMath = User, Math ** { + fun + QSum : Number -> Number -> Query ; +} ; + diff --git a/grammars/multiple/UserMathEng.gf b/grammars/multiple/UserMathEng.gf new file mode 100644 index 000000000..c1a190b47 --- /dev/null +++ b/grammars/multiple/UserMathEng.gf @@ -0,0 +1,6 @@ +concrete UserMathEng of UserMath = UserEng, MathEng ** open Prelude in + { + lin + QSum x y = ss (["what is the sum of"] ++ x.s ++ "and" ++ y.s) ; + } + diff --git a/grammars/multiple/UserUnionCity.gf b/grammars/multiple/UserUnionCity.gf new file mode 100644 index 000000000..68115c626 --- /dev/null +++ b/grammars/multiple/UserUnionCity.gf @@ -0,0 +1 @@ +abstract UserUnionCity = union User, City ; diff --git a/grammars/multiple/map.txt b/grammars/multiple/map.txt new file mode 100644 index 000000000..1700f967c --- /dev/null +++ b/grammars/multiple/map.txt @@ -0,0 +1,32 @@ +Using multiple inheritance in GF. AR 15/9/2004. + +The following diagrams show inheritance between abstract syntaxes in two simple systems. + + TopCity + / | \ + / | \ + SystemCity UserCity Top + / \ / \ + System City User + + + TopMath + / | \ + / | \ + SystemMath UserMath Top + / \ / \ + System Math User + + +Idea of each module: + + User -- User's moves on any domain + System -- System's moves on any domain + Top -- grammar covering both kinds of moves + X = Math, City -- possible domains + UserX -- User's domain specific moves + SystemX -- System's domain specific moves + TopX -- all moves on the domain X + +In parallel to the abstract syntax hierarchies, we have of course +hierarchies of concrete syntaxes for any language; this directory contains Eng. diff --git a/lib/resource-0.6/english/ParadigmsEng.gf b/lib/resource-0.6/english/ParadigmsEng.gf index 19dfa67e0..3bddb3f42 100644 --- a/lib/resource-0.6/english/ParadigmsEng.gf +++ b/lib/resource-0.6/english/ParadigmsEng.gf @@ -26,17 +26,19 @@ resource ParadigmsEng = open (Predef=Predef), Prelude, SyntaxEng, ResourceEng in -- To abstract over gender names, we define the following identifiers. oper - Gender : Type = SyntaxEng.Gender ; + Gender : Type ; human : Gender ; nonhuman : Gender ; -- To abstract over number names, we define the following. + Number : Type ; singular : Number ; plural : Number ; -- To abstract over case names, we define the following. + Case : Type ; nominative : Case ; genitive : Case ; @@ -183,6 +185,9 @@ oper -- hidden from the document. --. + Gender = SyntaxEng.Gender ; + Number = SyntaxEng.Number ; + Case = SyntaxEng.Case ; human = Hum ; nonhuman = NoHum ; singular = Sg ; diff --git a/src/GF/Canon/AbsGFC.hs b/src/GF/Canon/AbsGFC.hs index da8ea3804..2ac08ac4a 100644 --- a/src/GF/Canon/AbsGFC.hs +++ b/src/GF/Canon/AbsGFC.hs @@ -23,7 +23,7 @@ data ModType = deriving (Eq,Ord,Show) data Extend = - Ext Ident + Ext [Ident] | NoExt deriving (Eq,Ord,Show) diff --git a/src/GF/Canon/CanonToGrammar.hs b/src/GF/Canon/CanonToGrammar.hs index ece71c517..927f7747d 100644 --- a/src/GF/Canon/CanonToGrammar.hs +++ b/src/GF/Canon/CanonToGrammar.hs @@ -41,9 +41,7 @@ canon2sourceModule (i,mi) = do return (i',info') where redExtOpen m = do - e' <- case M.extends m of - Just e -> liftM Just $ redIdent e - _ -> return Nothing + e' <- mapM redIdent $ M.extends m os' <- mapM (\ (M.OSimple q i) -> liftM (\i -> M.OQualif q i i) (redIdent i)) $ M.opens m return (e',os') diff --git a/src/GF/Canon/GFC.cf b/src/GF/Canon/GFC.cf index 236bd72ca..698a589b9 100644 --- a/src/GF/Canon/GFC.cf +++ b/src/GF/Canon/GFC.cf @@ -16,7 +16,7 @@ MTTrans. ModType ::= "transfer" Ident ":" Ident "->" Ident ; separator Module "" ; -Ext. Extend ::= Ident "**" ; +Ext. Extend ::= [Ident] "**" ; NoExt. Extend ::= ; Opens. Open ::= "open" [Ident] "in" ; diff --git a/src/GF/Canon/MkGFC.hs b/src/GF/Canon/MkGFC.hs index 9d2fad49b..af126605e 100644 --- a/src/GF/Canon/MkGFC.hs +++ b/src/GF/Canon/MkGFC.hs @@ -33,8 +33,8 @@ canon2grammar (Gr modules) = M.MGrammar $ map mod2info modules where MTCnc a x -> (a,M.MTConcrete x) MTTrans a x y -> (a,M.MTTransfer (M.oSimple x) (M.oSimple y)) in (a,M.ModMod (M.Module mt' M.MSComplete flags (ee e) (oo os) defs')) - ee (Ext m) = Just m - ee _ = Nothing + ee (Ext m) = m + ee _ = [] oo (Opens ms) = map M.oSimple ms oo _ = [] @@ -52,7 +52,7 @@ info2mod m = case m of in Mod mt' (gfcE me) (gfcO os) flags defs' where - gfcE = maybe NoExt Ext + gfcE = ifNull NoExt Ext gfcO os = if null os then NoOpens else Opens [m | M.OSimple _ m <- os] diff --git a/src/GF/Canon/ParGFC.hs b/src/GF/Canon/ParGFC.hs index d207eafdb..e496389ea 100644 --- a/src/GF/Canon/ParGFC.hs +++ b/src/GF/Canon/ParGFC.hs @@ -340,19 +340,19 @@ happyOutTok x = unsafeCoerce# x {-# INLINE happyOutTok #-} happyActOffsets :: HappyAddr -happyActOffsets = HappyA# "\x07\x02\x03\x02\x00\x00\x02\x02\x2d\x01\xfe\x01\x11\x02\x01\x02\x00\x00\x24\x02\xf9\x01\xf9\x01\xf9\x01\xf9\x01\x1f\x02\x00\x00\x00\x02\x00\x00\xf3\x01\xf3\x01\xf3\x01\x00\x00\x21\x02\x15\x02\xfd\x01\xf1\x01\xf1\x01\x1a\x02\x00\x00\x16\x02\xee\x01\x00\x00\x00\x00\x2d\x01\xfb\x01\x00\x00\xed\x01\x00\x00\xfa\x01\x00\x00\x17\x02\x67\x00\xea\x01\x14\x02\xf7\x01\x13\x02\x00\x00\xe5\x01\xe5\x01\xe5\x01\xe5\x01\xe5\x01\xe5\x01\xe5\x01\x00\x00\x10\x02\x0f\x02\x0b\x02\x0d\x02\x09\x02\x05\x02\xff\x01\x00\x00\xe4\x01\x00\x00\xcf\x01\x00\x00\xcf\x01\xcf\x01\x0a\x00\xcf\x01\x58\x00\x58\x00\xcf\x01\x0a\x00\xe0\x01\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\x01\x0a\x00\xcb\x01\xcb\x01\xd4\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe7\x01\x00\x00\x00\x00\xf8\x01\x3d\x00\x58\x00\x00\x00\xf6\x01\xf5\x01\xec\x01\xe8\x01\xe3\x01\xe9\x01\x00\x00\xb9\x01\xe6\x01\x0a\x00\x0a\x00\xdc\x01\x12\x00\xd2\x01\x00\x00\xd9\x01\xd7\x01\xd5\x01\xa9\x01\x12\x00\xa7\x01\x58\x00\x00\x00\x00\x00\xc8\x01\x10\x01\xc9\x01\xcd\x01\xc5\x01\x00\x00\x0a\x00\xa4\x01\x00\x00\xc7\x01\x6e\x00\x00\x00\x0a\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\xa7\x00\x00\x00\x00\x00\xbc\x01\xb6\x01\xb1\x01\x00\x00\x00\x00\x3d\x00\x1c\x00\x12\x00\x95\x01\x95\x01\x58\x00\xb5\x01\x00\x00\x00\x00\x58\x00\x3d\x00\x58\x00\xb2\x00\x94\x01\x00\x00\x00\x00\x00\x00\x00\x00\x94\x01\x26\x01\xa8\x01\xbb\x01\x12\x00\x12\x00\xaa\x01\x00\x00\x00\x00\x00\x00\xb3\x01\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb4\x01\xb2\x01\xaf\x01\x51\x00\x3d\x00\x74\x01\x74\x01\xa3\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x82\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9d\x01\x98\x01\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x3d\x00\x0c\x00\x00\x00\x47\x00\x9e\x01\x41\x00\x00\x00\x91\x01\x8f\x01\x12\x00\x71\x01\x00\x00\x00\x00\x60\x00\x00\x00\x00\x00\x9f\x01\x99\x01\x57\x00\x00\x00\x00\x00\x7e\x00\x00\x00\x89\x01\x62\x01\x0a\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x92\x01\x70\x00\x8e\x01\x00\x00\x00\x00\x3d\x00\x60\x01\x00\x00\x12\x00\x00\x00\x8d\x01\x12\x00\x7a\x01\x00\x00\x7a\x01\x00\x00\x8c\x01\x8b\x01\x87\x01\x78\x01\x00\x00\x68\x00\x00\x00\x51\x01\x00\x00\x00\x00\x3d\x00\x5b\x00\x21\x00\x00\x00\x00\x00\x00\x00\x00\x00"# +happyActOffsets = HappyA# "\x0a\x02\x06\x02\x00\x00\x04\x02\xdd\x00\x02\x02\x14\x02\x00\x02\x00\x00\x29\x02\xfc\x01\xfc\x01\xfc\x01\xfc\x01\x25\x02\x00\x00\xff\x01\x00\x00\xff\xff\xf9\x01\xf9\x01\x00\x00\x22\x02\xfd\x01\x1d\x02\xf8\x01\xf8\x01\x1b\x02\x00\x00\x00\x00\x1c\x02\xf0\x01\x00\x00\xdd\x00\xf5\x01\x00\x00\xee\x01\x00\x00\xf6\x01\x00\x00\x15\x02\x66\x00\xed\x01\x13\x02\xef\x01\x0d\x02\x00\x00\xda\x01\xda\x01\xda\x01\xda\x01\xda\x01\xda\x01\xda\x01\x00\x00\x07\x02\x05\x02\x01\x02\xfb\x01\xf7\x01\xf4\x01\xf3\x01\x00\x00\xd6\x01\x00\x00\xc8\x01\x00\x00\xc8\x01\xc8\x01\x11\x00\xc8\x01\x44\x00\x44\x00\xc8\x01\x11\x00\xe9\x01\x00\x00\x00\x00\x00\x00\x94\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x01\x11\x00\xc7\x01\xc7\x01\xc3\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd2\x01\x00\x00\x00\x00\xe8\x01\x5d\x00\x44\x00\x00\x00\xe7\x01\xe6\x01\xe4\x01\xe2\x01\xdc\x01\xe1\x01\x00\x00\xb3\x01\xd7\x01\x11\x00\x11\x00\xce\x01\x0d\x00\xc4\x01\x00\x00\xd5\x01\xd0\x01\xcf\x01\xa2\x01\x0d\x00\xa1\x01\x44\x00\x00\x00\x00\x00\xc0\x01\xa3\x00\xba\x01\xbf\x01\xc2\x01\x00\x00\x11\x00\x93\x01\x00\x00\xc1\x01\x69\x00\x00\x00\x11\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\xc7\x00\x00\x00\x00\x00\xb6\x01\xaa\x01\xaf\x01\x00\x00\x00\x00\x5d\x00\x72\x00\x0d\x00\x8f\x01\x8f\x01\x44\x00\xb2\x01\x00\x00\x00\x00\x44\x00\x5d\x00\x44\x00\xa6\x00\x84\x01\x00\x00\x00\x00\x00\x00\x00\x00\x84\x01\xcf\x00\x99\x01\xac\x01\x0d\x00\x0d\x00\xa4\x01\x00\x00\x00\x00\x00\x00\xad\x01\x00\x00\x00\x00\xfd\xff\x00\x00\x00\x00\xae\x01\xab\x01\x9f\x01\x4c\x00\x5d\x00\x70\x01\x70\x01\x90\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x71\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x01\x95\x01\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x00\x5d\x00\x15\x00\x00\x00\x42\x00\x96\x01\x3c\x00\x00\x00\x8b\x01\x89\x01\x0d\x00\x6b\x01\x00\x00\x00\x00\x65\x00\x00\x00\x00\x00\x8e\x01\x8a\x01\x56\x00\x00\x00\x00\x00\x51\x00\x00\x00\x7c\x01\x57\x01\x11\x00\x85\x00\x00\x00\x00\x00\x00\x00\x8c\x01\xf9\xff\x88\x01\x00\x00\x00\x00\x5d\x00\x4f\x01\x00\x00\x0d\x00\x00\x00\x87\x01\x0d\x00\x7b\x01\x00\x00\x7b\x01\x00\x00\x86\x01\x7d\x01\x78\x01\x74\x01\x00\x00\xf7\xff\x00\x00\x4a\x01\x00\x00\x00\x00\x5d\x00\x57\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00"# happyGotoOffsets :: HappyAddr -happyGotoOffsets = HappyA# "\x59\x00\x00\x00\x00\x00\x00\x00\xd6\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x7f\x01\x7e\x01\x7d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x11\x01\x7c\x01\x02\x00\x00\x00\x00\x00\x00\x00\x72\x01\x79\x01\x70\x01\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x69\x01\xd6\x00\x00\x00\x48\x01\x6d\x01\x00\x00\x17\x00\x00\x00\x00\x00\x84\x00\x6a\x01\x00\x00\x5c\x01\x00\x00\x00\x00\x67\x01\x5e\x01\x5a\x01\x57\x01\x50\x01\x4f\x01\x44\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x01\x00\x00\x42\x01\x21\x01\xf4\x01\x3c\x01\x32\x01\x09\x01\x40\x00\xe2\x01\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x01\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x01\x38\x01\xd0\x01\x0c\x01\x2c\x01\x27\x01\x00\x00\x00\x00\x00\x00\x00\x00\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x00\x00\x00\xbe\x01\xac\x01\x00\x00\x13\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x01\x0a\x01\x08\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf7\xff\x00\x00\x9a\x01\x12\x01\x00\x00\x00\x00\xe7\x00\x00\x00\x88\x01\x00\x00\x76\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x01\x01\x03\x01\x00\x01\xc5\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x05\x00\x7d\x00\x00\x00\x6f\x00\x00\x00\x00\x00\xe5\x00\x00\x00\xe4\x00\x00\x00\x00\x00\x00\x00\xea\x00\x2a\x01\x00\x00\x00\x00\x00\x00\xc3\x00\x00\x00\x00\x00\xb7\x00\x00\x00\x00\x00\xbf\x00\x00\x00\x00\x00\x00\x00\x3a\x01\x11\x00\xdb\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x01\xe3\x00\x00\x00\x00\x00\xab\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe1\x00\x7b\x00\x9b\x00\x00\x00\x33\x01\xea\xff\x33\x01\x00\x00\x00\x00\x00\x00\xd8\x00\x6c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x3b\x01\x00\x00\x00\x00\x91\x00\x52\x01\xe7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x75\x00\x00\x00\x00\x00\x00\x00\x07\x00\xb6\x00\x00\x00\xb9\x00\x00\x00\xe4\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xff\x4f\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x06\x00\x22\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00"# +happyGotoOffsets = HappyA# "\x51\x01\x00\x00\x00\x00\x00\x00\xc9\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x01\x79\x01\x77\x01\x76\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x6d\x01\x03\x00\x00\x00\x00\x00\x63\x01\x00\x00\x6a\x01\x69\x01\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x58\x01\xc9\x00\x00\x00\x36\x01\x5a\x01\x00\x00\x93\x00\x00\x00\x00\x00\x1a\x00\x55\x01\x00\x00\x4c\x01\x00\x00\x00\x00\x44\x01\x40\x01\x3f\x01\x39\x01\x38\x01\x28\x01\x27\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x01\x00\x00\x16\x01\x26\x01\x03\x02\x5b\x01\xfb\x00\xea\x00\x0c\x00\xf1\x01\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x02\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x0e\x01\xdf\x01\x59\x01\x0c\x01\x08\x01\x00\x00\x00\x00\x00\x00\x00\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\xe9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x01\x00\x00\xcd\x01\xbb\x01\x00\x00\x2a\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf7\x00\x18\x01\x0b\x00\xd8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x01\x00\x00\xa9\x01\xf8\x00\x00\x00\x00\x00\xc1\x00\x00\x00\x97\x01\x00\x00\x85\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x06\x01\x52\x01\xd6\x00\xd7\x00\x00\x00\x00\x00\x00\x00\xb3\x00\x05\x00\xa4\x00\x00\x00\x6b\x00\x00\x00\x00\x00\xab\x00\x00\x00\x2f\x01\x00\x00\x00\x00\x00\x00\xf4\x00\x30\x01\x00\x00\x00\x00\x00\x00\xc3\x00\x00\x00\x00\x00\xb9\x00\x00\x00\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x49\x01\x0e\x00\xb0\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\x01\xd3\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe2\x00\x7f\x00\x82\x00\x00\x00\x42\x01\xed\x00\x42\x01\x00\x00\x00\x00\x00\x00\xd0\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x71\x00\x00\x00\x00\x00\x20\x01\x00\x00\x00\x00\x76\x00\x61\x01\xc1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x09\x00\xaf\x00\x00\x00\xbe\x00\x00\x00\xf3\xff\xac\x00\x00\x00\x00\x00\x00\x00\x35\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\xfc\x00\x00\x00\x10\x00\x00\x00\x00\x00\x07\x00\x61\x00\x25\x00\x00\x00\x00\x00\x00\x00\x00\x00"# happyDefActions :: HappyAddr -happyDefActions = HappyA# "\xf4\xff\x00\x00\xfe\xff\x00\x00\xfa\xff\x7d\xff\x7c\xff\x00\x00\xf3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xff\x00\x00\xf8\xff\xf1\xff\x00\x00\x7d\xff\x7b\xff\x00\x00\x00\x00\xef\xff\x00\x00\x00\x00\x00\x00\xf7\xff\x00\x00\x7d\xff\xf2\xff\xf4\xff\xfb\xff\x00\x00\xa0\xff\x00\x00\xf5\xff\x9e\xff\xf0\xff\x00\x00\x00\x00\x00\x00\x00\x00\xe3\xff\x00\x00\xf9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\xff\x00\x00\xe4\xff\x00\x00\xee\xff\x00\x00\xd1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x9c\xff\x00\x00\x00\x00\xc6\xff\xc5\xff\xca\xff\xdc\xff\xeb\xff\xe0\xff\xc4\xff\xdb\xff\xcc\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xff\xda\xff\xfd\xff\xfc\xff\x99\xff\x9b\xff\xea\xff\xc0\xff\x00\x00\x8f\xff\x00\x00\xbf\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\xff\xe6\xff\xd1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\xff\x8e\xff\x00\x00\x00\x00\x00\x00\x00\x00\x9c\xff\xe5\xff\xc7\xff\xc8\xff\x00\x00\x00\x00\x00\x00\x00\x00\xce\xff\xe1\xff\x00\x00\x00\x00\xe2\xff\x00\x00\x00\x00\xdd\xff\x00\x00\xd9\xff\x00\x00\xc9\xff\x98\xff\x9a\xff\x00\x00\xae\xff\xbc\xff\xb1\xff\xaf\xff\xe9\xff\xb8\xff\xbd\xff\x95\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\xff\xc2\xff\x00\x00\x8f\xff\x00\x00\x00\x00\x92\xff\xec\xff\xc3\xff\x97\xff\xcf\xff\xed\xff\x00\x00\x91\xff\x00\x00\x00\x00\x00\x00\x00\x00\x8d\xff\xbe\xff\x89\xff\x00\x00\xba\xff\x89\xff\x00\x00\xb7\xff\x87\xff\x94\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xff\xd5\xff\xd4\xff\xd3\xff\xcd\xff\x00\x00\x00\x00\xd2\xff\xcb\xff\xce\xff\xd7\xff\x00\x00\x00\x00\xa7\xff\xb5\xff\xb3\xff\xb9\xff\x00\x00\x95\xff\x00\x00\xb6\xff\x00\x00\x7f\xff\x00\x00\xc1\xff\xb0\xff\xe8\xff\x00\x00\x92\xff\x96\xff\x90\xff\x00\x00\x88\xff\xb2\xff\x8b\xff\x00\x00\x00\x00\xbb\xff\x86\xff\x85\xff\x93\xff\xac\xff\x00\x00\x00\x00\x00\x00\xd6\xff\xdf\xff\xa6\xff\x84\xff\x00\x00\x00\x00\xa4\xff\x7e\xff\x82\xff\x00\x00\xa3\xff\x00\x00\xb4\xff\x7f\xff\x00\x00\xe7\xff\x8a\xff\xab\xff\x7f\xff\x00\x00\x81\xff\x00\x00\x00\x00\x87\xff\x85\xff\x83\xff\xaa\xff\xad\xff\xa2\xff\x82\xff\x00\x00\x00\x00\xa5\xff\xa1\xff\x80\xff"# +happyDefActions = HappyA# "\xf4\xff\x00\x00\xfe\xff\x00\x00\xfa\xff\x7d\xff\x7c\xff\x00\x00\xf3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xff\x00\x00\xf8\xff\xf1\xff\x00\x00\x7d\xff\x7b\xff\x00\x00\xef\xff\x00\x00\x00\x00\x00\x00\x00\x00\xf7\xff\xf2\xff\x00\x00\x7d\xff\xf4\xff\xfb\xff\x00\x00\xa0\xff\x00\x00\xf5\xff\x9e\xff\xf0\xff\x00\x00\x00\x00\x00\x00\x00\x00\xe3\xff\x00\x00\xf9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9d\xff\x00\x00\xe4\xff\x00\x00\xee\xff\x00\x00\xd1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x9c\xff\x00\x00\x00\x00\xc6\xff\xc5\xff\xca\xff\xdc\xff\xeb\xff\xe0\xff\xc4\xff\xdb\xff\xcc\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xff\xda\xff\xfd\xff\xfc\xff\x99\xff\x9b\xff\xea\xff\xc0\xff\x00\x00\x8f\xff\x00\x00\xbf\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\xff\xe6\xff\xd1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\xff\x8e\xff\x00\x00\x00\x00\x00\x00\x00\x00\x9c\xff\xe5\xff\xc7\xff\xc8\xff\x00\x00\x00\x00\x00\x00\x00\x00\xce\xff\xe1\xff\x00\x00\x00\x00\xe2\xff\x00\x00\x00\x00\xdd\xff\x00\x00\xd9\xff\x00\x00\xc9\xff\x98\xff\x9a\xff\x00\x00\xae\xff\xbc\xff\xb1\xff\xaf\xff\xe9\xff\xb8\xff\xbd\xff\x95\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\xff\xc2\xff\x00\x00\x8f\xff\x00\x00\x00\x00\x92\xff\xec\xff\xc3\xff\x97\xff\xcf\xff\xed\xff\x00\x00\x91\xff\x00\x00\x00\x00\x00\x00\x00\x00\x8d\xff\xbe\xff\x89\xff\x00\x00\xba\xff\x89\xff\x00\x00\xb7\xff\x87\xff\x94\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xff\xd5\xff\xd4\xff\xd3\xff\xcd\xff\x00\x00\x00\x00\xd2\xff\xcb\xff\xce\xff\xd7\xff\x00\x00\x00\x00\xa7\xff\xb5\xff\xb3\xff\xb9\xff\x00\x00\x95\xff\x00\x00\xb6\xff\x00\x00\x7f\xff\x00\x00\xc1\xff\xb0\xff\xe8\xff\x00\x00\x92\xff\x96\xff\x90\xff\x00\x00\x88\xff\xb2\xff\x8b\xff\x00\x00\x00\x00\xbb\xff\x86\xff\x85\xff\x93\xff\xac\xff\x00\x00\x00\x00\x00\x00\xd6\xff\xdf\xff\xa6\xff\x84\xff\x00\x00\x00\x00\xa4\xff\x7e\xff\x82\xff\x00\x00\xa3\xff\x00\x00\xb4\xff\x7f\xff\x00\x00\xe7\xff\x8a\xff\xab\xff\x7f\xff\x00\x00\x81\xff\x00\x00\x00\x00\x87\xff\x85\xff\x83\xff\xaa\xff\xad\xff\xa2\xff\x82\xff\x00\x00\x00\x00\xa5\xff\xa1\xff\x80\xff"# happyCheck :: HappyAddr -happyCheck = HappyA# "\xff\xff\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x20\x00\x30\x00\x15\x00\x03\x00\x01\x00\x03\x00\x00\x00\x00\x00\x2e\x00\x0b\x00\x0a\x00\x03\x00\x0c\x00\x33\x00\x2e\x00\x0f\x00\x08\x00\x11\x00\x12\x00\x33\x00\x0c\x00\x1a\x00\x09\x00\x0f\x00\x00\x00\x11\x00\x03\x00\x09\x00\x1c\x00\x22\x00\x22\x00\x22\x00\x20\x00\x25\x00\x25\x00\x0c\x00\x0d\x00\x0e\x00\x28\x00\x00\x00\x2d\x00\x22\x00\x24\x00\x34\x00\x34\x00\x34\x00\x32\x00\x32\x00\x30\x00\x31\x00\x32\x00\x31\x00\x27\x00\x2d\x00\x00\x00\x2f\x00\x30\x00\x31\x00\x03\x00\x04\x00\x24\x00\x2b\x00\x33\x00\x08\x00\x03\x00\x0b\x00\x00\x00\x0c\x00\x11\x00\x08\x00\x0f\x00\x30\x00\x11\x00\x0c\x00\x03\x00\x24\x00\x0f\x00\x10\x00\x11\x00\x08\x00\x03\x00\x03\x00\x03\x00\x0c\x00\x03\x00\x06\x00\x0f\x00\x01\x00\x11\x00\x0c\x00\x0c\x00\x0e\x00\x1a\x00\x0c\x00\x28\x00\x0e\x00\x13\x00\x04\x00\x00\x00\x30\x00\x22\x00\x00\x00\x21\x00\x30\x00\x31\x00\x1b\x00\x06\x00\x15\x00\x01\x00\x30\x00\x31\x00\x2d\x00\x0c\x00\x00\x00\x0e\x00\x00\x00\x16\x00\x30\x00\x31\x00\x30\x00\x31\x00\x00\x00\x00\x00\x1e\x00\x16\x00\x30\x00\x30\x00\x22\x00\x0d\x00\x30\x00\x25\x00\x26\x00\x0a\x00\x23\x00\x29\x00\x2a\x00\x23\x00\x02\x00\x16\x00\x2e\x00\x19\x00\x30\x00\x2c\x00\x31\x00\x1f\x00\x2c\x00\x01\x00\x22\x00\x30\x00\x31\x00\x32\x00\x31\x00\x1f\x00\x00\x00\x0c\x00\x22\x00\x2b\x00\x0f\x00\x00\x00\x11\x00\x12\x00\x0c\x00\x0d\x00\x0e\x00\x2b\x00\x31\x00\x00\x00\x01\x00\x0b\x00\x01\x00\x1c\x00\x0d\x00\x00\x00\x14\x00\x20\x00\x00\x00\x01\x00\x18\x00\x0d\x00\x0d\x00\x17\x00\x18\x00\x15\x00\x19\x00\x02\x00\x0d\x00\x15\x00\x00\x00\x0d\x00\x15\x00\x30\x00\x31\x00\x32\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x30\x00\x31\x00\x32\x00\x0d\x00\x23\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x04\x00\x05\x00\x23\x00\x02\x00\x19\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x0d\x00\x2f\x00\x00\x00\x01\x00\x02\x00\x00\x00\x01\x00\x0d\x00\x0d\x00\x0d\x00\x30\x00\x0d\x00\x0d\x00\x2f\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0d\x00\x19\x00\x19\x00\x13\x00\x23\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x23\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x23\x00\x0d\x00\x2a\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x01\x00\x05\x00\x0d\x00\x0d\x00\x07\x00\x0d\x00\x02\x00\x0b\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0d\x00\x00\x00\x19\x00\x29\x00\x23\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x02\x00\x00\x00\x01\x00\x00\x00\x23\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x00\x00\x01\x00\x14\x00\x23\x00\x0d\x00\x00\x00\x18\x00\x00\x00\x01\x00\x00\x00\x17\x00\x18\x00\x0d\x00\x0d\x00\x16\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x1c\x00\x0d\x00\x1e\x00\x0d\x00\x1d\x00\x19\x00\x1f\x00\x23\x00\x1b\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x1b\x00\x23\x00\x00\x00\x1e\x00\x2c\x00\x00\x00\x2e\x00\x21\x00\x23\x00\x00\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x00\x00\x0c\x00\x17\x00\x00\x00\x30\x00\x31\x00\x00\x00\x26\x00\x06\x00\x00\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x00\x00\x08\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x31\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x04\x00\x01\x00\x17\x00\x02\x00\x15\x00\x30\x00\x04\x00\x04\x00\x01\x00\x32\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x04\x00\x15\x00\x17\x00\x01\x00\x30\x00\x04\x00\x06\x00\x15\x00\x14\x00\x32\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x17\x00\x0d\x00\x17\x00\x30\x00\x04\x00\x02\x00\x01\x00\x03\x00\x0d\x00\x03\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x06\x00\x1a\x00\x17\x00\x30\x00\x30\x00\x15\x00\x0b\x00\x01\x00\x04\x00\x14\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x06\x00\x30\x00\x17\x00\x0d\x00\x30\x00\x10\x00\x04\x00\x01\x00\x32\x00\x05\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x13\x00\x0a\x00\x17\x00\x02\x00\x30\x00\x01\x00\x0b\x00\x09\x00\x05\x00\x02\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x02\x00\x02\x00\x17\x00\x02\x00\x30\x00\x00\x00\x01\x00\x02\x00\x30\x00\x19\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x32\x00\x08\x00\x24\x00\x0d\x00\x05\x00\x17\x00\x10\x00\x11\x00\x05\x00\x02\x00\x05\x00\x02\x00\x02\x00\x17\x00\x01\x00\x30\x00\x02\x00\x20\x00\x01\x00\x03\x00\x30\x00\x21\x00\x07\x00\x30\x00\x30\x00\x24\x00\x06\x00\x30\x00\x01\x00\x30\x00\x05\x00\x28\x00\x02\x00\x27\x00\x27\x00\x30\x00\x23\x00\x1a\x00\xff\xff\xff\xff\x30\x00\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\xff\xff\xff\xff\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"# +happyCheck = HappyA# "\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x07\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x16\x00\x00\x00\x16\x00\x03\x00\x01\x00\x15\x00\x20\x00\x03\x00\x08\x00\x0b\x00\x0b\x00\x03\x00\x0c\x00\x00\x00\x0a\x00\x0f\x00\x0c\x00\x11\x00\x1a\x00\x0f\x00\x2e\x00\x11\x00\x12\x00\x0a\x00\x00\x00\x33\x00\x22\x00\x31\x00\x22\x00\x31\x00\x22\x00\x25\x00\x1c\x00\x25\x00\x30\x00\x22\x00\x20\x00\x2d\x00\x28\x00\x28\x00\x34\x00\x34\x00\x34\x00\x34\x00\x32\x00\x2d\x00\x32\x00\x2f\x00\x30\x00\x31\x00\x03\x00\x04\x00\x30\x00\x31\x00\x32\x00\x08\x00\x03\x00\x31\x00\x03\x00\x0c\x00\x24\x00\x08\x00\x0f\x00\x03\x00\x11\x00\x0c\x00\x03\x00\x0c\x00\x0f\x00\x10\x00\x11\x00\x08\x00\x0c\x00\x0d\x00\x0e\x00\x0c\x00\x03\x00\x03\x00\x0f\x00\x00\x00\x11\x00\x00\x00\x1b\x00\x30\x00\x00\x00\x0c\x00\x0c\x00\x0e\x00\x0e\x00\x01\x00\x16\x00\x33\x00\x13\x00\x04\x00\x00\x00\x30\x00\x31\x00\x11\x00\x06\x00\x01\x00\x00\x00\x30\x00\x31\x00\x30\x00\x0c\x00\x1a\x00\x0e\x00\x02\x00\x30\x00\x15\x00\x09\x00\x30\x00\x31\x00\x22\x00\x00\x00\x00\x00\x23\x00\x31\x00\x01\x00\x1e\x00\x24\x00\x30\x00\x30\x00\x22\x00\x2d\x00\x2c\x00\x25\x00\x26\x00\x30\x00\x23\x00\x29\x00\x2a\x00\x0c\x00\x0d\x00\x0e\x00\x2e\x00\x24\x00\x30\x00\x2c\x00\x15\x00\x30\x00\x31\x00\x32\x00\x09\x00\x2b\x00\x1f\x00\x1f\x00\x0c\x00\x22\x00\x22\x00\x0f\x00\x00\x00\x11\x00\x12\x00\x01\x00\x05\x00\x02\x00\x2b\x00\x2b\x00\x00\x00\x01\x00\x0b\x00\x00\x00\x1c\x00\x0d\x00\x02\x00\x00\x00\x20\x00\x30\x00\x31\x00\x32\x00\x30\x00\x0d\x00\x27\x00\x15\x00\x0d\x00\x19\x00\x00\x00\x01\x00\x0d\x00\x00\x00\x01\x00\x02\x00\x30\x00\x31\x00\x32\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0d\x00\x19\x00\x04\x00\x05\x00\x23\x00\x00\x00\x01\x00\x0b\x00\x00\x00\x13\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0d\x00\x17\x00\x18\x00\x0d\x00\x23\x00\x00\x00\x01\x00\x0d\x00\x0d\x00\x17\x00\x18\x00\x2f\x00\x00\x00\x00\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0d\x00\x19\x00\x19\x00\x2f\x00\x23\x00\x00\x00\x01\x00\x0d\x00\x0d\x00\x00\x00\x02\x00\x1d\x00\x00\x00\x1f\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0d\x00\x19\x00\x19\x00\x29\x00\x23\x00\x00\x00\x01\x00\x0d\x00\x2c\x00\x02\x00\x2e\x00\x00\x00\x20\x00\x00\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0d\x00\x19\x00\x16\x00\x00\x00\x23\x00\x00\x00\x01\x00\x00\x00\x2e\x00\x12\x00\x21\x00\x00\x00\x15\x00\x33\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x01\x00\x30\x00\x31\x00\x14\x00\x00\x00\x00\x00\x01\x00\x18\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x0d\x00\x00\x00\x00\x00\x14\x00\x23\x00\x0d\x00\x0d\x00\x18\x00\x00\x00\x00\x00\x21\x00\x00\x00\x01\x00\x00\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x1b\x00\x1c\x00\x23\x00\x1e\x00\x0d\x00\x30\x00\x31\x00\x00\x00\x23\x00\x03\x00\x00\x00\x0d\x00\x06\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x26\x00\x1b\x00\x06\x00\x0d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x1b\x00\x23\x00\x0d\x00\x1e\x00\x0d\x00\x00\x00\x00\x00\x08\x00\x23\x00\x00\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x31\x00\x04\x00\x09\x00\x01\x00\x30\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x02\x00\x32\x00\x17\x00\x04\x00\x04\x00\x01\x00\x04\x00\x01\x00\x15\x00\x15\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x04\x00\x30\x00\x17\x00\x0d\x00\x15\x00\x14\x00\x06\x00\x30\x00\x32\x00\x04\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x17\x00\x02\x00\x17\x00\x01\x00\x03\x00\x0d\x00\x06\x00\x1a\x00\x30\x00\x03\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x14\x00\x30\x00\x17\x00\x0b\x00\x01\x00\x30\x00\x15\x00\x06\x00\x04\x00\x0d\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x10\x00\x30\x00\x17\x00\x04\x00\x32\x00\x05\x00\x01\x00\x13\x00\x0a\x00\x02\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x01\x00\x30\x00\x17\x00\x09\x00\x02\x00\x05\x00\x02\x00\x02\x00\x02\x00\x19\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x0b\x00\x32\x00\x17\x00\x30\x00\x30\x00\x05\x00\x24\x00\x08\x00\x05\x00\x02\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x00\x00\x01\x00\x02\x00\x05\x00\x02\x00\x17\x00\x02\x00\x30\x00\x00\x00\x01\x00\x02\x00\x01\x00\x20\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x02\x00\x01\x00\x21\x00\x0d\x00\x24\x00\x17\x00\x10\x00\x11\x00\x30\x00\x30\x00\x03\x00\x30\x00\x06\x00\x17\x00\x01\x00\x07\x00\x28\x00\x27\x00\x27\x00\x30\x00\x30\x00\x05\x00\x02\x00\x30\x00\x23\x00\x1a\x00\xff\xff\xff\xff\xff\xff\x30\x00\xff\xff\xff\xff\xff\xff\x30\x00\xff\xff\x34\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"# happyTable :: HappyAddr -happyTable = HappyA# "\x00\x00\x06\x00\x06\x00\x06\x00\xe4\x00\x74\x00\x74\x00\x74\x00\x5e\x00\x87\x00\xe4\x00\x09\x01\x88\x00\x55\x00\xe8\x00\xea\x00\xf5\x00\x74\x00\xff\x00\x5f\x00\x56\x00\x99\x00\x57\x00\xe6\x00\xe5\x00\x58\x00\x9a\x00\x59\x00\x5a\x00\xe6\x00\x9b\x00\x75\x00\x28\x00\x9c\x00\xf5\x00\x9d\x00\xf8\x00\xb9\x00\x5b\x00\x76\x00\x02\x01\x02\x01\x5c\x00\x03\x01\x03\x01\xf9\x00\x10\x01\xfa\x00\x8f\x00\xf5\x00\xb1\x00\xd0\x00\xf6\x00\x22\x00\x15\x00\x07\x00\x11\x01\x04\x01\x03\x00\x5d\x00\x5e\x00\x5d\x00\x29\x00\x9e\x00\x5e\x00\x9f\x00\x03\x00\x5d\x00\x99\x00\xe4\x00\x10\x01\xba\x00\x0e\x01\x9a\x00\x99\x00\x5f\x00\x74\x00\x9b\x00\x79\x00\x9a\x00\x9c\x00\x03\x00\x9d\x00\x9b\x00\x99\x00\xf6\x00\x9c\x00\xe8\x00\x9d\x00\x9a\x00\xf8\x00\x64\x00\x03\x00\x9b\x00\xf8\x00\x04\x00\x9c\x00\xfe\x00\x9d\x00\xf9\x00\x65\x00\xfa\x00\x75\x00\xf9\x00\x60\x00\xfa\x00\xfb\x00\x2f\x00\xab\x00\x03\x00\x76\x00\xab\x00\xf2\x00\x03\x00\x5d\x00\x66\x00\xc8\x00\xb0\x00\xe8\x00\x03\x00\x5d\x00\x77\x00\xc9\x00\x74\x00\xca\x00\x4b\x00\x87\xff\xf3\x00\x08\x01\x03\x00\x5d\x00\x74\x00\x2c\x00\x30\x00\x07\x01\x03\x00\x03\x00\x31\x00\x61\x00\x03\x00\x32\x00\x33\x00\x2d\x00\xac\x00\x34\x00\x35\x00\xac\x00\xf1\x00\x87\xff\x36\x00\xb0\x00\x03\x00\xe0\x00\x87\xff\xba\x00\xad\x00\xe8\x00\xbb\x00\x03\x00\x5d\x00\x5e\x00\x5d\x00\xba\x00\x69\x00\x85\x00\xbb\x00\xea\x00\x58\x00\x4b\x00\x59\x00\x5a\x00\xc9\x00\xf0\x00\xca\x00\xbc\x00\x87\xff\x90\x00\x91\x00\x86\x00\xaf\x00\x5b\x00\x61\x00\x4b\x00\xa9\x00\x5c\x00\x90\x00\x91\x00\x6b\x00\xd7\x00\x92\x00\xc0\x00\xc1\x00\xee\x00\xb2\x00\xce\x00\x01\x01\xb0\x00\x4b\x00\x92\x00\xb0\x00\x03\x00\x5d\x00\x5e\x00\x93\x00\x94\x00\xfe\x00\x96\x00\x03\x00\x5d\x00\x5e\x00\x61\x00\x97\x00\x93\x00\x94\x00\x00\x01\x96\x00\x90\x00\x91\x00\x08\x00\x09\x00\x97\x00\xcf\x00\xb4\x00\x4b\x00\x4b\x00\x90\x00\x91\x00\x4b\x00\x4b\x00\x92\x00\xd7\x00\xc3\x00\xc4\x00\xc5\x00\x90\x00\x91\x00\x61\x00\x61\x00\x92\x00\xd5\x00\xcb\x00\xdf\x00\xd9\x00\x93\x00\x94\x00\xe1\x00\x96\x00\x92\x00\x8e\x00\x73\x00\xc6\x00\x97\x00\x93\x00\x94\x00\xeb\x00\x96\x00\xb5\x00\x90\x00\x91\x00\x4b\x00\x97\x00\x93\x00\x94\x00\xdc\x00\x96\x00\x4b\x00\x90\x00\x91\x00\x4b\x00\x97\x00\x92\x00\xaa\x00\xb6\x00\x17\x00\x86\x00\x90\x00\x91\x00\x8d\x00\x61\x00\x92\x00\x18\x00\x7e\x00\x9f\x00\x86\x00\x93\x00\x94\x00\xb7\x00\x96\x00\x92\x00\x69\x00\x62\x00\x7b\x00\x97\x00\x93\x00\x94\x00\x95\x00\x96\x00\x7c\x00\x90\x00\x91\x00\x7d\x00\x97\x00\x93\x00\x94\x00\xa4\x00\x96\x00\x4b\x00\x90\x00\x91\x00\x6a\x00\x97\x00\x92\x00\x81\x00\x6b\x00\x90\x00\x91\x00\x4b\x00\xc0\x00\xc1\x00\x61\x00\x92\x00\x82\x00\x6c\x00\x42\x00\x37\x00\x93\x00\xdb\x00\x92\x00\x96\x00\x67\x00\x0b\x00\x66\x00\x0c\x00\x97\x00\xe2\x00\x38\x00\x39\x00\x96\x00\x4b\x00\x4c\x00\x4d\x00\xd1\x00\x97\x00\x3a\x00\x96\x00\x0d\x00\x3b\x00\x0e\x00\xf2\x00\x97\x00\x3c\x00\x4e\x00\x4f\x00\xf0\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\x3d\x00\x3f\x00\x53\x00\x2b\x00\xf3\x00\xf4\x00\x25\x00\x26\x00\x21\x00\x1b\x00\x4e\x00\x4f\x00\xcc\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\x1c\x00\x1d\x00\x53\x00\x16\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x0b\x01\x5d\x00\x4e\x00\x4f\x00\xc1\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\x0c\x01\x0d\x01\x53\x00\x0e\x01\xb0\x00\x03\x00\x8c\xff\x06\x01\x08\x01\x5e\x00\x4e\x00\x4f\x00\xc2\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\xfc\x00\xb0\x00\x53\x00\xfd\x00\x03\x00\x8c\xff\xee\x00\xb0\x00\xbe\x00\x5e\x00\x4e\x00\x4f\x00\x80\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\xed\x00\xce\x00\x53\x00\x03\x00\xd3\x00\xd4\x00\xd5\x00\xd9\x00\xdb\x00\xb4\x00\x4e\x00\x4f\x00\xa6\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\xde\x00\xdf\x00\x53\x00\x03\x00\x03\x00\xb0\x00\xbf\x00\xcb\x00\x8a\x00\xbe\x00\x4e\x00\x4f\x00\xa7\x00\x51\x00\x52\x00\x7f\x00\x4c\x00\x4d\x00\x8b\x00\x03\x00\x53\x00\x8c\x00\x03\x00\x8e\x00\xa1\x00\xa3\x00\x5e\x00\xa2\x00\x4e\x00\x4f\x00\x80\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\xa4\x00\xa6\x00\x53\x00\xa9\x00\x03\x00\x6e\x00\x86\x00\x6f\x00\x70\x00\x71\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\x72\x00\x73\x00\x53\x00\x7a\x00\x03\x00\x4b\x00\x4c\x00\x4d\x00\x03\x00\x7b\x00\x4e\x00\x4f\x00\x68\x00\x51\x00\x52\x00\x5e\x00\x45\x00\x44\x00\x4e\x00\x46\x00\x53\x00\x83\x00\x52\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x53\x00\x3f\x00\x03\x00\x42\x00\x41\x00\x37\x00\x24\x00\x03\x00\x2b\x00\x20\x00\x03\x00\x03\x00\x28\x00\x25\x00\x03\x00\x21\x00\x03\x00\x1b\x00\x1f\x00\x13\x00\x1a\x00\x14\x00\x03\x00\x06\x00\x15\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"# +happyTable = HappyA# "\x00\x00\x06\x00\x06\x00\x06\x00\x06\x00\x74\x00\x7d\xff\x74\x00\x17\x00\x74\x00\xd7\x00\x5e\x00\x5e\x00\x87\xff\x74\x00\x07\x01\x99\x00\xe8\x00\xb0\x00\xe4\x00\x55\x00\x9a\x00\x5f\x00\x5f\x00\xea\x00\x9b\x00\x2c\x00\x56\x00\x9c\x00\x57\x00\x9d\x00\x75\x00\x58\x00\xff\x00\x59\x00\x5a\x00\x2d\x00\xf5\x00\xe6\x00\x76\x00\x87\xff\x02\x01\x5d\x00\x02\x01\x03\x01\x5b\x00\x03\x01\x03\x00\xd0\x00\x5c\x00\xb1\x00\x8f\x00\x60\x00\x18\x00\x22\x00\x15\x00\x07\x00\x11\x01\x9e\x00\x04\x01\x9f\x00\x03\x00\x5d\x00\x99\x00\xe4\x00\x03\x00\x5d\x00\x5e\x00\x9a\x00\x99\x00\x5d\x00\x64\x00\x9b\x00\xf6\x00\x9a\x00\x9c\x00\xf8\x00\x9d\x00\x9b\x00\x99\x00\x65\x00\x9c\x00\xe8\x00\x9d\x00\x9a\x00\xf9\x00\x10\x01\xfa\x00\x9b\x00\xf8\x00\xf8\x00\x9c\x00\x74\x00\x9d\x00\xab\x00\x66\x00\x09\x01\xf5\x00\xf9\x00\xf9\x00\xfa\x00\xfa\x00\xfe\x00\x87\xff\x0e\x01\xfb\x00\x2f\x00\xab\x00\x03\x00\x5d\x00\x79\x00\xc8\x00\xe8\x00\xf5\x00\x03\x00\x5d\x00\x03\x00\xc9\x00\x75\x00\xca\x00\xf1\x00\x03\x00\xb0\x00\xb9\x00\x03\x00\x5d\x00\x76\x00\x74\x00\x74\x00\xac\x00\x87\xff\xe8\x00\x30\x00\x10\x01\x03\x00\x03\x00\x31\x00\x77\x00\xe0\x00\x32\x00\x33\x00\x03\x00\xac\x00\x34\x00\x35\x00\xc9\x00\xf0\x00\xca\x00\x36\x00\xf6\x00\x03\x00\xad\x00\xee\x00\x03\x00\x5d\x00\x5e\x00\x28\x00\xba\x00\xba\x00\xba\x00\x85\x00\xbb\x00\xbb\x00\x58\x00\x4b\x00\x59\x00\x5a\x00\xaf\x00\x8d\x00\xce\x00\xea\x00\xbc\x00\x90\x00\x91\x00\x86\x00\x4b\x00\x5b\x00\x61\x00\xcf\x00\x4b\x00\x5c\x00\x03\x00\x5d\x00\x5e\x00\xd5\x00\x92\x00\x29\x00\xb0\x00\x01\x01\xb0\x00\x90\x00\x91\x00\x61\x00\xc3\x00\xc4\x00\xc5\x00\x03\x00\x5d\x00\x5e\x00\x93\x00\x94\x00\xfe\x00\x96\x00\x92\x00\xb2\x00\x08\x00\x09\x00\x97\x00\x90\x00\x91\x00\x86\x00\x4b\x00\xc6\x00\xaa\x00\xb5\x00\x4b\x00\x4b\x00\x93\x00\x94\x00\x00\x01\x96\x00\x92\x00\xc0\x00\xc1\x00\xcb\x00\x97\x00\x90\x00\x91\x00\x61\x00\x61\x00\xc0\x00\xc1\x00\xd7\x00\x4b\x00\x4b\x00\x93\x00\x94\x00\xe1\x00\x96\x00\x92\x00\xb4\x00\x8e\x00\xd9\x00\x97\x00\x90\x00\x91\x00\x61\x00\x61\x00\x86\x00\x9f\x00\x0b\x00\x4b\x00\x0c\x00\x93\x00\x94\x00\xeb\x00\x96\x00\x92\x00\x73\x00\x62\x00\x7b\x00\x97\x00\x90\x00\x91\x00\x61\x00\x0d\x00\x7c\x00\x0e\x00\x7d\x00\xe4\x00\x81\x00\x93\x00\x94\x00\xdc\x00\x96\x00\x92\x00\x66\x00\x82\x00\x6c\x00\x97\x00\x90\x00\x91\x00\x69\x00\xe5\x00\x87\x00\xf2\x00\x42\x00\x88\x00\xe6\x00\x93\x00\x94\x00\xb7\x00\x96\x00\x92\x00\x69\x00\x37\x00\x38\x00\x97\x00\x90\x00\x91\x00\xf3\x00\x08\x01\xa9\x00\x4b\x00\x90\x00\x91\x00\x6b\x00\x93\x00\x94\x00\x95\x00\x96\x00\x92\x00\x39\x00\x3a\x00\x6a\x00\x97\x00\xdf\x00\x92\x00\x6b\x00\x3b\x00\x3c\x00\xf2\x00\x90\x00\x91\x00\x3d\x00\x93\x00\x94\x00\xa4\x00\x96\x00\x90\x00\x91\x00\x93\x00\xdb\x00\x97\x00\x96\x00\x92\x00\xf3\x00\xf4\x00\x4b\x00\x97\x00\x03\x00\x2b\x00\x92\x00\x04\x00\x3f\x00\x4b\x00\x25\x00\x4b\x00\x26\x00\xe2\x00\x21\x00\xb6\x00\x96\x00\x4b\x00\x4c\x00\x4d\x00\xd1\x00\x97\x00\x7e\x00\x96\x00\x67\x00\x1b\x00\x1c\x00\x1e\x00\x97\x00\x16\x00\x4e\x00\x4f\x00\xf0\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\x0e\x00\x0f\x00\x53\x00\x10\x00\x11\x00\x5d\x00\x0c\x01\x0b\x01\x0d\x01\x03\x00\x4e\x00\x4f\x00\xcc\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\x0e\x01\x5e\x00\x53\x00\x8c\xff\x06\x01\x08\x01\xfc\x00\xfd\x00\xb0\x00\xb0\x00\x4e\x00\x4f\x00\xc1\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\x8c\xff\x03\x00\x53\x00\xce\x00\xb0\x00\xbe\x00\xee\x00\x03\x00\x5e\x00\xd3\x00\x4e\x00\x4f\x00\xc2\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\xed\x00\xd4\x00\x53\x00\xd5\x00\xd9\x00\xdb\x00\xde\x00\xdf\x00\x03\x00\xb4\x00\x4e\x00\x4f\x00\x80\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\xbe\x00\x03\x00\x53\x00\xbf\x00\xcb\x00\x03\x00\xb0\x00\x8b\x00\x8a\x00\x8c\x00\x4e\x00\x4f\x00\xa6\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\x8e\x00\x03\x00\x53\x00\xa1\x00\x5e\x00\xa2\x00\xa3\x00\xa4\x00\xa6\x00\xa9\x00\x4e\x00\x4f\x00\xa7\x00\x51\x00\x52\x00\x7f\x00\x4c\x00\x4d\x00\x6e\x00\x03\x00\x53\x00\x6f\x00\x71\x00\x70\x00\x72\x00\x73\x00\x7a\x00\x7b\x00\x4e\x00\x4f\x00\x80\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\x86\x00\x5e\x00\x53\x00\x03\x00\x03\x00\x46\x00\x44\x00\x45\x00\x47\x00\x48\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x4b\x00\x4c\x00\x4d\x00\x49\x00\x4a\x00\x53\x00\x4b\x00\x03\x00\x4b\x00\x4c\x00\x4d\x00\x3f\x00\x41\x00\x4e\x00\x4f\x00\x68\x00\x51\x00\x52\x00\x42\x00\x37\x00\x2b\x00\x4e\x00\x28\x00\x53\x00\x83\x00\x52\x00\x03\x00\x03\x00\x24\x00\x03\x00\x25\x00\x53\x00\x21\x00\x1e\x00\x20\x00\x1a\x00\x14\x00\x03\x00\x03\x00\x1b\x00\x13\x00\x03\x00\x06\x00\x15\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"# happyReduceArr = array (1, 132) [ (1 , happyReduce_1), @@ -614,7 +614,7 @@ happyReduction_12 happy_x_2 happyReduce_13 = happySpecReduce_2 7# happyReduction_13 happyReduction_13 happy_x_2 happy_x_1 - = case happyOut4 happy_x_1 of { happy_var_1 -> + = case happyOut56 happy_x_1 of { happy_var_1 -> happyIn11 (Ext happy_var_1 )} @@ -1727,7 +1727,7 @@ happyError ts = myLexer = tokens {-# LINE 1 "GenericTemplate.hs" #-} --- $Id: ParGFC.hs,v 1.2 2004/09/14 18:05:47 aarne Exp $ +-- $Id: ParGFC.hs,v 1.3 2004/09/15 15:36:32 aarne Exp $ diff --git a/src/GF/Canon/PrintGFC.hs b/src/GF/Canon/PrintGFC.hs index 5182e9270..f55b9604a 100644 --- a/src/GF/Canon/PrintGFC.hs +++ b/src/GF/Canon/PrintGFC.hs @@ -117,7 +117,7 @@ instance Print ModType where instance Print Extend where prt i e = case e of - Ext id -> prPrec i 0 (concatD [prt 0 id , doc (showString "**")]) + Ext ids -> prPrec i 0 (concatD [prt 0 ids , doc (showString "**")]) NoExt -> prPrec i 0 (concatD []) diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs index 5ca8d71b4..8057904a8 100644 --- a/src/GF/Compile/Compile.hs +++ b/src/GF/Compile/Compile.hs @@ -10,7 +10,7 @@ import Modules import ReadFiles import ShellState import MkResource -import MkUnion +---- import MkUnion -- the main compiler passes import GetGrammar @@ -202,9 +202,12 @@ makeSourceModule opts env@(k,gr,can) mo@(i,mi) = case mi of mos = modules gr --- putp " type checking reused" $ ioeErr $ showCheckModule mos mo2 return $ (k,mo2) +{- ---- obsolete MTUnion ty imps -> do mo' <- ioeErr $ makeUnion gr i ty imps compileSourceModule opts env mo' +-} + _ -> compileSourceModule opts env mo _ -> compileSourceModule opts env mo where diff --git a/src/GF/Compile/Extend.hs b/src/GF/Compile/Extend.hs index 84eb91945..6f76ad093 100644 --- a/src/GF/Compile/Extend.hs +++ b/src/GF/Compile/Extend.hs @@ -17,21 +17,11 @@ import Monad extendModule :: [SourceModule] -> SourceModule -> Err SourceModule extendModule ms (name,mod) = case mod of - ModMod (Module mt st fs me ops js) -> do - -{- --- building the {s : Str} lincat from js0 - js <- case mt of - MTConcrete a -> do - ModMod ma <- lookupModule (MGrammar ms) a - let cats = [c | (c,AbsCat _ _) <- tree2list $ jments ma] - jscs = [(c,CncCat (yes defLinType) nope nope) | c <- cats] - return $ updatesTreeNondestr jscs js0 - _ -> return js0 --} - - case me of - -- if the module is an extension of another one... - Just n -> do + ModMod m -> do + mod' <- foldM extOne m (extends m) + return (name,ModMod mod') + where + extOne mod@(Module mt st fs es ops js) n = do (m0,isCompl) <- do m <- lookupModMod (MGrammar ms) n @@ -44,11 +34,8 @@ extendModule ms (name,mod) = case mod of js1 <- extendMod isCompl n (jments m0) js -- if incomplete, throw away extension information - let me' = if isCompl then me else Nothing - return $ (name,ModMod (Module mt st fs me' ops js1)) - - -- if the module is not an extension, just return it - _ -> return (name,mod) + let me' = if isCompl then es else (filter (/=n) es) + return $ Module mt st fs me' ops js1 -- When extending a complete module: new information is inserted, -- and the process is interrupted if unification fails. @@ -94,6 +81,12 @@ extendAnyInfo isc n i j = errIn ("building extension for" +++ prt n) $ case (i,j ---- (AnyInd _ _, ResOper _ _) -> return j ---- + (AnyInd b1 m1, AnyInd b2 m2) -> do + testErr (b1 == b2) "inconsistent indirection status" + testErr (m1 == m2) $ + "different sources of indirection: " +++ show m1 +++ show m2 + return i + _ -> Bad $ "cannot unify information in" ++++ show i ++++ "and" ++++ show j --- where diff --git a/src/GF/Compile/GrammarToCanon.hs b/src/GF/Compile/GrammarToCanon.hs index 7b7620f3b..ed145385c 100644 --- a/src/GF/Compile/GrammarToCanon.hs +++ b/src/GF/Compile/GrammarToCanon.hs @@ -39,7 +39,7 @@ redModInfo (c,info) = do info' <- case info of ModMod m -> do let isIncompl = not $ isCompleteModule m - (e,os) <- if isIncompl then return (Nothing,[]) else redExtOpen m ---- + (e,os) <- if isIncompl then return ([],[]) else redExtOpen m ---- flags <- mapM redFlag $ flags m (a,mt) <- case mtype m of MTConcrete a -> do @@ -61,8 +61,7 @@ redModInfo (c,info) = do where redExtOpen m = do e' <- case extends m of - Just e -> liftM Just $ redIdent e - _ -> return Nothing + es -> mapM redIdent es os' <- mapM (\o -> case o of OQualif q _ i -> liftM (OSimple q) (redIdent i) _ -> prtBad "cannot translate unqualified open in" c) $ opens m diff --git a/src/GF/Compile/MkResource.hs b/src/GF/Compile/MkResource.hs index ed24389a5..d28384e5d 100644 --- a/src/GF/Compile/MkResource.hs +++ b/src/GF/Compile/MkResource.hs @@ -13,7 +13,7 @@ import Monad -- extracting resource r from abstract + concrete syntax -- AR 21/8/2002 -- 22/6/2003 for GF with modules -makeReuse :: SourceGrammar -> Ident -> Maybe Ident -> +makeReuse :: SourceGrammar -> Ident -> [Ident] -> MReuseType Ident -> Err SourceRes makeReuse gr r me mrc = do flags <- return [] --- no flags are passed: they would not make sense @@ -59,7 +59,7 @@ makeReuse gr r me mrc = do -- the second Boolean indicates if the definition needs be given mkResDefs :: Bool -> Bool -> - SourceGrammar -> Ident -> Ident -> Maybe Ident -> Maybe Ident -> + SourceGrammar -> Ident -> Ident -> [Ident] -> [Ident] -> BinTree (Ident,Info) -> BinTree (Ident,Info) -> Err (BinTree (Ident,Info)) mkResDefs hasT isC gr r a mext maext abs cnc = mapMTree (mkOne a maext) abs where @@ -101,7 +101,7 @@ mkResDefs hasT isC gr r a mext maext abs cnc = mapMTree (mkOne a maext) abs wher -- type constant qualifications changed from abstract to resource redirTyp always a mae ty = case ty of Q _ c | always -> return $ Q r c - Q n c | n == a || Just n == mae -> return $ Q r c + Q n c | n == a || [n] == mae -> return $ Q r c ---- FIX for non-singleton exts _ -> composOp (redirTyp always a mae) ty lockRecType :: Ident -> Type -> Err Type diff --git a/src/GF/Compile/MkUnion.hs b/src/GF/Compile/MkUnion.hs index e6260e6dc..6c46068a4 100644 --- a/src/GF/Compile/MkUnion.hs +++ b/src/GF/Compile/MkUnion.hs @@ -13,7 +13,7 @@ import List import Monad -- building union of modules --- AR 1/3/2004 +-- AR 1/3/2004 --- OBSOLETE 15/9/2004 with multiple inheritance makeUnion :: SourceGrammar -> Ident -> ModuleType Ident -> [(Ident,[Ident])] -> Err SourceModule diff --git a/src/GF/Compile/ModDeps.hs b/src/GF/Compile/ModDeps.hs index c4784e243..60f360746 100644 --- a/src/GF/Compile/ModDeps.hs +++ b/src/GF/Compile/ModDeps.hs @@ -65,9 +65,7 @@ moduleDeps ms = mapM deps ms where t -> chDep (IdentM c t) (extends m) t (opens m) t chDep it es ety os oty = do - ests <- case es of - Just e -> liftM singleton $ lookupModuleType gr e - _ -> return [] + ests <- mapM (lookupModuleType gr) es testErr (all (compatMType ety) ests) "inappropriate extension module type" osts <- mapM (lookupModuleType gr . openedModule) os testErr (all (compatOType oty) osts) "inappropriate open module type" @@ -75,7 +73,7 @@ moduleDeps ms = mapM deps ms where IdentM _ (MTConcrete a) -> [IdentM a MTAbstract] _ -> [] ---- return (it, ab ++ - [IdentM e ety | Just e <- [es]] ++ + [IdentM e ety | e <- es] ++ [IdentM (openedModule o) oty | o <- os]) -- check for superficial compatibility, not submodule relation etc: what can be extended @@ -114,7 +112,7 @@ requiredCanModules :: (Eq i, Show i) => MGrammar i f a -> i -> [i] requiredCanModules gr = nub . iterFix (concatMap more) . singleton where more i = errVal [] $ do m <- lookupModMod gr i - return $ maybe [] return (extends m) ++ map openedModule (opens m) + return $ extends m ++ map openedModule (opens m) diff --git a/src/GF/Compile/Rebuild.hs b/src/GF/Compile/Rebuild.hs index 048af3c7c..491c9c9f2 100644 --- a/src/GF/Compile/Rebuild.hs +++ b/src/GF/Compile/Rebuild.hs @@ -34,12 +34,14 @@ rebuildModule ms mo@(i,mi) = do js' <- extendMod False i0 (jments m1) (jments m) --- to avoid double inclusions, in instance I of I0 = J0 ** ... case extends m of - Nothing -> return $ replaceJudgements m js' - Just j0 -> do + [] -> return $ replaceJudgements m js' + j0:jj -> do m0 <- lookupModMod gr j0 let notInM0 c = not $ isInBinTree (fst c) $ mapTree fst $ jments m0 let js2 = sorted2tree $ filter notInM0 $ tree2list js' - return $ replaceJudgements m js2 + if null jj + then return $ replaceJudgements m js2 + else Bad "FIXME: handle multiple inheritance in instance" return $ ModMod m' _ -> return mi diff --git a/src/GF/Compile/ShellState.hs b/src/GF/Compile/ShellState.hs index 8676a60b6..1c90d1369 100644 --- a/src/GF/Compile/ShellState.hs +++ b/src/GF/Compile/ShellState.hs @@ -181,11 +181,10 @@ filterAbstracts abstr cgr = M.MGrammar (nubBy (\x y -> fst x == fst y) [m | m <- Just a -> elem i $ needs a _ -> True needs a = [i | (i,M.ModMod m) <- ms, not (M.isModAbs m) || dep i a] - dep i a = elem i (ext a mse) + dep i a = elem i (ext mse a) mse = [(i,me) | (i,M.ModMod m) <- ms, M.isModAbs m, me <- [M.extends m]] - ext a es = case lookup a es of - Just (Just e) -> a : ext e es - Just _ -> a : [] + ext es a = case lookup a es of + Just e -> a : concatMap (ext es) e ---- FIX multiple exts _ -> [] diff --git a/src/GF/Infra/Modules.hs b/src/GF/Infra/Modules.hs index ffd622b54..22c8b242a 100644 --- a/src/GF/Infra/Modules.hs +++ b/src/GF/Infra/Modules.hs @@ -26,7 +26,7 @@ data Module i f a = Module { mtype :: ModuleType i , mstatus :: ModuleStatus , flags :: [f] , - extends :: Maybe i , + extends :: [i], opens :: [OpenSpec i] , jments :: BinTree (i,a) } @@ -50,6 +50,11 @@ data ModuleType i = data MReuseType i = MRInterface i | MRInstance i i | MRResource i deriving (Show,Eq) +-- previously: single inheritance +extendm :: Module i f a -> Maybe i +extendm m = case extends m of + [i] -> Just i + _ -> Nothing -- destructive update @@ -131,7 +136,7 @@ depPathModule m = fors m ++ exts m ++ opens m where MTConcrete i -> [oSimple i] MTInstance i -> [oSimple i] _ -> [] - exts m = map oSimple $ maybe [] return $ extends m + exts m = map oSimple $ extends m -- all dependencies allDepsModule :: Ord i => MGrammar i f a -> Module i f a -> [OpenSpec i] @@ -155,8 +160,8 @@ partOfGrammar gr (i,m) = MGrammar [mo | mo@(j,_) <- mods, elem j modsFor] allExtends :: (Show i,Ord i) => MGrammar i f a -> i -> [i] allExtends gr i = case lookupModule gr i of Ok (ModMod m) -> case extends m of - Just i1 -> i : allExtends gr i1 - _ -> [i] + [] -> [i] + is -> i : concatMap (allExtends gr) is _ -> [] -- this plus that an instance extends its interface @@ -165,7 +170,7 @@ allExtendsPlus gr i = case lookupModule gr i of Ok (ModMod m) -> i : concatMap (allExtendsPlus gr) (exts m) _ -> [] where - exts m = [j | Just j <- [extends m]] ++ [j | MTInstance j <- [mtype m]] + exts m = extends m ++ [j | MTInstance j <- [mtype m]] -- conversely: all modules that extend a given module, incl. instances of interface allExtensions :: (Show i,Ord i) => MGrammar i f a -> i -> [i] @@ -173,7 +178,7 @@ allExtensions gr i = case lookupModule gr i of Ok (ModMod m) -> let es = exts i in es ++ concatMap (allExtensions gr) es _ -> [] where - exts i = [j | (j,m) <- mods, elem (Just i) [extends m] + exts i = [j | (j,m) <- mods, elem i (extends m) || elem (MTInstance i) [mtype m]] mods = [(j,m) | (j,ModMod m) <- modules gr] @@ -193,7 +198,7 @@ emptyModInfo :: ModInfo i f a emptyModInfo = ModMod emptyModule emptyModule :: Module i f a -emptyModule = Module MTResource MSComplete [] Nothing [] NT +emptyModule = Module MTResource MSComplete [] [] [] NT -- we store the module type with the identifier diff --git a/src/GF/Shell/ShellCommands.hs b/src/GF/Shell/ShellCommands.hs index 236718918..b4c28ca2e 100644 --- a/src/GF/Shell/ShellCommands.hs +++ b/src/GF/Shell/ShellCommands.hs @@ -30,7 +30,6 @@ data Command = | CGenerateRandom | CGenerateTrees | CPutTerm - | CReadTerm | CWrapTerm I.Ident | CMorphoAnalyse | CTestTokenizer diff --git a/src/GF/Source/GrammarToSource.hs b/src/GF/Source/GrammarToSource.hs index b313b563c..290cb92d0 100644 --- a/src/GF/Source/GrammarToSource.hs +++ b/src/GF/Source/GrammarToSource.hs @@ -30,8 +30,8 @@ trModule (i,mo) = case mo of (mkOpens (map trOpen (opens m))) (mkTopDefs (concatMap trAnyDef (tree2list (jments m)) ++ map trFlag (flags m))) -trExtend :: Maybe Ident -> P.Extend -trExtend i = maybe P.NoExt (P.Ext . singleton . tri) i +trExtend :: [Ident] -> P.Extend +trExtend i = ifNull P.NoExt (P.Ext . map tri) i ---- this has to be completed with other mtys forName (MTConcrete a) = tri a diff --git a/src/GF/Source/SourceToGrammar.hs b/src/GF/Source/SourceToGrammar.hs index 31e917469..436ce4503 100644 --- a/src/GF/Source/SourceToGrammar.hs +++ b/src/GF/Source/SourceToGrammar.hs @@ -75,11 +75,11 @@ transModDef x = case x of flags' <- return [f | Right fs <- defs0, f <- fs] return (id',GM.ModMod (GM.Module mtyp' mstat' flags' extends' opens' defs')) MReuse _ -> do - return (id', GM.ModMod (GM.Module mtyp' mstat' [] Nothing [] NT)) + return (id', GM.ModMod (GM.Module mtyp' mstat' [] [] [] NT)) MUnion imps -> do imps' <- mapM transIncluded imps return (id', - GM.ModMod (GM.Module (GM.MTUnion mtyp' imps') mstat' [] Nothing [] NT)) + GM.ModMod (GM.Module (GM.MTUnion mtyp' imps') mstat' [] [] [] NT)) MWith m opens -> do m' <- transIdent m @@ -137,11 +137,10 @@ transTransfer x = case x of TransferIn open -> liftM Left $ transOpen open TransferOut open -> liftM Right $ transOpen open -transExtend :: Extend -> Err (Maybe Ident) +transExtend :: Extend -> Err [Ident] transExtend x = case x of - Ext [id] -> transIdent id >>= return . Just - Ext ids -> Bad "sorry, no support for multiple inheritance yet" - NoExt -> return Nothing + Ext ids -> mapM transIdent ids + NoExt -> return [] transOpens :: Opens -> Err [GM.OpenSpec Ident] transOpens x = case x of diff --git a/src/Makefile b/src/Makefile index a71f5f03d..ce5873e52 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,7 +4,8 @@ include config.mk GHMAKE=$(GHC) --make GHCXMAKE=ghcxmake GHCFLAGS=-package lang -package util -fglasgow-exts $(CPPFLAGS) $(LDFLAGS) -GHCOPTFLAGS=-O $(GHCFLAGS) +GHCOPTFLAGS=$(GHCFLAGS) +##GHCOPTFLAGS=-O $(GHCFLAGS) GHCFUDFLAG= JAVAFLAGS=-target 1.4 -source 1.4