diff --git a/Grammar.cf b/Grammar.cf index b258446..9acd143 100644 --- a/Grammar.cf +++ b/Grammar.cf @@ -6,6 +6,7 @@ EId. Exp3 ::= Ident ; EInt. Exp3 ::= Integer ; EApp. Exp2 ::= Exp2 Exp3 ; EAdd. Exp1 ::= Exp1 "+" Exp2 ; +ESub. Exp1 ::= Exp1 "-" Exp2 ; EAbs. Exp ::= "\\" Ident "->" Exp ; coercions Exp 3 ; diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..35736a1 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +.PHONY : sdist clean + +language : src/Grammar/Test + cabal install --installdir=. --overwrite-policy=always + +src/Grammar/Test.hs src/Grammar/Lex.x src/Grammar/Par.y : Grammar.cf + bnfc -o src -d $< + +src/Grammar/Par.hs : src/Grammar/Par.y + happy --ghc --coerce --array --info $< + +src/Grammar/Lex.hs : src/Grammar/Lex.x + alex --ghc $< + +src/Grammar/%.y : Grammar.cf + bnfc -o src -d $< + +src/Grammar/Test : src/Grammar/Test.hs src/Grammar/Par.hs src/Grammar/Lex.hs + ghc src/Grammar/Test.hs src/Grammar/Par.hs src/Grammar/Lex.hs src/Grammar/Abs.hs src/Grammar/Skel.hs src/Grammar/Print.hs -o src/Grammar/test + +clean : + rm -r src/Grammar + rm language + +# EOF diff --git a/language b/language new file mode 120000 index 0000000..4ba1e1a --- /dev/null +++ b/language @@ -0,0 +1 @@ +/home/samuel/.cabal/store/ghc-9.4.4/language-0.1.0.0-e-language-80436b2c1d93bf52fad22442b35609fca17123af17fcd9d9251ea49ce5440bf0/bin/language \ No newline at end of file diff --git a/src/Compiler/Compiler.hs b/src/Compiler/Compiler.hs index c1bbaa3..f50c514 100644 --- a/src/Compiler/Compiler.hs +++ b/src/Compiler/Compiler.hs @@ -65,6 +65,7 @@ data LLVMIr = Define Type Ident Params | Declare Type Ident Params | Variable Ident | Add Type Value Value + | Sub Type Value Value | Call Type Ident Args | Alloca Type | Store Type Ident Type Ident @@ -80,6 +81,7 @@ printLLVMIr DefineEnd = "}\n" printLLVMIr (Declare t (Ident i) params) = undefined printLLVMIr (Variable (Ident i)) = concat ["%", i, " = "] printLLVMIr (Add t v1 v2) = concat ["add ", show t, " ", show v1, ", ", show v2, "\n"] +printLLVMIr (Sub t v1 v2) = concat ["sub ", show t, " ", show v1, ", ", show v2, "\n"] printLLVMIr (Call t (Ident i) arg) = concat ["call ", show t, " @", i, "(" , concatMap (\(x,y) -> show x <> " " <> show y) arg , ")\n"] @@ -126,6 +128,7 @@ compile (Program prgE) = do go :: Exp -> CompilerState go (EInt int) = emitInt int go (EAdd e1 e2) = emitAdd e1 e2 + go (ESub e1 e2) = emitSub e1 e2 go (EId id) = undefined go (EApp e1 e2) = undefined go (EAbs id e) = undefined @@ -144,7 +147,22 @@ compile (Program prgE) = do emitAdd e1 e2 = do -- instead of declaring variables for adding ints, -- we can directly pass them to add. - (v1,v2) <- case (e1, e2) of + (v1,v2) <- evalToValues e1 e2 + increaseVarCount + v <- gets variableCount + emit $ Variable $ Ident $ show v + emit $ Add I64 v1 v2 + + emitSub :: Exp -> Exp -> CompilerState + emitSub e1 e2 = do + (v1,v2) <- evalToValues e1 e2 + increaseVarCount + v <- gets variableCount + emit $ Variable $ Ident $ show v + emit $ Sub I64 v1 v2 + + evalToValues :: Exp -> Exp -> State CodeGenerator (Value, Value) + evalToValues e1 e2 = case (e1, e2) of (EInt i1, EInt i2) -> return (VInteger i1, VInteger i2) (EInt i, e) -> do go e @@ -160,8 +178,3 @@ compile (Program prgE) = do go e2 v2 <- gets variableCount return (VIdent (Ident $ show v1),VIdent (Ident $ show v2)) - increaseVarCount - v <- gets variableCount - emit $ Variable $ Ident $ show v - emit $ Add I64 v1 v2 - diff --git a/src/Grammar/Abs.hi b/src/Grammar/Abs.hi new file mode 100644 index 0000000..df1820a Binary files /dev/null and b/src/Grammar/Abs.hi differ diff --git a/src/Grammar/Abs.hs b/src/Grammar/Abs.hs index 8ed9f3a..d9a5d47 100644 --- a/src/Grammar/Abs.hs +++ b/src/Grammar/Abs.hs @@ -18,6 +18,7 @@ data Exp | EInt Integer | EApp Exp Exp | EAdd Exp Exp + | ESub Exp Exp | EAbs Ident Exp deriving (C.Eq, C.Ord, C.Show, C.Read) diff --git a/src/Grammar/Abs.o b/src/Grammar/Abs.o new file mode 100644 index 0000000..025a038 Binary files /dev/null and b/src/Grammar/Abs.o differ diff --git a/src/Grammar/Doc.txt b/src/Grammar/Doc.txt index 946b390..8c549a6 100644 --- a/src/Grammar/Doc.txt +++ b/src/Grammar/Doc.txt @@ -28,8 +28,8 @@ The reserved words used in Grammar are the following: | ``main`` | | | The symbols used in Grammar are the following: - | = | + | \ | -> - | ( | ) | | + | = | + | - | \ + | -> | ( | ) | ===Comments=== Single-line comments begin with --.Multiple-line comments are enclosed with {- and -}. @@ -47,6 +47,7 @@ All other symbols are terminals. | //Exp2// | -> | //Exp2// //Exp3// | | **|** | //Exp3// | //Exp1// | -> | //Exp1// ``+`` //Exp2// + | | **|** | //Exp1// ``-`` //Exp2// | | **|** | //Exp2// | //Exp// | -> | ``\`` //Ident// ``->`` //Exp// | | **|** | //Exp1// diff --git a/src/Grammar/Lex.hi b/src/Grammar/Lex.hi new file mode 100644 index 0000000..83b665c Binary files /dev/null and b/src/Grammar/Lex.hi differ diff --git a/src/Grammar/Lex.hs b/src/Grammar/Lex.hs index fa5df83..25923f8 100644 --- a/src/Grammar/Lex.hs +++ b/src/Grammar/Lex.hs @@ -1,12 +1,13 @@ {-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-} {-# LANGUAGE CPP #-} -{-# LINE 4 "LexGrammar.x" #-} +{-# LANGUAGE MagicHash #-} +{-# LINE 4 "src/Grammar/Lex.x" #-} {-# OPTIONS -fno-warn-incomplete-patterns #-} {-# OPTIONS_GHC -w #-} {-# LANGUAGE PatternSynonyms #-} -module Grammar.Lex where +module Grammar.Lex where import Prelude @@ -24,4049 +25,29 @@ import Data.Array #else import Array #endif +#if __GLASGOW_HASKELL__ >= 503 +import Data.Array.Base (unsafeAt) +import GHC.Exts +#else +import GlaExts +#endif alex_tab_size :: Int alex_tab_size = 8 -alex_base :: Array Int Int -alex_base = listArray (0 :: Int, 29) - [ -8 - , 60 - , 188 - , -39 - , -76 - , 399 - , 0 - , -2 - , 0 - , 317 - , 616 - , -36 - , -23 - , 0 - , 697 - , 953 - , 954 - , 1082 - , 547 - , 1147 - , 1260 - , 0 - , 0 - , 0 - , 1471 - , 1727 - , 1326 - , 0 - , 0 - , 1712 - ] +alex_base :: AlexAddr +alex_base = AlexA# + "\xf8\xff\xff\xff\x3c\x00\x00\x00\xbc\x00\x00\x00\xd9\xff\xff\xff\xb4\xff\xff\xff\x8f\x01\x00\x00\x00\x00\x00\x00\xfe\xff\xff\xff\xdf\xff\xff\xff\x00\x00\x00\x00\x3d\x01\x00\x00\x68\x02\x00\x00\xdd\xff\xff\xff\x00\x00\x00\x00\xb9\x02\x00\x00\xb9\x03\x00\x00\xba\x03\x00\x00\x3a\x04\x00\x00\x23\x02\x00\x00\x7b\x04\x00\x00\xec\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\x05\x00\x00\xbf\x06\x00\x00\x2e\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x06\x00\x00"# -alex_table :: Array Int Int -alex_table = listArray (0 :: Int, 1982) - [ 0 - , 7 - , 7 - , 7 - , 7 - , 7 - , 5 - , 7 - , 7 - , 7 - , 7 - , 7 - , 11 - , 11 - , 11 - , 11 - , 11 - , 11 - , 11 - , 11 - , 11 - , 11 - , 14 - , 0 - , 7 - , 0 - , 0 - , 0 - , 0 - , 0 - , 7 - , 0 - , 8 - , 8 - , 0 - , 8 - , 0 - , 12 - , 0 - , 8 - , 11 - , 11 - , 11 - , 11 - , 11 - , 11 - , 11 - , 11 - , 11 - , 11 - , 0 - , 0 - , 0 - , 8 - , 0 - , 0 - , 0 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 0 - , 8 - , 0 - , 0 - , 0 - , 0 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 3 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 9 - , 25 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 1 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 24 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 0 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 0 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 25 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 4 - , 1 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 26 - , 2 - , 28 - , 28 - , 28 - , 29 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 10 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , -1 - , 0 - , 0 - , 0 - , 10 - , 0 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , 10 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 9 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 15 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 18 - , 16 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 19 - , 17 - , 23 - , 23 - , 23 - , 20 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 15 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 21 - , 16 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 22 - , 18 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 19 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 24 - , 4 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 6 - , 0 - , 0 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 25 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 13 - , 4 - , 1 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 27 - , 26 - , 2 - , 28 - , 28 - , 28 - , 29 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 26 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - , 0 - ] +alex_table :: AlexAddr +alex_table = AlexA# + "\x00\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x05\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x0e\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x07\x00\x00\x00\x09\x00\x09\x00\x00\x00\x09\x00\x00\x00\x08\x00\x00\x00\x00\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x03\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x19\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x01\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x18\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x00\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x00\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\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\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\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\x19\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x04\x00\x01\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1a\x00\x02\x00\x1c\x00\x1c\x00\x1c\x00\x1d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\xff\xff\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x0b\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\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\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\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\x0f\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x12\x00\x10\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x13\x00\x11\x00\x17\x00\x17\x00\x17\x00\x14\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\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\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\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\x00\x00\x0f\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x10\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x16\x00\x12\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\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\x13\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\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\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\x18\x00\x04\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\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\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\x06\x00\x00\x00\x00\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\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\x19\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x0d\x00\x04\x00\x01\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1b\x00\x1a\x00\x02\x00\x1c\x00\x1c\x00\x1c\x00\x1d\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\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\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\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\x1a\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\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\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\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"# -alex_check :: Array Int Int -alex_check = listArray (0 :: Int, 1982) - [ -1 - , 9 - , 10 - , 11 - , 12 - , 13 - , 45 - , 9 - , 10 - , 11 - , 12 - , 13 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , 45 - , -1 - , 32 - , -1 - , -1 - , -1 - , -1 - , -1 - , 32 - , -1 - , 40 - , 41 - , -1 - , 43 - , -1 - , 45 - , -1 - , 62 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , -1 - , -1 - , -1 - , 61 - , -1 - , -1 - , -1 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , -1 - , 92 - , -1 - , -1 - , -1 - , -1 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , 123 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 195 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 45 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , -1 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , -1 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 39 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , 10 - , -1 - , -1 - , -1 - , 95 - , -1 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 195 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 0 - , 1 - , 2 - , 3 - , 4 - , 5 - , 6 - , 7 - , 8 - , 9 - , 10 - , 11 - , 12 - , 13 - , 14 - , 15 - , 16 - , 17 - , 18 - , 19 - , 20 - , 21 - , 22 - , 23 - , 24 - , 25 - , 26 - , 27 - , 28 - , 29 - , 30 - , 31 - , 32 - , 33 - , 34 - , 35 - , 36 - , 37 - , 38 - , 39 - , 40 - , 41 - , 42 - , 43 - , 44 - , 45 - , 46 - , 47 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , 58 - , 59 - , 60 - , 61 - , 62 - , 63 - , 64 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , 91 - , 92 - , 93 - , 94 - , 95 - , 96 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , 123 - , 124 - , 125 - , 126 - , 127 - , -1 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 45 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 125 - , -1 - , -1 - , 128 - , 129 - , 130 - , 131 - , 132 - , 133 - , 134 - , 135 - , 136 - , 137 - , 138 - , 139 - , 140 - , 141 - , 142 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , 0 - , 1 - , 2 - , 3 - , 4 - , 5 - , 6 - , 7 - , 8 - , 9 - , 10 - , 11 - , 12 - , 13 - , 14 - , 15 - , 16 - , 17 - , 18 - , 19 - , 20 - , 21 - , 22 - , 23 - , 24 - , 25 - , 26 - , 27 - , 28 - , 29 - , 30 - , 31 - , 32 - , 33 - , 34 - , 35 - , 36 - , 37 - , 38 - , 39 - , 40 - , 41 - , 42 - , 43 - , 44 - , 45 - , 46 - , 47 - , 48 - , 49 - , 50 - , 51 - , 52 - , 53 - , 54 - , 55 - , 56 - , 57 - , 58 - , 59 - , 60 - , 61 - , 62 - , 63 - , 64 - , 65 - , 66 - , 67 - , 68 - , 69 - , 70 - , 71 - , 72 - , 73 - , 74 - , 75 - , 76 - , 77 - , 78 - , 79 - , 80 - , 81 - , 82 - , 83 - , 84 - , 85 - , 86 - , 87 - , 88 - , 89 - , 90 - , 91 - , 92 - , 93 - , 94 - , 95 - , 96 - , 97 - , 98 - , 99 - , 100 - , 101 - , 102 - , 103 - , 104 - , 105 - , 106 - , 107 - , 108 - , 109 - , 110 - , 111 - , 112 - , 113 - , 114 - , 115 - , 116 - , 117 - , 118 - , 119 - , 120 - , 121 - , 122 - , 123 - , 124 - , 125 - , 126 - , 127 - , 143 - , 144 - , 145 - , 146 - , 147 - , 148 - , 149 - , 150 - , 151 - , 152 - , 153 - , 154 - , 155 - , 156 - , 157 - , 158 - , 159 - , 160 - , 161 - , 162 - , 163 - , 164 - , 165 - , 166 - , 167 - , 168 - , 169 - , 170 - , 171 - , 172 - , 173 - , 174 - , 175 - , 176 - , 177 - , 178 - , 179 - , 180 - , 181 - , 182 - , 183 - , 184 - , 185 - , 186 - , 187 - , 188 - , 189 - , 190 - , 191 - , 192 - , 193 - , 194 - , 195 - , 196 - , 197 - , 198 - , 199 - , 200 - , 201 - , 202 - , 203 - , 204 - , 205 - , 206 - , 207 - , 208 - , 209 - , 210 - , 211 - , 212 - , 213 - , 214 - , 215 - , 216 - , 217 - , 218 - , 219 - , 220 - , 221 - , 222 - , 223 - , 224 - , 225 - , 226 - , 227 - , 228 - , 229 - , 230 - , 231 - , 232 - , 233 - , 234 - , 235 - , 236 - , 237 - , 238 - , 239 - , 240 - , 241 - , 242 - , 243 - , 244 - , 245 - , 246 - , 247 - , 248 - , 249 - , 250 - , 251 - , 252 - , 253 - , 254 - , 255 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - ] +alex_check :: AlexAddr +alex_check = AlexA# + "\xff\xff\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\x3e\x00\x20\x00\xff\xff\x28\x00\x29\x00\xff\xff\x2b\x00\xff\xff\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x3d\x00\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x2d\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xff\xff\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xff\xff\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x0a\x00\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\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\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x2d\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\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\x7d\x00\xff\xff\xff\xff\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x7e\x00\x7f\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xd7\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\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"# -alex_deflt :: Array Int Int -alex_deflt = listArray (0 :: Int, 29) - [ -1 - , -1 - , -1 - , -1 - , 5 - , 5 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , -1 - , 5 - , 14 - , 14 - , -1 - , -1 - , 14 - , 21 - , 22 - , 14 - , 21 - , 22 - , 5 - , 5 - , 13 - , 13 - , 27 - , 27 - ] +alex_deflt :: AlexAddr +alex_deflt = AlexA# + "\xff\xff\xff\xff\xff\xff\xff\xff\x05\x00\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x00\x0e\x00\x0e\x00\xff\xff\xff\xff\x0e\x00\x15\x00\x16\x00\x0e\x00\x15\x00\x16\x00\x05\x00\x05\x00\x0d\x00\x0d\x00\x1b\x00\x1b\x00"# alex_accept = listArray (0 :: Int, 29) [ AlexAccNone @@ -4077,12 +58,12 @@ alex_accept = listArray (0 :: Int, 29) , AlexAccNone , AlexAccSkip , AlexAccSkip + , AlexAcc 3 , AlexAcc 2 , AlexAccNone , AlexAcc 1 , AlexAcc 0 , AlexAccNone - , AlexAccNone , AlexAccSkip , AlexAccNone , AlexAccNone @@ -4101,13 +82,14 @@ alex_accept = listArray (0 :: Int, 29) , AlexAccNone ] -alex_actions = array (0 :: Int, 3) - [ (2,alex_action_3) +alex_actions = array (0 :: Int, 4) + [ (3,alex_action_3) + , (2,alex_action_3) , (1,alex_action_4) , (0,alex_action_5) ] -{-# LINE 56 "LexGrammar.x" #-} +{-# LINE 56 "src/Grammar/Lex.x" #-} -- | Create a token with position. tok :: (String -> Tok) -> (Posn -> String -> Token) tok f p = PT p . f @@ -4208,9 +190,9 @@ eitherResIdent tv s = treeFind resWords -- | The keywords and symbols of the language organized as binary search tree. resWords :: BTree resWords = - b "->" 4 - (b ")" 2 (b "(" 1 N N) (b "+" 3 N N)) - (b "\\" 6 (b "=" 5 N N) (b "main" 7 N N)) + b "->" 5 + (b "+" 3 (b ")" 2 (b "(" 1 N N) N) (b "-" 4 N N)) + (b "\\" 7 (b "=" 6 N N) (b "main" 8 N N)) where b s n = B bs (TS bs n) where @@ -4301,6 +283,7 @@ alex_action_3 = tok (eitherResIdent TV) alex_action_4 = tok (eitherResIdent TV) alex_action_5 = tok TI +#define ALEX_GHC 1 #define ALEX_NOPRED 1 -- ----------------------------------------------------------------------------- -- ALEX TEMPLATE diff --git a/src/Grammar/Lex.o b/src/Grammar/Lex.o new file mode 100644 index 0000000..381bb86 Binary files /dev/null and b/src/Grammar/Lex.o differ diff --git a/src/Grammar/Par.hi b/src/Grammar/Par.hi new file mode 100644 index 0000000..4fc3937 Binary files /dev/null and b/src/Grammar/Par.hi differ diff --git a/src/Grammar/Par.hs b/src/Grammar/Par.hs index cd85a46..064c696 100644 --- a/src/Grammar/Par.hs +++ b/src/Grammar/Par.hs @@ -1,4 +1,8 @@ {-# OPTIONS_GHC -w #-} +{-# OPTIONS -XMagicHash -XBangPatterns -XTypeSynonymInstances -XFlexibleInstances -cpp #-} +#if __GLASGOW_HASKELL__ >= 710 +{-# OPTIONS_GHC -XPartialTypeSignatures #-} +#endif {-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-} {-# LANGUAGE PatternSynonyms #-} @@ -14,389 +18,260 @@ module Grammar.Par import Prelude -import qualified Grammar.Abs as Abs ---import qualified Grammar.Lex as Lex -import Grammar.Lex ( pattern TS, prToken, tokenPos, tokens, Tok(TI, TV), Token(..) ) +import qualified Grammar.Abs +import Grammar.Lex import qualified Data.Array as Happy_Data_Array import qualified Data.Bits as Bits +import qualified GHC.Exts as Happy_GHC_Exts import Control.Applicative(Applicative(..)) import Control.Monad (ap) -- parser produced by Happy Version 1.20.0 -data HappyAbsSyn - = HappyTerminal (Token) - | HappyErrorToken Prelude.Int - | HappyAbsSyn8 (Abs.Ident) - | HappyAbsSyn9 (Integer) - | HappyAbsSyn10 (Abs.Program) - | HappyAbsSyn11 (Abs.Exp) +newtype HappyAbsSyn = HappyAbsSyn HappyAny +#if __GLASGOW_HASKELL__ >= 607 +type HappyAny = Happy_GHC_Exts.Any +#else +type HappyAny = forall a . a +#endif +newtype HappyWrap8 = HappyWrap8 (Grammar.Abs.Ident) +happyIn8 :: (Grammar.Abs.Ident) -> (HappyAbsSyn ) +happyIn8 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap8 x) +{-# INLINE happyIn8 #-} +happyOut8 :: (HappyAbsSyn ) -> HappyWrap8 +happyOut8 x = Happy_GHC_Exts.unsafeCoerce# x +{-# INLINE happyOut8 #-} +newtype HappyWrap9 = HappyWrap9 (Integer) +happyIn9 :: (Integer) -> (HappyAbsSyn ) +happyIn9 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap9 x) +{-# INLINE happyIn9 #-} +happyOut9 :: (HappyAbsSyn ) -> HappyWrap9 +happyOut9 x = Happy_GHC_Exts.unsafeCoerce# x +{-# INLINE happyOut9 #-} +newtype HappyWrap10 = HappyWrap10 (Grammar.Abs.Program) +happyIn10 :: (Grammar.Abs.Program) -> (HappyAbsSyn ) +happyIn10 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap10 x) +{-# INLINE happyIn10 #-} +happyOut10 :: (HappyAbsSyn ) -> HappyWrap10 +happyOut10 x = Happy_GHC_Exts.unsafeCoerce# x +{-# INLINE happyOut10 #-} +newtype HappyWrap11 = HappyWrap11 (Grammar.Abs.Exp) +happyIn11 :: (Grammar.Abs.Exp) -> (HappyAbsSyn ) +happyIn11 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap11 x) +{-# INLINE happyIn11 #-} +happyOut11 :: (HappyAbsSyn ) -> HappyWrap11 +happyOut11 x = Happy_GHC_Exts.unsafeCoerce# x +{-# INLINE happyOut11 #-} +newtype HappyWrap12 = HappyWrap12 (Grammar.Abs.Exp) +happyIn12 :: (Grammar.Abs.Exp) -> (HappyAbsSyn ) +happyIn12 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap12 x) +{-# INLINE happyIn12 #-} +happyOut12 :: (HappyAbsSyn ) -> HappyWrap12 +happyOut12 x = Happy_GHC_Exts.unsafeCoerce# x +{-# INLINE happyOut12 #-} +newtype HappyWrap13 = HappyWrap13 (Grammar.Abs.Exp) +happyIn13 :: (Grammar.Abs.Exp) -> (HappyAbsSyn ) +happyIn13 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap13 x) +{-# INLINE happyIn13 #-} +happyOut13 :: (HappyAbsSyn ) -> HappyWrap13 +happyOut13 x = Happy_GHC_Exts.unsafeCoerce# x +{-# INLINE happyOut13 #-} +newtype HappyWrap14 = HappyWrap14 (Grammar.Abs.Exp) +happyIn14 :: (Grammar.Abs.Exp) -> (HappyAbsSyn ) +happyIn14 x = Happy_GHC_Exts.unsafeCoerce# (HappyWrap14 x) +{-# INLINE happyIn14 #-} +happyOut14 :: (HappyAbsSyn ) -> HappyWrap14 +happyOut14 x = Happy_GHC_Exts.unsafeCoerce# x +{-# INLINE happyOut14 #-} +happyInTok :: (Token) -> (HappyAbsSyn ) +happyInTok x = Happy_GHC_Exts.unsafeCoerce# x +{-# INLINE happyInTok #-} +happyOutTok :: (HappyAbsSyn ) -> (Token) +happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x +{-# INLINE happyOutTok #-} -{- 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 :: () => 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_5, - happyReduce_6, - happyReduce_7, - happyReduce_8, - happyReduce_9, - happyReduce_10, - happyReduce_11, - happyReduce_12, - happyReduce_13, - happyReduce_14, - happyReduce_15, - happyReduce_16 :: () => ({-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,76) ([0,16,24640,16384,96,24640,16384,104,8192,0,0,0,0,0,0,16384,96,256,0,0,26688,0,32,0,0,1,24640,0,0,0,0,4,26688,0,0,24640,0,2,128,0,0,26688,16384,96,0,0,0,0 - ]) +happyExpList :: HappyAddr +happyExpList = HappyA# "\x00\x00\x20\x00\x80\x80\x01\x00\x01\x03\x00\x02\x06\x00\x04\x0d\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x03\x00\x18\x00\x00\x00\x00\x00\x08\x1a\x00\x00\x10\x00\x00\x00\x00\x00\x03\x00\x80\x80\x01\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x08\x1a\x00\x00\x00\x00\x20\x60\x00\x40\xc0\x00\x00\x08\x00\x00\x02\x00\x00\x00\x00\x00\x04\x0d\x00\x08\x18\x00\x10\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00"# {-# NOINLINE happyExpListPerState #-} happyExpListPerState st = token_strs_expected - where token_strs = ["error","%dummy","%start_pProgram","%start_pExp3","%start_pExp2","%start_pExp1","%start_pExp","Ident","Integer","Program","Exp3","Exp2","Exp1","Exp","'('","')'","'+'","'->'","'='","'\\\\'","'main'","L_Ident","L_integ","%eof"] - bit_start = st Prelude.* 24 - bit_end = (st Prelude.+ 1) Prelude.* 24 + where token_strs = ["error","%dummy","%start_pProgram","%start_pExp3","%start_pExp2","%start_pExp1","%start_pExp","Ident","Integer","Program","Exp3","Exp2","Exp1","Exp","'('","')'","'+'","'-'","'->'","'='","'\\\\'","'main'","L_Ident","L_integ","%eof"] + bit_start = st Prelude.* 25 + bit_end = (st Prelude.+ 1) Prelude.* 25 read_bit = readArrayBit happyExpList bits = Prelude.map read_bit [bit_start..bit_end Prelude.- 1] - bits_indexed = Prelude.zip bits [0..23] + bits_indexed = Prelude.zip bits [0..24] token_strs_expected = Prelude.concatMap f bits_indexed f (Prelude.False, _) = [] f (Prelude.True, nr) = [token_strs Prelude.!! nr] -action_0 (21) = happyShift action_20 -action_0 (10) = happyGoto action_19 -action_0 _ = happyFail (happyExpListPerState 0) +happyActOffsets :: HappyAddr +happyActOffsets = HappyA# "\xf9\xff\x08\x00\x08\x00\x08\x00\x06\x00\xfc\xff\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x47\x00\xfd\xff\x06\x00\x05\x00\x00\x00\x10\x00\x01\x00\x0c\x00\x0c\x00\x1c\x00\x06\x00\x00\x00\x08\x00\x08\x00\x24\x00\x4a\x00\x00\x00\x06\x00\x08\x00\x08\x00\x00\x00\x00\x00\x00\x00"# -action_1 (15) = happyShift action_13 -action_1 (22) = happyShift action_6 -action_1 (23) = happyShift action_15 -action_1 (8) = happyGoto action_7 -action_1 (9) = happyGoto action_8 -action_1 (11) = happyGoto action_18 -action_1 _ = happyFail (happyExpListPerState 1) +happyGotoOffsets :: HappyAddr +happyGotoOffsets = HappyA# "\x4b\x00\x03\x00\x3b\x00\x35\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x20\x00\x30\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x27\x00\x00\x00\x40\x00\x45\x00\x00\x00\x00\x00\x00\x00\x2e\x00\x15\x00\x15\x00\x00\x00\x00\x00\x00\x00"# -action_2 (15) = happyShift action_13 -action_2 (22) = happyShift action_6 -action_2 (23) = happyShift action_15 -action_2 (8) = happyGoto action_7 -action_2 (9) = happyGoto action_8 -action_2 (11) = happyGoto action_9 -action_2 (12) = happyGoto action_17 -action_2 _ = happyFail (happyExpListPerState 2) +happyAdjustOffset :: Happy_GHC_Exts.Int# -> Happy_GHC_Exts.Int# +happyAdjustOffset off = off -action_3 (15) = happyShift action_13 -action_3 (22) = happyShift action_6 -action_3 (23) = happyShift action_15 -action_3 (8) = happyGoto action_7 -action_3 (9) = happyGoto action_8 -action_3 (11) = happyGoto action_9 -action_3 (12) = happyGoto action_10 -action_3 (13) = happyGoto action_16 -action_3 _ = happyFail (happyExpListPerState 3) +happyDefActions :: HappyAddr +happyDefActions = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfa\xff\xf7\xff\xf6\xff\xf3\xff\xf0\xff\xee\xff\x00\x00\x00\x00\x00\x00\xf9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\xff\x00\x00\x00\x00\x00\x00\x00\x00\xf5\xff\x00\x00\xf1\xff\xf2\xff\xf8\xff\xef\xff"# -action_4 (15) = happyShift action_13 -action_4 (20) = happyShift action_14 -action_4 (22) = happyShift action_6 -action_4 (23) = happyShift action_15 -action_4 (8) = happyGoto action_7 -action_4 (9) = happyGoto action_8 -action_4 (11) = happyGoto action_9 -action_4 (12) = happyGoto action_10 -action_4 (13) = happyGoto action_11 -action_4 (14) = happyGoto action_12 -action_4 _ = happyFail (happyExpListPerState 4) +happyCheck :: HappyAddr +happyCheck = HappyA# "\xff\xff\x08\x00\x01\x00\x00\x00\x01\x00\x09\x00\x03\x00\x01\x00\x0b\x00\x01\x00\x09\x00\x0a\x00\x0b\x00\x07\x00\x09\x00\x09\x00\x0a\x00\x09\x00\x0a\x00\x03\x00\x04\x00\x00\x00\x01\x00\x0b\x00\x03\x00\x00\x00\x01\x00\x0b\x00\x03\x00\x04\x00\x05\x00\x06\x00\x00\x00\x01\x00\x06\x00\x03\x00\x04\x00\x05\x00\x06\x00\x00\x00\x01\x00\x05\x00\x03\x00\x04\x00\x05\x00\x06\x00\x00\x00\x01\x00\x00\x00\x03\x00\x04\x00\x05\x00\x06\x00\x00\x00\x01\x00\xff\xff\x03\x00\x04\x00\x05\x00\x00\x00\x01\x00\xff\xff\x03\x00\x04\x00\x00\x00\x01\x00\xff\xff\x03\x00\x04\x00\x00\x00\x01\x00\xff\xff\x03\x00\x04\x00\x03\x00\x04\x00\x02\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"# -action_5 (22) = happyShift action_6 -action_5 _ = happyFail (happyExpListPerState 5) +happyTable :: HappyAddr +happyTable = HappyA# "\x00\x00\x15\x00\x0e\x00\x07\x00\x08\x00\x07\x00\x12\x00\x0e\x00\xff\xff\x0e\x00\x07\x00\x10\x00\xff\xff\x0f\x00\x07\x00\x07\x00\x10\x00\x07\x00\x10\x00\x18\x00\x19\x00\x07\x00\x08\x00\xff\xff\x16\x00\x07\x00\x08\x00\xff\xff\x09\x00\x0a\x00\x0b\x00\x0c\x00\x07\x00\x08\x00\x16\x00\x09\x00\x0a\x00\x0b\x00\x1a\x00\x07\x00\x08\x00\x1d\x00\x09\x00\x0a\x00\x0b\x00\x1f\x00\x07\x00\x08\x00\x19\x00\x09\x00\x0a\x00\x0b\x00\x20\x00\x07\x00\x08\x00\x00\x00\x09\x00\x0a\x00\x10\x00\x07\x00\x08\x00\x00\x00\x09\x00\x11\x00\x07\x00\x08\x00\x00\x00\x09\x00\x1e\x00\x07\x00\x08\x00\x00\x00\x09\x00\x1d\x00\x18\x00\x19\x00\x1c\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"# -action_6 _ = happyReduce_5 +happyReduceArr = Happy_Data_Array.array (5, 17) [ + (5 , happyReduce_5), + (6 , happyReduce_6), + (7 , happyReduce_7), + (8 , happyReduce_8), + (9 , happyReduce_9), + (10 , happyReduce_10), + (11 , happyReduce_11), + (12 , happyReduce_12), + (13 , happyReduce_13), + (14 , happyReduce_14), + (15 , happyReduce_15), + (16 , happyReduce_16), + (17 , happyReduce_17) + ] -action_7 _ = happyReduce_8 +happy_n_terms = 12 :: Prelude.Int +happy_n_nonterms = 7 :: Prelude.Int -action_8 _ = happyReduce_9 +happyReduce_5 = happySpecReduce_1 0# happyReduction_5 +happyReduction_5 happy_x_1 + = case happyOutTok happy_x_1 of { (PT _ (TV happy_var_1)) -> + happyIn8 + (Grammar.Abs.Ident happy_var_1 + )} -action_9 _ = happyReduce_12 - -action_10 (15) = happyShift action_13 -action_10 (22) = happyShift action_6 -action_10 (23) = happyShift action_15 -action_10 (8) = happyGoto action_7 -action_10 (9) = happyGoto action_8 -action_10 (11) = happyGoto action_22 -action_10 _ = happyReduce_14 - -action_11 (17) = happyShift action_23 -action_11 _ = happyReduce_16 - -action_12 (24) = happyAccept -action_12 _ = happyFail (happyExpListPerState 12) - -action_13 (15) = happyShift action_13 -action_13 (20) = happyShift action_14 -action_13 (22) = happyShift action_6 -action_13 (23) = happyShift action_15 -action_13 (8) = happyGoto action_7 -action_13 (9) = happyGoto action_8 -action_13 (11) = happyGoto action_9 -action_13 (12) = happyGoto action_10 -action_13 (13) = happyGoto action_11 -action_13 (14) = happyGoto action_25 -action_13 _ = happyFail (happyExpListPerState 13) - -action_14 (22) = happyShift action_6 -action_14 (8) = happyGoto action_24 -action_14 _ = happyFail (happyExpListPerState 14) - -action_15 _ = happyReduce_6 - -action_16 (17) = happyShift action_23 -action_16 (24) = happyAccept -action_16 _ = happyFail (happyExpListPerState 16) - -action_17 (15) = happyShift action_13 -action_17 (22) = happyShift action_6 -action_17 (23) = happyShift action_15 -action_17 (24) = happyAccept -action_17 (8) = happyGoto action_7 -action_17 (9) = happyGoto action_8 -action_17 (11) = happyGoto action_22 -action_17 _ = happyFail (happyExpListPerState 17) - -action_18 (24) = happyAccept -action_18 _ = happyFail (happyExpListPerState 18) - -action_19 (24) = happyAccept -action_19 _ = happyFail (happyExpListPerState 19) - -action_20 (19) = happyShift action_21 -action_20 _ = happyFail (happyExpListPerState 20) - -action_21 (15) = happyShift action_13 -action_21 (20) = happyShift action_14 -action_21 (22) = happyShift action_6 -action_21 (23) = happyShift action_15 -action_21 (8) = happyGoto action_7 -action_21 (9) = happyGoto action_8 -action_21 (11) = happyGoto action_9 -action_21 (12) = happyGoto action_10 -action_21 (13) = happyGoto action_11 -action_21 (14) = happyGoto action_29 -action_21 _ = happyFail (happyExpListPerState 21) - -action_22 _ = happyReduce_11 - -action_23 (15) = happyShift action_13 -action_23 (22) = happyShift action_6 -action_23 (23) = happyShift action_15 -action_23 (8) = happyGoto action_7 -action_23 (9) = happyGoto action_8 -action_23 (11) = happyGoto action_9 -action_23 (12) = happyGoto action_28 -action_23 _ = happyFail (happyExpListPerState 23) - -action_24 (18) = happyShift action_27 -action_24 _ = happyFail (happyExpListPerState 24) - -action_25 (16) = happyShift action_26 -action_25 _ = happyFail (happyExpListPerState 25) - -action_26 _ = happyReduce_10 - -action_27 (15) = happyShift action_13 -action_27 (20) = happyShift action_14 -action_27 (22) = happyShift action_6 -action_27 (23) = happyShift action_15 -action_27 (8) = happyGoto action_7 -action_27 (9) = happyGoto action_8 -action_27 (11) = happyGoto action_9 -action_27 (12) = happyGoto action_10 -action_27 (13) = happyGoto action_11 -action_27 (14) = happyGoto action_30 -action_27 _ = happyFail (happyExpListPerState 27) - -action_28 (15) = happyShift action_13 -action_28 (22) = happyShift action_6 -action_28 (23) = happyShift action_15 -action_28 (8) = happyGoto action_7 -action_28 (9) = happyGoto action_8 -action_28 (11) = happyGoto action_22 -action_28 _ = happyReduce_13 - -action_29 _ = happyReduce_7 - -action_30 _ = happyReduce_15 - -happyReduce_5 = happySpecReduce_1 8 happyReduction_5 -happyReduction_5 (HappyTerminal (PT _ (TV happy_var_1))) - = HappyAbsSyn8 - (Abs.Ident happy_var_1 - ) -happyReduction_5 _ = notHappyAtAll - -happyReduce_6 = happySpecReduce_1 9 happyReduction_6 -happyReduction_6 (HappyTerminal (PT _ (TI happy_var_1))) - = HappyAbsSyn9 +happyReduce_6 = happySpecReduce_1 1# happyReduction_6 +happyReduction_6 happy_x_1 + = case happyOutTok happy_x_1 of { (PT _ (TI happy_var_1)) -> + happyIn9 ((read happy_var_1) :: Integer - ) -happyReduction_6 _ = notHappyAtAll + )} -happyReduce_7 = happySpecReduce_3 10 happyReduction_7 -happyReduction_7 (HappyAbsSyn11 happy_var_3) - _ - _ - = HappyAbsSyn10 - (Abs.Program happy_var_3 - ) -happyReduction_7 _ _ _ = notHappyAtAll +happyReduce_7 = happySpecReduce_3 2# happyReduction_7 +happyReduction_7 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut14 happy_x_3 of { (HappyWrap14 happy_var_3) -> + happyIn10 + (Grammar.Abs.Program happy_var_3 + )} -happyReduce_8 = happySpecReduce_1 11 happyReduction_8 -happyReduction_8 (HappyAbsSyn8 happy_var_1) - = HappyAbsSyn11 - (Abs.EId happy_var_1 - ) -happyReduction_8 _ = notHappyAtAll +happyReduce_8 = happySpecReduce_1 3# happyReduction_8 +happyReduction_8 happy_x_1 + = case happyOut8 happy_x_1 of { (HappyWrap8 happy_var_1) -> + happyIn11 + (Grammar.Abs.EId happy_var_1 + )} -happyReduce_9 = happySpecReduce_1 11 happyReduction_9 -happyReduction_9 (HappyAbsSyn9 happy_var_1) - = HappyAbsSyn11 - (Abs.EInt happy_var_1 - ) -happyReduction_9 _ = notHappyAtAll +happyReduce_9 = happySpecReduce_1 3# happyReduction_9 +happyReduction_9 happy_x_1 + = case happyOut9 happy_x_1 of { (HappyWrap9 happy_var_1) -> + happyIn11 + (Grammar.Abs.EInt happy_var_1 + )} -happyReduce_10 = happySpecReduce_3 11 happyReduction_10 -happyReduction_10 _ - (HappyAbsSyn11 happy_var_2) - _ - = HappyAbsSyn11 +happyReduce_10 = happySpecReduce_3 3# happyReduction_10 +happyReduction_10 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut14 happy_x_2 of { (HappyWrap14 happy_var_2) -> + happyIn11 (happy_var_2 - ) -happyReduction_10 _ _ _ = notHappyAtAll + )} -happyReduce_11 = happySpecReduce_2 12 happyReduction_11 -happyReduction_11 (HappyAbsSyn11 happy_var_2) - (HappyAbsSyn11 happy_var_1) - = HappyAbsSyn11 - (Abs.EApp happy_var_1 happy_var_2 - ) -happyReduction_11 _ _ = notHappyAtAll +happyReduce_11 = happySpecReduce_2 4# happyReduction_11 +happyReduction_11 happy_x_2 + happy_x_1 + = case happyOut12 happy_x_1 of { (HappyWrap12 happy_var_1) -> + case happyOut11 happy_x_2 of { (HappyWrap11 happy_var_2) -> + happyIn12 + (Grammar.Abs.EApp happy_var_1 happy_var_2 + )}} -happyReduce_12 = happySpecReduce_1 12 happyReduction_12 -happyReduction_12 (HappyAbsSyn11 happy_var_1) - = HappyAbsSyn11 +happyReduce_12 = happySpecReduce_1 4# happyReduction_12 +happyReduction_12 happy_x_1 + = case happyOut11 happy_x_1 of { (HappyWrap11 happy_var_1) -> + happyIn12 (happy_var_1 - ) -happyReduction_12 _ = notHappyAtAll + )} -happyReduce_13 = happySpecReduce_3 13 happyReduction_13 -happyReduction_13 (HappyAbsSyn11 happy_var_3) - _ - (HappyAbsSyn11 happy_var_1) - = HappyAbsSyn11 - (Abs.EAdd happy_var_1 happy_var_3 - ) -happyReduction_13 _ _ _ = notHappyAtAll +happyReduce_13 = happySpecReduce_3 5# happyReduction_13 +happyReduction_13 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut13 happy_x_1 of { (HappyWrap13 happy_var_1) -> + case happyOut12 happy_x_3 of { (HappyWrap12 happy_var_3) -> + happyIn13 + (Grammar.Abs.EAdd happy_var_1 happy_var_3 + )}} -happyReduce_14 = happySpecReduce_1 13 happyReduction_14 -happyReduction_14 (HappyAbsSyn11 happy_var_1) - = HappyAbsSyn11 +happyReduce_14 = happySpecReduce_3 5# happyReduction_14 +happyReduction_14 happy_x_3 + happy_x_2 + happy_x_1 + = case happyOut13 happy_x_1 of { (HappyWrap13 happy_var_1) -> + case happyOut12 happy_x_3 of { (HappyWrap12 happy_var_3) -> + happyIn13 + (Grammar.Abs.ESub happy_var_1 happy_var_3 + )}} + +happyReduce_15 = happySpecReduce_1 5# happyReduction_15 +happyReduction_15 happy_x_1 + = case happyOut12 happy_x_1 of { (HappyWrap12 happy_var_1) -> + happyIn13 (happy_var_1 - ) -happyReduction_14 _ = notHappyAtAll + )} -happyReduce_15 = happyReduce 4 14 happyReduction_15 -happyReduction_15 ((HappyAbsSyn11 happy_var_4) `HappyStk` - _ `HappyStk` - (HappyAbsSyn8 happy_var_2) `HappyStk` - _ `HappyStk` +happyReduce_16 = happyReduce 4# 6# happyReduction_16 +happyReduction_16 (happy_x_4 `HappyStk` + happy_x_3 `HappyStk` + happy_x_2 `HappyStk` + happy_x_1 `HappyStk` happyRest) - = HappyAbsSyn11 - (Abs.EAbs happy_var_2 happy_var_4 - ) `HappyStk` happyRest + = case happyOut8 happy_x_2 of { (HappyWrap8 happy_var_2) -> + case happyOut14 happy_x_4 of { (HappyWrap14 happy_var_4) -> + happyIn14 + (Grammar.Abs.EAbs happy_var_2 happy_var_4 + ) `HappyStk` happyRest}} -happyReduce_16 = happySpecReduce_1 14 happyReduction_16 -happyReduction_16 (HappyAbsSyn11 happy_var_1) - = HappyAbsSyn11 +happyReduce_17 = happySpecReduce_1 6# happyReduction_17 +happyReduction_17 happy_x_1 + = case happyOut13 happy_x_1 of { (HappyWrap13 happy_var_1) -> + happyIn14 (happy_var_1 - ) -happyReduction_16 _ = notHappyAtAll + )} happyNewToken action sts stk [] = - action 24 24 notHappyAtAll (HappyState action) sts stk [] + happyDoAction 11# notHappyAtAll action sts stk [] happyNewToken action sts stk (tk:tks) = - let cont i = action i i tk (HappyState action) sts stk tks in + let cont i = happyDoAction i tk action sts stk tks in case tk of { - PT _ (TS _ 1) -> cont 15; - PT _ (TS _ 2) -> cont 16; - PT _ (TS _ 3) -> cont 17; - PT _ (TS _ 4) -> cont 18; - PT _ (TS _ 5) -> cont 19; - PT _ (TS _ 6) -> cont 20; - PT _ (TS _ 7) -> cont 21; - PT _ (TV happy_dollar_dollar) -> cont 22; - PT _ (TI happy_dollar_dollar) -> cont 23; + PT _ (TS _ 1) -> cont 1#; + PT _ (TS _ 2) -> cont 2#; + PT _ (TS _ 3) -> cont 3#; + PT _ (TS _ 4) -> cont 4#; + PT _ (TS _ 5) -> cont 5#; + PT _ (TS _ 6) -> cont 6#; + PT _ (TS _ 7) -> cont 7#; + PT _ (TS _ 8) -> cont 8#; + PT _ (TV happy_dollar_dollar) -> cont 9#; + PT _ (TI happy_dollar_dollar) -> cont 10#; _ -> happyError' ((tk:tks), []) } -happyError_ explist 24 tk tks = happyError' (tks, explist) +happyError_ explist 11# tk tks = happyError' (tks, explist) happyError_ explist _ tk tks = happyError' ((tk:tks), explist) happyThen :: () => Err a -> (a -> Err b) -> Err b @@ -409,19 +284,19 @@ 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 {HappyAbsSyn10 z -> happyReturn z; _other -> notHappyAtAll }) + happySomeParser = happyThen (happyParse 0# tks) (\x -> happyReturn (let {(HappyWrap10 x') = happyOut10 x} in x')) pExp3 tks = happySomeParser where - happySomeParser = happyThen (happyParse action_1 tks) (\x -> case x of {HappyAbsSyn11 z -> happyReturn z; _other -> notHappyAtAll }) + happySomeParser = happyThen (happyParse 1# tks) (\x -> happyReturn (let {(HappyWrap11 x') = happyOut11 x} in x')) pExp2 tks = happySomeParser where - happySomeParser = happyThen (happyParse action_2 tks) (\x -> case x of {HappyAbsSyn11 z -> happyReturn z; _other -> notHappyAtAll }) + happySomeParser = happyThen (happyParse 2# tks) (\x -> happyReturn (let {(HappyWrap12 x') = happyOut12 x} in x')) pExp1 tks = happySomeParser where - happySomeParser = happyThen (happyParse action_3 tks) (\x -> case x of {HappyAbsSyn11 z -> happyReturn z; _other -> notHappyAtAll }) + happySomeParser = happyThen (happyParse 3# tks) (\x -> happyReturn (let {(HappyWrap13 x') = happyOut13 x} in x')) pExp tks = happySomeParser where - happySomeParser = happyThen (happyParse action_4 tks) (\x -> case x of {HappyAbsSyn11 z -> happyReturn z; _other -> notHappyAtAll }) + happySomeParser = happyThen (happyParse 4# tks) (\x -> happyReturn (let {(HappyWrap14 x') = happyOut14 x} in x')) happySeq = happyDontSeq @@ -453,6 +328,16 @@ myLexer = tokens +-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex. +#if __GLASGOW_HASKELL__ > 706 +#define LT(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.<# m)) :: Prelude.Bool) +#define GTE(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.>=# m)) :: Prelude.Bool) +#define EQ(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.==# m)) :: Prelude.Bool) +#else +#define LT(n,m) (n Happy_GHC_Exts.<# m) +#define GTE(n,m) (n Happy_GHC_Exts.>=# m) +#define EQ(n,m) (n Happy_GHC_Exts.==# m) +#endif @@ -472,17 +357,7 @@ myLexer = tokens - - - - - - - - - - -data Happy_IntList = HappyCons Prelude.Int Happy_IntList +data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList @@ -537,183 +412,178 @@ happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll -- 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` _) = +happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) = happyReturn1 ans happyAccept j tk st sts (HappyStk ans _) = - (happyReturn1 ans) + (happyTcHack j (happyTcHack st)) (happyReturn1 ans) ----------------------------------------------------------------------------- -- Arrays only: do the next action +happyDoAction i tk st + = {- nothing -} + case action of + 0# -> {- nothing -} + happyFail (happyExpListPerState ((Happy_GHC_Exts.I# (st)) :: Prelude.Int)) i tk st + -1# -> {- nothing -} + happyAccept i tk st + n | LT(n,(0# :: Happy_GHC_Exts.Int#)) -> {- nothing -} + (happyReduceArr Happy_Data_Array.! rule) i tk st + where rule = (Happy_GHC_Exts.I# ((Happy_GHC_Exts.negateInt# ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#)))))) + n -> {- nothing -} + happyShift new_state i tk st + where new_state = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) + where off = happyAdjustOffset (indexShortOffAddr happyActOffsets st) + off_i = (off Happy_GHC_Exts.+# i) + check = if GTE(off_i,(0# :: Happy_GHC_Exts.Int#)) + then EQ(indexShortOffAddr happyCheck off_i, i) + else Prelude.False + action + | check = indexShortOffAddr happyTable off_i + | Prelude.otherwise = indexShortOffAddr happyDefActions st +indexShortOffAddr (HappyA# arr) off = + Happy_GHC_Exts.narrow16Int# i + where + i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low) + high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#))) + low = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off')) + off' = off Happy_GHC_Exts.*# 2# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -indexShortOffAddr arr off = arr Happy_Data_Array.! off - - {-# INLINE happyLt #-} -happyLt x y = (x Prelude.< y) - - - - +happyLt x y = LT(x,y) readArrayBit arr bit = - Bits.testBit (indexShortOffAddr arr (bit `Prelude.div` 16)) (bit `Prelude.mod` 16) + Bits.testBit (Happy_GHC_Exts.I# (indexShortOffAddr arr ((unbox_int bit) `Happy_GHC_Exts.iShiftRA#` 4#))) (bit `Prelude.mod` 16) + where unbox_int (Happy_GHC_Exts.I# x) = x +data HappyAddr = HappyA# Happy_GHC_Exts.Addr# + + ----------------------------------------------------------------------------- -- 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 +happyShift new_state 0# tk st sts stk@(x `HappyStk` _) = + let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in -- trace "shifting the error token" $ - new_state i i tk (HappyState (new_state)) ((st):(sts)) (stk) + happyDoAction i tk new_state (HappyCons (st) (sts)) (stk) happyShift new_state i tk st sts stk = - happyNewToken new_state ((st):(sts)) ((HappyTerminal (tk))`HappyStk`stk) + happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (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_0 i fn 0# tk st sts stk + = happyFail [] 0# tk st sts stk +happySpecReduce_0 nt fn j tk st@((action)) sts stk + = happyGoto nt j tk st (HappyCons (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') +happySpecReduce_1 i fn 0# tk st sts stk + = happyFail [] 0# tk st sts stk +happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk') = let r = fn v1 in - happySeq r (action nt j tk st sts (r `HappyStk` stk')) + happySeq r (happyGoto 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') +happySpecReduce_2 i fn 0# tk st sts stk + = happyFail [] 0# tk st sts stk +happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk') = let r = fn v1 v2 in - happySeq r (action nt j tk st sts (r `HappyStk` stk')) + happySeq r (happyGoto 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') +happySpecReduce_3 i fn 0# tk st sts stk + = happyFail [] 0# tk st sts stk +happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(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')) + happySeq r (happyGoto 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 i fn 0# tk st sts stk + = happyFail [] 0# 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))):(_))) -> + = case happyDrop (k Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) sts of + sts1@((HappyCons (st1@(action)) (_))) -> let r = fn stk in -- it doesn't hurt to always seq here... - happyDoSeq r (action nt j tk st1 sts1 r) + happyDoSeq r (happyGoto 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 0# tk st sts stk + = happyFail [] 0# tk st sts stk happyMonadReduce k nt fn j tk st sts stk = - case happyDrop k ((st):(sts)) of - sts1@(((st1@(HappyState (action))):(_))) -> + case happyDrop k (HappyCons (st) (sts)) of + sts1@((HappyCons (st1@(action)) (_))) -> let drop_stk = happyDropStk k stk in - happyThen1 (fn stk tk) (\r -> action nt j tk st1 sts1 (r `HappyStk` drop_stk)) + happyThen1 (fn stk tk) (\r -> happyGoto 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 0# tk st sts stk + = happyFail [] 0# tk st sts stk happyMonad2Reduce k nt fn j tk st sts stk = - case happyDrop k ((st):(sts)) of - sts1@(((st1@(HappyState (action))):(_))) -> + case happyDrop k (HappyCons (st) (sts)) of + sts1@((HappyCons (st1@(action)) (_))) -> let drop_stk = happyDropStk k stk + off = happyAdjustOffset (indexShortOffAddr happyGotoOffsets st1) + off_i = (off Happy_GHC_Exts.+# nt) + new_state = indexShortOffAddr happyTable off_i - _ = 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 +happyDrop 0# l = l +happyDrop n (HappyCons (_) (t)) = happyDrop (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) t -happyDropStk (0) l = l -happyDropStk n (x `HappyStk` xs) = happyDropStk (n Prelude.- ((1)::Prelude.Int)) xs +happyDropStk 0# l = l +happyDropStk n (x `HappyStk` xs) = happyDropStk (n Happy_GHC_Exts.-# (1#::Happy_GHC_Exts.Int#)) xs ----------------------------------------------------------------------------- -- Moving to a new state after a reduction +happyGoto nt j tk st = + {- nothing -} + happyDoAction j tk new_state + where off = happyAdjustOffset (indexShortOffAddr happyGotoOffsets st) + off_i = (off Happy_GHC_Exts.+# nt) + new_state = indexShortOffAddr happyTable off_i - - - -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 +happyFail explist 0# tk old_st _ stk@(x `HappyStk` _) = + let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in -- trace "failing" $ happyError_ explist i tk @@ -730,9 +600,9 @@ happyFail ERROR_TOK tk old_st CONS(HAPPYSTATE(action),sts) -- Enter error recovery: generate an error token, -- save the old token and carry on. -happyFail explist i tk (HappyState (action)) sts stk = +happyFail explist i tk (action) sts stk = -- trace "entering error recovery" $ - action (1) (1) tk (HappyState (action)) sts ((HappyErrorToken (i)) `HappyStk` stk) + happyDoAction 0# tk action sts ((Happy_GHC_Exts.unsafeCoerce# (Happy_GHC_Exts.I# (i))) `HappyStk` stk) -- Internal happy errors: @@ -743,9 +613,9 @@ notHappyAtAll = Prelude.error "Internal Happy error\n" -- Hack to get the typechecker to accept our action functions - - - +happyTcHack :: Happy_GHC_Exts.Int# -> a -> a +happyTcHack x y = y +{-# INLINE happyTcHack #-} ----------------------------------------------------------------------------- @@ -764,12 +634,12 @@ happyDontSeq a b = b -- the generated parser quite a bit. - - - - - - +{-# NOINLINE happyDoAction #-} +{-# NOINLINE happyTable #-} +{-# NOINLINE happyCheck #-} +{-# NOINLINE happyActOffsets #-} +{-# NOINLINE happyGotoOffsets #-} +{-# NOINLINE happyDefActions #-} {-# NOINLINE happyShift #-} {-# NOINLINE happySpecReduce_0 #-} diff --git a/src/Grammar/Par.info b/src/Grammar/Par.info new file mode 100644 index 0000000..adfea52 --- /dev/null +++ b/src/Grammar/Par.info @@ -0,0 +1,456 @@ +----------------------------------------------------------------------------- +Info file generated by Happy Version 1.20.0 from src/Grammar/Par.y +----------------------------------------------------------------------------- + + +----------------------------------------------------------------------------- +Grammar +----------------------------------------------------------------------------- + %start_pProgram -> Program (0) + %start_pExp3 -> Exp3 (1) + %start_pExp2 -> Exp2 (2) + %start_pExp1 -> Exp1 (3) + %start_pExp -> Exp (4) + Ident -> L_Ident (5) + Integer -> L_integ (6) + Program -> 'main' '=' Exp (7) + Exp3 -> Ident (8) + Exp3 -> Integer (9) + Exp3 -> '(' Exp ')' (10) + Exp2 -> Exp2 Exp3 (11) + Exp2 -> Exp3 (12) + Exp1 -> Exp1 '+' Exp2 (13) + Exp1 -> Exp1 '-' Exp2 (14) + Exp1 -> Exp2 (15) + Exp -> '\\' Ident '->' Exp (16) + Exp -> Exp1 (17) + +----------------------------------------------------------------------------- +Terminals +----------------------------------------------------------------------------- + '(' { PT _ (TS _ 1) } + ')' { PT _ (TS _ 2) } + '+' { PT _ (TS _ 3) } + '-' { PT _ (TS _ 4) } + '->' { PT _ (TS _ 5) } + '=' { PT _ (TS _ 6) } + '\\' { PT _ (TS _ 7) } + 'main' { PT _ (TS _ 8) } + L_Ident { PT _ (TV $$) } + L_integ { PT _ (TI $$) } + +----------------------------------------------------------------------------- +Non-terminals +----------------------------------------------------------------------------- + %start_pProgram rule 0 + %start_pExp3 rule 1 + %start_pExp2 rule 2 + %start_pExp1 rule 3 + %start_pExp rule 4 + Ident rule 5 + Integer rule 6 + Program rule 7 + Exp3 rules 8, 9, 10 + Exp2 rules 11, 12 + Exp1 rules 13, 14, 15 + Exp rules 16, 17 + +----------------------------------------------------------------------------- +States +----------------------------------------------------------------------------- +State 0 + + %start_pProgram -> . Program (rule 0) + + 'main' shift, and enter state 20 + + Program goto state 19 + +State 1 + + %start_pExp3 -> . Exp3 (rule 1) + + '(' shift, and enter state 13 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 18 + +State 2 + + %start_pExp2 -> . Exp2 (rule 2) + + '(' shift, and enter state 13 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 9 + Exp2 goto state 17 + +State 3 + + %start_pExp1 -> . Exp1 (rule 3) + + '(' shift, and enter state 13 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 9 + Exp2 goto state 10 + Exp1 goto state 16 + +State 4 + + %start_pExp -> . Exp (rule 4) + + '(' shift, and enter state 13 + '\\' shift, and enter state 14 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 9 + Exp2 goto state 10 + Exp1 goto state 11 + Exp goto state 12 + +State 5 + + Ident -> . L_Ident (rule 5) + + L_Ident shift, and enter state 6 + + +State 6 + + Ident -> L_Ident . (rule 5) + + '(' reduce using rule 5 + ')' reduce using rule 5 + '+' reduce using rule 5 + '-' reduce using rule 5 + '->' reduce using rule 5 + L_Ident reduce using rule 5 + L_integ reduce using rule 5 + %eof reduce using rule 5 + + +State 7 + + Exp3 -> Ident . (rule 8) + + '(' reduce using rule 8 + ')' reduce using rule 8 + '+' reduce using rule 8 + '-' reduce using rule 8 + L_Ident reduce using rule 8 + L_integ reduce using rule 8 + %eof reduce using rule 8 + + +State 8 + + Exp3 -> Integer . (rule 9) + + '(' reduce using rule 9 + ')' reduce using rule 9 + '+' reduce using rule 9 + '-' reduce using rule 9 + L_Ident reduce using rule 9 + L_integ reduce using rule 9 + %eof reduce using rule 9 + + +State 9 + + Exp2 -> Exp3 . (rule 12) + + '(' reduce using rule 12 + ')' reduce using rule 12 + '+' reduce using rule 12 + '-' reduce using rule 12 + L_Ident reduce using rule 12 + L_integ reduce using rule 12 + %eof reduce using rule 12 + + +State 10 + + Exp2 -> Exp2 . Exp3 (rule 11) + Exp1 -> Exp2 . (rule 15) + + '(' shift, and enter state 13 + ')' reduce using rule 15 + '+' reduce using rule 15 + '-' reduce using rule 15 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + %eof reduce using rule 15 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 22 + +State 11 + + Exp1 -> Exp1 . '+' Exp2 (rule 13) + Exp1 -> Exp1 . '-' Exp2 (rule 14) + Exp -> Exp1 . (rule 17) + + ')' reduce using rule 17 + '+' shift, and enter state 23 + '-' shift, and enter state 24 + %eof reduce using rule 17 + + +State 12 + + %start_pExp -> Exp . (rule 4) + + %eof accept + + +State 13 + + Exp3 -> '(' . Exp ')' (rule 10) + + '(' shift, and enter state 13 + '\\' shift, and enter state 14 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 9 + Exp2 goto state 10 + Exp1 goto state 11 + Exp goto state 26 + +State 14 + + Exp -> '\\' . Ident '->' Exp (rule 16) + + L_Ident shift, and enter state 6 + + Ident goto state 25 + +State 15 + + Integer -> L_integ . (rule 6) + + '(' reduce using rule 6 + ')' reduce using rule 6 + '+' reduce using rule 6 + '-' reduce using rule 6 + L_Ident reduce using rule 6 + L_integ reduce using rule 6 + %eof reduce using rule 6 + + +State 16 + + %start_pExp1 -> Exp1 . (rule 3) + Exp1 -> Exp1 . '+' Exp2 (rule 13) + Exp1 -> Exp1 . '-' Exp2 (rule 14) + + '+' shift, and enter state 23 + '-' shift, and enter state 24 + %eof accept + + +State 17 + + %start_pExp2 -> Exp2 . (rule 2) + Exp2 -> Exp2 . Exp3 (rule 11) + + '(' shift, and enter state 13 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + %eof accept + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 22 + +State 18 + + %start_pExp3 -> Exp3 . (rule 1) + + %eof accept + + +State 19 + + %start_pProgram -> Program . (rule 0) + + %eof accept + + +State 20 + + Program -> 'main' . '=' Exp (rule 7) + + '=' shift, and enter state 21 + + +State 21 + + Program -> 'main' '=' . Exp (rule 7) + + '(' shift, and enter state 13 + '\\' shift, and enter state 14 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 9 + Exp2 goto state 10 + Exp1 goto state 11 + Exp goto state 31 + +State 22 + + Exp2 -> Exp2 Exp3 . (rule 11) + + '(' reduce using rule 11 + ')' reduce using rule 11 + '+' reduce using rule 11 + '-' reduce using rule 11 + L_Ident reduce using rule 11 + L_integ reduce using rule 11 + %eof reduce using rule 11 + + +State 23 + + Exp1 -> Exp1 '+' . Exp2 (rule 13) + + '(' shift, and enter state 13 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 9 + Exp2 goto state 30 + +State 24 + + Exp1 -> Exp1 '-' . Exp2 (rule 14) + + '(' shift, and enter state 13 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 9 + Exp2 goto state 29 + +State 25 + + Exp -> '\\' Ident . '->' Exp (rule 16) + + '->' shift, and enter state 28 + + +State 26 + + Exp3 -> '(' Exp . ')' (rule 10) + + ')' shift, and enter state 27 + + +State 27 + + Exp3 -> '(' Exp ')' . (rule 10) + + '(' reduce using rule 10 + ')' reduce using rule 10 + '+' reduce using rule 10 + '-' reduce using rule 10 + L_Ident reduce using rule 10 + L_integ reduce using rule 10 + %eof reduce using rule 10 + + +State 28 + + Exp -> '\\' Ident '->' . Exp (rule 16) + + '(' shift, and enter state 13 + '\\' shift, and enter state 14 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 9 + Exp2 goto state 10 + Exp1 goto state 11 + Exp goto state 32 + +State 29 + + Exp2 -> Exp2 . Exp3 (rule 11) + Exp1 -> Exp1 '-' Exp2 . (rule 14) + + '(' shift, and enter state 13 + ')' reduce using rule 14 + '+' reduce using rule 14 + '-' reduce using rule 14 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + %eof reduce using rule 14 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 22 + +State 30 + + Exp2 -> Exp2 . Exp3 (rule 11) + Exp1 -> Exp1 '+' Exp2 . (rule 13) + + '(' shift, and enter state 13 + ')' reduce using rule 13 + '+' reduce using rule 13 + '-' reduce using rule 13 + L_Ident shift, and enter state 6 + L_integ shift, and enter state 15 + %eof reduce using rule 13 + + Ident goto state 7 + Integer goto state 8 + Exp3 goto state 22 + +State 31 + + Program -> 'main' '=' Exp . (rule 7) + + %eof reduce using rule 7 + + +State 32 + + Exp -> '\\' Ident '->' Exp . (rule 16) + + ')' reduce using rule 16 + %eof reduce using rule 16 + + +----------------------------------------------------------------------------- +Grammar Totals +----------------------------------------------------------------------------- +Number of rules: 18 +Number of terminals: 10 +Number of non-terminals: 12 +Number of states: 33 diff --git a/src/Grammar/Par.o b/src/Grammar/Par.o new file mode 100644 index 0000000..a703c82 Binary files /dev/null and b/src/Grammar/Par.o differ diff --git a/src/Grammar/Print.hi b/src/Grammar/Print.hi new file mode 100644 index 0000000..c7556dc Binary files /dev/null and b/src/Grammar/Print.hi differ diff --git a/src/Grammar/Print.hs b/src/Grammar/Print.hs index 0acef7c..3c84b87 100644 --- a/src/Grammar/Print.hs +++ b/src/Grammar/Print.hs @@ -150,4 +150,5 @@ instance Print Grammar.Abs.Exp where Grammar.Abs.EInt n -> prPrec i 3 (concatD [prt 0 n]) Grammar.Abs.EApp exp1 exp2 -> prPrec i 2 (concatD [prt 2 exp1, prt 3 exp2]) Grammar.Abs.EAdd exp1 exp2 -> prPrec i 1 (concatD [prt 1 exp1, doc (showString "+"), prt 2 exp2]) + Grammar.Abs.ESub exp1 exp2 -> prPrec i 1 (concatD [prt 1 exp1, doc (showString "-"), prt 2 exp2]) Grammar.Abs.EAbs id_ exp -> prPrec i 0 (concatD [doc (showString "\\"), prt 0 id_, doc (showString "->"), prt 0 exp]) diff --git a/src/Grammar/Print.o b/src/Grammar/Print.o new file mode 100644 index 0000000..39e1200 Binary files /dev/null and b/src/Grammar/Print.o differ diff --git a/src/Grammar/Skel.hi b/src/Grammar/Skel.hi new file mode 100644 index 0000000..45a1d42 Binary files /dev/null and b/src/Grammar/Skel.hi differ diff --git a/src/Grammar/Skel.hs b/src/Grammar/Skel.hs index 89c6233..11d293e 100644 --- a/src/Grammar/Skel.hs +++ b/src/Grammar/Skel.hs @@ -29,4 +29,5 @@ transExp x = case x of Grammar.Abs.EInt integer -> failure x Grammar.Abs.EApp exp1 exp2 -> failure x Grammar.Abs.EAdd exp1 exp2 -> failure x + Grammar.Abs.ESub exp1 exp2 -> failure x Grammar.Abs.EAbs ident exp -> failure x diff --git a/src/Grammar/Skel.o b/src/Grammar/Skel.o new file mode 100644 index 0000000..442bac9 Binary files /dev/null and b/src/Grammar/Skel.o differ diff --git a/src/Grammar/Test.hi b/src/Grammar/Test.hi new file mode 100644 index 0000000..a28d0de Binary files /dev/null and b/src/Grammar/Test.hi differ diff --git a/src/Grammar/Test.o b/src/Grammar/Test.o new file mode 100644 index 0000000..91bcdcc Binary files /dev/null and b/src/Grammar/Test.o differ diff --git a/src/Grammar/test b/src/Grammar/test new file mode 100755 index 0000000..7c253ff Binary files /dev/null and b/src/Grammar/test differ diff --git a/test/simple.sf b/test/simple.sf index 2b92e13..adcf2c4 100644 --- a/test/simple.sf +++ b/test/simple.sf @@ -2,4 +2,4 @@ -main = 1 + (123 + 4214) + 1231 + 314 +main = 1 + (123 + 4214) - 1231 + 314