packages feed

HXQ 0.15.0 → 0.16.0

raw patch · 21 files changed

+3410/−2575 lines, 21 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Text.XML.HXQ.XQuery: CommentEvent :: String -> XMLEvent
- Text.XML.HXQ.XQuery: EmptyEvent :: Name -> [(Name, String)] -> XMLEvent
- Text.XML.HXQ.XQuery: EndEvent :: Name -> XMLEvent
- Text.XML.HXQ.XQuery: ErrorEvent :: String -> XMLEvent
- Text.XML.HXQ.XQuery: GERefEvent :: Name -> XMLEvent
- Text.XML.HXQ.XQuery: PIEvent :: Name -> String -> XMLEvent
- Text.XML.HXQ.XQuery: StartEvent :: Name -> [(Name, String)] -> XMLEvent
- Text.XML.HXQ.XQuery: TextEvent :: String -> XMLEvent
- Text.XML.HXQ.XQuery: data XMLEvent
- Text.XML.HXQ.XQuery: executeSQL :: Statement -> XSeq -> IO XSeq
- Text.XML.HXQ.XQuery: prepareSQL :: Connection -> String -> IO Statement
- Text.XML.HXQ.XQuery: type Tag = String
+ Text.XML.HXQ.XQuery: XType :: Ast -> XTree
+ Text.XML.HXQ.XQuery: eval :: XSeq -> IO XSeq
+ Text.XML.HXQ.XQuery: type Name = String
- Text.XML.HXQ.XQuery: XAttr :: !Tag -> !String -> XTree
+ Text.XML.HXQ.XQuery: XAttr :: !Name -> !String -> XTree
- Text.XML.HXQ.XQuery: XElem :: !Tag -> !AttList -> !Int -> XTree -> [XTree] -> XTree
+ Text.XML.HXQ.XQuery: XElem :: !Name -> !AttList -> !Int -> XTree -> [XTree] -> XTree
- Text.XML.HXQ.XQuery: XFloat :: !Float -> XTree
+ Text.XML.HXQ.XQuery: XFloat :: !Double -> XTree
- Text.XML.HXQ.XQuery: XGERef :: Tag -> XTree
+ Text.XML.HXQ.XQuery: XGERef :: String -> XTree
- Text.XML.HXQ.XQuery: XPI :: Tag -> String -> XTree
+ Text.XML.HXQ.XQuery: XPI :: Name -> String -> XTree
- Text.XML.HXQ.XQuery: connect :: FilePath -> IO Connection
+ Text.XML.HXQ.XQuery: connect :: String -> IO Connection
- Text.XML.HXQ.XQuery: genSchema :: Connection -> String -> String -> IO Table
+ Text.XML.HXQ.XQuery: genSchema :: Connection -> FilePath -> String -> IO Table
- Text.XML.HXQ.XQuery: shred :: Connection -> String -> String -> IO ()
+ Text.XML.HXQ.XQuery: shred :: Connection -> FilePath -> String -> IO ()
- Text.XML.HXQ.XQuery: shredC :: String -> String -> String -> Q Exp
+ Text.XML.HXQ.XQuery: shredC :: String -> FilePath -> String -> Q Exp

Files

HXQ.cabal view
@@ -1,6 +1,6 @@ Cabal-Version:       >= 1.2 Name:                HXQ-Version:             0.15.0+Version:             0.16.0 Synopsis:            A Compiler from XQuery to Haskell Description:                  HXQ is a fast and space-efficient compiler from XQuery (the standard@@ -66,7 +66,7 @@ Library   Exposed-Modules:     Text.XML.HXQ.XQuery   Other-Modules:       HXML, ETree, Misc, Tree, AssocList, PrintXML, XML, TreeBuild, DTD, XMLScanner, LLParsing, XMLParse,-                       Readline, Text.XML.HXQ.XTree,+                       Readline, Text.XML.HXQ.XTree, Text.XML.HXQ.Types,                        Text.XML.HXQ.Functions, Text.XML.HXQ.Compiler, Text.XML.HXQ.Interpreter,                        Text.XML.HXQ.Optimizer, Text.XML.HXQ.OptionalDB, Text.XML.HXQ.Parser   hs-source-dirs:      . src src/hxml-0.2
Main.hs view
@@ -2,7 +2,7 @@ - - The main program of the XQuery interpreter - Programmer: Leonidas Fegaras (fegaras@cse.uta.edu)-- Date: 01/06/2009+- Date: 01/13/2009 - ---------------------------------------------------------------} @@ -20,13 +20,14 @@ import System.CPUTime import Text.XML.HXQ.XQuery import Text.XML.HXQ.Functions+import Text.XML.HXQ.Types import Text.XML.HXQ.Interpreter(evalInput,xqueryE,xfileDB)   type E = C.Exception  -version = "0.15.0"+version = "0.16.0"   parseEnv :: [String] -> [(String,String)]@@ -47,17 +48,15 @@  main = do senv <- getArgs           let env = parseEnv senv-              Just system_path = lookup "ghc" env-              Just hxq_path = lookup "hxq" env-              Just dbname = lookup "db" env               verbose = case lookup "v" env of Nothing -> False; _ -> True               timing = case lookup "t" env of Nothing -> False; _ -> True               putTime t = if timing then putStrLn $ "Evaluation time: "++show (div t (10^9))++" milliseconds" else return ()           case lookup "help" env of-            Just _ -> do putStrLn ("HXQ: XQuery Interpreter version "++version++".")+            Just _ -> do putStrLn ("HXQ: XQuery Interpreter version "++version)+                         putStrLn "The documentation is availabe at http://lambda.uta.edu/HXQ/"                          putStrLn "Command line options and files:"                          putStrLn "   xquery-file               evaluate the XQuery in xquery-file using the interpreter"-                         putStrLn "   -db database              use the relational the database during querying"+                         putStrLn "   -db database              use the relational database during querying"                          putStrLn "   -c xquery-file            compile the XQuery in xquery-file into Haskell code"                          putStrLn "   -o haskell-file           set the Haskell file for -c (default is Temp.hs)"                          putStrLn "   -p XPath-query xml-file   interpret the XPath query against the xml-file"@@ -66,12 +65,13 @@                          putStrLn "Without an xquery-file, it reads and evaluates the input using the HXQ interpreter."                          putStrLn "   The input may be an XQuery or a 'declare variable' or a 'declare function'."                          putStrLn "   To write an XQuery in multiple lines, wrap it in {}."-                         putStrLn $ "Functions (name/arity):  " ++ (unwords $ sort $ map (\(f,c,_) -> f++"/"++show c) systemFunctions)+                         putStrLn $ "Functions (name/arity):  " ++ (unwords $ sort $ map (\(f,c,_,_) -> f++"/"++show c) systemFunctions)                          putStrLn $ "Path Steps:  " ++ (unwords $ map fst pathFunctions)+                         putStrLn $ "Build-in Types:  xs:anyAtomicType " ++ (unwords $ map fst buildInTypes)             _ -> case lookup "c" env of                    Just file -> do query <- readFile file-                                   let qf = map (\c -> if c=='\"' then '\'' else c)-                                                (foldr1 (\a r -> a++" "++r) (lines query))+                                   let qf = foldr (\c r -> if c=='\"' then '\\':c:r else c:r)+                                                  "" (foldr1 (\a r -> a++" "++r) (lines query))                                        db = case lookup "db" env of Just filepath -> filepath; _ -> ""                                        pr = "{-# LANGUAGE TemplateHaskell #-}\nmodule Main where\nimport Text.XML.HXQ.XQuery\n\nmain = do "                                             ++ (if db=="" then "res <- " else "db <- connect \""++db++"\"\n          res <- ")@@ -112,7 +112,7 @@                                                                               putTime (t2-t1)                                                                               commit db                                                                               return (nvs,nfs))-                                                                          (\e -> do putStrLn (show (e::E)); return (vs,fs))) [] []+                                                                          (\e -> do putStrLn (show (e::E)); return (vs,fs))) [] [] "> "                                            _ -> evalInput (\s vs fs-> C.catch                                                                       (do t1 <- getCPUTime                                                                           (result,nvs,nfs) <- xqueryE s vs fs noDBerror verbose@@ -120,4 +120,4 @@                                                                           t2 <- getCPUTime                                                                           putTime (t2-t1)                                                                           return (nvs,nfs))-                                                                      (\e -> do putStrLn (show (e::E)); return (vs,fs))) [] []+                                                                      (\e -> do putStrLn (show (e::E)); return (vs,fs))) [] [] "> "
Makefile view
@@ -45,12 +45,12 @@ # extract the structural summary of dblp.xml dblp1:  $(parser) TestDBLP1.hs 	$(ghc) --make TestDBLP1.hs -o a.out-	./a.out +RTS -H200m -K100m+	time ./a.out +RTS -H200m -K100m  # store dblp.xml into a MySQL database dblp2:  $(parser) TestDBLP2.hs 	$(ghc) --make TestDBLP2.hs -o a.out-	./a.out+	time ./a.out  # run in the ghci interpreter and load HXQ ghci:   $(parser)
XQueryParser.y view
@@ -99,6 +99,11 @@         'instance'      { INSTANCE }         'of'            { OF }         '?'             { QMARK }+        'cast'          { CAST }+        'castable'      { CASTABLE }+        'case'          { CASE }+        'default'       { DEFAULT }+        'typeswitch'    { TYPESWITCH } 	'Variable' 	{ Variable $$ } 	'XMLtext' 	{ XMLtext $$ } 	'Integer' 	{ TInteger $$ }@@ -107,8 +112,8 @@ 	'EOF' 	        { TokenEOF }  -%nonassoc	'for' 'let' 'satisfies' 'return'-%nonassoc	'with' 'from' 'into' 'as' 'instance' 'of'+%nonassoc	'for' 'let' 'satisfies' 'return' 'typeswitch'+%nonassoc	'with' 'from' 'into' 'instance' 'cast' 'castable' 'case' 'default' %nonassoc	'else' %left		'intersect' 'union' 'except' %right		'or'@@ -134,6 +139,8 @@ def            :: { Ast } def             :   expr                                { $1 }                 |   'declare' 'variable' var ':=' expr  { Ast "variable" [$3,$5] }+                |   'declare' 'variable' var 'as' type+                      ':=' expr                         { Ast "variable" [$3,$7] }                 |   'declare' 'function' qname                       '(' params ')' '{' expr '}'       { Ast "function" ([Avar $3,$8]++$5) }                 |   'declare' 'function' qname@@ -150,14 +157,31 @@                 |   params ',' var                      { $1++[$3] }                 |   params ',' var 'as' type            { $1++[$3] } -type           ::  { String }-type            :  qname                                { $1 }-                |  qname '(' ')'                        { $1 }-                |  'element' '(' ')'                    { "element" }-                |  type '+'                             { $1 }-                |  type '*'                             { $1 }-                |  type '?'                             { $1 }+type           ::  { Ast }+type            :  qname               %prec 'case'     { Avar $1 }+                |  qname '+'                            { Ast "+" [Avar $1] }+                |  qname '*'                            { Ast "*" [Avar $1] }+                |  qname '?'                            { Ast "?" [Avar $1] }+                |  sequence_type       %prec 'case'     { $1 }+                |  sequence_type '+'                    { Ast "+" [$1] }+                |  sequence_type '*'                    { Ast "*" [$1] }+                |  sequence_type '?'                    { Ast "?" [$1] } +sequence_type  ::  { Ast }+sequence_type   :  'element' '(' ')'                    { Ast "element" [] }+                |  'attribute' '(' ')'                  { Ast "attribute" [] }+                |  qname '(' ')'                        { Ast $1 [] }+                |  'element' '(' typeparams ')'         { Ast "element" $3 }+                |  'attribute' '(' typeparams ')'       { Ast "attribute" $3 }++typeparams     :: { [ Ast ] }+                :  '*'                                  { [Avar "*"] }+                |  qname                                { [Avar $1] }+                |  '*' ',' qname                        { [Avar "*",Avar $3] }+                |  qname ',' qname                      { [Avar $1,Avar $3] }+                |  '*' ',' qname '?'                    { [Avar "*",Ast "?" [Avar $3]] }+                |  qname ',' qname '?'                  { [Avar $1,Ast "?" [Avar $3]] }+ var            :: { Ast } var		:   'Variable' 				{ Avar $1 } @@ -200,7 +224,10 @@ 		|   expr 'union' expr			{ call "union" [$1,$3] } 		|   expr 'intersect' expr		{ call "intersect" [$1,$3] } 		|   expr 'except' expr			{ call "except" [$1,$3] }-                |   expr 'instance' 'of' type           { call "instance-of" [$1,Astring $4] }+                |   expr 'instance' 'of' type           { call "instance-of" [$1,Ast "type" [$4]] }+                |   expr 'cast' 'as' type               { call "cast-as" [$1,Ast "type" [$4]] }+                |   expr 'castable' 'as' type           { call "castable-as" [$1,Ast "type" [$4]] }+                |   'typeswitch' '(' expr ')' typecases { let v = "_tc" in Ast "let" [Avar v,$3,$5 v] } 		|   '+' expr       %prec UMINUS		{ call "uplus" [$2] } 		|   '-' expr       %prec UMINUS		{ call "uminus" [$2] } 		|   'not' expr     %prec UMINUS		{ call "not" [$2] }@@ -290,9 +317,9 @@  stringc        :: { [Ast] } stringc         :   'String'                            { if $1=="" then [] else [Astring $1] }-                |   '{' expl '}'                        { [concatenateAll $2] }+                |   '{' expl '}'                        { [concatAll $2] }                 |   stringc 'String'                    { if $2=="" then $1 else $1++[Astring $2] }-                |   stringc '{' expl '}'                { $1++[concatenateAll $3] }+                |   stringc '{' expl '}'                { $1++[concatAll $3] }  attributes     :: { [ Ast ] } attributes	:   qname '=' string  	                { [Ast "pair" [Astring $1,$3]] }@@ -352,13 +379,19 @@                                                                   then call $1 []                                                                   else call $1 [e] } +typecases      :: { String -> Ast }+typecases       :   'case' type 'return' expr+                           'default' 'return' expr      { \v -> Ast "if" [call "instance-of" [Avar v,Ast "type" [$2]],$4,$7] }+                |   'case' type 'return' expr typecases { \v -> Ast "if" [call "instance-of" [Avar v,Ast "type" [$2]],$4,$5 v] }++ {  -- Abstract Syntax Tree for XQueries data Ast = Ast String [Ast]          | Avar String          | Aint Int-         | Afloat Float+         | Afloat Double          | Astring String          deriving Eq @@ -410,6 +443,12 @@ concatenateAll _ = call "empty" []  +concatAll :: [Ast] -> Ast+concatAll [x] = call "string" [x]+concatAll (x:xs) = foldl (\a r -> call "concatenate" [call "string" [a],r]) x xs+concatAll _ = call "empty" []++ path_steps = ["child", "descendant", "attribute", "self", "descendant-or-self", "following-sibling", "following",               "attribute-descendant", "parent", "ancestor", "preceding-sibling", "preceding", "ancestor-or-self" ] @@ -423,8 +462,9 @@   | ATTRIBUTE | STAG | ETAG | SATISFIES | ATSIGN | SLASH | DECLARE | SEMI | COLON   | FUNCTION | VARIABLE | AT | DOT | DOTS | TokenEOF | PRE | POST | IS   | INSERT | INTO | DELETE | FROM | REPLACE | WITH | INSTANCE | OF+  | CAST | CASTABLE | CASE | DEFAULT | TYPESWITCH   | QName String | Variable String | XMLtext String | TInteger Int-  | TFloat Float | TString String | TError String+  | TFloat Double | TString String | TError String     deriving Eq  @@ -459,13 +499,14 @@              (TO,"to"),(PLUS,"+"),(MINUS,"-"),(TIMES,"*"),(DIV,"div"),(IDIV,"idiv"),(MOD,"mod"),              (TEQ,"="),(TNE,"!="),(TLT,"<"),(TLE,"<="),(TGT,">"),(TGE,">="),(PRE,"<<"),(POST,">>"),              (IS,"is"),(SEQ,"eq"),(SNE,"ne"),(SLT,"lt"),(SLE,"le"),(SGT,"gt"),(SGE,"ge"),(AND,"and"),-             (OR,"or"),(NOT,"not"),(UNION,"union"),(INTERSECT,"intersect"),(EXCEPT,"except"),+             (OR,"or"),(NOT,"not"),(UNION,"|"),(INTERSECT,"intersect"),(EXCEPT,"except"),              (FOR,"for"),(LET,"let"),(IN,"in"),(AS,"as"),(COMMA,"','"),(ASSIGN,":="),(WHERE,"where"),(ORDER,"order"),              (BY,"by"),(ASCENDING,"ascending"),(DESCENDING,"descending"),(ELEMENT,"element"),              (ATTRIBUTE,"attribute"),(STAG,"</"),(ETAG,"/>"),(SATISFIES,"satisfies"),(ATSIGN,"@"),              (SLASH,"/"),(DECLARE,"declare"),(FUNCTION,"function"),(VARIABLE,"variable"),   	     (INSERT,"insert"),(INTO,"into"),(DELETE,"delete"),(FROM,"from"),(REPLACE,"replace"),(WITH,"with"),-             (AT,"at"),(DOTS,".."),(DOT,"."),(SEMI,";"),(COLON,":"),(INSTANCE,"instance"),(OF,"of")]+             (AT,"at"),(DOTS,".."),(DOT,"."),(SEMI,";"),(COLON,":"),(INSTANCE,"instance"),(OF,"of"),+             (CAST,"cast"),(CASTABLE,"castable"),(CASE,"case"),(DEFAULT,"default"),(TYPESWITCH,"typeswitch")]   parseError tk = error (case tk of@@ -507,11 +548,11 @@   isQN :: Char -> Bool-isQN c = elem c "_-" || isDigit c || isAlpha c+isQN c = elem c "_-." || isDigit c || isAlpha c   isVar :: Char -> Bool-isVar c = elem c "_" || isDigit c || isAlpha c+isVar c = elem c "_-." || isDigit c || isAlpha c   inXML :: String -> Bool@@ -526,7 +567,7 @@ lexer (' ':'>':' ':cs) n = TGT : lexer cs n lexer (c:cs) n       | isSpace c = lexer cs n-      | isAlpha c = lexVar (c:cs) n+      | isAlpha c || c=='_' = lexVar (c:cs) n       | isDigit c = lexNum (c:cs) n lexer ('$':c:cs) n | isAlpha c       = let (var,rest) = span isVar (c:cs)@@ -576,16 +617,29 @@ lexer (c:cs) n = TError ("Illegal character: '"++[c,'\'']) : lexer cs n  +lexExp :: String -> (String,String)+lexExp (e:cs)+    | e == 'e' || e == 'E'+    = case cs of+        '+':rest -> span isDigit rest+        '-':rest -> let (s,rest1) = span isDigit rest+                    in ('-':s,rest1)+        rest -> span isDigit rest+lexExp cs = ("",cs)++ lexNum :: String -> String -> [Token]-lexNum cs n = if null rest || head rest /= '.'-                 then TInteger (read k) : lexer rest n-              else let (m,rest2) = span isDigit (tail rest)-                       val::Float = read (k++('.':m))-                   in case rest2 of-                        ('e':rest3) -> let (exp,rest4) = span isDigit rest3-                                       in (TFloat (val*10^(read exp))) : lexer rest4 n-                        _ -> (TFloat val) : lexer rest2 n-      where (k,rest) = span isDigit cs+lexNum cs n+    = let (si,rest) = span isDigit cs+      in case rest of+           '.':rest1+               -> let (sd,rest2) = span isDigit rest1+                  in case lexExp rest2 of+                       ("",_) -> (TFloat (read $ si ++ "." ++ sd)) : lexer rest2 n+                       (exp,rest3) -> (TFloat (read $ si ++ "." ++ sd ++ "e" ++ exp)) : lexer rest3 n+           _ -> case lexExp rest of+                  ("",_) -> (TInteger (read si)) : lexer rest n+                  (exp,rest3) -> (TFloat (read $ si ++ "e" ++ exp)) : lexer rest3 n   lexString :: String -> String -> String -> [Token]@@ -618,7 +672,7 @@ lexVar :: String -> String -> [Token] lexVar cs n =     let (nm,rest) = span isQN cs-    in (case nm of+        token = case nm of           "return" -> RETURN           "some" -> SOME           "every" -> EVERY@@ -666,6 +720,16 @@ 	  "with" -> WITH           "instance" -> INSTANCE           "of" -> OF+          "cast" -> CAST+          "castable" -> CASTABLE+          "case" -> CASE+          "default" -> DEFAULT+          "typeswitch" -> TYPESWITCH           var -> QName var-       ) : lexer rest n+    in case token of+         QName v1 -> case rest of+                       ':':rest2 -> let (v2,rest3) = span isQN rest2+                                    in [QName v1,COLON,QName v2] ++ lexer rest3 n+                       _ -> QName v1 : lexer rest n+         x -> x : lexer rest n }
data/q1.xq view
@@ -1,4 +1,4 @@-declare function fact ($n) { if $n=1 then 1 else $n*fact($n-1) };+declare function fact ($n) { if $n=1 then 1 else $n*fact($n - 1) };  declare variable $x := fact(10); 
data/test-results.txt view
@@ -15,7 +15,7 @@  Query 8:  100   Query 9:- 5050.0 + 5050   Query 10:  50.5   Query 11:
data/test.xq view
@@ -62,7 +62,7 @@ declare function g ($x,$y) { f($x,$y)*3-f($y,$x) }; q(30,g(4,5)) ;-declare function fact ($n) { if $n <= 1 then 1 else $n*fact($n-1) };+declare function fact ($n) { if $n <= 1 then 1 else $n*fact($n - 1) }; q(31,fact(1)) ; q(32,fact(10))
db.html view
@@ -7,7 +7,7 @@ <body> <center> <h1>HXQ with Database Connectivity</h1>-<h3>Download <a href="/HXQ-0.15.0.tar.gz">HXQ-0.15.0.tar.gz</a></h3>+<h3>Download <a href="/HXQ-0.16.0.tar.gz">HXQ-0.16.0.tar.gz</a></h3> </center> <p> <h2>Installation Instructions (HXQ with database connectivity)</h2>@@ -195,4 +195,4 @@ <p> <hr> <p>-<address>Last modified: 01/06/09 by <a href="http://lambda.uta.edu/">Leonidas Fegaras</a></address>+<address>Last modified: 01/17/09 by <a href="http://lambda.uta.edu/">Leonidas Fegaras</a></address>
hxq-manual.pdf view

binary file changed (42157 → 42281 bytes)

index.html view
@@ -7,7 +7,7 @@ <body> <center> <h1>HXQ: A Compiler from XQuery to Haskell</h1>-<h3>Download <a href="/HXQ-0.15.0.tar.gz">HXQ-0.15.0.tar.gz</a></h3>+<h3>Download <a href="/HXQ-0.16.0.tar.gz">HXQ-0.16.0.tar.gz</a></h3> </center> <p> <h2>Description</h2>@@ -15,47 +15,90 @@ HXQ is a fast and space-efficient translator from <a href="http://www.w3.org/XML/Query/">XQuery</a> (the standard query language for XML) to embedded Haskell code. The translation is-based on <a href="http://haskell.org/haskellwiki/Template_Haskell">Template Haskell</a>.-HXQ takes full advantage of Haskell's lazy-evaluation to keep in memory only those parts of XML data needed at-each point of evaluation, thus performing stream-based evaluation for-forward queries (queries that do not contain backward steps). This-results to an implementation that is as fast and space-efficient as-any stream-based implementation based on SAX filters or finite state+based on <a href="http://haskell.org/haskellwiki/Template_Haskell">Template+Haskell</a>. HXQ takes full advantage of Haskell's lazy evaluation to+keep in memory only those parts of XML data needed at each point of+evaluation, thus performing stream-based evaluation for forward+queries (queries that do not contain backward steps). This results to+an implementation that is as fast and space-efficient as any+stream-based implementation based on SAX filters or finite state machines. Furthermore, the coding is far simpler and extensible since-it is based on XML trees, rather than SAX events.-<p>-For example, the XQuery in <a href="Test2.hs">Test2.hs</a>, which is-against the <a href="http://dblp.uni-trier.de/xml/">DBLP XML-document</a> (420MB), runs in 36 seconds on my laptop PC and uses a maximum of 3.2MB of heap space-(using the runtime options <tt>+RTS -H2m -M3.2m</tt>).-To contrast this, <a href="http://www.gnu.org/software/qexo/">Qexo</a>, which-compiles XQueries to Java bytecode, takes 1 minute 17 seconds and uses 1400MB of heap space for the same query.-Also <a href="http://xqilla.sourceforge.net/HomePage">XQilla</a>, which is written in C++, takes 1 minute and 10 secs-and uses 1150MB of heap space. (All results are taken on an Intel Core 2 Duo 2.2GHz 2GB running ghc-6.8.3 on Linux 2.6.27 kernel.)-Furthermore, since HXQ uses lazy evaluation, you get the first results of non-blocking queries immediately, while-most other XQuery processors must first parse the entire input file and construct the whole XML tree in memory before they produce any output.+it is based on XML trees, rather than SAX events.  Since HXQ uses lazy+evaluation, you get the first results of non-blocking queries+immediately, while the non-streaming XQuery processors must first parse the+entire input file and construct the whole XML tree in memory before+they produce any output. <p> Finally, HXQ can store XML documents in a relational database-(currently MySQL or SQLite), by shredding XML into relational tuples, and by-translating XQueries over the shredded documents into optimized SQL-queries. For example, when the DBLP file is shredded into a MySQL database and the appropriate index is created, the-above query runs in 90 milliseconds.+(currently MySQL or SQLite), by shredding XML into relational tuples,+and by translating XQueries over the shredded documents into optimized+SQL queries. The mapping to relational tables is based on the+document's structural summary, which is derived from the document data+rather than from a schema.  It uses hybrid inlining to inline attributes+and non-repeating elements into a single table, thus resulting to a+compact relational schema. For each such mapping, HXQ synthesizes an XQuery+that reconstructs the original XML document from the shredded data.+This XQuery is fused with the user queries using partial evaluation+techniques and parts of the resulting query are mapped to SQL queries+using code folding rules so that all relevant predicates are promoted+to SQL. This pushes most evaluation to the database query engine, thus+resulting to a fast execution over large data sets. <p>+<h2>Performance</h2>+<p>+HXQ shines best when used for data intensive applications. For example,+the XQuery in <a href="Test2.hs">Test2.hs</a>, which is against+the <a href="http://dblp.uni-trier.de/xml/">DBLP XML document</a>+(420MB), runs in 36 seconds on my laptop PC and uses a maximum of+3.2MB of heap space (using the runtime options <tt>+RTS -H2m -M3.2m</tt>).+(All results are taken on an Intel Core 2 Duo+2.2GHz 2GB running ghc-6.8.3 on Linux 2.6.27 kernel.)  To contrast+this, <a href="http://www.gnu.org/software/qexo/">Qexo</a>, which+compiles XQueries to Java bytecode, takes 1 minute 17 seconds and uses+1400MB of heap space for the same query,+while <a href="http://xqilla.sourceforge.net/HomePage">XQilla</a>,+which is written in C++, takes 1 minute and 10 secs and uses 1150MB of+heap space.  For simple XPath queries, the fastest implementation I+have ever tried is+using <a href="http://lambda.uta.edu/cse5335/examples/sax.java">SAX+pipelines</a>, which runs in 17secs and needs 3MB heap. Unfortunately,+it is very hard to implement complex XQuery constructs+using <a href="http://lambda.uta.edu/XStreamQuery.pdf">SAX</a>,+and one may end up simulating lazy evaluation using ad-hoc techniques.+<p>+For better performance in data intensive applications, one may use the+database capabilities of HXQ.  For example, when the DBLP file is+shredded into a MySQL database and the appropriate index is created,+the above query runs in 90 milliseconds.+<p>+HXQ uses the <a href="http://www.flightlab.com/~joe/hxml/">HXML parser+for XML</a> (developed by Joe English), which is included in the+source. I have also tried hexpat, tagsoup, HXT, and HaXML Xtract, but+they all have space leaks.+<p>+HXQ has two parsers: one that generates simple rose trees from XML+documents, which can be processed by forward queries without space+leaks, and another parser where each tree node has a reference to its+parent.  Some, but not all, backward axis steps (such as the parent+axis /..) are removed from a query using optimization rules.  If there+are backward axis steps left in the query, then HXQ uses the latter+parser, which may result to a performance penalty due to space leaks.+<p> <h2>Installation Instructions (HXQ without Database Connectivity)</h2> <p> HXQ can be installed on most platforms but I have only tested it on Linux, Mac OS X, and Windows XP.  The simplest installation is without database connectivity (ie, it can only process XQueries against XML text documents). If you want database connectivity-(over MySQL or sqlite relational databases), look at the <a href="db.html">installation instructions for database connectivity</a>.+(over MySQL or sqlite relational databases), look at the+<a href="db.html">installation instructions for database connectivity</a>. <p> First, you need to install the Glasgow Haskell Compiler, <a href="http://www.haskell.org/ghc/">ghc</a>.  Optionally, if you want to modify the XQuery parser, you need to install the parser generator for Haskell, <a href="http://www.haskell.org/happy/">happy</a>.  Then,-download <a href="/HXQ-0.15.0.tar.gz">HXQ version 0.15.0</a> and untar+download <a href="/HXQ-0.16.0.tar.gz">HXQ version 0.16.0</a> and untar it (using <tt>tar xfz</tt> on Linux/Mac or <a href="http://www.7-zip.org/">7z x</a> on Windows).  Then, you execute the following commands inside the HXQ directory:@@ -80,27 +123,26 @@ fully compliant with the W3C specs. One may use HXQ as a basis for a fully compliant XQuery implementation (conforming to W3C test suits), but currently I do not have the time to do so. To see the list of-supported system functions, run <tt>xquery -help</tt> .  HXQ does not-have static typechecking; it leaves all checking to Haskell.  In-addition, the XQuery semantics requires duplicate elimination and+supported system functions, run <tt>xquery -help</tt>. Here are+some important differences between HXQ and the W3C specs:+<ul>+<li> HXQ does not do static typechecking and ignores function types,+although it supports type testing and casting using+the XQuery expressions: typeswitch, instance-of, cast-as, etc.+<li> HXQ provides very little support for namespaces. For example, two QNames,+<tt>s1:tag</tt> and <tt>s2:tag</tt>, are different in HXQ+even when <tt>s1</tt> and <tt>s2</tt> are different prefixes+of the same namespace.+<li> The XQuery semantics requires duplicate elimination and sorting by document order for every XPath step, which is very expensive and unnecessary in most cases.  This is not currently supported by HXQ but will be addressed in the future (needs a static analysis to determine when duplicate elimination is necessary).  For example, <tt>e//*//*</tt> may return duplicate elements in HXQ.-<p>-HXQ uses the <a href="http://www.flightlab.com/~joe/hxml/">HXML parser-for XML</a> (developed by Joe English), which is included in the-source. I have also tried hexpat, tagsoup, HXT, and HaXML Xtract, but-they all have space leaks.-<p>-HXQ has two parsers: one that generates simple rose trees from XML-documents, which can be processed by forward queries without space-leaks, and another parser where each tree node has a reference to its-parent.  Some, but not all, backward axis steps (such as the parent-axis /..) are removed from a query using optimization rules.  If there-are backward axis steps left in the query, then HXQ uses the latter-parser, which may result to a performance penalty due to space leaks.+<li> Currently, the <tt>doc</tt> function works on local+XML documents only, rather than general URIs. This can be easily fixed+by using the Haskell Network.HTTP.Simple library.+</ul> <p> <h2>XQuery Documentation</h2> <p>@@ -109,6 +151,7 @@ and <a href="http://lambda.uta.edu/cse6339/xquery2.pdf">XQuery</a>. Here are two relevant courses on XML and databases at <a href="http://www.stanford.edu/class/cs345b/">Stanford</a> and <a href="http://www.dbis.ethz.ch/education/ws0708/xml_db_ws2007">ETH</a>.+A nice <a href="http://www.ics.uci.edu/community/events/carey/index.php">video lecture on XQuery</a> by Michael Carey. <p> <h2>Using the Compiler</h2> <p>@@ -186,4 +229,4 @@ <p> <hr> <p>-<address>Last modified: 01/06/09 by <a href="http://lambda.uta.edu/">Leonidas Fegaras</a></address>+<address>Last modified: 01/17/09 by <a href="http://lambda.uta.edu/">Leonidas Fegaras</a></address>
src/Text/XML/HXQ/Compiler.hs view
@@ -19,7 +19,7 @@  module Text.XML.HXQ.Compiler     ( xe, xq, xqdb, maxPosition, containsLast, qName, qx,-      parent_error, pathPosition, liftIOSources ) where+      parent_error, pathPosition, liftIOSources, uploadFile ) where  import Text.XML.HXQ.Parser import Text.XML.HXQ.XTree@@ -30,12 +30,19 @@ import XMLParse(parseDocument) import Text.XML.HXQ.Optimizer import Text.XML.HXQ.Functions+import Text.XML.HXQ.Types import Language.Haskell.TH #if __GLASGOW_HASKELL__ >= 609 import Language.Haskell.TH.Quote #endif  +-- need to handle URIs too+uploadFile :: String -> IO String+uploadFile path+    = readFile path++ undef1 = [| error "Undefined XQuery context (.)" |] undef2 = [| error "Undefined position()" |] undef3 = [| error "Undefined last()" |]@@ -50,16 +57,25 @@ containsLast _ = False  +liftAst :: Ast -> Q Exp+liftAst (Ast s xs)+    = let cs = listE $ map liftAst xs+      in [| Ast s $cs |]+liftAst (Avar v) = [| Avar v |]+liftAst (Aint n) = [| Aint n |]+liftAst (Astring s) = [| Astring s |]++ -- calculate the maximum position value used in a predicate, if there is one maxPosition :: Ast -> Ast -> Int maxPosition position e     = case e of-        Ast "call" [Avar f,p,Aint n]-            | f `elem` ["=","<","<=","eq","lt","le"] && p == position-            -> n-        Ast "call" [Avar f,Aint n,p]-            | f `elem` ["=",">",">=","eq","gt","ge"] && p == position-            -> n+        Ast "call" [Avar f,p,n]+            | f `elem` ["=","<","<=","eq","lt","le"] && p == position && maxV n /= Nothing+            -> let Just k = maxV n in k+        Ast "call" [Avar f,n,p]+            | f `elem` ["=",">",">=","eq","gt","ge"] && p == position && maxV n /= Nothing+            -> let Just k = maxV n in k         Ast "let" [Avar x,source,body]             -> if position == Avar x                then 0 else minp (maxPosition position source) (maxPosition position body)@@ -74,6 +90,11 @@             -> max (maxPosition position x) (maxPosition position y)         _ -> 0     where minp x y = if x == 0 then y else if y == 0 then x else min x y+          maxV (Aint n) = Just n+          maxV (Ast "call" [Avar "to",_,n]) = maxV n+          maxV (Ast "call" [Avar "+",x,y]) = do n <- maxV x; m <- maxV y; return $ n+m+          maxV (Ast "call" [Avar "-",x,y]) = do n <- maxV x; m <- maxV y; return $ n-m+          maxV _ = Nothing   pathPosition = Ast "call" [Avar "position"]@@ -83,7 +104,7 @@   -- extract the QName-qName :: XSeq -> Tag+qName :: XSeq -> String qName [XText s] = s qName e = error ("Invalid QName: "++(show e)) @@ -93,6 +114,36 @@     = if vc==[XNull] then [] else [(qName ac,showXS vc)]  +-- true, if it is a function in the IO monad+ioFunction :: String -> Q Bool+ioFunction name+    = do info <- reify (mkName name)+         iotp <- [t| IO XSeq |]+         case info of+           VarI _ (AppT _ tp) _ _+               | tp == iotp+               -> return True+           _ -> return False+++-- make a function call+callF :: String -> [Q Exp] -> Q Exp+callF fname args+    = case filter (\(n,_,_,_) -> n == fname || ("fn:"++n)==fname) systemFunctions of+        [] ->     -- must be a Haskell function of type (XSeq,...,XSeq) -> IO XSeq+             let itp = case args of+                         [] -> [t| () |]+                         [_] -> [t| XSeq |]+                         _ -> foldr (\_ r -> appT r [t| XSeq |]) (appT (tupleT (length args)) [t| XSeq |])+                                    (tail args)+                 fn = sigE (varE (mkName fname))+                           (appT (appT arrowT itp) [t| IO XSeq |])+             in appE fn (tupE args)+        fs -> case filter (\(_,len,_,_) -> len < 0 || length args == len) fs of+                [] -> error ("wrong number of arguments in function call: " ++ fname)+                (_,_,_,f):_ -> f args++ -- Each XPath predicate must calculate position() and last() from its input XSeq -- if last() is used, then the evaluation is blocking (need to store the whole input XSeq) compilePredicates :: [Ast] -> Q Exp -> Bool -> Q Exp@@ -184,6 +235,10 @@       Ast f _           | elem f ["insert","delete","replace"]           -> error "Updates must be over XML data stored in databases"+      Ast "call" [Avar fname,a]+          | isBuildInType fname+          -> let ac = compile a context position last effective_axis+             in [| castAs $ac (Avar fname) |]       Ast "call" ((Avar f):_)           | not (elem f system_functions)           -> error "External function calls must be within the IO monad"@@ -242,6 +297,8 @@                                                                     o -> o |])                                   [| \xs ys -> EQ |] ordList              in [| concatMap head (sortBy (\(_:xs) (_:ys) -> $ordering xs ys) ($ce::[[XSeq]])) |]+      Ast "type" [tp]+          -> [| [ XType $(liftAst tp) ] |]       _ -> error ("Illegal XQuery: "++(show e))  @@ -306,7 +363,7 @@           -> [| return $last |]       Ast "call" [Avar f,Astring file]           | elem f ["doc","fn:doc"]-          -> [| do doc <- readFile file+          -> [| do doc <- uploadFile file                    return [materialize False (parseDocument doc)] |]       Ast "step" (Avar "child":tag:Avar ".":preds)           | effective_axis /= ""@@ -369,6 +426,11 @@              in [| do v1 <- $vc1                       v2 <- $vc2                       replaceDB $db v1 v2 |]+      Ast "call" [Avar fname,a]+          | isBuildInType fname+          -> let ac = compileM a context position last effective_axis+             in [| do a <- $ac+                      return $! castAs a (Avar fname) |]       Ast "call" ((Avar f):args)           -- Note: strict function application           -> let binds = zipWith (\i x -> (mkName ("x"++(show i)),x)) [1..(length args)] args                  call = if elem f system_functions@@ -439,6 +501,8 @@                                   [| \xs ys -> EQ |] ordList              in [| do c <- $ce                       return (concatMap head (sortBy (\(_:xs) (_:ys) -> $ordering xs ys) (c::[[XSeq]]))) |]+      Ast "type" [tp]+          -> [| return [ XType $(liftAst tp) ] |]       _ -> error ("Illegal XQuery: "++(show e))  @@ -446,7 +510,7 @@ ioSources :: [ String ] ioSources     = is ++ map (\x -> "fn:"++x) is-      where is = ["executeSQL","doc","sql","publish","insert","delete","replace"]+      where is = ["debug","executeSQL","doc","sql","publish","insert","delete","replace"]   -- steps that need the parent XTree link in evaluation (with a potential space leak)@@ -493,7 +557,7 @@ noIO :: Ast -> Bool noIO (Ast nm _) | elem nm ioSources = False noIO (Ast "call" (Avar nm:_))-    | elem nm ioSources || not(elem nm system_functions)+    | elem nm ioSources || not (elem nm system_functions || isBuildInType nm)     = False noIO (Ast n args) = all noIO args noIO _ = True@@ -560,33 +624,37 @@                                                      $(varE (mkName "_db"))                                                      $(litE (StringL sql))) >>= $d |]                                    _ -> [| do let [XText f] = $(compileAst e)-                                              doc <- readFile f+                                              doc <- uploadFile f                                               $d [materialize $bc (parseDocument doc)] |])                [| (liftM2 (++)) $code $rest |] ns compileQueryM [] = [| return [] |]  --- | Run an XQuery expression that does not perform IO.--- When evaluated, it returns XSeq.+-- | Compile an XQuery expression that does not perform IO.+-- When the compiled code is evaluated, it returns a value of type @XSeq@. xe :: String -> Q Exp xe query = compileQuery (parse (scan query))  --- | Run an XQuery that may read XML documents.--- When evaluated, it returns IO XSeq.+-- | Compile an XQuery that may perform IO (such as reading an XML document or calling a user function).+-- When the compiled code is evaluated, it returns a value of type @IO XSeq@. xq :: String -> Q Exp xq query = compileQueryM (parse (scan query))  --- | Run an XQuery that reads XML documents and queries databases.--- When evaluated, it returns @Connection -> IO XSeq@.+-- | Compile an XQuery that may perform IO and/or queries a database.+-- When the compiled code is evaluated, it returns @Connection -> IO XSeq@. xqdb :: String -> Q Exp xqdb query = lamE [varP (mkName "_db")] (compileQueryM (parse (scan query)))  --- | Quasi-quotation for HXQ using xq #if __GLASGOW_HASKELL__ >= 609+-- | Quasi-quotation for HXQ. For example, @[qx| doc(\"data\/cs.xml\")\/\/gpa |]@ is equivalent to @xq \"doc(\\\"data\/cs.xml\\\")\/\/gpa\"@. qx = QuasiQuoter xq (\_ -> error "XQuery patterns are not allowed") #else+type QuasiQuoter = String++-- | Quasi-quotation for HXQ (for ghc 6.09 or later). For example, @[qx| doc(\"data\/cs.xml\")\/\/gpa |]@ is equivalent to @xq \"doc(\\\"data\/cs.xml\\\")\/\/gpa\"@.+qx :: QuasiQuoter qx = error "Quasi-quotation not permitted in earlier ghc versions" #endif
src/Text/XML/HXQ/Functions.hs view
@@ -4,7 +4,7 @@ - Programmer: Leonidas Fegaras - Email: fegaras@cse.uta.edu - Web: http://lambda.uta.edu/-- Creation: 08/15/08, last update: 01/07/09+- Creation: 08/15/08, last update: 01/17/09 -  - Copyright (c) 2008 by Leonidas Fegaras, the University of Texas at Arlington. All rights reserved. - This material is provided as is, with absolutely no warranty expressed or implied.@@ -23,9 +23,11 @@ import Data.List import Char import Text.XML.HXQ.XTree+import Text.XML.HXQ.Types import Language.Haskell.TH import Text.Regex import Text.Regex.Base.RegexLike+import qualified GHC.Arr as A import Debug.Trace  @@ -33,7 +35,7 @@   -- XPath step self /.-self_step :: Tag -> XTree -> XSeq+self_step :: String -> XTree -> XSeq self_step tag x     = case x of         XElem t _ _ _ _ -> if t==tag || tag=="*" then [x] else []@@ -41,7 +43,7 @@   -- XPath step /tag or / *-child_step :: Tag -> XTree -> XSeq+child_step :: String -> XTree -> XSeq child_step tag x     = case x of         XElem _ _ _ _ bs@@ -52,7 +54,7 @@   -- XPath step descendant-or-self-descendant_or_self_step :: Tag -> XTree -> XSeq+descendant_or_self_step :: String -> XTree -> XSeq descendant_or_self_step tag (x@(XElem t _ _ _ cs))     | tag==t || tag=="*"     = x:(concatMap (descendant_or_self_step tag) cs)@@ -62,7 +64,7 @@   -- XPath step //tag or // *-descendant_step :: Tag -> XTree -> XSeq+descendant_step :: String -> XTree -> XSeq descendant_step tag (XElem t _ _ _ cs)     = concatMap (descendant_or_self_step tag) cs descendant_step _ _ = []@@ -70,7 +72,7 @@  -- It's like //* but has tagged children, which are derived statically -- After examining 100 children it gives up: this avoids space leaks-descendant_any_with_tagged_children :: [Tag] -> XTree -> XSeq+descendant_any_with_tagged_children :: [String] -> XTree -> XSeq descendant_any_with_tagged_children tags (XElem t _ _ _ cs)     = concatMap (ca tags) cs       where ca tags (x@(XElem t _ _ _ cs))@@ -86,7 +88,7 @@   -- XPath step /@attr or /@*-attribute_step :: Tag -> XTree -> XSeq+attribute_step :: String -> XTree -> XSeq attribute_step attr x     = case x of         XElem _ al _ _ _ -> foldr (\(a,v) s -> if a==attr || attr=="*"@@ -96,7 +98,7 @@   -- XPath step //@attr or //@*-attribute_descendant_step :: Tag -> XTree -> XSeq+attribute_descendant_step :: String -> XTree -> XSeq attribute_descendant_step attr (x@(XElem _ al _ _ cs))     = foldr (\(a,v) s -> if a==attr || attr=="*"                          then (XAttr a v):s@@ -106,7 +108,7 @@   -- XPath step parent /..-parent_step :: Tag -> XTree -> XSeq+parent_step :: String -> XTree -> XSeq parent_step tag (XElem _ _ _ p _)  = case p of      XElem t _ _ _ _ | (t==tag || tag=="*") -> [p]@@ -115,7 +117,7 @@   -- XPath step ancestor-ancestor_step :: Tag -> XTree -> XSeq+ancestor_step :: String -> XTree -> XSeq ancestor_step tag (XElem _ _ _ p _)  = case p of      XElem t _ _ _ _@@ -127,7 +129,7 @@   -- XPath step ancestor-or-self-ancestor_or_self_step :: Tag -> XTree -> XSeq+ancestor_or_self_step :: String -> XTree -> XSeq ancestor_or_self_step tag e  = case e of      XElem t _ _ _ _@@ -138,7 +140,7 @@   -- XPath step following-sibling-following_sibling_step :: Tag -> XTree -> XSeq+following_sibling_step :: String -> XTree -> XSeq following_sibling_step tag (XElem _ _ order (XElem _ _ _ _ cs) _)  = concatMap (self_step tag)              (tail (dropWhile filter cs))@@ -148,7 +150,7 @@   -- XPath step following-following_step :: Tag -> XTree -> XSeq+following_step :: String -> XTree -> XSeq following_step tag (XElem _ _ order p _)  = case p of      XElem _ _ _ _ cs@@ -162,7 +164,7 @@   -- XPath step preceding-sibling-preceding_sibling_step :: Tag -> XTree -> XSeq+preceding_sibling_step :: String -> XTree -> XSeq preceding_sibling_step tag (XElem _ _ order (XElem _ _ _ _ cs) _)  = concatMap (self_step tag)              (takeWhile filter cs)@@ -172,7 +174,7 @@   -- XPath step preceding-preceding_step :: Tag -> XTree -> XSeq+preceding_step :: String -> XTree -> XSeq preceding_step tag (XElem _ _ order p _)  = case p of      XElem t _ _ _ cs@@ -186,7 +188,7 @@   -- XPath steps-paths :: [(Tag,Q Exp)]+paths :: [(String,Q Exp)] paths = [ ( "child", [| child_step |] ),           ( "descendant", [| descendant_step |] ),           ( "attribute", [| attribute_step |] ),@@ -203,7 +205,7 @@   -- XPath steps to be used by the interpreter-pathFunctions :: [(String,Tag->XTree->XSeq)]+pathFunctions :: [(String,String->XTree->XSeq)] pathFunctions     = [ ( "child", child_step ),         ( "descendant", descendant_step ),@@ -255,15 +257,6 @@ toBool b = if b then [trueXT] else [falseXT]  -readNum :: String -> Maybe XTree-readNum cs = case span isDigit cs of-               (n,[]) -> Just (XInt (read n))-               (n,'.':rest) -> case span isDigit rest of-                                 (k,[]) -> Just (XFloat (read (n++('.':k))))-                                 _ -> Nothing-               _ -> Nothing-- text :: XSeq -> XSeq text xs = foldr (\x r -> case x of                             XElem _ _ _ _ zs@@ -287,13 +280,8 @@                              _ -> r) [] xs  -toString :: XSeq -> [String]-toString xs = map (\x -> case x of -                           XText t -> t-                           XInt n -> show n-                           XFloat n -> show n-                           XBool n -> show n)-                  (text xs)+strings :: XSeq -> [String]+strings xs = map toString xs   getNames :: XSeq -> XSeq@@ -326,14 +314,16 @@             s _ _ = []  -replace :: String -> String -> String -> String-replace xs from to-    = s xs from []-      where s xs from c-                | isPrefixOf from xs-                = c ++ to ++ drop (length from) xs-            s (x:xs) from c = s xs from (c++[x])-            s _ _ _ = []+replaceString :: String -> String -> [(Int,Int)] -> String+replaceString from with indexes+    = rs from indexes 0 ""+      where rs "" _ _ s = s+            rs fs [] _ s = s++fs+            rs fs ((i,l):is) j s+                | i==j+                = rs (drop l fs) is (j+l) (s++with)+            rs (f:fs) is j s+                = rs fs is (j+1) (s++[f])   translate_string :: String -> String -> String -> String@@ -345,31 +335,39 @@                        _ -> c:r) "" xs  -toNum :: XSeq -> XSeq-toNum xs = foldr (\x r -> case x of-                             XInt n -> x:r-                             XFloat n -> x:r-                             XText s -> case readNum s of-                                          Just t -> t:r-                                          _ -> r-                             _ -> r) [] (text xs)+toNums :: XSeq -> XSeq+toNums xs = case mapM toNum xs of Just x -> x; _ -> []  -toFloat :: XTree -> Float-toFloat (XText s) = case readNum s of-                      Just (XInt n) -> fromIntegral n-                      Just (XFloat n) -> n-                      _ -> error("Cannot convert to a float: "++s)-toFloat (XInt n) = fromIntegral n-toFloat (XFloat n) = n-toFloat x = error("Cannot convert to a float: "++(show x))+getFloat :: XTree -> Double+getFloat x = case toFloat x of+               Just (XFloat n) -> n+               _ -> error("Cannot convert to a double: "++show x)   -- strict: average value-mean :: (Fractional t) => [t] -> t+mean :: [Double] -> Double mean = uncurry (/) . foldl' (\(!s, !n) x -> (s+x, n+1)) (0,0.0)  +sumSeq :: XSeq -> XSeq+sumSeq xs+    = case xs of+        XInt _:_ -> [ XInt (sum [ n | XInt n <- xs ]) ]+        XFloat _:_ -> [ XFloat (sum [ n | XFloat n <- xs ]) ]+        _ -> []+++maxSeq :: XSeq -> XSeq+maxSeq [] = []+maxSeq xs = [ maximumBy compareXTrees xs ]+++minSeq :: XSeq -> XSeq+minSeq [] = []+minSeq xs = [ minimumBy compareXTrees xs ]++ contains :: String -> String -> Bool contains text word = isInfixOf word text @@ -382,8 +380,12 @@             rd [] _ = []  -arithmetic :: (Float -> Float -> Float) -> XTree -> XTree -> XTree-arithmetic op (XInt n) (XInt m) = XInt (round (op (fromIntegral n) (fromIntegral m)))+modulo :: Double -> Double -> Double+modulo x y = x - fromIntegral(floor(x/y))*y+++arithmetic :: (Double -> Double -> Double) -> XTree -> XTree -> XTree+arithmetic op (XInt n) (XInt m) = XInt (floor (op (fromIntegral n) (fromIntegral m))) arithmetic op (XFloat n) (XFloat m) = XFloat (op n m) arithmetic op (XFloat n) (XInt m) = XFloat (op n (fromIntegral m)) arithmetic op (XInt n) (XFloat m) = XFloat (op (fromIntegral n) m)@@ -398,7 +400,7 @@ compareXTrees (XFloat n) (XFloat m) = compare n m compareXTrees (XText n) (XText m) = compare n m compareXTrees (XBool n) (XBool m) = compare n m-compareXTrees x y = compare (toFloat x) (toFloat y)+compareXTrees x y = compare (toString x) (toString y)   strictCompareOne [XInt n] [XInt m] = compare n m@@ -455,231 +457,298 @@ index (_:xs) n = index xs $! (n-1)  -type Function = [Q Exp] -> Q Exp----- System functions: they can also be defined as Haskell functions of type (XSeq,...,XSeq) -> XSeq--- but here we make sure they are unfolded and fused with the rest of the query-functions :: [(Tag,Int,Function)]-functions-    = [ ( "=", 2, \[xs,ys] -> [| toBool $ or [ compareXTrees x y == EQ | x <- text $xs, y <- text $ys ] |] ),-        ( "!=", 2, \[xs,ys] -> [| toBool $ strictCompare $xs $ys /= EQ |] ),-        ( ">", 2, \[xs,ys] -> [| toBool $ or [ compareXTrees x y == GT | x <- text $xs, y <- text $ys ] |] ),-        ( "<", 2, \[xs,ys] -> [| toBool $ or [ compareXTrees x y == LT | x <- text $xs, y <- text $ys ] |] ),-        ( ">=", 2, \[xs,ys] -> [| toBool $ or [ compareXTrees x y `elem` [GT,EQ] | x <- text $xs, y <- text $ys ] |] ),-        ( "<=", 2, \[xs,ys] -> [| toBool $ or [ compareXTrees x y `elem` [LT,EQ] | x <- text $xs, y <- text $ys ] |] ),-        ( "eq", 2, \[xs,ys] -> [| toBool $ strictCompare $xs $ys == EQ |] ),-        ( "neq", 2, \[xs,ys] -> [| toBool $ strictCompare $xs $ys /= EQ |] ),-        ( "lt", 2, \[xs,ys] -> [| toBool $ strictCompare $xs $ys == LT |] ),-        ( "gt", 2, \[xs,ys] -> [| toBool $ strictCompare $xs $ys == GT |] ),-        ( "le", 2, \[xs,ys] -> [| toBool $ strictCompare $xs $ys `elem` [LT,EQ] |] ),-        ( "ge", 2, \[xs,ys] -> [| toBool $ strictCompare $xs $ys `elem` [GT,EQ] |] ),-        ( "<<", 2, \[xs,ys] -> [| toBool $ or [ ox < oy | XElem _ _ ox _ _ <- $xs, XElem _ _ oy _ _ <- $ys ] |] ),-        ( ">>", 2, \[xs,ys] -> [| toBool $ or [ ox > oy | XElem _ _ ox _ _ <- $xs, XElem _ _ oy _ _ <- $ys ] |] ),-        ( "is", 2, \[xs,ys] -> [| toBool $ or [ ox == oy | XElem _ _ ox _ _ <- $xs, XElem _ _ oy _ _ <- $ys ] |] ),-        ( "+", 2, \[xs,ys] -> [| [ arithmetic (+) x y | x <- toNum $xs, y <- toNum $ys ] |] ),-        ( "-", 2, \[xs,ys] -> [| [ arithmetic (-) x y | x <- toNum $xs, y <- toNum $ys ] |] ),-        ( "*", 2, \[xs,ys] -> [| [ arithmetic (*) x y | x <- toNum $xs, y <- toNum $ys ] |] ),-        ( "div", 2, \[xs,ys] -> [| [ arithmetic (/) x y | x <- toNum $xs, y <- toNum $ys ] |] ),-        ( "idiv", 2, \[xs,ys] -> [| [ XInt (div x y) | (XInt x) <- toNum $xs, (XInt y) <- toNum $ys ] |] ),-        ( "mod", 2, \[xs,ys] -> [| [ XInt (mod x y) | (XInt x) <- toNum $xs, (XInt y) <- toNum $ys ] |] ),-        ( "uplus", 1, \[xs] -> [| [ x | x <- toNum $xs ] |] ),-        ( "uminus", 1, \[xs] -> [| [ case x of XInt n -> XInt (-n); XFloat n -> XFloat (-n) | x <- toNum $xs ] |] ),-        ( "and", 2, \[xs,ys] -> [| toBool $ (conditionTest $xs) && (conditionTest $ys) |] ),-        ( "or", 2, \[xs,ys] -> [| toBool $ (conditionTest $xs) || (conditionTest $ys) |] ),-        ( "not", 1, \[xs] -> [| toBool $ not $ conditionTest $xs |] ),-        ( "count", 1, \[xs] -> [| [ XInt (length $xs) ] |] ),-        ( "sum", 1, \[xs] -> [| [ XFloat (sum [ toFloat x | x <- toNum $xs ]) ] |] ),-        ( "avg", 1, \[xs] -> [| [ XFloat (mean [ toFloat x | x <- toNum $xs ]) ] |] ),-        ( "min", 1, \[xs] -> [| [ XFloat (minimum [ toFloat x | x <- toNum $xs ]) ] |] ),-        ( "max", 1, \[xs] -> [| [ XFloat (maximum [ toFloat x | x <- toNum $xs ]) ] |] ),-        ( "to", 2, \[xs,ys] -> [| [ XInt i | XInt n <- toNum $xs, XInt m <- toNum $ys, i <- [n..m] ] |] ),-        ( "text", 1, \[xs] -> [| [ w | XElem _ _ _ _ ts <- $xs, w <- text ts ] |] ),-        ( "string", 1, \[xs] -> [| string $xs |] ),-        ( "data", 1, \[xs] -> [| text $xs |] ),-        ( "node", 1, \[xs] -> [| [ w | XElem _ _ _ _ ts <- $xs, w <- ts ] |] ),-        ( "exists", 1, \[xs] -> [| toBool $ (not (null $xs)) |] ),-        ( "some", 1, \[xs] -> [| toBool $ or [ conditionTest [x] | x <- $xs ] |] ),-        ( "empty", 0, \[] -> [| [] |] ),-        ( "empty", 1, \[xs] -> [| toBool $ null $xs |] ),-        ( "true", 0, \[] -> [| [trueXT] |] ),-        ( "false", 0, \[] -> [| [falseXT] |] ),-        ( "if", 3, \[cs,xs,ys] -> [| if conditionTest $cs then $xs else $ys |] ),-        ( "name", 1, \[xs] -> [| getNames $xs |] ),-        ( "local-name", 1, \[xs] -> [| getNames $xs |] ),-        ( "contains", 2, \[xs,text] -> [| toBool $ or [ contains x t | x <- toString $xs, t <- toString $text ] |] ),-        ( "substring", 3, \[xs,n1,n2] -> [| [ XText (take m2 (drop (m1-1) x)) | x <- toString $xs,-                                              XInt m1 <- toNum $n1, XInt m2 <- toNum $n2 ] |] ),-        ( "concatenate", 2, \[xs,ys] -> [| $xs ++ $ys |] ),-        ( "distinct-values", 1, \[xs] -> [| distinct $xs |] ),-        ( "union", 2, \[xs,ys] -> [| distinct ($xs ++ $ys) |] ),-        ( "intersect", 2, \[xs,ys] -> [| intersect $xs $ys |] ),-        ( "except", 2, \[xs,ys] -> [| $xs \\ $ys |] ),-        ( "reverse", 1, \[xs] -> [| reverse $xs |] ),-        ( "trace", 2, \[xs,ys] -> [| trace ("*** trace: "++show $xs) $ys |] ),-        ( "error", 0, \[] -> [| error "XQuery error" |] ),-        ( "error", 2, \[xs,ys] -> [| error (showXS $xs++": "++show $ys) |] ),-        ( "substring", 2, \[xs,n] -> [| [ XText (drop (m-1) x) | x <- toString $xs, XInt m <- toNum $n ] |] ),-        ( "substring-before", 2, \[xs,ys] -> [| [ XText (substring_before x y)  | x <- toString $xs, y <- toString $ys ] |] ),-        ( "substring-after", 2, \[xs,ys] -> [| [ XText (substring_after x y)  | x <- toString $xs, y <- toString $ys ] |] ),-        ( "starts-with", 2, \[xs,ys] -> [| toBool $ or [ x == "" || isPrefixOf y x  | x <- toString $xs, y <- toString $ys ] |] ),-        ( "ends-with", 2, \[xs,ys] -> [| toBool $ or [ x == "" || isSuffixOf y x  | x <- toString $xs, y <- toString $ys ] |] ),-        ( "concat", -1, \ss -> [| [ XText $ $(foldr (\s r -> [| concat [ x | x <- toString $s ] ++ $r |]) [| "" |] ss) ] |] ),-        ( "string-join", 2, \[xs,ys] -> [| [ XText $ intercalate y (toString $xs) | y <- toString $ys ] |] ),-        ( "substitute-string", 3, \[xs,ys,zs] -> [| [ XText $ replace x y z  | x <- toString $xs, y <- toString $ys, z <- toString $zs ] |] ),-        ( "string-length", 1, \[xs] -> [| [ XInt $ length x | x <- toString $xs ] |] ),-        ( "number", 1, \[xs] -> [| toNum $xs |] ),-        ( "boolean", 1, \[xs] -> [| toBool $ or [ conditionTest [x] | x <- $xs ] |] ),-        ( "abs", 1, \[xs] -> [| [ case x of XInt n -> XInt (abs n); XFloat n -> XFloat (abs n) | x <- toNum $xs ] |] ),-        ( "ceiling", 1, \[xs] -> [| [ case x of XInt n -> XInt n; XFloat n -> XInt (ceiling n) | x <- toNum $xs ] |] ),-        ( "round", 1, \[xs] -> [| [ case x of XInt n -> XInt n; XFloat n -> XInt (round n) | x <- toNum $xs ] |] ),-        ( "floor", 1, \[xs] -> [| [ case x of XInt n -> XInt n; XFloat n -> XInt (floor n) | x <- toNum $xs ] |] ),-        ( "index-of", 2, \[xs,ys] -> [| [ XInt (i+1) | y <- $ys, i <- elemIndices y $xs ] |] ),-        ( "remove", 2, \[xs,ys] -> [| let x = $xs in concat [ (take (i-1) x)++(drop i x) | XInt i <- toNum $ys ] |] ),-        ( "subsequence", 2, \[xs,n] -> [| concat [ drop (m-1) $xs | XInt m <- toNum $n ] |] ),-        ( "subsequence", 3, \[xs,n1,n2] -> [| concat [ take m2 (drop (m1-1) $xs) | XInt m1 <- toNum $n1, XInt m2 <- toNum $n2 ] |] ),-        ( "last", 0, \[] -> error "the 'last()' call must be handled separately" ),-        ( "position", 0, \[] -> error "the 'position()' call must be handled separately" ),-        ( "insert-before", 3, \[xs,n,ys] -> [| let x = $xs in concat [ (take (i-1) x) ++ $ys ++ (drop (i-1) x) | XInt i <- toNum $n ] |] ),-        ( "deep-equal", 2, \[xs,ys] -> [| toBool $ or [ deep_equal x y | x <- $xs, y <- $ys ] |] ),-        ( "translate", 3, \[xs,ys,zs] -> [| [ XText $ translate_string x y z  | x <- toString $xs, y <- toString $ys, z <- toString $zs ] |] ),-        ( "matches", 2, \[xs,ys] -> [| toBool $ or [ matchTest (mkRegex y) x | x <- toString $xs, y <- toString $ys ] |] ),-        ( "compare", 2, \[xs,ys] -> [| [ XInt $ case compare x y of EQ -> 0; LT -> -1; GT -> 1 | x <- toString $xs, y <- toString $ys ] |] ),-        ( "upper-case", 1, \[xs] -> [| [ XText $ map toUpper x | x <- toString $xs ] |] ),-        ( "lower-case", 1, \[xs] -> [| [ XText  $ map toLower x | x <- toString $xs ] |] )-   ]----- Functions to be used by the interpreter. When evaluated, it gives [(String,Int,[XSeq]->XSeq)]-iFunctions :: Q Exp-iFunctions = foldr (\(fname,len,f) r-                        -> let vars = map (\i -> mkName ("v_"++(show i))) [1..len]-                               entry = tupE [litE (StringL fname),litE (IntegerL (toInteger len)),-                                             lamE [listP (map varP vars)] (f (map varE vars))]-                           in [| $entry : $r |]) [| [] |] functions----- System functions used by the interpreter. They can be derived from functions using the splicing $(iFunctions),--- but haddock crashes during splicing.-systemFunctions :: [(String,Int,[XSeq]->XSeq)]-systemFunctions                   --   = $(iFunctions)-    = [ ( "=", 2, \[xs,ys] -> toBool $ or [ compareXTrees x y == EQ | x <- text xs, y <- text ys ] ),-        ( "!=", 2, \[xs,ys] -> toBool $ strictCompare xs ys /= EQ ),-        ( ">", 2, \[xs,ys] -> toBool $ or [ compareXTrees x y == GT | x <- text xs, y <- text ys ] ),-        ( "<", 2, \[xs,ys] -> toBool $ or [ compareXTrees x y == LT | x <- text xs, y <- text ys ] ),-        ( ">=", 2, \[xs,ys] -> toBool $ or [ compareXTrees x y `elem` [GT,EQ] | x <- text xs, y <- text ys ] ),-        ( "<=", 2, \[xs,ys] -> toBool $ or [ compareXTrees x y `elem` [LT,EQ] | x <- text xs, y <- text ys ] ),-        ( "eq", 2, \[xs,ys] -> toBool $ strictCompare xs ys == EQ ),-        ( "neq", 2, \[xs,ys] -> toBool $ strictCompare xs ys /= EQ ),-        ( "lt", 2, \[xs,ys] -> toBool $ strictCompare xs ys == LT ),-        ( "gt", 2, \[xs,ys] -> toBool $ strictCompare xs ys == GT ),-        ( "le", 2, \[xs,ys] -> toBool $ strictCompare xs ys `elem` [LT,EQ] ),-        ( "ge", 2, \[xs,ys] -> toBool $ strictCompare xs ys `elem` [GT,EQ] ),-        ( "<<", 2, \[xs,ys] -> toBool $ or [ ox < oy | XElem _ _ ox _ _ <- xs, XElem _ _ oy _ _ <- ys ] ),-        ( ">>", 2, \[xs,ys] -> toBool $ or [ ox > oy | XElem _ _ ox _ _ <- xs, XElem _ _ oy _ _ <- ys ] ),-        ( "is", 2, \[xs,ys] -> toBool $ or [ ox == oy | XElem _ _ ox _ _ <- xs, XElem _ _ oy _ _ <- ys ] ),-        ( "+", 2, \[xs,ys] -> [ arithmetic (+) x y | x <- toNum xs, y <- toNum ys ] ),-        ( "-", 2, \[xs,ys] -> [ arithmetic (-) x y | x <- toNum xs, y <- toNum ys ] ),-        ( "*", 2, \[xs,ys] -> [ arithmetic (*) x y | x <- toNum xs, y <- toNum ys ] ),-        ( "div", 2, \[xs,ys] -> [ arithmetic (/) x y | x <- toNum xs, y <- toNum ys ] ),-        ( "idiv", 2, \[xs,ys] -> [ XInt (div x y) | (XInt x) <- toNum xs, (XInt y) <- toNum ys ] ),-        ( "mod", 2, \[xs,ys] -> [ XInt (mod x y) | (XInt x) <- toNum xs, (XInt y) <- toNum ys ] ),-        ( "uplus", 1, \[xs] -> [ x | x <- toNum xs ] ),-        ( "uminus", 1, \[xs] -> [ case x of XInt n -> XInt (-n); XFloat n -> XFloat (-n) | x <- toNum xs ] ),-        ( "and", 2, \[xs,ys] -> toBool $ (conditionTest xs) && (conditionTest ys) ),-        ( "or", 2, \[xs,ys] -> toBool $ (conditionTest xs) || (conditionTest ys) ),-        ( "not", 1, \[xs] -> toBool $ not $ conditionTest xs ),-        ( "count", 1, \[xs] -> [ XInt (length xs) ] ),-        ( "sum", 1, \[xs] -> [ XFloat (sum [ toFloat x | x <- toNum xs ]) ] ),-        ( "avg", 1, \[xs] -> [ XFloat (mean [ toFloat x | x <- toNum xs ]) ] ),-        ( "min", 1, \[xs] -> [ XFloat (minimum [ toFloat x | x <- toNum xs ]) ] ),-        ( "max", 1, \[xs] -> [ XFloat (maximum [ toFloat x | x <- toNum xs ]) ] ),-        ( "to", 2, \[xs,ys] -> [ XInt i | XInt n <- toNum xs, XInt m <- toNum ys, i <- [n..m] ] ),-        ( "text", 1, \[xs] -> [ w | XElem _ _ _ _ ts <- xs, w <- text ts ] ),-        ( "string", 1, \[xs] -> string xs ),-        ( "data", 1, \[xs] -> text xs ),-        ( "node", 1, \[xs] -> [ w | XElem _ _ _ _ ts <- xs, w <- ts ] ),-        ( "exists", 1, \[xs] -> toBool $ (not (null xs)) ),-        ( "some", 1, \[xs] -> toBool $ or [ conditionTest [x] | x <- xs ] ),-        ( "empty", 0, \[] -> [] ),-        ( "empty", 1, \[xs] -> toBool $ null xs ),-        ( "true", 0, \[] -> [trueXT] ),-        ( "false", 0, \[] -> [falseXT] ),-        ( "if", 3, \[cs,xs,ys] -> if conditionTest cs then xs else ys ),-        ( "name", 1, \[xs] -> getNames xs ),-        ( "local-name", 1, \[xs] -> getNames xs ),-        ( "contains", 2, \[xs,text] -> toBool $ or [ contains x t | x <- toString xs, t <- toString text ] ),-        ( "substring", 3, \[xs,n1,n2] -> [ XText (take m2 (drop (m1-1) x)) | x <- toString xs,-                                           XInt m1 <- toNum n1, XInt m2 <- toNum n2 ] ),-        ( "concatenate", 2, \[xs,ys] -> xs ++ ys ),-        ( "distinct-values", 1, \[xs] -> distinct xs ),-        ( "union", 2, \[xs,ys] -> distinct (xs ++ ys) ),-        ( "intersect", 2, \[xs,ys] -> intersect xs ys ),-        ( "except", 2, \[xs,ys] -> xs \\ ys ),-        ( "reverse", 1, \[xs] -> reverse xs ),-        ( "trace", 2, \[xs,ys] -> trace ("*** trace: "++show xs) ys ),-        ( "error", 0, \[] -> error "XQuery error" ),-        ( "error", 2, \[xs,ys] -> error (showXS xs++": "++show ys) ),-        ( "substring", 2, \[xs,n] -> [ XText (drop (m-1) x) | x <- toString xs, XInt m <- toNum n ] ),-        ( "substring-before", 2, \[xs,ys] -> [ XText (substring_before x y)  | x <- toString xs, y <- toString ys ] ),-        ( "substring-after", 2, \[xs,ys] -> [ XText (substring_after x y)  | x <- toString xs, y <- toString ys ] ),-        ( "starts-with", 2, \[xs,ys] -> toBool $ or [ x == "" || isPrefixOf y x  | x <- toString xs, y <- toString ys ] ),-        ( "ends-with", 2, \[xs,ys] -> toBool $ or [ x == "" || isSuffixOf y x  | x <- toString xs, y <- toString ys ] ),-        ( "concat", -1, \ss -> [ XText $ foldr (\s r -> concat [ x | x <- toString s ] ++ r) "" ss ] ),-        ( "string-join", 2, \[xs,ys] -> [ XText $ intercalate y (toString xs) | y <- toString ys ] ),-        ( "substitute-string", 3, \[xs,ys,zs] -> [ XText $ replace x y z  | x <- toString xs, y <- toString ys, z <- toString zs ] ),-        ( "string-length", 1, \[xs] -> [ XInt $ length x | x <- toString xs ] ),-        ( "number", 1, \[xs] -> toNum xs ),-        ( "boolean", 1, \[xs] -> toBool $ or [ conditionTest [x] | x <- xs ] ),-        ( "abs", 1, \[xs] -> [ case x of XInt n -> XInt (abs n); XFloat n -> XFloat (abs n) | x <- toNum xs ] ),-        ( "ceiling", 1, \[xs] -> [ case x of XInt n -> XInt n; XFloat n -> XInt (ceiling n) | x <- toNum xs ] ),-        ( "round", 1, \[xs] -> [ case x of XInt n -> XInt n; XFloat n -> XInt (round n) | x <- toNum xs ] ),-        ( "floor", 1, \[xs] -> [ case x of XInt n -> XInt n; XFloat n -> XInt (floor n) | x <- toNum xs ] ),-        ( "index-of", 2, \[xs,ys] -> [ XInt (i+1) | y <- ys, i <- elemIndices y xs ] ),-        ( "remove", 2, \[xs,ys] -> concat [ (take (i-1) xs)++(drop i xs) | XInt i <- toNum ys ] ),-        ( "subsequence", 2, \[xs,n] -> concat [ drop (m-1) xs | XInt m <- toNum n ] ),-        ( "subsequence", 3, \[xs,n1,n2] -> concat [ take m2 (drop (m1-1) xs) | XInt m1 <- toNum n1, XInt m2 <- toNum n2 ] ),-        ( "last", 0, \[] -> error "the 'last()' call must be handled separately" ),-        ( "position", 0, \[] -> error "the 'position()' call must be handled separately" ),-        ( "insert-before", 3, \[xs,n,ys] -> concat [ (take (i-1) xs)++ys++(drop (i-1) xs) | XInt i <- toNum n ] ),-        ( "deep-equal", 2, \[xs,ys] -> toBool $ or [ deep_equal x y | x <- xs, y <- ys ] ),-        ( "translate", 3, \[xs,ys,zs] -> [ XText $ translate_string x y z  | x <- toString xs, y <- toString ys, z <- toString zs ] ),-        ( "matches", 2, \[xs,ys] -> toBool $ or [ matchTest (mkRegex y) x | x <- toString xs, y <- toString ys ] ),-        ( "compare", 2, \[xs,ys] -> [ XInt $ case compare x y of EQ -> 0; LT -> -1; GT -> 1 | x <- toString xs, y <- toString ys ] ),-        ( "upper-case", 1, \[xs] -> [ XText $ map toUpper x | x <- toString xs ] ),-        ( "lower-case", 1, \[xs] -> [ XText  $ map toLower x | x <- toString xs ] )-   ]-- system_functions :: [String]-system_functions = map (\(nm,_,_) -> nm) systemFunctions ++ map (\(nm,_,_) -> "fn:"++nm) systemFunctions----- true, if it is a function in the IO monad-ioFunction :: String -> Q Bool-ioFunction name-    = do info <- reify (mkName name)-         iotp <- [t| IO XSeq |]-         case info of-           VarI _ (AppT _ tp) _ _-               | tp == iotp-               -> return True-           _ -> return False+system_functions = map (\(nm,_,_,_) -> nm) systemFunctions ++ map (\(nm,_,_,_) -> "fn:"++nm) systemFunctions  --- make a function call-callF :: Tag -> Function-callF fname args-    = case filter (\(n,_,_) -> n == fname || ("fn:"++n)==fname) functions of-        [] ->     -- must be a Haskell function of type (XSeq,...,XSeq) -> IO XSeq-             let itp = case args of-                         [] -> [t| () |]-                         [_] -> [t| XSeq |]-                         _ -> foldr (\_ r -> appT r [t| XSeq |]) (appT (tupleT (length args)) [t| XSeq |])-                                    (tail args)-                 fn = sigE (varE (mkName fname))-                           (appT (appT arrowT itp) [t| IO XSeq |])-             in appE fn (tupE args)-        fs -> case filter (\(_,len,_) -> len < 0 || length args == len) fs of-                [] -> error ("wrong number of arguments in function call: " ++ fname)-                (_,_,f):_ -> f args+-- System functions+systemFunctions :: [(String,                -- function name+                     Int,                   -- arity (-1 means any number of arguments)+                     [XSeq]->XSeq,          -- function to be used by the interpreter+                     [Q Exp] -> Q Exp)]     -- function to be used by the compiler+systemFunctions+    = [+--  general comparisons+        ( "=", 2,+          \[xs,ys] -> toBool $ or [ compareXTrees x y == EQ | x <- text xs, y <- text ys ],+          \[xs,ys] -> [| toBool $ or [ compareXTrees x y == EQ | x <- text $xs, y <- text $ys ] |] ),+        ( "!=", 2,+          \[xs,ys] -> toBool $ strictCompare xs ys /= EQ,+          \[xs,ys] -> [| toBool $ strictCompare $xs $ys /= EQ |] ),+        ( ">", 2,+          \[xs,ys] -> toBool $ or [ compareXTrees x y == GT | x <- text xs, y <- text ys ],+          \[xs,ys] -> [| toBool $ or [ compareXTrees x y == GT | x <- text $xs, y <- text $ys ] |] ),+        ( "<", 2,+          \[xs,ys] -> toBool $ or [ compareXTrees x y == LT | x <- text xs, y <- text ys ],+          \[xs,ys] -> [| toBool $ or [ compareXTrees x y == LT | x <- text $xs, y <- text $ys ] |] ),+        ( ">=", 2,+          \[xs,ys] -> toBool $ or [ compareXTrees x y `elem` [GT,EQ] | x <- text xs, y <- text ys ],+          \[xs,ys] -> [| toBool $ or [ compareXTrees x y `elem` [GT,EQ] | x <- text $xs, y <- text $ys ] |] ),+        ( "<=", 2,+          \[xs,ys] -> toBool $ or [ compareXTrees x y `elem` [LT,EQ] | x <- text xs, y <- text ys ],+          \[xs,ys] -> [| toBool $ or [ compareXTrees x y `elem` [LT,EQ] | x <- text $xs, y <- text $ys ] |] ),+        ( "deep-equal", 2,+          \[xs,ys] -> toBool $ or [ deep_equal x y | x <- xs, y <- ys ],+          \[xs,ys] -> [| toBool $ or [ deep_equal x y | x <- $xs, y <- $ys ] |] ),+--  strict comparisons+        ( "eq", 2,+          \[xs,ys] -> toBool $ strictCompare xs ys == EQ,+          \[xs,ys] -> [| toBool $ strictCompare $xs $ys == EQ |] ),+        ( "neq", 2,+          \[xs,ys] -> toBool $ strictCompare xs ys /= EQ,+          \[xs,ys] -> [| toBool $ strictCompare $xs $ys /= EQ |] ),+        ( "lt", 2,+          \[xs,ys] -> toBool $ strictCompare xs ys == LT,+          \[xs,ys] -> [| toBool $ strictCompare $xs $ys == LT |] ),+        ( "gt", 2,+          \[xs,ys] -> toBool $ strictCompare xs ys == GT,+          \[xs,ys] -> [| toBool $ strictCompare $xs $ys == GT |] ),+        ( "le", 2,+          \[xs,ys] -> toBool $ strictCompare xs ys `elem` [LT,EQ],+          \[xs,ys] -> [| toBool $ strictCompare $xs $ys `elem` [LT,EQ] |] ),+        ( "ge", 2,+          \[xs,ys] -> toBool $ strictCompare xs ys `elem` [GT,EQ],+          \[xs,ys] -> [| toBool $ strictCompare $xs $ys `elem` [GT,EQ] |] ),+-- document order comparisons+        ( "<<", 2,+          \[xs,ys] -> toBool $ or [ ox < oy | XElem _ _ ox _ _ <- xs, XElem _ _ oy _ _ <- ys ],+          \[xs,ys] -> [| toBool $ or [ ox < oy | XElem _ _ ox _ _ <- $xs, XElem _ _ oy _ _ <- $ys ] |] ),+        ( ">>", 2,+          \[xs,ys] -> toBool $ or [ ox > oy | XElem _ _ ox _ _ <- xs, XElem _ _ oy _ _ <- ys ],+          \[xs,ys] -> [| toBool $ or [ ox > oy | XElem _ _ ox _ _ <- $xs, XElem _ _ oy _ _ <- $ys ] |] ),+        ( "is", 2,+          \[xs,ys] -> toBool $ or [ ox == oy | XElem _ _ ox _ _ <- xs, XElem _ _ oy _ _ <- ys ],+          \[xs,ys] -> [| toBool $ or [ ox == oy | XElem _ _ ox _ _ <- $xs, XElem _ _ oy _ _ <- $ys ] |] ),+-- arithmetic operations+        ( "+", 2,+          \[xs,ys] -> [ arithmetic (+) x y | x <- toNums xs, y <- toNums ys ],+          \[xs,ys] -> [| [ arithmetic (+) x y | x <- toNums $xs, y <- toNums $ys ] |] ),+        ( "-", 2,+          \[xs,ys] -> [ arithmetic (-) x y | x <- toNums xs, y <- toNums ys ],+          \[xs,ys] -> [| [ arithmetic (-) x y | x <- toNums $xs, y <- toNums $ys ] |] ),+        ( "*", 2,+          \[xs,ys] -> [ arithmetic (*) x y | x <- toNums xs, y <- toNums ys ],+          \[xs,ys] -> [| [ arithmetic (*) x y | x <- toNums $xs, y <- toNums $ys ] |] ),+        ( "div", 2,+          \[xs,ys] -> [ arithmetic (/) x y | x <- toNums xs, y <- toNums ys ],+          \[xs,ys] -> [| [ arithmetic (/) x y | x <- toNums $xs, y <- toNums $ys ] |] ),+        ( "idiv", 2,+          \[xs,ys] -> [ case arithmetic (/) x y of XFloat n -> XInt (floor n); x -> x+                      | x <- toNums xs, y <- toNums ys ],+          \[xs,ys] -> [| [ case arithmetic (/) x y of XFloat n -> XInt (floor n); x -> x+                         | x <- toNums $xs, y <- toNums $ys ] |] ),+        ( "mod", 2,+          \[xs,ys] -> [ arithmetic modulo x y | x <- toNums xs, y <- toNums ys ],+          \[xs,ys] -> [| [ arithmetic modulo x y | x <- toNums $xs, y <- toNums $ys ] |] ),+        ( "uplus", 1,+          \[xs] -> [ x | x <- toNums xs ],+          \[xs] -> [| [ x | x <- toNums $xs ] |] ),+        ( "uminus", 1,+          \[xs] -> [ case x of XInt n -> XInt (-n); XFloat n -> XFloat (-n) | x <- toNums xs ],+          \[xs] -> [| [ case x of XInt n -> XInt (-n); XFloat n -> XFloat (-n) | x <- toNums $xs ] |] ),+        ( "abs", 1,+          \[xs] -> [ case x of XInt n -> XInt (abs n); XFloat n -> XFloat (abs n) | x <- toNums xs ],+          \[xs] -> [| [ case x of XInt n -> XInt (abs n); XFloat n -> XFloat (abs n) | x <- toNums $xs ] |] ),+        ( "ceiling", 1,+          \[xs] -> [ case x of XInt n -> XInt n; XFloat n -> XInt (ceiling n) | x <- toNums xs ],+          \[xs] -> [| [ case x of XInt n -> XInt n; XFloat n -> XInt (ceiling n) | x <- toNums $xs ] |] ),+        ( "round", 1,+          \[xs] -> [ case x of XInt n -> XInt n; XFloat n -> XInt (round n) | x <- toNums xs ],+          \[xs] -> [| [ case x of XInt n -> XInt n; XFloat n -> XInt (round n) | x <- toNums $xs ] |] ),+        ( "floor", 1,+          \[xs] -> [ case x of XInt n -> XInt n; XFloat n -> XInt (floor n) | x <- toNums xs ],+          \[xs] -> [| [ case x of XInt n -> XInt n; XFloat n -> XInt (floor n) | x <- toNums $xs ] |] ),+-- boolean operations+        ( "true", 0,+          \[] -> [trueXT],+          \[] -> [| [trueXT] |] ),+        ( "false", 0,+          \[] -> [falseXT],+          \[] -> [| [falseXT] |] ),+        ( "if", 3,+          \[cs,xs,ys] -> if conditionTest cs then xs else ys,+          \[cs,xs,ys] -> [| if conditionTest $cs then $xs else $ys |] ),+        ( "and", 2,+          \[xs,ys] -> toBool $ (conditionTest xs) && (conditionTest ys),+          \[xs,ys] -> [| toBool $ (conditionTest $xs) && (conditionTest $ys) |] ),+        ( "or", 2,+          \[xs,ys] -> toBool $ (conditionTest xs) || (conditionTest ys),+          \[xs,ys] -> [| toBool $ (conditionTest $xs) || (conditionTest $ys) |] ),+        ( "not", 1,+          \[xs] -> toBool $ not $ conditionTest xs,+          \[xs] -> [| toBool $ not $ conditionTest $xs |] ),+        ( "some", 1,+          \[xs] -> toBool $ or [ conditionTest [x] | x <- xs ],+          \[xs] -> [| toBool $ or [ conditionTest [x] | x <- $xs ] |] ),+-- aggregations+        ( "count", 1,+          \[xs] -> [ XInt (length xs) ],+          \[xs] -> [| [ XInt (length $xs) ] |] ),+        ( "sum", 1,+          \[xs] -> sumSeq xs,+          \[xs] -> [| sumSeq $xs |] ),+        ( "avg", 1,+          \[xs] -> [ XFloat (mean [ getFloat x | x <- toNums xs ]) ],+          \[xs] -> [| [ XFloat (mean [ getFloat x | x <- toNums $xs ]) ] |] ),+        ( "min", 1,+          \[xs] -> minSeq xs,+          \[xs] -> [| minSeq $xs |] ),+        ( "max", 1,+          \[xs] -> maxSeq xs,+          \[xs] -> [| maxSeq $xs |] ),+-- string operations+        ( "concat", -1,+          \ss -> [ XText $ foldr (\s r -> concat [ x | x <- strings s ] ++ r) "" ss ],+          \ss -> [| [ XText $ $(foldr (\s r -> [| concat [ x | x <- strings $s ] ++ $r |]) [| "" |] ss) ] |] ),+        ( "substring", 3,+          \[xs,n1,n2] -> [ XText (take m2 (drop (m1-1) x))+                         | x <- strings xs, XInt m1 <- toNums n1, XInt m2 <- toNums n2 ],+          \[xs,n1,n2] -> [| [ XText (take m2 (drop (m1-1) x))+                            | x <- strings $xs, XInt m1 <- toNums $n1, XInt m2 <- toNums $n2 ] |] ),+        ( "substring", 2,+          \[xs,n] -> [ XText (drop (m-1) x) | x <- strings xs, XInt m <- toNums n ],+          \[xs,n] -> [| [ XText (drop (m-1) x) | x <- strings $xs, XInt m <- toNums $n ] |] ),+        ( "substring-before", 2,+          \[xs,ys] -> [ XText (substring_before x y)  | x <- strings xs, y <- strings ys ],+          \[xs,ys] -> [| [ XText (substring_before x y)  | x <- strings $xs, y <- strings $ys ] |] ),+        ( "substring-after", 2,+          \[xs,ys] -> [ XText (substring_after x y)  | x <- strings xs, y <- strings ys ],+          \[xs,ys] -> [| [ XText (substring_after x y)  | x <- strings $xs, y <- strings $ys ] |] ),+        ( "starts-with", 2,+          \[xs,ys] -> toBool $ or [ x == "" || isPrefixOf y x  | x <- strings xs, y <- strings ys ],+          \[xs,ys] -> [| toBool $ or [ x == "" || isPrefixOf y x  | x <- strings $xs, y <- strings $ys ] |] ),+        ( "ends-with", 2,+          \[xs,ys] -> toBool $ or [ x == "" || isSuffixOf y x  | x <- strings xs, y <- strings ys ],+          \[xs,ys] -> [| toBool $ or [ x == "" || isSuffixOf y x  | x <- strings $xs, y <- strings $ys ] |] ),+        ( "string-join", 2,+          \[xs,ys] -> [ XText $ intercalate y (strings xs) | y <- strings ys ],+          \[xs,ys] -> [| [ XText $ intercalate y (strings $xs) | y <- strings $ys ] |] ),+        ( "string-length", 1,+          \[xs] -> [ XInt $ length x | x <- strings xs ],+          \[xs] -> [| [ XInt $ length x | x <- strings $xs ] |] ),+        ( "translate", 3,+          \[xs,ys,zs] -> [ XText $ translate_string x y z  | x <- strings xs, y <- strings ys, z <- strings zs ],+          \[xs,ys,zs] -> [| [ XText $ translate_string x y z  | x <- strings $xs, y <- strings $ys, z <- strings $zs ] |] ),+        ( "matches", 2,+          \[xs,ys] -> toBool $ or [ matchTest (mkRegex y) x | x <- strings xs, y <- strings ys ],+          \[xs,ys] -> [| toBool $ or [ matchTest (mkRegex y) x | x <- strings $xs, y <- strings $ys ] |] ),+        ( "replace", 3,+          \[xs,ys,zs] -> [ XText $ replaceString x z (map snd $ concatMap A.elems $ matchAllText (mkRegex y) x)+                         | x <- strings xs, y <- strings ys, z <- strings zs ],+          \[xs,ys,zs] -> [| [ XText $ replaceString x z (map snd $ concatMap A.elems $ matchAllText (mkRegex y) x)+                            | x <- strings $xs, y <- strings $ys, z <- strings $zs ] |] ),+        ( "contains", 2,+          \[xs,text] -> toBool $ or [ contains x t | x <- strings xs, t <- strings text ],+          \[xs,text] -> [| toBool $ or [ contains x t | x <- strings $xs, t <- strings $text ] |] ),+        ( "compare", 2,+          \[xs,ys] -> [ XInt $ case compare x y of EQ -> 0; LT -> -1; GT -> 1 | x <- strings xs, y <- strings ys ],+          \[xs,ys] -> [| [ XInt $ case compare x y of EQ -> 0; LT -> -1; GT -> 1 | x <- strings $xs, y <- strings $ys ] |] ),+        ( "upper-case", 1,+          \[xs] -> [ XText $ map toUpper x | x <- strings xs ],+          \[xs] -> [| [ XText $ map toUpper x | x <- strings $xs ] |] ),+        ( "lower-case", 1,+          \[xs] -> [ XText $ map toLower x | x <- strings xs ],+          \[xs] -> [| [ XText $ map toLower x | x <- strings $xs ] |] ),+        ( "normalize-space", 1,+          \[xs] -> [ XText $ unwords $ words x  | x <- strings xs ],+          \[xs] -> [| [ XText $ unwords $ words x  | x <- strings $xs ] |] ),+-- sequence operations+        ( "empty", 0,+          \[] -> [],+          \[] -> [| [] |] ),+        ( "empty", 1,+          \[xs] -> toBool $ null xs,+          \[xs] -> [| toBool $ null $xs |] ),+        ( "exists", 1,+          \[xs] -> toBool $ (not (null xs)),+          \[xs] -> [| toBool $ (not (null $xs)) |] ),+        ( "to", 2,+          \[xs,ys] -> [ XInt i | XInt n <- toNums xs, XInt m <- toNums ys, i <- [n..m] ],+          \[xs,ys] -> [| [ XInt i | XInt n <- toNums $xs, XInt m <- toNums $ys, i <- [n..m] ] |] ),+        ( "concatenate", 2,+          \[xs,ys] -> xs ++ ys,+          \[xs,ys] -> [| $xs ++ $ys |] ),+        ( "distinct-values", 1,+          \[xs] -> distinct xs,+          \[xs] -> [| distinct $xs |] ),+        ( "union", 2,+          \[xs,ys] -> distinct (xs ++ ys),+          \[xs,ys] -> [| distinct ($xs ++ $ys) |] ),+        ( "intersect", 2,+          \[xs,ys] -> intersect xs ys,+          \[xs,ys] -> [| intersect $xs $ys |] ),+        ( "except", 2,+          \[xs,ys] -> xs \\ ys,+          \[xs,ys] -> [| $xs \\ $ys |] ),+        ( "reverse", 1,+          \[xs] -> reverse xs,+          \[xs] -> [| reverse $xs |] ),+        ( "subsequence", 2,+          \[xs,n] -> concat [ drop (m-1) xs | XInt m <- toNums n ],+          \[xs,n] -> [| concat [ drop (m-1) $xs | XInt m <- toNums $n ] |] ),+        ( "subsequence", 3,+          \[xs,n1,n2] -> concat [ take m2 (drop (m1-1) xs) | XInt m1 <- toNums n1, XInt m2 <- toNums n2 ],+          \[xs,n1,n2] -> [| concat [ take m2 (drop (m1-1) $xs) | XInt m1 <- toNums $n1, XInt m2 <- toNums $n2 ] |] ),+        ( "insert-before", 3,+          \[xs,n,ys] -> concat [ (take (i-1) xs)++ys++(drop (i-1) xs) | XInt i <- toNums n ],+          \[xs,n,ys] -> [| let x = $xs in concat [ (take (i-1) x) ++ $ys ++ (drop (i-1) x) | XInt i <- toNums $n ] |] ),+        ( "index-of", 2,+          \[xs,ys] -> [ XInt (i+1) | y <- ys, i <- elemIndices y xs ],+          \[xs,ys] -> [| [ XInt (i+1) | y <- $ys, i <- elemIndices y $xs ] |] ),+        ( "remove", 2,+          \[xs,ys] -> concat [ (take (i-1) xs)++(drop i xs) | XInt i <- toNums ys ],+          \[xs,ys] -> [| let x = $xs in concat [ (take (i-1) x)++(drop i x) | XInt i <- toNums $ys ] |] ),+-- type testing and casting+        ( "text", 1,+          \[xs] -> [ w | XElem _ _ _ _ ts <- xs, w <- text ts ],+          \[xs] -> [| [ w | XElem _ _ _ _ ts <- $xs, w <- text ts ] |] ),+        ( "string", 1,+          \[xs] -> string xs,+          \[xs] -> [| string $xs |] ),+        ( "name", 1,+          \[xs] -> getNames xs,+          \[xs] -> [| getNames $xs |] ),+        ( "local-name", 1,+          \[xs] -> getNames xs,+          \[xs] -> [| getNames $xs |] ),+        ( "data", 1,+          \[xs] -> text xs,+          \[xs] -> [| text $xs |] ),+        ( "number", 1,+          \[xs] -> toNums xs,+          \[xs] -> [| toNums $xs |] ),+        ( "boolean", 1,+          \[xs] -> toBool $ or [ conditionTest [x] | x <- xs ],+          \[xs] -> [| toBool $ or [ conditionTest [x] | x <- $xs ] |] ),+        ( "node", 1,+          \[xs] -> [ w | XElem _ _ _ _ ts <- xs, w <- ts ],+          \[xs] -> [| [ w | XElem _ _ _ _ ts <- $xs, w <- ts ] |] ),+        ( "instance-of", 2,+          \[e,[XType tp]] -> [ XBool $ instanceOf e tp ],+          \[e,tp] -> [| case $tp of [XType t] -> [ XBool $ instanceOf $e t ] |] ),+        ( "cast-as", 2,+          \[e,[XType tp]] -> castAs e tp,+          \[e,tp] -> [| case $tp of [XType t] -> castAs $e t |] ),+        ( "castable-as", 2,+          \[e,[XType tp]] -> [ XBool $ castableAs e tp ],+          \[e,tp] -> [| case $tp of [XType t] -> [ XBool $ castableAs $e t ] |] ),+-- miscellaneous operations+        ( "trace", 2,+          \[xs,ys] -> trace ("*** trace: "++show xs) ys,+          \[xs,ys] -> [| trace ("*** trace: "++show $xs) $ys |] ),+        ( "debug", 1,+          \_ -> error "the debug() call must be handled separately",+          \_ -> error "Debugging is not permitted at compile-time." ),+        ( "error", 0,+          \[] -> error "XQuery error" ,+          \[] -> [| error "XQuery error" |] ),+        ( "error", 2,+          \[xs,ys] -> error (showXS xs++": "++show ys),+          \[xs,ys] -> [| error (showXS $xs++": "++show $ys) |] ),+        ( "last", 0,+          \[] -> error "the 'last()' call must be handled separately",+          \[] -> error "the 'last()' call must be handled separately" ),+        ( "position", 0,+          \[] -> error "the 'position()' call must be handled separately",+          \[] -> error "the 'position()' call must be handled separately" )+   ]
src/Text/XML/HXQ/Interpreter.hs view
@@ -4,7 +4,7 @@ - Programmer: Leonidas Fegaras - Email: fegaras@cse.uta.edu - Web: http://lambda.uta.edu/-- Creation: 03/22/08, last update: 01/04/09+- Creation: 03/22/08, last update: 01/17/09 -  - Copyright (c) 2008 by Leonidas Fegaras, the University of Texas at Arlington. All rights reserved. - This material is provided as is, with absolutely no warranty expressed or implied.@@ -27,8 +27,10 @@ import Text.XML.HXQ.Optimizer import Text.XML.HXQ.Functions import Text.XML.HXQ.Compiler+import Text.XML.HXQ.Types  + -- run-time bindings of FLOWR variables type Environment = [(String,XSeq)] @@ -118,13 +120,15 @@       Ast f _           | elem f ["insert","delete","replace"]           -> error "Updates must be over XML data stored in databases"-      Ast "call" ((Avar fname):args)+      Ast "call" (v@(Avar fname):args)           -> let vs = map (\x -> eval x context position last effective_axis env fncs) args-             in case filter (\(n,_,_) -> n == fname || ("fn:"++n) == fname) systemFunctions of-                  [] -> error "External function calls must be within the IO monad"-                  fs -> case filter (\(_,len,_) -> len < 0 || length args == len) fs of+             in case filter (\(n,_,_,_) -> n == fname || ("fn:"++n) == fname) systemFunctions of+                  [] -> if isBuildInType fname  && length vs == 1+                        then castAs (head vs) v+                        else error "External function calls must be within the IO monad"+                  fs -> case filter (\(_,len,_,_) -> len < 0 || length args == len) fs of                           [] -> error ("wrong number of arguments in function call: " ++ fname)-                          (_,_,f):_ -> f vs+                          (_,_,f,_):_ -> f vs       Ast "construction" [tag,id,parent,Ast "attributes" al,body]              -> let ct = eval tag context position last effective_axis env fncs                     bc = eval body context position last effective_axis env fncs@@ -168,6 +172,8 @@                                             o -> o)                                   (\xs ys -> EQ) ordList              in concatMap head (sortBy (\(_:xs) (_:ys) -> ordering xs ys) ce)+      Ast "type" [tp]+          -> [ XType tp ]       _ -> error ("Illegal XQuery: "++(show e))  @@ -225,8 +231,17 @@       Ast "call" [Avar "last"] -> return $! [XInt last]       Ast "call" [Avar f,Astring file]           | elem f ["doc","fn:doc"]-          -> do doc <- readFile file+          -> do doc <- uploadFile file                 return $! [materialize False (parseDocument doc)]+      Ast "call" [Avar "debug",c]+          -> do ec <- evalM c context position last effective_axis env fncs db stmts+                debugSession ec env fncs db+      Ast "call" [Avar "eval",x]+          -> do xc <- evalM x context position last effective_axis env fncs db stmts+                case xc of+                  [ XText q ] -> do (res,_,_) <- evalQueryM (parse (scan q)) env fncs db False+                                    return res+                  _ -> error $ "The eval argument must be a string: " ++ show xc       Ast "step" (Avar "child":tag:Avar ".":preds)           | effective_axis /= ""           -> evalM (Ast "step" (Avar effective_axis:tag:Avar ".":preds)) context position last "" env fncs db stmts@@ -273,19 +288,22 @@           -> do v1 <- evalM e1 context position last effective_axis env fncs db stmts                 v2 <- evalM e2 context position last effective_axis env fncs db stmts                 replaceDB db v1 v2-      Ast "call" ((Avar fname):args)        -- Note: strict function application-          -> case filter (\(n,_,_) -> n == fname || ("fn:"++n) == fname) systemFunctions of-               [] -> case filter (\(n,_,_) -> n == fname) fncs of-                       (_,params,body):_ -> if (length params) == (length args)-                                            then do vs <- mapM (\a -> evalM a context position last effective_axis env fncs db stmts) args-                                                    evalM body context undefv2 undefv3 ""-                                                             ((zip params vs)++env) fncs db stmts-                                            else error ("Wrong number of arguments in function call: "++fname)-                       _ -> error ("Undefined function: "++fname)-               fs -> case filter (\(_,len,_) -> len < 0 || length args == len) fs of+      Ast "call" (v@(Avar fname):args)        -- Note: strict function application+          -> case filter (\(n,_,_,_) -> n == fname || ("fn:"++n) == fname) systemFunctions of+               [] -> do vs <- mapM (\a -> evalM a context position last effective_axis env fncs db stmts) args+                        if isBuildInType fname  && length vs == 1+                           then return $! castAs (head vs) v+                           else case filter (\(n,_,_) -> n == fname) fncs of+                                  (_,params,body):_+                                      -> if (length params) == (length args)+                                         then evalM body context undefv2 undefv3 ""+                                                    ((zip params vs)++env) fncs db stmts+                                         else error ("Wrong number of arguments in function call: "++fname)+                                  _ -> error ("Undefined function: "++fname)+               fs -> case filter (\(_,len,_,_) -> len < 0 || length args == len) fs of                        [] -> error ("wrong number of arguments in function call: " ++ fname)-                       (_,_,f):_ -> do vs <- mapM (\x -> evalM x context position last effective_axis env fncs db stmts) args-                                       return $ f vs+                       (_,_,f,_):_ -> do vs <- mapM (\x -> evalM x context position last effective_axis env fncs db stmts) args+                                         return $ f vs       Ast "construction" [tag,id,parent,Ast "attributes" al,body]              -> do ct <- evalM tag context position last effective_axis env fncs db stmts                    bc <- evalM body context position last effective_axis env fncs db stmts@@ -331,12 +349,14 @@                                             o -> o)                                   (\xs ys -> EQ) ordList                 return $! (concatMap head (sortBy (\(_:xs) (_:ys) -> ordering xs ys) ce))+      Ast "type" [tp]+          -> return [ XType tp ]       _ -> error ("Illegal XQuery: "++(show e))   -- evaluate from input continuously-evalInput :: (String -> Environment -> Functions -> IO(Environment,Functions)) -> Environment -> Functions -> IO ()-evalInput eval vs fs+evalInput :: (String -> Environment -> Functions -> IO(Environment,Functions)) -> Environment -> Functions -> String -> IO ()+evalInput eval vs fs prompt     = do let bracs s = (length $ filter (== '{') s) - (length $ filter (== '}') s)              oneline prompt = do line <- readline prompt                                  case line of@@ -350,19 +370,32 @@                                    else if line == "quit"                                         then return $! (line,0)                                         else readlines (x++" "++line) (bs+c)-         (line,c) <- oneline "> "+         (line,c) <- oneline prompt          (stmt,_) <- if head line == '{'                      then if last line == '}' && c==0                           then return $! (init (tail line),0)                           else readlines (tail line) c                      else return $! (line,0)          if stmt == "quit"-            then putStrLn "Bye!"+            then if prompt == "> " then putStrLn "Bye!" else putStrLn ""             else do addHistory stmt-                    (nvs,nfs) <- eval (map (\c -> if c=='\"' then '\'' else c) stmt) vs fs-                    evalInput eval nvs nfs+                    (nvs,nfs) <- eval stmt vs fs+                    evalInput eval nvs nfs prompt  +debugSession :: XSeq -> Environment -> Functions -> Connection -> IO XSeq+debugSession e env fncs db+    = do let se = show e+         putStrLn $ "*** debug " ++ if null(index se 20) then se else (take 20 se) ++ " ..."+         putStr $ "Local variables:"+         mapM putStr (distinct $ map (\(v,_) -> " $"++v) env)+         putStrLn "\nYou may evaluate any XQuery. Type quit or ctr-D to continue execution."+         evalInput (\s vs fs -> do (result,nvs,nfs) <- xqueryE s vs fs db False+                                   putXSeq result+                                   return (nvs,nfs)) env fncs "debug> "+         return e++ evalQueryM :: [Ast] -> Environment -> Functions -> Connection -> Bool -> IO (XSeq,Environment,Functions) evalQueryM [] variables functions db verbose     = return $! ([],variables,functions)@@ -394,7 +427,7 @@                                                   -> do env <- r                                                         return $! ((n,findV m env):env)                                               Astring file-                                                  -> do doc <- readFile file+                                                  -> do doc <- uploadFile file                                                         env <- r                                                         return $! ((n,[materialize b (parseDocument doc)]):env)                                               _ -> r)
src/Text/XML/HXQ/Optimizer.hs view
@@ -114,7 +114,7 @@   -- to speed up //* step, find possible immediate tagged children, if any (eg, x in //*/x)-tagged_children :: String -> Ast -> [Tag]+tagged_children :: String -> Ast -> [String] tagged_children context (Ast "step" (Avar "child":Astring tag:Avar v:_))     | v == context     = [tag]
src/Text/XML/HXQ/Parser.hs view
@@ -50,2122 +50,2393 @@ happyOut8 :: (HappyAbsSyn ) -> ([ Ast ]) happyOut8 x = unsafeCoerce# x {-# INLINE happyOut8 #-}-happyIn9 :: (String) -> (HappyAbsSyn )-happyIn9 x = unsafeCoerce# x-{-# INLINE happyIn9 #-}-happyOut9 :: (HappyAbsSyn ) -> (String)-happyOut9 x = unsafeCoerce# x-{-# INLINE happyOut9 #-}-happyIn10 :: (Ast) -> (HappyAbsSyn )-happyIn10 x = unsafeCoerce# x-{-# INLINE happyIn10 #-}-happyOut10 :: (HappyAbsSyn ) -> (Ast)-happyOut10 x = unsafeCoerce# x-{-# INLINE happyOut10 #-}-happyIn11 :: (Ast) -> (HappyAbsSyn )-happyIn11 x = unsafeCoerce# x-{-# INLINE happyIn11 #-}-happyOut11 :: (HappyAbsSyn ) -> (Ast)-happyOut11 x = unsafeCoerce# x-{-# INLINE happyOut11 #-}-happyIn12 :: ([ Ast ]) -> (HappyAbsSyn )-happyIn12 x = unsafeCoerce# x-{-# INLINE happyIn12 #-}-happyOut12 :: (HappyAbsSyn ) -> ([ Ast ])-happyOut12 x = unsafeCoerce# x-{-# INLINE happyOut12 #-}-happyIn13 :: (Ast -> Ast) -> (HappyAbsSyn )-happyIn13 x = unsafeCoerce# x-{-# INLINE happyIn13 #-}-happyOut13 :: (HappyAbsSyn ) -> (Ast -> Ast)-happyOut13 x = unsafeCoerce# x-{-# INLINE happyOut13 #-}-happyIn14 :: (Ast -> Ast) -> (HappyAbsSyn )-happyIn14 x = unsafeCoerce# x-{-# INLINE happyIn14 #-}-happyOut14 :: (HappyAbsSyn ) -> (Ast -> Ast)-happyOut14 x = unsafeCoerce# x-{-# INLINE happyOut14 #-}-happyIn15 :: (Ast -> Ast) -> (HappyAbsSyn )-happyIn15 x = unsafeCoerce# x-{-# INLINE happyIn15 #-}-happyOut15 :: (HappyAbsSyn ) -> (Ast -> Ast)-happyOut15 x = unsafeCoerce# x-{-# INLINE happyOut15 #-}-happyIn16 :: (Ast -> Ast) -> (HappyAbsSyn )-happyIn16 x = unsafeCoerce# x-{-# INLINE happyIn16 #-}-happyOut16 :: (HappyAbsSyn ) -> (Ast -> Ast)-happyOut16 x = unsafeCoerce# x-{-# INLINE happyOut16 #-}-happyIn17 :: (( Ast -> Ast, Ast -> Ast )) -> (HappyAbsSyn )-happyIn17 x = unsafeCoerce# x-{-# INLINE happyIn17 #-}-happyOut17 :: (HappyAbsSyn ) -> (( Ast -> Ast, Ast -> Ast ))-happyOut17 x = unsafeCoerce# x-{-# INLINE happyOut17 #-}-happyIn18 :: (( [ Ast ], [ Ast ] )) -> (HappyAbsSyn )-happyIn18 x = unsafeCoerce# x-{-# INLINE happyIn18 #-}-happyOut18 :: (HappyAbsSyn ) -> (( [ Ast ], [ Ast ] ))-happyOut18 x = unsafeCoerce# x-{-# INLINE happyOut18 #-}-happyIn19 :: (Ast) -> (HappyAbsSyn )-happyIn19 x = unsafeCoerce# x-{-# INLINE happyIn19 #-}-happyOut19 :: (HappyAbsSyn ) -> (Ast)-happyOut19 x = unsafeCoerce# x-{-# INLINE happyOut19 #-}-happyIn20 :: (Ast) -> (HappyAbsSyn )-happyIn20 x = unsafeCoerce# x-{-# INLINE happyIn20 #-}-happyOut20 :: (HappyAbsSyn ) -> (Ast)-happyOut20 x = unsafeCoerce# x-{-# INLINE happyOut20 #-}-happyIn21 :: (Ast) -> (HappyAbsSyn )-happyIn21 x = unsafeCoerce# x-{-# INLINE happyIn21 #-}-happyOut21 :: (HappyAbsSyn ) -> (Ast)-happyOut21 x = unsafeCoerce# x-{-# INLINE happyOut21 #-}-happyIn22 :: ([ Ast ]) -> (HappyAbsSyn )-happyIn22 x = unsafeCoerce# x-{-# INLINE happyIn22 #-}-happyOut22 :: (HappyAbsSyn ) -> ([ Ast ])-happyOut22 x = unsafeCoerce# x-{-# INLINE happyOut22 #-}-happyIn23 :: ([ Ast ]) -> (HappyAbsSyn )-happyIn23 x = unsafeCoerce# x-{-# INLINE happyIn23 #-}-happyOut23 :: (HappyAbsSyn ) -> ([ Ast ])-happyOut23 x = unsafeCoerce# x-{-# INLINE happyOut23 #-}-happyIn24 :: (Ast) -> (HappyAbsSyn )-happyIn24 x = unsafeCoerce# x-{-# INLINE happyIn24 #-}-happyOut24 :: (HappyAbsSyn ) -> (Ast)-happyOut24 x = unsafeCoerce# x-{-# INLINE happyOut24 #-}-happyIn25 :: ([Ast]) -> (HappyAbsSyn )-happyIn25 x = unsafeCoerce# x-{-# INLINE happyIn25 #-}-happyOut25 :: (HappyAbsSyn ) -> ([Ast])-happyOut25 x = unsafeCoerce# x-{-# INLINE happyOut25 #-}-happyIn26 :: ([ Ast ]) -> (HappyAbsSyn )-happyIn26 x = unsafeCoerce# x-{-# INLINE happyIn26 #-}-happyOut26 :: (HappyAbsSyn ) -> ([ Ast ])-happyOut26 x = unsafeCoerce# x-{-# INLINE happyOut26 #-}-happyIn27 :: (Ast) -> (HappyAbsSyn )-happyIn27 x = unsafeCoerce# x-{-# INLINE happyIn27 #-}-happyOut27 :: (HappyAbsSyn ) -> (Ast)-happyOut27 x = unsafeCoerce# x-{-# INLINE happyOut27 #-}-happyIn28 :: (Ast -> Ast) -> (HappyAbsSyn )-happyIn28 x = unsafeCoerce# x-{-# INLINE happyIn28 #-}-happyOut28 :: (HappyAbsSyn ) -> (Ast -> Ast)-happyOut28 x = unsafeCoerce# x-{-# INLINE happyOut28 #-}-happyIn29 :: (Ast -> Ast) -> (HappyAbsSyn )-happyIn29 x = unsafeCoerce# x-{-# INLINE happyIn29 #-}-happyOut29 :: (HappyAbsSyn ) -> (Ast -> Ast)-happyOut29 x = unsafeCoerce# x-{-# INLINE happyOut29 #-}-happyIn30 :: ([ Ast ]) -> (HappyAbsSyn )-happyIn30 x = unsafeCoerce# x-{-# INLINE happyIn30 #-}-happyOut30 :: (HappyAbsSyn ) -> ([ Ast ])-happyOut30 x = unsafeCoerce# x-{-# INLINE happyOut30 #-}-happyIn31 :: (String -> Ast -> [ Ast ] -> Ast) -> (HappyAbsSyn )-happyIn31 x = unsafeCoerce# x-{-# INLINE happyIn31 #-}-happyOut31 :: (HappyAbsSyn ) -> (String -> Ast -> [ Ast ] -> Ast)-happyOut31 x = unsafeCoerce# x-{-# INLINE happyOut31 #-}-happyIn32 :: (String -> Ast -> Ast) -> (HappyAbsSyn )-happyIn32 x = unsafeCoerce# x-{-# INLINE happyIn32 #-}-happyOut32 :: (HappyAbsSyn ) -> (String -> Ast -> Ast)-happyOut32 x = unsafeCoerce# x-{-# INLINE happyOut32 #-}-happyInTok :: (Token) -> (HappyAbsSyn )-happyInTok x = unsafeCoerce# x-{-# INLINE happyInTok #-}-happyOutTok :: (HappyAbsSyn ) -> (Token)-happyOutTok x = unsafeCoerce# x-{-# INLINE happyOutTok #-}---happyActOffsets :: HappyAddr-happyActOffsets = HappyA# "\xef\x00\xef\x00\xd5\xff\x1b\x02\x23\x02\x00\x00\x70\x03\x56\x00\x00\x00\x00\x00\xfe\xff\x00\x00\xfc\xff\x00\x00\x00\x00\x00\x00\xde\x01\xde\x01\x3f\x01\x9f\x00\x3f\x01\x3f\x01\x3f\x01\x00\x00\xef\x01\x3f\x01\xa2\x01\xa2\x01\x62\x00\x21\x00\x57\x00\xab\x01\xf4\x00\x00\x00\x3f\x01\xa5\x01\x3f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x99\x01\xd8\x02\x3f\x01\xbc\x02\x92\x01\x7f\x01\xdd\xff\x00\x00\xc0\x01\x8f\x01\x3f\x01\x86\x01\xb8\x01\x8c\x01\x3f\x01\x96\x01\x95\x01\x6c\x00\x93\x01\x00\x00\x82\x01\x00\x00\x00\x00\x70\x03\x83\x00\x19\x00\x00\x00\x84\x01\x45\x00\xf5\xff\x05\x00\x3f\x01\x00\x00\x20\x00\x00\x00\x89\x01\x6a\x01\x6a\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x3f\x01\x6d\x01\x4f\x00\x00\x00\xff\xff\x00\x00\x68\x01\x10\x00\x00\x00\xea\xff\x6e\x09\x6e\x09\x6e\x09\xa0\x09\x6e\x09\x87\x09\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x28\x01\x00\x00\x00\x00\x00\x00\x00\x00\xf6\x00\xf6\x00\xb8\x09\x70\x03\x88\x01\x87\x01\x8a\x01\x7d\x01\x00\x00\xfa\xff\x3f\x01\x07\x00\x06\x00\x52\x01\x00\x00\x00\x00\x7f\x00\x75\x01\x00\x00\x3f\x01\x29\x00\x39\x01\x3f\x01\x3f\x01\x3f\x01\x00\x00\x3f\x01\x00\x00\x76\x01\x4d\x01\x3f\x01\x35\x01\x35\x01\x3f\x01\x61\x02\x77\x01\x3f\x01\x4c\x01\x40\x02\x74\x01\x3f\x01\x05\x00\x00\x00\x03\x00\x51\x01\x72\x01\x3f\x01\x32\x03\x3f\x01\x32\x03\x32\x03\x2f\x01\x3f\x01\x00\x00\x00\x00\x43\x01\x7a\x00\x00\x00\x6e\x01\x6e\x00\x00\x00\x6c\x01\x16\x03\x42\x01\x47\x01\x16\x03\x53\x01\xf9\xff\x16\x03\xc2\x01\x16\x03\x16\x03\xf2\xff\x00\x00\x57\x00\x79\x00\x00\x00\xe3\x01\x00\x00\x00\x00\x4e\x01\x69\x00\x00\x00\x3f\x01\x32\x01\x00\x00\x00\x00\x3f\x01\x3f\x01\x5c\x01\x0b\x00\x59\x01\x00\x00\x00\x00\x55\x01\x00\x00\x00\x00\x00\x00\x54\x01\x16\x03\x7e\x02\x2e\x01\x41\x01\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x50\x01\x3f\x01\x0d\x01\x3f\x01\x00\x00\xf9\xff\x3f\x01\x3f\x01\x3f\x01\x00\x00\x3f\x01\x00\x00\x16\x03\x0a\x00\x2c\x01\xea\xff\x50\x00\x07\x01\x60\x00\x5a\x00\x16\x03\x16\x03\x00\x00\x8c\x03\x2b\x01\x16\x03\x4b\x01\x00\x00\x4b\x01\x00\x00\x00\x00\x3f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7e\x02\x4b\x01\x3f\x01\x00\x00\x00\x00\x27\x01\x3f\x01\xea\xff\x0b\x00\xfb\xff\x22\x02\xea\xff\x16\x03\x00\x00\x0b\x00\x00\x00\x3f\x01\x01\x02\x00\x00\x00\x00"#--happyGotoOffsets :: HappyAddr-happyGotoOffsets = HappyA# "\x0a\x01\xba\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x45\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x01\x00\x00\xd1\x00\xb8\x00\x5e\x09\x3f\x04\x28\x04\x47\x09\x30\x09\x00\x00\x49\x01\x19\x09\xad\x00\xab\x00\x48\x01\x46\x01\x29\x01\x00\x00\x00\x00\x00\x00\x02\x09\x00\x00\xeb\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x08\x00\x00\x44\x01\x40\x01\x00\x00\x23\x01\x00\x00\x26\x01\xbd\x08\x00\x00\x00\x00\x24\x01\xa6\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x01\x11\x04\x00\x00\x04\x01\x00\x00\xec\x00\x6d\x00\x16\x00\x8f\x08\x78\x08\x61\x08\x4a\x08\x33\x08\x1c\x08\x05\x08\xee\x07\xd7\x07\xc0\x07\xa9\x07\x92\x07\x7b\x07\x64\x07\x4d\x07\x36\x07\x1f\x07\x08\x07\xf1\x06\xda\x06\xc3\x06\xac\x06\x95\x06\x7e\x06\x67\x06\x50\x06\x39\x06\x22\x06\x0b\x06\x00\x00\xfa\x03\x00\x00\x5a\x01\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\x00\xe3\x03\x1a\x01\x0f\x01\x0c\x01\x00\x00\x00\x00\x00\x00\xf5\x00\x00\x00\xf4\x05\xe7\x00\xe0\x00\xdd\x05\xc6\x05\xaf\x05\x00\x00\x98\x05\x00\x00\x00\x00\x01\x01\x81\x05\xdc\x00\xd7\x00\x6a\x05\x00\x00\x00\x00\xcc\x03\x00\x00\x00\x00\x00\x00\xb5\x03\xa0\x00\x00\x00\xd6\x00\x00\x00\x00\x00\x53\x05\x00\x00\x3c\x05\x00\x00\x00\x00\xe3\x00\x25\x05\x00\x00\x00\x00\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x91\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x00\xe5\x00\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x03\x1c\x00\x00\x00\x00\x00\xfe\x02\x0e\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\x00\xd9\x00\x55\x00\x00\x00\xf7\x04\x5b\x00\xe0\x04\x00\x00\x85\x00\xc9\x04\xb2\x04\xa6\x02\x00\x00\xaa\x01\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x00\x00\x9b\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x84\x04\x00\x00\x00\x00\x00\x00\x6d\x04\xc2\x00\x00\x00\x00\x00\x00\x00\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x04\x00\x00\x00\x00\x00\x00"#--happyDefActions :: HappyAddr-happyDefActions = HappyA# "\x00\x00\x00\x00\x00\x00\xfd\xff\x7d\xff\x7a\xff\xf9\xff\xae\xff\xe2\xff\xe3\xff\x00\x00\xc1\xff\x93\xff\xe4\xff\x80\xff\x7f\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7e\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf5\xff\x00\x00\x79\xff\x00\x00\x00\x00\x00\x00\xe9\xff\xc0\xff\xbf\xff\x92\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xff\x00\x00\x00\x00\x00\x00\xf5\xff\x00\x00\x00\x00\x00\x00\x00\x00\xb8\xff\x00\x00\xb9\xff\xc2\xff\x9d\xff\xc3\xff\xc4\xff\xbb\xff\x00\x00\x00\x00\x77\xff\x00\x00\x00\x00\x00\x00\x8c\xff\x00\x00\x90\xff\x00\x00\xa2\xff\xac\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xff\x00\x00\xfe\xff\xfb\xff\x00\x00\x75\xff\x00\x00\xc6\xff\xc7\xff\xc8\xff\xc9\xff\xca\xff\xcb\xff\xcc\xff\xcd\xff\xce\xff\xcf\xff\xd0\xff\xd1\xff\xd2\xff\xd3\xff\xd4\xff\xd5\xff\xd6\xff\xd7\xff\xd8\xff\xd9\xff\xda\xff\xdb\xff\xdc\xff\xdd\xff\xde\xff\xdf\xff\xe0\xff\xe1\xff\xaf\xff\xb6\xff\xb7\xff\x00\x00\x00\x00\x98\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\xff\x9a\xff\x00\x00\x8a\xff\x88\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\xff\x00\x00\x91\xff\x00\x00\x9c\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\xff\xf4\xff\x00\x00\x00\x00\x00\x00\x00\x00\xbd\xff\x00\x00\xbc\xff\xbe\xff\x00\x00\x00\x00\x7c\xff\x7b\xff\x89\xff\x00\x00\xa5\xff\x00\x00\x00\x00\xa6\xff\x00\x00\xb1\xff\x00\x00\x00\x00\xb5\xff\x00\x00\x00\x00\xba\xff\x00\x00\xe6\xff\xe7\xff\x00\x00\x80\xff\x00\x00\x00\x00\x82\xff\x00\x00\x87\xff\x8f\xff\x00\x00\x00\x00\x94\xff\x00\x00\x00\x00\x95\xff\x96\xff\x00\x00\x00\x00\xef\xff\xc5\xff\x00\x00\x76\xff\xfa\xff\x00\x00\xec\xff\xeb\xff\xea\xff\x00\x00\xe8\xff\xa7\xff\xad\xff\x00\x00\x00\x00\x9b\xff\xa3\xff\x81\xff\x80\xff\x00\x00\x80\xff\x86\xff\x00\x00\x00\x00\x00\x00\x8e\xff\x00\x00\x00\x00\x00\x00\x00\x00\x9f\xff\x00\x00\x9e\xff\xf8\xff\x00\x00\xf3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xff\xb4\xff\x8d\xff\xe5\xff\x00\x00\xb3\xff\x85\xff\x80\xff\x84\xff\x97\xff\xa4\xff\x00\x00\xab\xff\xa9\xff\xa8\xff\xee\xff\xed\xff\xa7\xff\x83\xff\x00\x00\xa1\xff\xa0\xff\xf1\xff\x00\x00\x00\x00\xf2\xff\x00\x00\x00\x00\x00\x00\xb2\xff\xaa\xff\xf0\xff\xf7\xff\x00\x00\x00\x00\xf6\xff"#--happyCheck :: HappyAddr-happyCheck = HappyA# "\xff\xff\x02\x00\x03\x00\x04\x00\x0b\x00\x0b\x00\x0b\x00\x0b\x00\x09\x00\x0e\x00\x0b\x00\x10\x00\x07\x00\x0e\x00\x0f\x00\x10\x00\x16\x00\x0b\x00\x0b\x00\x10\x00\x0a\x00\x16\x00\x18\x00\x42\x00\x3b\x00\x0e\x00\x0a\x00\x10\x00\x06\x00\x2b\x00\x34\x00\x03\x00\x43\x00\x0b\x00\x2d\x00\x0a\x00\x25\x00\x3b\x00\x0f\x00\x52\x00\x29\x00\x2a\x00\x09\x00\x0b\x00\x0b\x00\x38\x00\x34\x00\x35\x00\x36\x00\x3f\x00\x09\x00\x34\x00\x35\x00\x37\x00\x16\x00\x2d\x00\x39\x00\x10\x00\x3b\x00\x3c\x00\x1a\x00\x2d\x00\x3b\x00\x3a\x00\x41\x00\x3b\x00\x3b\x00\x44\x00\x45\x00\x46\x00\x2d\x00\x4c\x00\x4e\x00\x06\x00\x51\x00\x51\x00\x4d\x00\x51\x00\x4f\x00\x50\x00\x51\x00\x02\x00\x03\x00\x04\x00\x34\x00\x35\x00\x36\x00\x4c\x00\x09\x00\x0a\x00\x0b\x00\x0b\x00\x3b\x00\x0e\x00\x0f\x00\x10\x00\x09\x00\x06\x00\x39\x00\x3a\x00\x3b\x00\x16\x00\x0c\x00\x10\x00\x03\x00\x40\x00\x41\x00\x09\x00\x0c\x00\x0b\x00\x4e\x00\x1a\x00\x0c\x00\x51\x00\x2d\x00\x06\x00\x25\x00\x0c\x00\x4d\x00\x0a\x00\x29\x00\x2a\x00\x0c\x00\x16\x00\x2c\x00\x38\x00\x0f\x00\x29\x00\x2a\x00\x1a\x00\x09\x00\x34\x00\x35\x00\x2f\x00\x0c\x00\x2d\x00\x39\x00\x10\x00\x3b\x00\x0c\x00\x03\x00\x2d\x00\x05\x00\x0c\x00\x41\x00\x2d\x00\x3b\x00\x44\x00\x45\x00\x46\x00\x2d\x00\x2b\x00\x41\x00\x14\x00\x15\x00\x2d\x00\x4d\x00\x3b\x00\x4f\x00\x50\x00\x51\x00\x02\x00\x03\x00\x04\x00\x4d\x00\x14\x00\x15\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x3f\x00\x2d\x00\x0e\x00\x0f\x00\x10\x00\x2d\x00\x06\x00\x39\x00\x06\x00\x3b\x00\x16\x00\x0b\x00\x0a\x00\x18\x00\x19\x00\x41\x00\x01\x00\x02\x00\x03\x00\x06\x00\x1a\x00\x06\x00\x07\x00\x0a\x00\x09\x00\x25\x00\x03\x00\x4d\x00\x05\x00\x29\x00\x2a\x00\x10\x00\x11\x00\x12\x00\x19\x00\x14\x00\x15\x00\x03\x00\x17\x00\x05\x00\x34\x00\x35\x00\x1b\x00\x1c\x00\x06\x00\x39\x00\x03\x00\x3b\x00\x0a\x00\x03\x00\x06\x00\x03\x00\x06\x00\x41\x00\x06\x00\x06\x00\x44\x00\x45\x00\x46\x00\x06\x00\x04\x00\x03\x00\x06\x00\x03\x00\x06\x00\x4d\x00\x06\x00\x4f\x00\x50\x00\x51\x00\x02\x00\x03\x00\x04\x00\x1b\x00\x1c\x00\x1b\x00\x1c\x00\x09\x00\x0d\x00\x0b\x00\x11\x00\x12\x00\x0e\x00\x0f\x00\x10\x00\x1b\x00\x1c\x00\x1b\x00\x1c\x00\x03\x00\x16\x00\x10\x00\x11\x00\x12\x00\x13\x00\x00\x00\x01\x00\x02\x00\x03\x00\x19\x00\x03\x00\x06\x00\x07\x00\x03\x00\x09\x00\x25\x00\x11\x00\x12\x00\x13\x00\x29\x00\x2a\x00\x10\x00\x11\x00\x12\x00\x03\x00\x14\x00\x15\x00\x03\x00\x17\x00\x05\x00\x34\x00\x35\x00\x1b\x00\x1c\x00\x03\x00\x39\x00\x03\x00\x3b\x00\x3c\x00\x03\x00\x18\x00\x19\x00\x06\x00\x41\x00\x3d\x00\x3e\x00\x44\x00\x45\x00\x46\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x4d\x00\x1a\x00\x4f\x00\x50\x00\x51\x00\x02\x00\x03\x00\x04\x00\x1b\x00\x1c\x00\x06\x00\x03\x00\x09\x00\x03\x00\x0b\x00\x03\x00\x03\x00\x0e\x00\x0f\x00\x10\x00\x1a\x00\x0c\x00\x07\x00\x2c\x00\x4d\x00\x16\x00\x2b\x00\x07\x00\x2c\x00\x18\x00\x4d\x00\x2d\x00\x02\x00\x03\x00\x0a\x00\x0a\x00\x06\x00\x07\x00\x09\x00\x09\x00\x25\x00\x09\x00\x18\x00\x14\x00\x29\x00\x2a\x00\x10\x00\x11\x00\x12\x00\x3b\x00\x14\x00\x15\x00\x2e\x00\x17\x00\x2b\x00\x34\x00\x35\x00\x1b\x00\x1c\x00\x0b\x00\x39\x00\x0b\x00\x3b\x00\x09\x00\x4d\x00\x3a\x00\x0a\x00\x2e\x00\x41\x00\x0a\x00\x4d\x00\x44\x00\x45\x00\x46\x00\x4d\x00\x3b\x00\x3b\x00\x05\x00\x14\x00\x01\x00\x4d\x00\x3b\x00\x4f\x00\x50\x00\x51\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\x03\x00\x31\x00\x3a\x00\x06\x00\x07\x00\x08\x00\x09\x00\x2d\x00\x2d\x00\x4e\x00\x4d\x00\x4b\x00\x30\x00\x10\x00\x11\x00\x12\x00\x3b\x00\x14\x00\x15\x00\x2d\x00\x17\x00\x2d\x00\x0b\x00\x2e\x00\x1b\x00\x1c\x00\x3b\x00\x06\x00\x43\x00\x3b\x00\x0b\x00\x4d\x00\x3b\x00\x4a\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\x08\x00\x53\x00\x48\x00\x43\x00\x4d\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\x4a\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\x3b\x00\x4d\x00\x09\x00\x4a\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\x4a\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\x4e\x00\xff\xff\xff\xff\x4a\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\x4a\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\xff\xff\xff\xff\x03\x00\xff\xff\x4a\x00\x06\x00\x07\x00\x08\x00\x09\x00\x32\x00\x33\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\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\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\x03\x00\xff\xff\x47\x00\x06\x00\x07\x00\x4a\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0e\x00\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x49\x00\x4a\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\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\xff\xff\xff\xff\xff\xff\x03\x00\xff\xff\x4a\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x4a\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\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\xff\xff\xff\xff\xff\xff\x03\x00\xff\xff\x4a\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\x08\x00\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\x03\x00\x1b\x00\x1c\x00\x06\x00\x07\x00\xff\xff\x09\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\xff\xff\x17\x00\xff\xff\xff\xff\xff\xff\x1b\x00\x1c\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\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\xff\xff\x25\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\xff\xff\xff\xff\x25\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#--happyTable :: HappyAddr-happyTable = HappyA# "\x00\x00\x11\x00\x12\x00\x13\x00\x15\x00\xe2\x00\x32\x01\x49\x00\x14\x00\xee\x00\x15\x00\xef\x00\xa2\x00\x16\x00\x17\x00\x18\x00\x19\x00\x34\x00\x38\x00\xc5\x00\x0d\x01\x19\x00\x4b\x00\x70\x00\xb9\x00\xee\x00\xeb\x00\xef\x00\x38\x00\xfe\x00\xea\x00\xf4\x00\xba\x00\x92\x00\xa4\x00\xa8\x00\x1a\x00\x35\x00\x2e\x01\x71\x00\x1b\x00\x1c\x00\x33\x00\x99\x00\x34\x00\xa5\x00\x9a\x00\x9b\x00\xe3\x00\xff\x00\x14\x00\x1d\x00\x1e\x00\x4c\x00\x19\x00\x0e\x01\x1f\x00\x18\x00\x20\x00\x21\x00\x22\x01\xa9\x00\x35\x00\xa3\x00\x22\x00\x35\x00\x35\x00\x23\x00\x24\x00\x25\x00\xa9\x00\xf0\x00\xe4\x00\x26\x01\x29\x00\xe5\x00\x26\x00\x4a\x00\x27\x00\x28\x00\x29\x00\x11\x00\x12\x00\x13\x00\x9a\x00\x9b\x00\x9c\x00\xf0\x00\x14\x00\x74\x00\x15\x00\x28\x01\x35\x00\x16\x00\x17\x00\x18\x00\x14\x00\x14\x01\xd9\x00\xda\x00\x20\x00\x19\x00\x25\x01\x18\x00\xaa\x00\xdb\x00\x22\x00\x37\x00\x26\x01\x38\x00\x9d\x00\x16\x01\x1a\x01\x9e\x00\xa4\x00\x3a\x00\x1a\x00\xf7\x00\x26\x00\x93\x00\x1b\x00\x1c\x00\x06\x01\xab\x00\x29\x01\xa6\x00\x1c\x01\x4e\x00\x4f\x00\x18\x01\x14\x00\x1d\x00\x1e\x00\x50\x00\x08\x01\xa9\x00\x1f\x00\x18\x00\x20\x00\xde\x00\xe7\x00\xa9\x00\x2f\x01\xaa\x00\x22\x00\xa9\x00\x20\x00\x23\x00\x24\x00\x25\x00\xa9\x00\xad\x00\x22\x00\x12\x01\x0c\x00\xa9\x00\x26\x00\x35\x00\x27\x00\x28\x00\x29\x00\x11\x00\x12\x00\x13\x00\x26\x00\x00\x01\x0c\x00\xa9\x00\x14\x00\x44\x00\x15\x00\xae\x00\xa9\x00\x16\x00\x17\x00\x18\x00\xa9\x00\x38\x00\xfb\x00\x3a\x00\x20\x00\x19\x00\x39\x00\x3b\x00\xc5\x00\xa0\x00\x22\x00\x02\x00\x03\x00\x04\x00\x3a\x00\xfc\x00\x05\x00\x06\x00\x45\x00\x07\x00\x1a\x00\xe7\x00\x26\x00\x2a\x01\x1b\x00\x1c\x00\x08\x00\x09\x00\x0a\x00\xdc\x00\x0b\x00\x0c\x00\xe7\x00\x0d\x00\x29\x01\x1d\x00\x1e\x00\x0e\x00\x0f\x00\x3a\x00\x1f\x00\xc3\x00\x20\x00\x46\x00\x04\x00\xcd\x00\x04\x00\x05\x00\x22\x00\x05\x00\xce\x00\x23\x00\x24\x00\x25\x00\xd6\x00\x09\x01\x04\x00\x0a\x01\x04\x00\x05\x00\x26\x00\x05\x00\x27\x00\x28\x00\x29\x00\x11\x00\x12\x00\x13\x00\x17\x01\x0f\x00\xf9\x00\x0f\x00\x14\x00\x94\x00\x15\x00\xe0\x00\x0a\x00\x16\x00\x17\x00\x18\x00\xfb\x00\x0f\x00\xd7\x00\x0f\x00\xd0\x00\x19\x00\x54\x00\x55\x00\x56\x00\x57\x00\x29\x00\x02\x00\x03\x00\x04\x00\xdc\x00\xde\x00\x05\x00\x06\x00\x31\x00\x07\x00\x1a\x00\x96\x00\x0a\x00\x97\x00\x1b\x00\x1c\x00\x08\x00\x09\x00\x0a\x00\x35\x00\x0b\x00\x0c\x00\xe7\x00\x0d\x00\xe8\x00\x1d\x00\x1e\x00\x0e\x00\x0f\x00\xb1\x00\x1f\x00\xb5\x00\x20\x00\x21\x00\x04\x00\x9f\x00\xa0\x00\x05\x00\x22\x00\x2e\x00\x2f\x00\x23\x00\x24\x00\x25\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x26\x00\xb7\x00\x27\x00\x28\x00\x29\x00\x11\x00\x12\x00\x13\x00\x30\x00\x0f\x00\xba\x00\xbb\x00\x14\x00\x31\x00\x15\x00\x35\x00\x3d\x00\x16\x00\x17\x00\x18\x00\x47\x00\x4c\x00\xa2\x00\x2d\x01\x26\x00\x19\x00\x24\x01\xa2\x00\x0c\x01\x1b\x01\x26\x00\x1c\x01\x71\x00\x04\x00\x20\x01\x21\x01\x05\x00\x06\x00\xed\x00\x07\x00\x1a\x00\xf1\x00\xf8\x00\x02\x01\x1b\x00\x1c\x00\x08\x00\x09\x00\x0a\x00\x35\x00\x0b\x00\x0c\x00\x04\x01\x0d\x00\x03\x01\x1d\x00\x1e\x00\x0e\x00\x0f\x00\x05\x01\x1f\x00\x07\x01\x20\x00\xc2\x00\x26\x00\xa3\x00\xc8\x00\xc3\x00\x22\x00\xcb\x00\x26\x00\x23\x00\x24\x00\x25\x00\x26\x00\xb9\x00\x35\x00\xa7\x00\xd2\x00\xe7\x00\x26\x00\x35\x00\x27\x00\x28\x00\x29\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\x04\x00\xe6\x00\xa3\x00\x05\x00\x40\x00\x0e\x01\x07\x00\xa4\x00\xaf\x00\xec\x00\x26\x00\x75\x00\x96\x00\x08\x00\x09\x00\x0a\x00\x35\x00\x0b\x00\x0c\x00\xa4\x00\x0d\x00\xaf\x00\xb3\x00\xb0\x00\x0e\x00\x0f\x00\x35\x00\x00\x01\xb4\x00\x35\x00\xb7\x00\x26\x00\x35\x00\x6d\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\xf9\x00\xff\xff\x2c\x00\x30\x00\x26\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\x34\x01\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\x35\x00\x26\x00\x6e\x00\x6d\x00\x31\x01\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\xc9\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\x6f\x00\x00\x00\x00\x00\x6d\x00\xcc\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\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\x00\x00\x00\x00\x04\x00\x00\x00\x6d\x00\x05\x00\x40\x00\x0f\x01\x07\x00\x1e\x01\x1f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\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\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\x04\x00\x00\x00\xbd\x00\x05\x00\xf2\x00\x6d\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbf\x00\x6d\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\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\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x6d\x00\x05\x00\x40\x00\xf5\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x6d\x00\x05\x00\x40\x00\xc6\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x40\x00\xc9\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x40\x00\xdf\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x40\x00\x72\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x40\x00\x9e\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x40\x00\x41\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x40\x00\x42\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x32\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x2b\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x2d\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x21\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x10\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x11\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x13\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x15\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xf1\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x08\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xbf\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xc0\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xcc\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xcf\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xd2\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xd3\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xd4\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xd5\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xdb\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x75\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x76\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x77\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x78\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x79\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x7a\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x7b\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x7c\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x7d\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x7e\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x7f\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x80\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x81\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x82\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x83\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x84\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x85\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x86\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x87\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x88\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x89\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x8a\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x8b\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x8c\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x8d\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x8e\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x8f\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x90\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x91\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xb0\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xb4\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\xbd\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x2a\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x2c\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x3c\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x3e\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x3f\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x04\x00\x0e\x00\x0f\x00\x05\x00\x44\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0f\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\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\x00\x00\x69\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\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#--happyReduceArr = array (1, 138) [-	(1 , happyReduce_1),-	(2 , happyReduce_2),-	(3 , happyReduce_3),-	(4 , happyReduce_4),-	(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),-	(18 , happyReduce_18),-	(19 , happyReduce_19),-	(20 , happyReduce_20),-	(21 , happyReduce_21),-	(22 , happyReduce_22),-	(23 , happyReduce_23),-	(24 , happyReduce_24),-	(25 , happyReduce_25),-	(26 , happyReduce_26),-	(27 , happyReduce_27),-	(28 , happyReduce_28),-	(29 , happyReduce_29),-	(30 , happyReduce_30),-	(31 , happyReduce_31),-	(32 , happyReduce_32),-	(33 , happyReduce_33),-	(34 , happyReduce_34),-	(35 , happyReduce_35),-	(36 , happyReduce_36),-	(37 , happyReduce_37),-	(38 , happyReduce_38),-	(39 , happyReduce_39),-	(40 , happyReduce_40),-	(41 , happyReduce_41),-	(42 , happyReduce_42),-	(43 , happyReduce_43),-	(44 , happyReduce_44),-	(45 , happyReduce_45),-	(46 , happyReduce_46),-	(47 , happyReduce_47),-	(48 , happyReduce_48),-	(49 , happyReduce_49),-	(50 , happyReduce_50),-	(51 , happyReduce_51),-	(52 , happyReduce_52),-	(53 , happyReduce_53),-	(54 , happyReduce_54),-	(55 , happyReduce_55),-	(56 , happyReduce_56),-	(57 , happyReduce_57),-	(58 , happyReduce_58),-	(59 , happyReduce_59),-	(60 , happyReduce_60),-	(61 , happyReduce_61),-	(62 , happyReduce_62),-	(63 , happyReduce_63),-	(64 , happyReduce_64),-	(65 , happyReduce_65),-	(66 , happyReduce_66),-	(67 , happyReduce_67),-	(68 , happyReduce_68),-	(69 , happyReduce_69),-	(70 , happyReduce_70),-	(71 , happyReduce_71),-	(72 , happyReduce_72),-	(73 , happyReduce_73),-	(74 , happyReduce_74),-	(75 , happyReduce_75),-	(76 , happyReduce_76),-	(77 , happyReduce_77),-	(78 , happyReduce_78),-	(79 , happyReduce_79),-	(80 , happyReduce_80),-	(81 , happyReduce_81),-	(82 , happyReduce_82),-	(83 , happyReduce_83),-	(84 , happyReduce_84),-	(85 , happyReduce_85),-	(86 , happyReduce_86),-	(87 , happyReduce_87),-	(88 , happyReduce_88),-	(89 , happyReduce_89),-	(90 , happyReduce_90),-	(91 , happyReduce_91),-	(92 , happyReduce_92),-	(93 , happyReduce_93),-	(94 , happyReduce_94),-	(95 , happyReduce_95),-	(96 , happyReduce_96),-	(97 , happyReduce_97),-	(98 , happyReduce_98),-	(99 , happyReduce_99),-	(100 , happyReduce_100),-	(101 , happyReduce_101),-	(102 , happyReduce_102),-	(103 , happyReduce_103),-	(104 , happyReduce_104),-	(105 , happyReduce_105),-	(106 , happyReduce_106),-	(107 , happyReduce_107),-	(108 , happyReduce_108),-	(109 , happyReduce_109),-	(110 , happyReduce_110),-	(111 , happyReduce_111),-	(112 , happyReduce_112),-	(113 , happyReduce_113),-	(114 , happyReduce_114),-	(115 , happyReduce_115),-	(116 , happyReduce_116),-	(117 , happyReduce_117),-	(118 , happyReduce_118),-	(119 , happyReduce_119),-	(120 , happyReduce_120),-	(121 , happyReduce_121),-	(122 , happyReduce_122),-	(123 , happyReduce_123),-	(124 , happyReduce_124),-	(125 , happyReduce_125),-	(126 , happyReduce_126),-	(127 , happyReduce_127),-	(128 , happyReduce_128),-	(129 , happyReduce_129),-	(130 , happyReduce_130),-	(131 , happyReduce_131),-	(132 , happyReduce_132),-	(133 , happyReduce_133),-	(134 , happyReduce_134),-	(135 , happyReduce_135),-	(136 , happyReduce_136),-	(137 , happyReduce_137),-	(138 , happyReduce_138)-	]--happy_n_terms = 84 :: Int-happy_n_nonterms = 29 :: Int--happyReduce_1 = happySpecReduce_2  0# happyReduction_1-happyReduction_1 happy_x_2-	happy_x_1-	 =  case happyOut5 happy_x_1 of { happy_var_1 -> -	happyIn4-		 (happy_var_1-	)}--happyReduce_2 = happySpecReduce_1  1# happyReduction_2-happyReduction_2 happy_x_1-	 =  case happyOut6 happy_x_1 of { happy_var_1 -> -	happyIn5-		 ([happy_var_1]-	)}--happyReduce_3 = happySpecReduce_2  1# happyReduction_3-happyReduction_3 happy_x_2-	happy_x_1-	 =  case happyOut6 happy_x_1 of { happy_var_1 -> -	happyIn5-		 ([happy_var_1]-	)}--happyReduce_4 = happySpecReduce_3  1# happyReduction_4-happyReduction_4 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut5 happy_x_1 of { happy_var_1 -> -	case happyOut6 happy_x_3 of { happy_var_3 -> -	happyIn5-		 (happy_var_1++[happy_var_3]-	)}}--happyReduce_5 = happyReduce 4# 1# happyReduction_5-happyReduction_5 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut5 happy_x_1 of { happy_var_1 -> -	case happyOut6 happy_x_3 of { happy_var_3 -> -	happyIn5-		 (happy_var_1++[happy_var_3]-	) `HappyStk` happyRest}}--happyReduce_6 = happySpecReduce_1  2# happyReduction_6-happyReduction_6 happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	happyIn6-		 (happy_var_1-	)}--happyReduce_7 = happyReduce 5# 2# happyReduction_7-happyReduction_7 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut10 happy_x_3 of { happy_var_3 -> -	case happyOut11 happy_x_5 of { happy_var_5 -> -	happyIn6-		 (Ast "variable" [happy_var_3,happy_var_5]-	) `HappyStk` happyRest}}--happyReduce_8 = happyReduce 9# 2# happyReduction_8-happyReduction_8 (happy_x_9 `HappyStk`-	happy_x_8 `HappyStk`-	happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut7 happy_x_3 of { happy_var_3 -> -	case happyOut8 happy_x_5 of { happy_var_5 -> -	case happyOut11 happy_x_8 of { happy_var_8 -> -	happyIn6-		 (Ast "function" ([Avar happy_var_3,happy_var_8]++happy_var_5)-	) `HappyStk` happyRest}}}--happyReduce_9 = happyReduce 11# 2# happyReduction_9-happyReduction_9 (happy_x_11 `HappyStk`-	happy_x_10 `HappyStk`-	happy_x_9 `HappyStk`-	happy_x_8 `HappyStk`-	happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut7 happy_x_3 of { happy_var_3 -> -	case happyOut8 happy_x_5 of { happy_var_5 -> -	case happyOut11 happy_x_10 of { happy_var_10 -> -	happyIn6-		 (Ast "function" ([Avar happy_var_3,happy_var_10]++happy_var_5)-	) `HappyStk` happyRest}}}--happyReduce_10 = happySpecReduce_1  3# happyReduction_10-happyReduction_10 happy_x_1-	 =  case happyOutTok happy_x_1 of { (QName happy_var_1) -> -	happyIn7-		 (happy_var_1-	)}--happyReduce_11 = happySpecReduce_3  3# happyReduction_11-happyReduction_11 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { (QName happy_var_1) -> -	case happyOutTok happy_x_3 of { (QName happy_var_3) -> -	happyIn7-		 (happy_var_1++":"++happy_var_3-	)}}--happyReduce_12 = happySpecReduce_1  4# happyReduction_12-happyReduction_12 happy_x_1-	 =  case happyOut10 happy_x_1 of { happy_var_1 -> -	happyIn8-		 ([happy_var_1]-	)}--happyReduce_13 = happySpecReduce_3  4# happyReduction_13-happyReduction_13 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut10 happy_x_1 of { happy_var_1 -> -	happyIn8-		 ([happy_var_1]-	)}--happyReduce_14 = happySpecReduce_3  4# happyReduction_14-happyReduction_14 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut8 happy_x_1 of { happy_var_1 -> -	case happyOut10 happy_x_3 of { happy_var_3 -> -	happyIn8-		 (happy_var_1++[happy_var_3]-	)}}--happyReduce_15 = happyReduce 5# 4# happyReduction_15-happyReduction_15 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut8 happy_x_1 of { happy_var_1 -> -	case happyOut10 happy_x_3 of { happy_var_3 -> -	happyIn8-		 (happy_var_1++[happy_var_3]-	) `HappyStk` happyRest}}--happyReduce_16 = happySpecReduce_1  5# happyReduction_16-happyReduction_16 happy_x_1-	 =  case happyOut7 happy_x_1 of { happy_var_1 -> -	happyIn9-		 (happy_var_1-	)}--happyReduce_17 = happySpecReduce_3  5# happyReduction_17-happyReduction_17 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut7 happy_x_1 of { happy_var_1 -> -	happyIn9-		 (happy_var_1-	)}--happyReduce_18 = happySpecReduce_3  5# happyReduction_18-happyReduction_18 happy_x_3-	happy_x_2-	happy_x_1-	 =  happyIn9-		 ("element"-	)--happyReduce_19 = happySpecReduce_2  5# happyReduction_19-happyReduction_19 happy_x_2-	happy_x_1-	 =  case happyOut9 happy_x_1 of { happy_var_1 -> -	happyIn9-		 (happy_var_1-	)}--happyReduce_20 = happySpecReduce_2  5# happyReduction_20-happyReduction_20 happy_x_2-	happy_x_1-	 =  case happyOut9 happy_x_1 of { happy_var_1 -> -	happyIn9-		 (happy_var_1-	)}--happyReduce_21 = happySpecReduce_2  5# happyReduction_21-happyReduction_21 happy_x_2-	happy_x_1-	 =  case happyOut9 happy_x_1 of { happy_var_1 -> -	happyIn9-		 (happy_var_1-	)}--happyReduce_22 = happySpecReduce_1  6# happyReduction_22-happyReduction_22 happy_x_1-	 =  case happyOutTok happy_x_1 of { (Variable happy_var_1) -> -	happyIn10-		 (Avar happy_var_1-	)}--happyReduce_23 = happyReduce 5# 7# happyReduction_23-happyReduction_23 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut13 happy_x_1 of { happy_var_1 -> -	case happyOut16 happy_x_2 of { happy_var_2 -> -	case happyOut17 happy_x_3 of { happy_var_3 -> -	case happyOut11 happy_x_5 of { happy_var_5 -> -	happyIn11-		 ((snd happy_var_3) (happy_var_1 (happy_var_2 ((fst happy_var_3) happy_var_5)))-	) `HappyStk` happyRest}}}}--happyReduce_24 = happyReduce 4# 7# happyReduction_24-happyReduction_24 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut14 happy_x_2 of { happy_var_2 -> -	case happyOut11 happy_x_4 of { happy_var_4 -> -	happyIn11-		 (call "some" [happy_var_2 happy_var_4]-	) `HappyStk` happyRest}}--happyReduce_25 = happyReduce 4# 7# happyReduction_25-happyReduction_25 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut14 happy_x_2 of { happy_var_2 -> -	case happyOut11 happy_x_4 of { happy_var_4 -> -	happyIn11-		 (call "not" [call "some" [happy_var_2 (call "not" [happy_var_4])]]-	) `HappyStk` happyRest}}--happyReduce_26 = happyReduce 6# 7# happyReduction_26-happyReduction_26 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut11 happy_x_2 of { happy_var_2 -> -	case happyOut11 happy_x_4 of { happy_var_4 -> -	case happyOut11 happy_x_6 of { happy_var_6 -> -	happyIn11-		 (Ast "if" [happy_var_2,happy_var_4,happy_var_6]-	) `HappyStk` happyRest}}}--happyReduce_27 = happySpecReduce_1  7# happyReduction_27-happyReduction_27 happy_x_1-	 =  case happyOut27 happy_x_1 of { happy_var_1 -> -	happyIn11-		 (happy_var_1-	)}--happyReduce_28 = happySpecReduce_1  7# happyReduction_28-happyReduction_28 happy_x_1-	 =  case happyOut21 happy_x_1 of { happy_var_1 -> -	happyIn11-		 (happy_var_1-	)}--happyReduce_29 = happySpecReduce_1  7# happyReduction_29-happyReduction_29 happy_x_1-	 =  case happyOut20 happy_x_1 of { happy_var_1 -> -	happyIn11-		 (happy_var_1-	)}--happyReduce_30 = happySpecReduce_3  7# happyReduction_30-happyReduction_30 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "to" [happy_var_1,happy_var_3]-	)}}--happyReduce_31 = happySpecReduce_3  7# happyReduction_31-happyReduction_31 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "+" [happy_var_1,happy_var_3]-	)}}--happyReduce_32 = happySpecReduce_3  7# happyReduction_32-happyReduction_32 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "-" [happy_var_1,happy_var_3]-	)}}--happyReduce_33 = happySpecReduce_3  7# happyReduction_33-happyReduction_33 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "*" [happy_var_1,happy_var_3]-	)}}--happyReduce_34 = happySpecReduce_3  7# happyReduction_34-happyReduction_34 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "div" [happy_var_1,happy_var_3]-	)}}--happyReduce_35 = happySpecReduce_3  7# happyReduction_35-happyReduction_35 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "idiv" [happy_var_1,happy_var_3]-	)}}--happyReduce_36 = happySpecReduce_3  7# happyReduction_36-happyReduction_36 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "mod" [happy_var_1,happy_var_3]-	)}}--happyReduce_37 = happySpecReduce_3  7# happyReduction_37-happyReduction_37 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "=" [happy_var_1,happy_var_3]-	)}}--happyReduce_38 = happySpecReduce_3  7# happyReduction_38-happyReduction_38 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "!=" [happy_var_1,happy_var_3]-	)}}--happyReduce_39 = happySpecReduce_3  7# happyReduction_39-happyReduction_39 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "<" [happy_var_1,happy_var_3]-	)}}--happyReduce_40 = happySpecReduce_3  7# happyReduction_40-happyReduction_40 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "<=" [happy_var_1,happy_var_3]-	)}}--happyReduce_41 = happySpecReduce_3  7# happyReduction_41-happyReduction_41 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call ">" [happy_var_1,happy_var_3]-	)}}--happyReduce_42 = happySpecReduce_3  7# happyReduction_42-happyReduction_42 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call ">=" [happy_var_1,happy_var_3]-	)}}--happyReduce_43 = happySpecReduce_3  7# happyReduction_43-happyReduction_43 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "<<" [happy_var_1,happy_var_3]-	)}}--happyReduce_44 = happySpecReduce_3  7# happyReduction_44-happyReduction_44 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call ">>" [happy_var_1,happy_var_3]-	)}}--happyReduce_45 = happySpecReduce_3  7# happyReduction_45-happyReduction_45 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "is" [happy_var_1,happy_var_3]-	)}}--happyReduce_46 = happySpecReduce_3  7# happyReduction_46-happyReduction_46 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "eq" [happy_var_1,happy_var_3]-	)}}--happyReduce_47 = happySpecReduce_3  7# happyReduction_47-happyReduction_47 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "ne" [happy_var_1,happy_var_3]-	)}}--happyReduce_48 = happySpecReduce_3  7# happyReduction_48-happyReduction_48 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "lt" [happy_var_1,happy_var_3]-	)}}--happyReduce_49 = happySpecReduce_3  7# happyReduction_49-happyReduction_49 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "le" [happy_var_1,happy_var_3]-	)}}--happyReduce_50 = happySpecReduce_3  7# happyReduction_50-happyReduction_50 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "gt" [happy_var_1,happy_var_3]-	)}}--happyReduce_51 = happySpecReduce_3  7# happyReduction_51-happyReduction_51 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "ge" [happy_var_1,happy_var_3]-	)}}--happyReduce_52 = happySpecReduce_3  7# happyReduction_52-happyReduction_52 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "and" [happy_var_1,happy_var_3]-	)}}--happyReduce_53 = happySpecReduce_3  7# happyReduction_53-happyReduction_53 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "or" [happy_var_1,happy_var_3]-	)}}--happyReduce_54 = happySpecReduce_3  7# happyReduction_54-happyReduction_54 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "not" [happy_var_1,happy_var_3]-	)}}--happyReduce_55 = happySpecReduce_3  7# happyReduction_55-happyReduction_55 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "union" [happy_var_1,happy_var_3]-	)}}--happyReduce_56 = happySpecReduce_3  7# happyReduction_56-happyReduction_56 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "intersect" [happy_var_1,happy_var_3]-	)}}--happyReduce_57 = happySpecReduce_3  7# happyReduction_57-happyReduction_57 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (call "except" [happy_var_1,happy_var_3]-	)}}--happyReduce_58 = happyReduce 4# 7# happyReduction_58-happyReduction_58 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut9 happy_x_4 of { happy_var_4 -> -	happyIn11-		 (call "instance-of" [happy_var_1,Astring happy_var_4]-	) `HappyStk` happyRest}}--happyReduce_59 = happySpecReduce_2  7# happyReduction_59-happyReduction_59 happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_2 of { happy_var_2 -> -	happyIn11-		 (call "uplus" [happy_var_2]-	)}--happyReduce_60 = happySpecReduce_2  7# happyReduction_60-happyReduction_60 happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_2 of { happy_var_2 -> -	happyIn11-		 (call "uminus" [happy_var_2]-	)}--happyReduce_61 = happySpecReduce_2  7# happyReduction_61-happyReduction_61 happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_2 of { happy_var_2 -> -	happyIn11-		 (call "not" [happy_var_2]-	)}--happyReduce_62 = happySpecReduce_1  7# happyReduction_62-happyReduction_62 happy_x_1-	 =  case happyOut24 happy_x_1 of { happy_var_1 -> -	happyIn11-		 (happy_var_1-	)}--happyReduce_63 = happySpecReduce_1  7# happyReduction_63-happyReduction_63 happy_x_1-	 =  case happyOutTok happy_x_1 of { (TInteger happy_var_1) -> -	happyIn11-		 (Aint happy_var_1-	)}--happyReduce_64 = happySpecReduce_1  7# happyReduction_64-happyReduction_64 happy_x_1-	 =  case happyOutTok happy_x_1 of { (TFloat happy_var_1) -> -	happyIn11-		 (Afloat happy_var_1-	)}--happyReduce_65 = happyReduce 4# 7# happyReduction_65-happyReduction_65 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut11 happy_x_2 of { happy_var_2 -> -	case happyOut11 happy_x_4 of { happy_var_4 -> -	happyIn11-		 (Ast "insert" [happy_var_2,Ast "destination" [happy_var_4]]-	) `HappyStk` happyRest}}--happyReduce_66 = happySpecReduce_3  7# happyReduction_66-happyReduction_66 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn11-		 (Ast "delete" [happy_var_3]-	)}--happyReduce_67 = happyReduce 4# 7# happyReduction_67-happyReduction_67 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut11 happy_x_2 of { happy_var_2 -> -	case happyOut11 happy_x_4 of { happy_var_4 -> -	happyIn11-		 (Ast "replace" [happy_var_2,happy_var_4]-	) `HappyStk` happyRest}}--happyReduce_68 = happySpecReduce_1  8# happyReduction_68-happyReduction_68 happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	happyIn12-		 ([happy_var_1]-	)}--happyReduce_69 = happySpecReduce_3  8# happyReduction_69-happyReduction_69 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut12 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn12-		 (happy_var_1++[happy_var_3]-	)}}--happyReduce_70 = happySpecReduce_2  9# happyReduction_70-happyReduction_70 happy_x_2-	happy_x_1-	 =  case happyOut14 happy_x_2 of { happy_var_2 -> -	happyIn13-		 (happy_var_2-	)}--happyReduce_71 = happySpecReduce_2  9# happyReduction_71-happyReduction_71 happy_x_2-	happy_x_1-	 =  case happyOut15 happy_x_2 of { happy_var_2 -> -	happyIn13-		 (happy_var_2-	)}--happyReduce_72 = happySpecReduce_3  9# happyReduction_72-happyReduction_72 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut13 happy_x_1 of { happy_var_1 -> -	case happyOut14 happy_x_3 of { happy_var_3 -> -	happyIn13-		 (happy_var_1 . happy_var_3-	)}}--happyReduce_73 = happySpecReduce_3  9# happyReduction_73-happyReduction_73 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut13 happy_x_1 of { happy_var_1 -> -	case happyOut15 happy_x_3 of { happy_var_3 -> -	happyIn13-		 (happy_var_1 . happy_var_3-	)}}--happyReduce_74 = happySpecReduce_3  10# happyReduction_74-happyReduction_74 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut10 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn14-		 (\x -> Ast "for" [happy_var_1,Avar "$",happy_var_3,x]-	)}}--happyReduce_75 = happyReduce 5# 10# happyReduction_75-happyReduction_75 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut10 happy_x_1 of { happy_var_1 -> -	case happyOut10 happy_x_3 of { happy_var_3 -> -	case happyOut11 happy_x_5 of { happy_var_5 -> -	happyIn14-		 (\x -> Ast "for" [happy_var_1,happy_var_3,happy_var_5,x]-	) `HappyStk` happyRest}}}--happyReduce_76 = happyReduce 5# 10# happyReduction_76-happyReduction_76 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut14 happy_x_1 of { happy_var_1 -> -	case happyOut10 happy_x_3 of { happy_var_3 -> -	case happyOut11 happy_x_5 of { happy_var_5 -> -	happyIn14-		 (\x -> happy_var_1(Ast "for" [happy_var_3,Avar "$",happy_var_5,x])-	) `HappyStk` happyRest}}}--happyReduce_77 = happyReduce 7# 10# happyReduction_77-happyReduction_77 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut14 happy_x_1 of { happy_var_1 -> -	case happyOut10 happy_x_3 of { happy_var_3 -> -	case happyOut10 happy_x_5 of { happy_var_5 -> -	case happyOut11 happy_x_7 of { happy_var_7 -> -	happyIn14-		 (\x -> happy_var_1(Ast "for" [happy_var_3,happy_var_5,happy_var_7,x])-	) `HappyStk` happyRest}}}}--happyReduce_78 = happySpecReduce_3  11# happyReduction_78-happyReduction_78 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut10 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn15-		 (\x -> Ast "let" [happy_var_1,happy_var_3,x]-	)}}--happyReduce_79 = happyReduce 5# 11# happyReduction_79-happyReduction_79 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut15 happy_x_1 of { happy_var_1 -> -	case happyOut10 happy_x_3 of { happy_var_3 -> -	case happyOut11 happy_x_5 of { happy_var_5 -> -	happyIn15-		 (\x -> happy_var_1(Ast "let" [happy_var_3,happy_var_5,x])-	) `HappyStk` happyRest}}}--happyReduce_80 = happySpecReduce_2  12# happyReduction_80-happyReduction_80 happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_2 of { happy_var_2 -> -	happyIn16-		 (\x -> Ast "predicate" [happy_var_2,x]-	)}--happyReduce_81 = happySpecReduce_0  12# happyReduction_81-happyReduction_81  =  happyIn16-		 (id-	)--happyReduce_82 = happySpecReduce_3  13# happyReduction_82-happyReduction_82 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut18 happy_x_3 of { happy_var_3 -> -	happyIn17-		 ((\x -> Ast "sortTuple" (x:(fst happy_var_3)),-                                                           \x -> Ast "sort" (x:(snd happy_var_3)))-	)}--happyReduce_83 = happySpecReduce_0  13# happyReduction_83-happyReduction_83  =  happyIn17-		 ((id,id)-	)--happyReduce_84 = happySpecReduce_2  14# happyReduction_84-happyReduction_84 happy_x_2-	happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	case happyOut19 happy_x_2 of { happy_var_2 -> -	happyIn18-		 (([happy_var_1],[happy_var_2])-	)}}--happyReduce_85 = happyReduce 4# 14# happyReduction_85-happyReduction_85 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut18 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	case happyOut19 happy_x_4 of { happy_var_4 -> -	happyIn18-		 (((fst happy_var_1)++[happy_var_3],(snd happy_var_1)++[happy_var_4])-	) `HappyStk` happyRest}}}--happyReduce_86 = happySpecReduce_1  15# happyReduction_86-happyReduction_86 happy_x_1-	 =  happyIn19-		 (Avar "ascending"-	)--happyReduce_87 = happySpecReduce_1  15# happyReduction_87-happyReduction_87 happy_x_1-	 =  happyIn19-		 (Avar "descending"-	)--happyReduce_88 = happySpecReduce_0  15# happyReduction_88-happyReduction_88  =  happyIn19-		 (Avar "ascending"-	)--happyReduce_89 = happyReduce 4# 16# happyReduction_89-happyReduction_89 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut7 happy_x_3 of { happy_var_3 -> -	happyIn20-		 (call "element" [Avar happy_var_3]-	) `HappyStk` happyRest}--happyReduce_90 = happyReduce 4# 16# happyReduction_90-happyReduction_90 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut7 happy_x_3 of { happy_var_3 -> -	happyIn20-		 (call "attribute" [Avar happy_var_3]-	) `HappyStk` happyRest}--happyReduce_91 = happyReduce 6# 17# happyReduction_91-happyReduction_91 (happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut22 happy_x_1 of { happy_var_1 -> -	case happyOut23 happy_x_3 of { happy_var_3 -> -	case happyOut7 happy_x_5 of { happy_var_5 -> -	happyIn21-		 (if head happy_var_1 == Astring happy_var_5-                                                             then Ast "element_construction" (happy_var_1++[Ast "append" happy_var_3])-                                                          else parseError [TError ("Unmatched tags in element construction: "-                                                                                   ++(show (head happy_var_1))++" '"++happy_var_5++"'")]-	) `HappyStk` happyRest}}}--happyReduce_92 = happyReduce 5# 17# happyReduction_92-happyReduction_92 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut22 happy_x_1 of { happy_var_1 -> -	case happyOut7 happy_x_4 of { happy_var_4 -> -	happyIn21-		 (if head happy_var_1 == Astring happy_var_4-                                                             then Ast "element_construction" (happy_var_1++[Ast "append" []])-                                                          else parseError [TError ("Unmatched tags in element construction: "-                                                                                   ++(show (head happy_var_1))++" '"++happy_var_4++"'")]-	) `HappyStk` happyRest}}--happyReduce_93 = happySpecReduce_2  17# happyReduction_93-happyReduction_93 happy_x_2-	happy_x_1-	 =  case happyOut22 happy_x_1 of { happy_var_1 -> -	happyIn21-		 (Ast "element_construction" (happy_var_1++[Ast "append" []])-	)}--happyReduce_94 = happyReduce 7# 17# happyReduction_94-happyReduction_94 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut11 happy_x_3 of { happy_var_3 -> -	case happyOut12 happy_x_6 of { happy_var_6 -> -	happyIn21-		 (Ast "element_construction" [happy_var_3,Ast "attributes" [],concatenateAll happy_var_6]-	) `HappyStk` happyRest}}--happyReduce_95 = happyReduce 7# 17# happyReduction_95-happyReduction_95 (happy_x_7 `HappyStk`-	happy_x_6 `HappyStk`-	happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut11 happy_x_3 of { happy_var_3 -> -	case happyOut12 happy_x_6 of { happy_var_6 -> -	happyIn21-		 (Ast "attribute_construction" [happy_var_3,concatenateAll happy_var_6]-	) `HappyStk` happyRest}}--happyReduce_96 = happyReduce 5# 17# happyReduction_96-happyReduction_96 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut7 happy_x_2 of { happy_var_2 -> -	case happyOut12 happy_x_4 of { happy_var_4 -> -	happyIn21-		 (Ast "element_construction" [Astring happy_var_2,Ast "attributes" [],concatenateAll happy_var_4]-	) `HappyStk` happyRest}}--happyReduce_97 = happyReduce 5# 17# happyReduction_97-happyReduction_97 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut7 happy_x_2 of { happy_var_2 -> -	case happyOut12 happy_x_4 of { happy_var_4 -> -	happyIn21-		 (Ast "attribute_construction" [Astring happy_var_2,concatenateAll happy_var_4]-	) `HappyStk` happyRest}}--happyReduce_98 = happySpecReduce_2  18# happyReduction_98-happyReduction_98 happy_x_2-	happy_x_1-	 =  case happyOut7 happy_x_2 of { happy_var_2 -> -	happyIn22-		 ([Astring happy_var_2,Ast "attributes" []]-	)}--happyReduce_99 = happySpecReduce_3  18# happyReduction_99-happyReduction_99 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut7 happy_x_2 of { happy_var_2 -> -	case happyOut26 happy_x_3 of { happy_var_3 -> -	happyIn22-		 ([Astring happy_var_2,Ast "attributes" happy_var_3]-	)}}--happyReduce_100 = happySpecReduce_3  19# happyReduction_100-happyReduction_100 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut12 happy_x_2 of { happy_var_2 -> -	happyIn23-		 ([concatenateAll happy_var_2]-	)}--happyReduce_101 = happySpecReduce_1  19# happyReduction_101-happyReduction_101 happy_x_1-	 =  case happyOutTok happy_x_1 of { (TString happy_var_1) -> -	happyIn23-		 ([Astring happy_var_1]-	)}--happyReduce_102 = happySpecReduce_1  19# happyReduction_102-happyReduction_102 happy_x_1-	 =  case happyOutTok happy_x_1 of { (XMLtext happy_var_1) -> -	happyIn23-		 ([Astring happy_var_1]-	)}--happyReduce_103 = happySpecReduce_1  19# happyReduction_103-happyReduction_103 happy_x_1-	 =  case happyOut21 happy_x_1 of { happy_var_1 -> -	happyIn23-		 ([happy_var_1]-	)}--happyReduce_104 = happyReduce 4# 19# happyReduction_104-happyReduction_104 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut23 happy_x_1 of { happy_var_1 -> -	case happyOut12 happy_x_3 of { happy_var_3 -> -	happyIn23-		 (happy_var_1++[concatenateAll happy_var_3]-	) `HappyStk` happyRest}}--happyReduce_105 = happySpecReduce_2  19# happyReduction_105-happyReduction_105 happy_x_2-	happy_x_1-	 =  case happyOut23 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { (TString happy_var_2) -> -	happyIn23-		 (happy_var_1++[Astring happy_var_2]-	)}}--happyReduce_106 = happySpecReduce_2  19# happyReduction_106-happyReduction_106 happy_x_2-	happy_x_1-	 =  case happyOut23 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { (XMLtext happy_var_2) -> -	happyIn23-		 (happy_var_1++[Astring happy_var_2]-	)}}--happyReduce_107 = happySpecReduce_2  19# happyReduction_107-happyReduction_107 happy_x_2-	happy_x_1-	 =  case happyOut23 happy_x_1 of { happy_var_1 -> -	case happyOut21 happy_x_2 of { happy_var_2 -> -	happyIn23-		 (happy_var_1++[happy_var_2]-	)}}--happyReduce_108 = happySpecReduce_1  20# happyReduction_108-happyReduction_108 happy_x_1-	 =  case happyOut25 happy_x_1 of { happy_var_1 -> -	happyIn24-		 (if length happy_var_1 == 0 then Astring ""-                                                          else if length happy_var_1 == 1 then head happy_var_1 else Ast "append" happy_var_1-	)}--happyReduce_109 = happySpecReduce_1  21# happyReduction_109-happyReduction_109 happy_x_1-	 =  case happyOutTok happy_x_1 of { (TString happy_var_1) -> -	happyIn25-		 (if happy_var_1=="" then [] else [Astring happy_var_1]-	)}--happyReduce_110 = happySpecReduce_3  21# happyReduction_110-happyReduction_110 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut12 happy_x_2 of { happy_var_2 -> -	happyIn25-		 ([concatenateAll happy_var_2]-	)}--happyReduce_111 = happySpecReduce_2  21# happyReduction_111-happyReduction_111 happy_x_2-	happy_x_1-	 =  case happyOut25 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { (TString happy_var_2) -> -	happyIn25-		 (if happy_var_2=="" then happy_var_1 else happy_var_1++[Astring happy_var_2]-	)}}--happyReduce_112 = happyReduce 4# 21# happyReduction_112-happyReduction_112 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut25 happy_x_1 of { happy_var_1 -> -	case happyOut12 happy_x_3 of { happy_var_3 -> -	happyIn25-		 (happy_var_1++[concatenateAll happy_var_3]-	) `HappyStk` happyRest}}--happyReduce_113 = happySpecReduce_3  22# happyReduction_113-happyReduction_113 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut7 happy_x_1 of { happy_var_1 -> -	case happyOut24 happy_x_3 of { happy_var_3 -> -	happyIn26-		 ([Ast "pair" [Astring happy_var_1,happy_var_3]]-	)}}--happyReduce_114 = happyReduce 4# 22# happyReduction_114-happyReduction_114 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut26 happy_x_1 of { happy_var_1 -> -	case happyOut7 happy_x_2 of { happy_var_2 -> -	case happyOut24 happy_x_4 of { happy_var_4 -> -	happyIn26-		 (happy_var_1++[Ast "pair" [Astring happy_var_2,happy_var_4]]-	) `HappyStk` happyRest}}}--happyReduce_115 = happySpecReduce_2  23# happyReduction_115-happyReduction_115 happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_1 of { happy_var_1 -> -	case happyOut30 happy_x_2 of { happy_var_2 -> -	happyIn27-		 (happy_var_1 "child" (Avar ".") happy_var_2-	)}}--happyReduce_116 = happySpecReduce_3  23# happyReduction_116-happyReduction_116 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_2 of { happy_var_2 -> -	case happyOut30 happy_x_3 of { happy_var_3 -> -	happyIn27-		 (happy_var_2 "attribute" (Avar ".") happy_var_3-	)}}--happyReduce_117 = happySpecReduce_3  23# happyReduction_117-happyReduction_117 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_1 of { happy_var_1 -> -	case happyOut30 happy_x_2 of { happy_var_2 -> -	case happyOut28 happy_x_3 of { happy_var_3 -> -	happyIn27-		 (happy_var_3 (happy_var_1 "child" (Avar ".") happy_var_2)-	)}}}--happyReduce_118 = happyReduce 4# 23# happyReduction_118-happyReduction_118 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut31 happy_x_2 of { happy_var_2 -> -	case happyOut30 happy_x_3 of { happy_var_3 -> -	case happyOut28 happy_x_4 of { happy_var_4 -> -	happyIn27-		 (happy_var_4 (happy_var_2 "attribute" (Avar ".") happy_var_3)-	) `HappyStk` happyRest}}}--happyReduce_119 = happySpecReduce_1  24# happyReduction_119-happyReduction_119 happy_x_1-	 =  case happyOut29 happy_x_1 of { happy_var_1 -> -	happyIn28-		 (happy_var_1-	)}--happyReduce_120 = happySpecReduce_2  24# happyReduction_120-happyReduction_120 happy_x_2-	happy_x_1-	 =  case happyOut28 happy_x_1 of { happy_var_1 -> -	case happyOut29 happy_x_2 of { happy_var_2 -> -	happyIn28-		 (happy_var_2 . happy_var_1-	)}}--happyReduce_121 = happySpecReduce_3  25# happyReduction_121-happyReduction_121 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_2 of { happy_var_2 -> -	case happyOut30 happy_x_3 of { happy_var_3 -> -	happyIn29-		 (\e -> happy_var_2 "child" e happy_var_3-	)}}--happyReduce_122 = happyReduce 4# 25# happyReduction_122-happyReduction_122 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut31 happy_x_3 of { happy_var_3 -> -	case happyOut30 happy_x_4 of { happy_var_4 -> -	happyIn29-		 (\e -> happy_var_3 "attribute" e happy_var_4-	) `HappyStk` happyRest}}--happyReduce_123 = happyReduce 4# 25# happyReduction_123-happyReduction_123 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut31 happy_x_3 of { happy_var_3 -> -	case happyOut30 happy_x_4 of { happy_var_4 -> -	happyIn29-		 (\e -> happy_var_3 "descendant" e happy_var_4-	) `HappyStk` happyRest}}--happyReduce_124 = happyReduce 5# 25# happyReduction_124-happyReduction_124 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut31 happy_x_4 of { happy_var_4 -> -	case happyOut30 happy_x_5 of { happy_var_5 -> -	happyIn29-		 (\e -> happy_var_4 "attribute-descendant" e happy_var_5-	) `HappyStk` happyRest}}--happyReduce_125 = happySpecReduce_2  25# happyReduction_125-happyReduction_125 happy_x_2-	happy_x_1-	 =  happyIn29-		 (\e -> Ast "step" [Avar "parent",Astring "*",e]-	)--happyReduce_126 = happyReduce 4# 26# happyReduction_126-happyReduction_126 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut30 happy_x_1 of { happy_var_1 -> -	case happyOut11 happy_x_3 of { happy_var_3 -> -	happyIn30-		 (happy_var_1 ++ [happy_var_3]-	) `HappyStk` happyRest}}--happyReduce_127 = happySpecReduce_0  26# happyReduction_127-happyReduction_127  =  happyIn30-		 ([]-	)--happyReduce_128 = happySpecReduce_1  27# happyReduction_128-happyReduction_128 happy_x_1-	 =  case happyOut32 happy_x_1 of { happy_var_1 -> -	happyIn31-		 (\t e ps -> if null ps-								     then happy_var_1 t e-                                                                     else Ast "filter" (happy_var_1 t e:ps)-	)}--happyReduce_129 = happySpecReduce_1  27# happyReduction_129-happyReduction_129 happy_x_1-	 =  happyIn31-		 (\t e ps -> Ast "step" ((Avar t):(Astring "*"):e:ps)-	)--happyReduce_130 = happySpecReduce_1  27# happyReduction_130-happyReduction_130 happy_x_1-	 =  case happyOut7 happy_x_1 of { happy_var_1 -> -	happyIn31-		 (\t e ps -> if elem happy_var_1 path_steps-                                                                     then parseError [TError ("Axis "++happy_var_1++" is missing a node step")]-                                                                     else Ast "step" ((Avar t):(Astring happy_var_1):e:ps)-	)}--happyReduce_131 = happyReduce 4# 27# happyReduction_131-happyReduction_131 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { (QName happy_var_1) -> -	case happyOut7 happy_x_4 of { happy_var_4 -> -	happyIn31-		 (\t e ps -> if elem happy_var_1 path_steps-                                                                     then if t == "child"-                                                                          then Ast "step" ((Avar happy_var_1):(Astring happy_var_4):e:ps)-                                                                          else parseError [TError ("The navigation step must be /"++happy_var_1++"::"++happy_var_4)]-                                                                     else parseError [TError ("Not a valid axis name: "++happy_var_1)]-	) `HappyStk` happyRest}}--happyReduce_132 = happyReduce 4# 27# happyReduction_132-happyReduction_132 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOutTok happy_x_1 of { (QName happy_var_1) -> -	happyIn31-		 (\t e ps -> if elem happy_var_1 path_steps-                                                                     then if t == "child"-                                                                          then Ast "step" ((Avar happy_var_1):(Astring "*"):e:ps)-                                                                          else parseError [TError ("The navigation step must be /"++happy_var_1++"::*")]-                                                                     else parseError [TError ("Not a valid axis name: "++happy_var_1)]-	) `HappyStk` happyRest}--happyReduce_133 = happySpecReduce_1  28# happyReduction_133-happyReduction_133 happy_x_1-	 =  case happyOut10 happy_x_1 of { happy_var_1 -> -	happyIn32-		 (\_ _ -> happy_var_1-	)}--happyReduce_134 = happySpecReduce_1  28# happyReduction_134-happyReduction_134 happy_x_1-	 =  happyIn32-		 (\_ e -> e-	)--happyReduce_135 = happySpecReduce_3  28# happyReduction_135-happyReduction_135 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut12 happy_x_2 of { happy_var_2 -> -	happyIn32-		 (\t e -> if e == Avar "."-                                                                  then concatenateAll happy_var_2-	                                                          else Ast "context" [e,Astring t,concatenateAll happy_var_2]-	)}--happyReduce_136 = happySpecReduce_2  28# happyReduction_136-happyReduction_136 happy_x_2-	happy_x_1-	 =  happyIn32-		 (\_ _ -> call "empty" []-	)--happyReduce_137 = happyReduce 4# 28# happyReduction_137-happyReduction_137 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut7 happy_x_1 of { happy_var_1 -> -	case happyOut12 happy_x_3 of { happy_var_3 -> -	happyIn32-		 (\t e -> if e == Avar "."-                                                                     then call happy_var_1 happy_var_3-                                                                  else Ast "context" [e,Astring t,call happy_var_1 happy_var_3]-	) `HappyStk` happyRest}}--happyReduce_138 = happySpecReduce_3  28# happyReduction_138-happyReduction_138 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut7 happy_x_1 of { happy_var_1 -> -	happyIn32-		 (\_ e -> if elem happy_var_1 ["last","position","true","false","empty","select"]-                                                                  then call happy_var_1 []-                                                                  else call happy_var_1 [e]-	)}--happyNewToken action sts stk [] =-	happyDoAction 83# notHappyAtAll action sts stk []--happyNewToken action sts stk (tk:tks) =-	let cont i = happyDoAction i tk action sts stk tks in-	case tk of {-	RETURN -> cont 1#;-	SOME -> cont 2#;-	EVERY -> cont 3#;-	IF -> cont 4#;-	THEN -> cont 5#;-	ELSE -> cont 6#;-	LB -> cont 7#;-	RB -> cont 8#;-	LP -> cont 9#;-	RP -> cont 10#;-	LSB -> cont 11#;-	RSB -> cont 12#;-	TO -> cont 13#;-	PLUS -> cont 14#;-	MINUS -> cont 15#;-	TIMES -> cont 16#;-	DIV -> cont 17#;-	IDIV -> cont 18#;-	MOD -> cont 19#;-	TEQ -> cont 20#;-	TNE -> cont 21#;-	TLT -> cont 22#;-	TLE -> cont 23#;-	TGT -> cont 24#;-	TGE -> cont 25#;-	PRE -> cont 26#;-	POST -> cont 27#;-	IS -> cont 28#;-	SEQ -> cont 29#;-	SNE -> cont 30#;-	SLT -> cont 31#;-	SLE -> cont 32#;-	SGT -> cont 33#;-	SGE -> cont 34#;-	AND -> cont 35#;-	OR -> cont 36#;-	NOT -> cont 37#;-	UNION -> cont 38#;-	INTERSECT -> cont 39#;-	EXCEPT -> cont 40#;-	FOR -> cont 41#;-	LET -> cont 42#;-	IN -> cont 43#;-	AS -> cont 44#;-	COMMA -> cont 45#;-	ASSIGN -> cont 46#;-	WHERE -> cont 47#;-	ORDER -> cont 48#;-	BY -> cont 49#;-	ASCENDING -> cont 50#;-	DESCENDING -> cont 51#;-	ELEMENT -> cont 52#;-	ATTRIBUTE -> cont 53#;-	STAG -> cont 54#;-	ETAG -> cont 55#;-	SATISFIES -> cont 56#;-	ATSIGN -> cont 57#;-	SLASH -> cont 58#;-	QName happy_dollar_dollar -> cont 59#;-	DECLARE -> cont 60#;-	FUNCTION -> cont 61#;-	VARIABLE -> cont 62#;-	AT -> cont 63#;-	DOTS -> cont 64#;-	DOT -> cont 65#;-	SEMI -> cont 66#;-	COLON -> cont 67#;-	INSERT -> cont 68#;-	DELETE -> cont 69#;-	REPLACE -> cont 70#;-	INTO -> cont 71#;-	FROM -> cont 72#;-	WITH -> cont 73#;-	INSTANCE -> cont 74#;-	OF -> cont 75#;-	QMARK -> cont 76#;-	Variable happy_dollar_dollar -> cont 77#;-	XMLtext happy_dollar_dollar -> cont 78#;-	TInteger happy_dollar_dollar -> cont 79#;-	TFloat happy_dollar_dollar -> cont 80#;-	TString happy_dollar_dollar -> cont 81#;-	TokenEOF -> cont 82#;-	_ -> happyError' (tk:tks)-	}--happyError_ tk tks = happyError' (tk:tks)--newtype HappyIdentity a = HappyIdentity a-happyIdentity = HappyIdentity-happyRunIdentity (HappyIdentity a) = a--instance Monad HappyIdentity where-    return = HappyIdentity-    (HappyIdentity p) >>= q = q p--happyThen :: () => HappyIdentity a -> (a -> HappyIdentity b) -> HappyIdentity b-happyThen = (>>=)-happyReturn :: () => a -> HappyIdentity a-happyReturn = (return)-happyThen1 m k tks = (>>=) m (\a -> k a tks)-happyReturn1 :: () => a -> b -> HappyIdentity a-happyReturn1 = \a tks -> (return) a-happyError' :: () => [(Token)] -> HappyIdentity a-happyError' = HappyIdentity . parseError--parse tks = happyRunIdentity happySomeParser where-  happySomeParser = happyThen (happyParse 0# tks) (\x -> happyReturn (happyOut4 x))--happySeq = happyDontSeq----- Abstract Syntax Tree for XQueries-data Ast = Ast String [Ast]-         | Avar String-         | Aint Int-         | Afloat Float-         | Astring String-         deriving Eq---instance Show Ast-  where show (Ast s []) = s ++ "()"-        show (Ast s (x:xs)) = s ++ "(" ++ show x-                              ++ foldr (\a r -> ","++show a++r) "" xs-                              ++ ")"-        show (Avar s) = s-        show (Aint n) = show n-        show (Afloat n) = show n-        show (Astring s) = "\'" ++ s ++ "\'"---screenSize = 80::Int--prettyAst :: Ast -> Int -> (String,Int)-prettyAst (Avar s) p = (s,(length s)+p)-prettyAst (Aint n) p = let s = show n in (s,(length s)+p)-prettyAst (Afloat n) p = let s = show n in (s,(length s)+p)-prettyAst (Astring s) p = ("\'" ++ s ++ "\'",(length s)+p+2)-prettyAst (Ast s args) p-    = let (ps,np) = prettyArgs args-      in (s++"("++ps++")",np+1)-    where prettyArgs [] = ("",p+1)-          prettyArgs xs = let ss = show (head xs) ++ foldr (\a r -> ","++show a++r) "" (tail xs)-                              np = (length s)+p+1-                          in if (length ss)+p < screenSize-                             then (ss,(length ss)+p)-                             else let ds = map (\x -> let (s,ep) = prettyAst x np-                                                      in (s ++ ",\n" ++ space np,ep)) (init xs)-                                      (ls,lp) = prettyAst (last xs) np-                                  in (concatMap fst ds ++ ls,lp)-          space n = replicate n ' '---ppAst :: Ast -> String-ppAst e = let (s,_) = prettyAst e 0 in s---call :: String -> [Ast] -> Ast-call name args = Ast "call" ((Avar name):args)---concatenateAll :: [Ast] -> Ast-concatenateAll [x] = x-concatenateAll (x:xs) = foldl (\a r -> call "concatenate" [a,r]) x xs-concatenateAll _ = call "empty" []---path_steps = ["child", "descendant", "attribute", "self", "descendant-or-self", "following-sibling", "following",-              "attribute-descendant", "parent", "ancestor", "preceding-sibling", "preceding", "ancestor-or-self" ]---data Token-  = RETURN | SOME | EVERY | IF | THEN | ELSE | LB | RB | LP | RP | LSB | RSB-  | TO | PLUS | MINUS | TIMES | DIV | IDIV | MOD | AS | QMARK-  | TEQ | TNE | TLT | TLE | TGT | TGE | SEQ | SNE | SLT | SLE | SGT | SGE-  | AND | OR | NOT | UNION | INTERSECT | EXCEPT | FOR | LET | IN | COMMA-  | ASSIGN | WHERE | ORDER | BY | ASCENDING | DESCENDING | ELEMENT-  | ATTRIBUTE | STAG | ETAG | SATISFIES | ATSIGN | SLASH | DECLARE | SEMI | COLON-  | FUNCTION | VARIABLE | AT | DOT | DOTS | TokenEOF | PRE | POST | IS-  | INSERT | INTO | DELETE | FROM | REPLACE | WITH | INSTANCE | OF-  | QName String | Variable String | XMLtext String | TInteger Int-  | TFloat Float | TString String | TError String-    deriving Eq---instance Show Token-    where show (QName s) = "QName("++s++")"-	  show (Variable s) = "Variable("++s++")"-	  show (XMLtext s) = "XMLtext("++s++")"-	  show (TInteger n) = "Integer("++(show n)++")"-	  show (TFloat n) = "Double("++(show n)++")"-	  show (TString s) = "String("++s++")"-	  show (TError s) = "'"++s++"'"-          show t = case filter (\(n,_) -> n==t) tokenList of-                     (_,b):_ -> b-                     _ -> "Illegal token"---printToken (QName s) = s-printToken (Variable s) = "$"++s-printToken (XMLtext s) = "'"++s++"'"-printToken (TInteger n) = show n-printToken (TFloat n) = show n-printToken (TString s) = "\""++s++"\""-printToken (TError s) = "error("++s++")"-printToken t = case filter (\(n,_) -> n==t) tokenList of-           (_,b):_ -> b-           _ -> "Illegal token"---tokenList :: [(Token,String)]-tokenList = [(TokenEOF,"EOF"),(RETURN,"return"),(SOME,"some"),(EVERY,"every"),(IF,"if"),(THEN,"then"),(ELSE,"else"),-             (LB,"["),(RB,"]"),(LP,"("),(RP,")"),(LSB,"{"),(RSB,"}"),(QMARK,"?"),-             (TO,"to"),(PLUS,"+"),(MINUS,"-"),(TIMES,"*"),(DIV,"div"),(IDIV,"idiv"),(MOD,"mod"),-             (TEQ,"="),(TNE,"!="),(TLT,"<"),(TLE,"<="),(TGT,">"),(TGE,">="),(PRE,"<<"),(POST,">>"),-             (IS,"is"),(SEQ,"eq"),(SNE,"ne"),(SLT,"lt"),(SLE,"le"),(SGT,"gt"),(SGE,"ge"),(AND,"and"),-             (OR,"or"),(NOT,"not"),(UNION,"union"),(INTERSECT,"intersect"),(EXCEPT,"except"),-             (FOR,"for"),(LET,"let"),(IN,"in"),(AS,"as"),(COMMA,"','"),(ASSIGN,":="),(WHERE,"where"),(ORDER,"order"),-             (BY,"by"),(ASCENDING,"ascending"),(DESCENDING,"descending"),(ELEMENT,"element"),-             (ATTRIBUTE,"attribute"),(STAG,"</"),(ETAG,"/>"),(SATISFIES,"satisfies"),(ATSIGN,"@"),-             (SLASH,"/"),(DECLARE,"declare"),(FUNCTION,"function"),(VARIABLE,"variable"),-  	     (INSERT,"insert"),(INTO,"into"),(DELETE,"delete"),(FROM,"from"),(REPLACE,"replace"),(WITH,"with"),-             (AT,"at"),(DOTS,".."),(DOT,"."),(SEMI,";"),(COLON,":"),(INSTANCE,"instance"),(OF,"of")]---parseError tk = error (case tk of-                         ((TError s):_) -> "Parse error: "++s-                         (TokenEOF:_) -> "Parse error: Unexpected end of file"-		         _ -> "Parse error: "++(foldr (\a r -> (printToken a)++" "++r) "" (init (take 11 tk))))---scan :: String -> [Token]-scan cs = lexer cs ""---xmlText :: String -> [Token]-xmlText "" = []-xmlText text = [XMLtext text]----- scans XML syntax and returns an XMLtext token with the text-xml :: String -> String -> String -> [Token]-xml ('{':cs) text n = (xmlText text)++(LSB : lexer cs ('{':n))-xml ('<':'/':cs) text n = (xmlText text)++(STAG : lexer cs ('<':'/':n))-xml ('<':'!':'-':cs) text n = xmlComment cs (text++"<!-") n-xml ('<':cs) text n = (xmlText text)++(TLT : lexer cs ('<':n))-xml ('(':':':cs) text n = xqComment cs text n-xml (c:cs) text n = xml cs (text++[c]) n-xml [] text _ = xmlText text---xqComment :: String -> String -> String -> [Token]-xqComment (':':')':cs) text n = xml cs text n-xqComment (_:cs) text n = xqComment cs text n-xqComment [] text _ = xmlText text---xmlComment :: String -> String -> String -> [Token]-xmlComment ('-':'>':cs) text n = xml cs (text++"->") n-xmlComment (c:cs) text n = xmlComment cs (text++[c]) n-xmlComment [] text _ = xmlText text---isQN :: Char -> Bool-isQN c = elem c "_-" || isDigit c || isAlpha c---isVar :: Char -> Bool-isVar c = elem c "_" || isDigit c || isAlpha c---inXML :: String -> Bool-inXML ('>':'<':_) = True-inXML _ = False----- the XQuery scanner-lexer :: String -> String -> [Token]-lexer [] "" = [ TokenEOF ]-lexer [] _ = [ TError "Unexpected end of input" ]-lexer (' ':'>':' ':cs) n = TGT : lexer cs n-lexer (c:cs) n-      | isSpace c = lexer cs n-      | isAlpha c = lexVar (c:cs) n-      | isDigit c = lexNum (c:cs) n-lexer ('$':c:cs) n | isAlpha c-      = let (var,rest) = span isVar (c:cs)-        in (Variable var) : lexer rest n-lexer (':':'=':cs) n = ASSIGN : lexer cs n-lexer ('<':'/':cs) n = STAG : lexer cs ('<':'/':n)-lexer ('<':'=':cs) n = TLE : lexer cs n-lexer ('>':'=':cs) n = TGE : lexer cs n-lexer ('<':'<':cs) n = PRE : lexer cs n-lexer ('>':'>':cs) n = POST : lexer cs n-lexer ('/':'>':cs) m = case m of-                         '<':n -> ETAG : (if inXML n then xml cs "" n else lexer cs n)-                         _ -> [ TError "Unexpected token: '/>'" ]-lexer ('(':':':cs) n = lexComment cs n-lexer ('<':'!':'-':cs) n = lexXmlComment cs "<!-" n-lexer ('.':'.':cs) n = DOTS : lexer cs n-lexer ('.':cs) n = DOT : lexer cs n-lexer ('!':'=':cs) n = TNE : lexer cs n-lexer ('\'':cs) n = lexString cs "" ('\'':n)-lexer ('\"':cs) n = lexString cs "" ('\"': n)-lexer ('[':cs) n = LB : lexer cs n-lexer (']':cs) n = RB : lexer cs n-lexer ('(':cs) n = LP : lexer cs n-lexer (')':cs) n = RP : lexer cs n-lexer ('}':cs) m = case m of-                     '{':'\"':n -> RSB : lexString cs "" ('\"':n)-                     '{':'\'':n -> RSB : lexString cs "" ('\'':n)-                     '{':n -> RSB : (if inXML n then xml cs "" n else lexer cs n)-                     _ -> [ TError "Unexpected token: '}'" ]-lexer ('+':cs) n = PLUS : lexer cs n-lexer ('-':cs) n = MINUS : lexer cs n-lexer ('*':cs) n = TIMES : lexer cs n-lexer ('=':cs) n = TEQ : lexer cs n-lexer ('<':c:cs) n = TLT : (lexer (c:cs) (if isAlpha c then ('<':n) else n))-lexer ('>':cs) m = case m of-                     '<':'/':'>':'<':n -> TGT : (if inXML n then xml cs "" n else lexer cs n)-                     '<':n -> TGT : xml cs "" ('>':m) -                     _ -> TGT : lexer cs m-lexer (',':cs) n = COMMA : lexer cs n-lexer ('@':cs) n = ATSIGN : lexer cs n-lexer ('?':cs) n = QMARK : lexer cs n-lexer ('/':cs) n = SLASH : lexer cs n-lexer ('{':cs) n = LSB : lexer cs ('{':n)-lexer ('|':cs) n = UNION : lexer cs n-lexer (';':cs) n = SEMI : lexer cs n-lexer (':':cs) n = COLON : lexer cs n-lexer (c:cs) n = TError ("Illegal character: '"++[c,'\'']) : lexer cs n---lexNum :: String -> String -> [Token]-lexNum cs n = if null rest || head rest /= '.'-                 then TInteger (read k) : lexer rest n-              else let (m,rest2) = span isDigit (tail rest)-                       val::Float = read (k++('.':m))-                   in case rest2 of-                        ('e':rest3) -> let (exp,rest4) = span isDigit rest3-                                       in (TFloat (val*10^(read exp))) : lexer rest4 n-                        _ -> (TFloat val) : lexer rest2 n-      where (k,rest) = span isDigit cs---lexString :: String -> String -> String -> [Token]-lexString ('\"':cs) s m = case m of-                            '\"':n -> (TString s) : (lexer cs n)-                            _ -> lexString cs (s++"\"") m-lexString ('\'':cs) s m = case m of-                            '\'':n -> (TString s) : (lexer cs n)-                            _ -> lexString cs (s++"\'") m--- a string in an attribute value must evaluate between {}-lexString ('{':cs) s (c:'<':n) = (TString s) : LSB : (lexer cs ('{':c:'<':n))-lexString ('\\':'n':cs) s n = lexString cs (s++['\n']) n-lexString ('\\':'r':cs) s n = lexString cs (s++['\r']) n-lexString (c:cs) s n = lexString cs (s++[c]) n-lexString [] s n = [ TError "End of input while in string" ]---lexComment :: String -> String -> [Token]-lexComment (':':')':cs) n = lexer cs n-lexComment (_:cs) n = lexComment cs n-lexComment [] n = [ TError "End of input while in comment" ]---lexXmlComment :: String -> String -> String -> [Token]-lexXmlComment ('-':'>':cs) text n = (xmlText (text++"->"))++(lexer cs n)-lexXmlComment (c:cs) text n = lexXmlComment cs (text++[c]) n-lexXmlComment [] text _ = xmlText text---lexVar :: String -> String -> [Token]-lexVar cs n =-    let (nm,rest) = span isQN cs-    in (case nm of-          "return" -> RETURN-          "some" -> SOME-          "every" -> EVERY-          "if" -> IF-          "then" -> THEN-          "else" -> ELSE-          "to" -> TO-          "div" -> DIV-          "idiv" -> IDIV-          "mod" -> MOD-          "and" -> AND-          "or" -> OR-          "not" -> NOT-          "union" -> UNION-          "intersect" -> INTERSECT-          "except" -> EXCEPT-          "for" -> FOR-          "let" -> LET-          "in" -> IN-          "as" -> AS-          "where" -> WHERE-          "order" -> ORDER-          "by" -> BY-          "ascending" -> ASCENDING-          "descending" -> DESCENDING-          "element" -> ELEMENT-          "attribute" -> ATTRIBUTE-          "satisfies" -> SATISFIES-          "declare" -> DECLARE-          "function" -> FUNCTION-          "variable" -> VARIABLE-          "at" -> AT-          "eq" -> SEQ-          "ne" -> SNE-          "lt" -> SLT-          "le" -> SLE-          "gt" -> SGT-          "ge" -> SGE-          "is" -> IS-	  "insert" -> INSERT-	  "into" -> INTO-	  "delete" -> DELETE-	  "from" -> FROM-	  "replace" -> REPLACE-	  "with" -> WITH-          "instance" -> INSTANCE-          "of" -> OF-          var -> QName var-       ) : lexer rest n+happyIn9 :: (Ast) -> (HappyAbsSyn )+happyIn9 x = unsafeCoerce# x+{-# INLINE happyIn9 #-}+happyOut9 :: (HappyAbsSyn ) -> (Ast)+happyOut9 x = unsafeCoerce# x+{-# INLINE happyOut9 #-}+happyIn10 :: (Ast) -> (HappyAbsSyn )+happyIn10 x = unsafeCoerce# x+{-# INLINE happyIn10 #-}+happyOut10 :: (HappyAbsSyn ) -> (Ast)+happyOut10 x = unsafeCoerce# x+{-# INLINE happyOut10 #-}+happyIn11 :: ([ Ast ]) -> (HappyAbsSyn )+happyIn11 x = unsafeCoerce# x+{-# INLINE happyIn11 #-}+happyOut11 :: (HappyAbsSyn ) -> ([ Ast ])+happyOut11 x = unsafeCoerce# x+{-# INLINE happyOut11 #-}+happyIn12 :: (Ast) -> (HappyAbsSyn )+happyIn12 x = unsafeCoerce# x+{-# INLINE happyIn12 #-}+happyOut12 :: (HappyAbsSyn ) -> (Ast)+happyOut12 x = unsafeCoerce# x+{-# INLINE happyOut12 #-}+happyIn13 :: (Ast) -> (HappyAbsSyn )+happyIn13 x = unsafeCoerce# x+{-# INLINE happyIn13 #-}+happyOut13 :: (HappyAbsSyn ) -> (Ast)+happyOut13 x = unsafeCoerce# x+{-# INLINE happyOut13 #-}+happyIn14 :: ([ Ast ]) -> (HappyAbsSyn )+happyIn14 x = unsafeCoerce# x+{-# INLINE happyIn14 #-}+happyOut14 :: (HappyAbsSyn ) -> ([ Ast ])+happyOut14 x = unsafeCoerce# x+{-# INLINE happyOut14 #-}+happyIn15 :: (Ast -> Ast) -> (HappyAbsSyn )+happyIn15 x = unsafeCoerce# x+{-# INLINE happyIn15 #-}+happyOut15 :: (HappyAbsSyn ) -> (Ast -> Ast)+happyOut15 x = unsafeCoerce# x+{-# INLINE happyOut15 #-}+happyIn16 :: (Ast -> Ast) -> (HappyAbsSyn )+happyIn16 x = unsafeCoerce# x+{-# INLINE happyIn16 #-}+happyOut16 :: (HappyAbsSyn ) -> (Ast -> Ast)+happyOut16 x = unsafeCoerce# x+{-# INLINE happyOut16 #-}+happyIn17 :: (Ast -> Ast) -> (HappyAbsSyn )+happyIn17 x = unsafeCoerce# x+{-# INLINE happyIn17 #-}+happyOut17 :: (HappyAbsSyn ) -> (Ast -> Ast)+happyOut17 x = unsafeCoerce# x+{-# INLINE happyOut17 #-}+happyIn18 :: (Ast -> Ast) -> (HappyAbsSyn )+happyIn18 x = unsafeCoerce# x+{-# INLINE happyIn18 #-}+happyOut18 :: (HappyAbsSyn ) -> (Ast -> Ast)+happyOut18 x = unsafeCoerce# x+{-# INLINE happyOut18 #-}+happyIn19 :: (( Ast -> Ast, Ast -> Ast )) -> (HappyAbsSyn )+happyIn19 x = unsafeCoerce# x+{-# INLINE happyIn19 #-}+happyOut19 :: (HappyAbsSyn ) -> (( Ast -> Ast, Ast -> Ast ))+happyOut19 x = unsafeCoerce# x+{-# INLINE happyOut19 #-}+happyIn20 :: (( [ Ast ], [ Ast ] )) -> (HappyAbsSyn )+happyIn20 x = unsafeCoerce# x+{-# INLINE happyIn20 #-}+happyOut20 :: (HappyAbsSyn ) -> (( [ Ast ], [ Ast ] ))+happyOut20 x = unsafeCoerce# x+{-# INLINE happyOut20 #-}+happyIn21 :: (Ast) -> (HappyAbsSyn )+happyIn21 x = unsafeCoerce# x+{-# INLINE happyIn21 #-}+happyOut21 :: (HappyAbsSyn ) -> (Ast)+happyOut21 x = unsafeCoerce# x+{-# INLINE happyOut21 #-}+happyIn22 :: (Ast) -> (HappyAbsSyn )+happyIn22 x = unsafeCoerce# x+{-# INLINE happyIn22 #-}+happyOut22 :: (HappyAbsSyn ) -> (Ast)+happyOut22 x = unsafeCoerce# x+{-# INLINE happyOut22 #-}+happyIn23 :: (Ast) -> (HappyAbsSyn )+happyIn23 x = unsafeCoerce# x+{-# INLINE happyIn23 #-}+happyOut23 :: (HappyAbsSyn ) -> (Ast)+happyOut23 x = unsafeCoerce# x+{-# INLINE happyOut23 #-}+happyIn24 :: ([ Ast ]) -> (HappyAbsSyn )+happyIn24 x = unsafeCoerce# x+{-# INLINE happyIn24 #-}+happyOut24 :: (HappyAbsSyn ) -> ([ Ast ])+happyOut24 x = unsafeCoerce# x+{-# INLINE happyOut24 #-}+happyIn25 :: ([ Ast ]) -> (HappyAbsSyn )+happyIn25 x = unsafeCoerce# x+{-# INLINE happyIn25 #-}+happyOut25 :: (HappyAbsSyn ) -> ([ Ast ])+happyOut25 x = unsafeCoerce# x+{-# INLINE happyOut25 #-}+happyIn26 :: (Ast) -> (HappyAbsSyn )+happyIn26 x = unsafeCoerce# x+{-# INLINE happyIn26 #-}+happyOut26 :: (HappyAbsSyn ) -> (Ast)+happyOut26 x = unsafeCoerce# x+{-# INLINE happyOut26 #-}+happyIn27 :: ([Ast]) -> (HappyAbsSyn )+happyIn27 x = unsafeCoerce# x+{-# INLINE happyIn27 #-}+happyOut27 :: (HappyAbsSyn ) -> ([Ast])+happyOut27 x = unsafeCoerce# x+{-# INLINE happyOut27 #-}+happyIn28 :: ([ Ast ]) -> (HappyAbsSyn )+happyIn28 x = unsafeCoerce# x+{-# INLINE happyIn28 #-}+happyOut28 :: (HappyAbsSyn ) -> ([ Ast ])+happyOut28 x = unsafeCoerce# x+{-# INLINE happyOut28 #-}+happyIn29 :: (Ast) -> (HappyAbsSyn )+happyIn29 x = unsafeCoerce# x+{-# INLINE happyIn29 #-}+happyOut29 :: (HappyAbsSyn ) -> (Ast)+happyOut29 x = unsafeCoerce# x+{-# INLINE happyOut29 #-}+happyIn30 :: (Ast -> Ast) -> (HappyAbsSyn )+happyIn30 x = unsafeCoerce# x+{-# INLINE happyIn30 #-}+happyOut30 :: (HappyAbsSyn ) -> (Ast -> Ast)+happyOut30 x = unsafeCoerce# x+{-# INLINE happyOut30 #-}+happyIn31 :: (Ast -> Ast) -> (HappyAbsSyn )+happyIn31 x = unsafeCoerce# x+{-# INLINE happyIn31 #-}+happyOut31 :: (HappyAbsSyn ) -> (Ast -> Ast)+happyOut31 x = unsafeCoerce# x+{-# INLINE happyOut31 #-}+happyIn32 :: ([ Ast ]) -> (HappyAbsSyn )+happyIn32 x = unsafeCoerce# x+{-# INLINE happyIn32 #-}+happyOut32 :: (HappyAbsSyn ) -> ([ Ast ])+happyOut32 x = unsafeCoerce# x+{-# INLINE happyOut32 #-}+happyIn33 :: (String -> Ast -> [ Ast ] -> Ast) -> (HappyAbsSyn )+happyIn33 x = unsafeCoerce# x+{-# INLINE happyIn33 #-}+happyOut33 :: (HappyAbsSyn ) -> (String -> Ast -> [ Ast ] -> Ast)+happyOut33 x = unsafeCoerce# x+{-# INLINE happyOut33 #-}+happyIn34 :: (String -> Ast -> Ast) -> (HappyAbsSyn )+happyIn34 x = unsafeCoerce# x+{-# INLINE happyIn34 #-}+happyOut34 :: (HappyAbsSyn ) -> (String -> Ast -> Ast)+happyOut34 x = unsafeCoerce# x+{-# INLINE happyOut34 #-}+happyIn35 :: (String -> Ast) -> (HappyAbsSyn )+happyIn35 x = unsafeCoerce# x+{-# INLINE happyIn35 #-}+happyOut35 :: (HappyAbsSyn ) -> (String -> Ast)+happyOut35 x = unsafeCoerce# x+{-# INLINE happyOut35 #-}+happyInTok :: (Token) -> (HappyAbsSyn )+happyInTok x = unsafeCoerce# x+{-# INLINE happyInTok #-}+happyOutTok :: (HappyAbsSyn ) -> (Token)+happyOutTok x = unsafeCoerce# x+{-# INLINE happyOutTok #-}+++happyActOffsets :: HappyAddr+happyActOffsets = HappyA# "\xfe\x00\xfe\x00\x5f\x00\xdc\x02\x25\x03\x00\x00\x44\x04\xca\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\xdb\x02\xdb\x02\x53\x01\xa9\x00\x53\x01\x53\x01\x53\x01\x00\x00\xb5\x02\x53\x01\x99\x02\x99\x02\x63\x00\x11\x00\xfb\xff\xac\x02\x4c\x01\x00\x00\x53\x01\xa2\x02\x53\x01\xe0\x02\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x02\x53\x01\xa4\x03\x53\x01\x88\x03\xa9\x02\x8d\x02\x41\x00\x00\x00\xd3\x02\xa5\x02\x53\x01\x9a\x02\xd1\x02\xa0\x02\x53\x01\xa8\x02\xa6\x02\x65\x00\xa3\x02\x00\x00\x94\x02\x00\x00\x00\x00\x44\x04\x6e\x00\x67\x00\x00\x00\x9d\x01\x47\x00\xe7\xff\x0c\x00\x53\x01\x00\x00\x15\x00\x00\x00\x9e\x02\x7b\x02\x7b\x02\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x53\x01\x43\x02\x61\x02\x5f\x02\x54\x00\x00\x00\xff\xff\x00\x00\x37\x02\x66\x00\x00\x00\x8c\x00\x8c\x00\x8c\x00\x81\x0a\x81\x0a\x81\x0a\xca\x03\x81\x0a\x28\x04\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x37\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x9e\x00\x99\x0a\x44\x04\x5c\x02\x5b\x02\x84\x02\x53\x02\x00\x00\xfc\xff\x53\x01\x13\x00\xfe\xff\x48\x02\x00\x00\x00\x00\x6a\x00\x47\x02\x00\x00\x53\x01\x51\x00\x2c\x02\x53\x01\x53\x01\x53\x01\x00\x00\x53\x01\x00\x00\x66\x02\x3e\x02\x53\x01\x26\x02\x26\x02\x53\x01\x04\x03\x6d\x02\x53\x01\x3b\x02\xe7\x02\x6b\x02\x53\x01\x0c\x00\x00\x00\x07\x00\x71\x00\x67\x02\x53\x01\x02\x04\x53\x01\x21\x02\x1e\x02\x02\x04\x02\x04\xfa\x01\x8c\x00\x53\x01\x00\x00\x00\x00\x11\x02\x69\x00\x00\x00\x1f\x02\x61\x00\x00\x00\x01\x02\xe6\x03\xdc\x01\xe0\x01\xe6\x03\xf5\x01\x05\x00\xe6\x03\xdf\x01\xe6\x03\xe6\x03\xed\xff\x00\x00\xfb\xff\x2e\x00\x00\x00\x00\x02\x00\x00\x00\x00\xd1\x01\x5a\x00\x00\x00\x53\x01\xad\x01\x00\x00\x00\x00\x53\x01\x53\x01\x0d\x00\x00\x00\x2f\x00\xdd\x01\xdb\x01\x00\x00\x00\x00\x00\x00\x00\x00\x37\x00\x25\x00\x00\x00\x00\x00\x00\x00\x97\x01\x00\x00\x00\x00\x00\x00\xe6\x03\x46\x03\xb6\x01\xca\x01\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xff\x00\x00\x99\x01\x53\x01\x54\x01\x53\x01\x00\x00\x05\x00\x53\x01\x53\x01\x53\x01\x00\x00\x53\x01\x00\x00\xe6\x03\x70\x01\x1b\x00\x77\x01\x00\x00\x8c\x00\x9e\x01\x8c\x00\x01\x00\x4b\x01\x53\x01\xfa\xff\xf9\xff\xe6\x03\xe6\x03\x00\x00\xb9\x01\x71\x01\xe6\x03\x94\x01\x00\x00\x94\x01\x00\x00\x00\x00\x53\x01\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x01\x8c\x01\x00\x00\x68\x01\x89\x01\x00\x00\x00\x00\x57\x01\x00\x00\x57\x01\x46\x03\x8a\x01\x53\x01\x00\x00\x00\x00\xe6\x03\x64\x01\x53\x01\x8c\x00\x00\x00\x53\x01\x42\x02\x84\x01\xa4\x02\x8c\x00\xe6\x03\x00\x00\x41\x01\x3f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x53\x01\x00\x00\x85\x01\x53\x01\x87\x02\x00\x00\xe6\x03\x00\x00"#++happyGotoOffsets :: HappyAddr+happyGotoOffsets = HappyA# "\xc2\x00\x17\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x75\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\x01\x00\x00\x15\x01\x0b\x01\x6f\x0a\xf4\x04\xdd\x04\x58\x0a\x41\x0a\x00\x00\x76\x01\x2a\x0a\x03\x01\xfb\x00\x74\x01\x72\x01\xf4\x00\x00\x00\x00\x00\x00\x00\x13\x0a\x00\x00\xfc\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x09\x00\x00\xce\x09\x00\x00\x6f\x01\x66\x01\x00\x00\x4f\x01\x00\x00\x61\x01\xb7\x09\x00\x00\x00\x00\x5a\x01\xa0\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x26\x01\xc6\x04\x00\x00\x0e\x00\x00\x00\x58\x01\xd9\x00\xdb\x00\x89\x09\x72\x09\x5b\x09\x44\x09\x2d\x09\x16\x09\xff\x08\xe8\x08\xd1\x08\xba\x08\xa3\x08\x8c\x08\x75\x08\x5e\x08\x47\x08\x30\x08\x19\x08\x02\x08\xeb\x07\xd4\x07\xbd\x07\xa6\x07\x8f\x07\x78\x07\x61\x07\x4a\x07\x33\x07\x1c\x07\x05\x07\x00\x00\x00\x00\x00\x00\xaf\x04\x00\x00\x5d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x01\x7b\x01\x67\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x01\x98\x04\x56\x01\x4e\x01\x49\x01\x00\x00\x00\x00\x00\x00\x21\x01\x00\x00\xee\x06\xe8\x00\x30\x01\xd7\x06\xc0\x06\xa9\x06\x00\x00\x92\x06\x00\x00\x00\x00\x33\x01\x7b\x06\x29\x01\x27\x01\x64\x06\x00\x00\x00\x00\x81\x04\x00\x00\x00\x00\x00\x00\x6a\x04\x01\x01\x00\x00\x23\x01\x00\x00\x00\x00\x4d\x06\x00\x00\x36\x06\x00\x00\x0d\x01\x00\x00\x00\x00\x98\x00\x55\x01\x1f\x06\x00\x00\x00\x00\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x01\xd4\x00\xc9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x03\x07\x01\x00\x00\x00\x00\x2f\x03\x08\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7e\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\xb2\x00\xd0\x00\x00\x00\xf1\x05\xe1\x00\xda\x05\x00\x00\xdf\x00\xc3\x05\xac\x05\xcf\x02\x00\x00\x69\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x48\x01\x00\x00\x38\x01\x00\x00\xd2\x00\x95\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x7e\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x00\x00\x75\x00\x96\x00\x00\x00\x67\x05\x00\x00\x00\x00\x00\x00\x00\x00\x50\x05\xc3\x00\x00\x00\x39\x05\x0b\x00\x00\x00\x00\x00\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x05\x00\x00\x00\x00\x0b\x05\x00\x00\x00\x00\x00\x00\x00\x00"#++happyDefActions :: HappyAddr+happyDefActions = HappyA# "\x00\x00\x00\x00\x00\x00\xfd\xff\x6c\xff\x69\xff\xf9\xff\x9d\xff\xd4\xff\xd5\xff\x00\x00\xb0\xff\x82\xff\xd6\xff\x6f\xff\x6e\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\xff\x00\x00\x68\xff\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xff\xaf\xff\xae\xff\x81\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xff\x00\x00\x00\x00\x00\x00\xf4\xff\x00\x00\x00\x00\x00\x00\x00\x00\xa7\xff\x00\x00\xa8\xff\xb1\xff\x8c\xff\xb2\xff\xb3\xff\xaa\xff\x00\x00\x00\x00\x66\xff\x00\x00\x00\x00\x00\x00\x7b\xff\x00\x00\x7f\xff\x00\x00\x91\xff\x9b\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\xff\x00\x00\xfe\xff\xfb\xff\x00\x00\x64\xff\x00\x00\x00\x00\x00\x00\xb8\xff\xb9\xff\xba\xff\xbb\xff\xbc\xff\xbd\xff\xbe\xff\xbf\xff\xc0\xff\xc1\xff\xc2\xff\xc3\xff\xc4\xff\xc5\xff\xc6\xff\xc7\xff\xc8\xff\xc9\xff\xca\xff\xcb\xff\xcc\xff\xcd\xff\xce\xff\xcf\xff\xd0\xff\xd1\xff\xd2\xff\xd3\xff\x9e\xff\xa5\xff\xa6\xff\x00\x00\x00\x00\x87\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\xff\x89\xff\x00\x00\x79\xff\x77\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x67\xff\x00\x00\x80\xff\x00\x00\x8b\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\xff\xf3\xff\x00\x00\x00\x00\x00\x00\x00\x00\xac\xff\x00\x00\x00\x00\x00\x00\xab\xff\xad\xff\x00\x00\x00\x00\x00\x00\x6b\xff\x6a\xff\x78\xff\x00\x00\x94\xff\x00\x00\x00\x00\x95\xff\x00\x00\xa0\xff\x00\x00\x00\x00\xa4\xff\x00\x00\x00\x00\xa9\xff\x00\x00\xd8\xff\xd9\xff\x00\x00\x6f\xff\x00\x00\x00\x00\x71\xff\x00\x00\x76\xff\x7e\xff\x00\x00\x00\x00\x83\xff\x00\x00\x00\x00\x84\xff\x85\xff\x00\x00\x00\x00\xee\xff\xb7\xff\xea\xff\x00\x00\x00\x00\xb6\xff\xb5\xff\x65\xff\xfa\xff\x00\x00\x00\x00\xe9\xff\xe8\xff\xe7\xff\x00\x00\xed\xff\xec\xff\xeb\xff\xda\xff\x96\xff\x9c\xff\x00\x00\x00\x00\x8a\xff\x92\xff\x70\xff\x6f\xff\x00\x00\x6f\xff\x75\xff\x00\x00\x00\x00\x00\x00\x7d\xff\x00\x00\x00\x00\x00\x00\x00\x00\x8e\xff\x00\x00\x8d\xff\xf8\xff\x00\x00\x00\x00\xf2\xff\xb4\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\xff\xa3\xff\x7c\xff\xd7\xff\x00\x00\xa2\xff\x74\xff\x6f\xff\x73\xff\x86\xff\x93\xff\x00\x00\x9a\xff\x98\xff\x97\xff\xe4\xff\xe0\xff\x00\x00\xe6\xff\xe1\xff\x00\x00\xe5\xff\xe2\xff\x00\x00\xe3\xff\x00\x00\x96\xff\x72\xff\x00\x00\x90\xff\x8f\xff\xf7\xff\xf0\xff\x00\x00\x00\x00\xf1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa1\xff\x99\xff\xde\xff\xdf\xff\xdd\xff\xdc\xff\xef\xff\xf6\xff\x00\x00\x62\xff\x00\x00\x00\x00\x00\x00\xf5\xff\x63\xff"#++happyCheck :: HappyAddr+happyCheck = HappyA# "\xff\xff\x02\x00\x03\x00\x04\x00\x09\x00\x0c\x00\x0c\x00\x0b\x00\x09\x00\x0b\x00\x0b\x00\x10\x00\x0b\x00\x0e\x00\x0f\x00\x10\x00\x0b\x00\x0b\x00\x16\x00\x07\x00\x2d\x00\x16\x00\x09\x00\x10\x00\x2b\x00\x03\x00\x09\x00\x0e\x00\x0b\x00\x10\x00\x0b\x00\x38\x00\x0b\x00\x13\x00\x14\x00\x15\x00\x25\x00\x0a\x00\x2d\x00\x2d\x00\x29\x00\x2a\x00\x1f\x00\x16\x00\x3f\x00\x2c\x00\x18\x00\x0a\x00\x34\x00\x35\x00\x36\x00\x34\x00\x35\x00\x10\x00\x3b\x00\x09\x00\x39\x00\x3b\x00\x3b\x00\x3c\x00\x41\x00\x0e\x00\x10\x00\x10\x00\x41\x00\x0a\x00\x3b\x00\x44\x00\x45\x00\x46\x00\x3a\x00\x10\x00\x2d\x00\x34\x00\x35\x00\x36\x00\x3b\x00\x52\x00\x3b\x00\x53\x00\x51\x00\x52\x00\x56\x00\x54\x00\x55\x00\x56\x00\x02\x00\x03\x00\x04\x00\x4c\x00\x09\x00\x56\x00\x56\x00\x09\x00\x0a\x00\x0b\x00\x3b\x00\x10\x00\x0e\x00\x0f\x00\x10\x00\x0c\x00\x0c\x00\x39\x00\x53\x00\x3b\x00\x16\x00\x56\x00\x09\x00\x0c\x00\x0b\x00\x41\x00\x0a\x00\x0a\x00\x3b\x00\x03\x00\x2d\x00\x0c\x00\x0c\x00\x07\x00\x03\x00\x25\x00\x0c\x00\x4c\x00\x3b\x00\x29\x00\x2a\x00\x38\x00\x52\x00\x03\x00\x03\x00\x18\x00\x43\x00\x07\x00\x2d\x00\x2d\x00\x34\x00\x35\x00\x39\x00\x3a\x00\x3b\x00\x39\x00\x2d\x00\x3b\x00\x2b\x00\x40\x00\x41\x00\x2d\x00\x2d\x00\x41\x00\x2d\x00\x2d\x00\x44\x00\x45\x00\x46\x00\x2d\x00\x04\x00\x2c\x00\x3b\x00\x2e\x00\x08\x00\x42\x00\x37\x00\x52\x00\x3f\x00\x51\x00\x52\x00\x11\x00\x54\x00\x55\x00\x56\x00\x02\x00\x03\x00\x04\x00\x10\x00\x11\x00\x12\x00\x13\x00\x09\x00\x0a\x00\x0b\x00\x03\x00\x57\x00\x0e\x00\x0f\x00\x10\x00\x08\x00\x03\x00\x1c\x00\x05\x00\x06\x00\x16\x00\x34\x00\x35\x00\x00\x00\x01\x00\x02\x00\x03\x00\x03\x00\x3b\x00\x05\x00\x06\x00\x08\x00\x09\x00\x03\x00\x0b\x00\x25\x00\x1d\x00\x1e\x00\x08\x00\x29\x00\x2a\x00\x12\x00\x13\x00\x14\x00\x03\x00\x16\x00\x17\x00\x08\x00\x19\x00\x08\x00\x34\x00\x35\x00\x1d\x00\x1e\x00\x08\x00\x39\x00\x08\x00\x3b\x00\x0c\x00\x1d\x00\x1e\x00\x0d\x00\x08\x00\x41\x00\x03\x00\x1c\x00\x44\x00\x45\x00\x46\x00\x08\x00\x1d\x00\x1e\x00\x29\x00\x2a\x00\x16\x00\x17\x00\x03\x00\x1c\x00\x2f\x00\x51\x00\x52\x00\x08\x00\x54\x00\x55\x00\x56\x00\x02\x00\x03\x00\x04\x00\x08\x00\x11\x00\x1d\x00\x1e\x00\x09\x00\x0d\x00\x0b\x00\x03\x00\x08\x00\x0e\x00\x0f\x00\x10\x00\x0c\x00\x1b\x00\x1d\x00\x1e\x00\x08\x00\x16\x00\x16\x00\x17\x00\x0c\x00\x01\x00\x02\x00\x03\x00\x1a\x00\x1b\x00\x08\x00\x1c\x00\x08\x00\x09\x00\x0c\x00\x0b\x00\x25\x00\x13\x00\x14\x00\x03\x00\x29\x00\x2a\x00\x12\x00\x13\x00\x14\x00\x1f\x00\x16\x00\x17\x00\x08\x00\x19\x00\x08\x00\x34\x00\x35\x00\x1d\x00\x1e\x00\x03\x00\x39\x00\x08\x00\x3b\x00\x3c\x00\x03\x00\x1b\x00\x05\x00\x06\x00\x41\x00\x1a\x00\x1b\x00\x44\x00\x45\x00\x46\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x03\x00\x03\x00\x05\x00\x06\x00\x51\x00\x52\x00\x03\x00\x54\x00\x55\x00\x56\x00\x02\x00\x03\x00\x04\x00\x03\x00\x03\x00\x05\x00\x06\x00\x09\x00\x03\x00\x0b\x00\x02\x00\x03\x00\x0e\x00\x0f\x00\x10\x00\x03\x00\x08\x00\x09\x00\x0f\x00\x0b\x00\x16\x00\x03\x00\x1c\x00\x05\x00\x06\x00\x08\x00\x12\x00\x13\x00\x14\x00\x03\x00\x16\x00\x17\x00\x03\x00\x19\x00\x03\x00\x25\x00\x03\x00\x1d\x00\x1e\x00\x29\x00\x2a\x00\x03\x00\x1c\x00\x05\x00\x06\x00\x03\x00\x0e\x00\x05\x00\x06\x00\x01\x00\x34\x00\x35\x00\x3d\x00\x3e\x00\x4c\x00\x39\x00\x4c\x00\x3b\x00\x0b\x00\x2c\x00\x07\x00\x3b\x00\x0a\x00\x41\x00\x2d\x00\x0a\x00\x44\x00\x45\x00\x46\x00\x2d\x00\x07\x00\x2b\x00\x52\x00\x2e\x00\x01\x00\x07\x00\x0a\x00\x05\x00\x2c\x00\x51\x00\x52\x00\x52\x00\x54\x00\x55\x00\x56\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\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\x18\x00\x2d\x00\x09\x00\x06\x00\x09\x00\x4a\x00\x3b\x00\x18\x00\x4d\x00\x4e\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\x08\x00\x14\x00\x2e\x00\x2b\x00\x0b\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\x4a\x00\x0b\x00\x0a\x00\x4d\x00\x4e\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\x4a\x00\x3a\x00\x52\x00\x4d\x00\x4e\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\x4a\x00\x03\x00\x4f\x00\x4d\x00\x4e\x00\x09\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0a\x00\x3b\x00\x0a\x00\x52\x00\x3b\x00\x14\x00\x12\x00\x13\x00\x14\x00\x52\x00\x16\x00\x17\x00\x3a\x00\x19\x00\x3b\x00\x31\x00\x01\x00\x1d\x00\x1e\x00\x2d\x00\x2d\x00\x53\x00\x2c\x00\x4a\x00\x2c\x00\x4b\x00\x4d\x00\x4e\x00\x4f\x00\x50\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\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\x52\x00\x30\x00\x3b\x00\x2d\x00\x4a\x00\x03\x00\x2d\x00\x4d\x00\x4e\x00\x2e\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x3b\x00\x0b\x00\x43\x00\x0b\x00\x52\x00\x3b\x00\x12\x00\x13\x00\x14\x00\x3b\x00\x16\x00\x17\x00\x58\x00\x19\x00\x09\x00\x48\x00\x52\x00\x1d\x00\x1e\x00\x4a\x00\x43\x00\x3b\x00\x4d\x00\x4e\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\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\x52\x00\x09\x00\x53\x00\xff\xff\x4a\x00\x03\x00\xff\xff\x4d\x00\x4e\x00\xff\xff\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\x00\x4a\x00\xff\xff\xff\xff\x4d\x00\x4e\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\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\x0a\x00\x0b\x00\x32\x00\x33\x00\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\x4e\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\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\xff\xff\xff\xff\x47\x00\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\x4e\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\x49\x00\x4a\x00\x25\x00\xff\xff\x4d\x00\x4e\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\x4e\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\x4a\x00\x25\x00\xff\xff\x4d\x00\x4e\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\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\x09\x00\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\xff\xff\x4a\x00\xff\xff\xff\xff\x4d\x00\x4e\x00\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\x03\x00\xff\xff\xff\xff\x1d\x00\x1e\x00\x08\x00\x09\x00\xff\xff\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x00\x13\x00\x14\x00\xff\xff\x16\x00\x17\x00\xff\xff\x19\x00\xff\xff\xff\xff\xff\xff\x1d\x00\x1e\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#++happyTable :: HappyAddr+happyTable = HappyA# "\x00\x00\x11\x00\x12\x00\x13\x00\x14\x00\x44\x01\x45\x01\xeb\x00\x14\x00\x36\x00\x15\x00\x18\x00\x48\x01\x16\x00\x17\x00\x18\x00\x15\x00\x4b\x00\x19\x00\xa8\x00\xaa\x00\x19\x00\xff\x00\xce\x00\x0f\x01\xb0\x00\x35\x00\x00\x01\x36\x00\x01\x01\x3a\x00\xab\x00\x9f\x00\x9c\x00\x0a\x00\x9d\x00\x1a\x00\x22\x01\xaf\x00\xaf\x00\x1b\x00\x1c\x00\x58\x01\x19\x00\x10\x01\x49\x01\xb1\x00\x39\x01\xa0\x00\xa1\x00\xec\x00\x1d\x00\x1e\x00\x3a\x01\x20\x00\x14\x00\x1f\x00\x37\x00\x20\x00\x21\x00\x22\x00\xfc\x00\x18\x00\xfd\x00\x22\x00\x3c\x01\x37\x00\x23\x00\x24\x00\x25\x00\xa9\x00\x3a\x01\x23\x01\xa0\x00\xa1\x00\xa2\x00\x37\x00\x27\x00\x37\x00\xed\x00\x26\x00\x27\x00\xee\x00\x28\x00\x29\x00\x2a\x00\x11\x00\x12\x00\x13\x00\x02\x01\x14\x00\x2a\x00\x4c\x00\x14\x00\x78\x00\x15\x00\x37\x00\x18\x00\x16\x00\x17\x00\x18\x00\x30\x01\x08\x01\x0c\x01\xa3\x00\x20\x00\x19\x00\xa4\x00\x39\x00\x17\x01\x3a\x00\x22\x00\xf8\x00\xae\x00\x37\x00\x36\x01\xaa\x00\x19\x01\xe7\x00\x37\x01\x51\x01\x1a\x00\xb0\x00\xfe\x00\xbf\x00\x1b\x00\x1c\x00\xac\x00\x27\x00\x36\x01\x52\x01\x4d\x00\xc0\x00\x3a\x01\xaf\x00\xaf\x00\x1d\x00\x1e\x00\xe2\x00\xe3\x00\x20\x00\x1f\x00\xaf\x00\x20\x00\xb3\x00\xe4\x00\x22\x00\xaf\x00\xaf\x00\x22\x00\xaf\x00\xaf\x00\x23\x00\x24\x00\x25\x00\xaf\x00\x1b\x01\xcb\x00\x37\x00\xcc\x00\x1c\x01\x74\x00\x4e\x00\x27\x00\xb4\x00\x26\x00\x27\x00\x50\x01\x28\x00\x29\x00\x2a\x00\x11\x00\x12\x00\x13\x00\x56\x00\x57\x00\x58\x00\x59\x00\x14\x00\x46\x00\x15\x00\x04\x00\x75\x00\x16\x00\x17\x00\x18\x00\x05\x00\xf0\x00\x41\x01\x55\x01\xf2\x00\x19\x00\xf4\x00\xf5\x00\x2a\x00\x02\x00\x03\x00\x04\x00\xf0\x00\x37\x00\x4c\x01\xf2\x00\x05\x00\x06\x00\x04\x00\x07\x00\x1a\x00\x2d\x01\x0f\x00\x05\x00\x1b\x00\x1c\x00\x08\x00\x09\x00\x0a\x00\x04\x00\x0b\x00\x0c\x00\x46\x01\x0d\x00\x05\x00\x1d\x00\x1e\x00\x0e\x00\x0f\x00\x3c\x00\x1f\x00\x3a\x00\x20\x00\x99\x00\x0a\x01\x0f\x00\x98\x00\x2a\x01\x22\x00\x04\x00\x2c\x01\x23\x00\x24\x00\x25\x00\x05\x00\x0c\x01\x0f\x00\x50\x00\x51\x00\x28\x01\x0c\x00\x04\x00\x2e\x01\x52\x00\x26\x00\x27\x00\x05\x00\x28\x00\x29\x00\x2a\x00\x11\x00\x12\x00\x13\x00\x3a\x00\x32\x01\xe0\x00\x0f\x00\x14\x00\x3b\x00\x15\x00\x05\x01\x3c\x00\x16\x00\x17\x00\x18\x00\x3d\x00\xe5\x00\x32\x00\x0f\x00\x3c\x00\x19\x00\x11\x01\x0c\x00\x47\x00\x02\x00\x03\x00\x04\x00\xce\x00\xa6\x00\x3c\x00\x0d\x01\x05\x00\x06\x00\x48\x00\x07\x00\x1a\x00\xe9\x00\x0a\x00\xcc\x00\x1b\x00\x1c\x00\x08\x00\x09\x00\x0a\x00\x1d\x01\x0b\x00\x0c\x00\xd6\x00\x0d\x00\xd7\x00\x1d\x00\x1e\x00\x0e\x00\x0f\x00\xd9\x00\x1f\x00\xdf\x00\x20\x00\x21\x00\xf0\x00\xe5\x00\x49\x01\xf2\x00\x22\x00\xa5\x00\xa6\x00\x23\x00\x24\x00\x25\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\xf0\x00\xe7\x00\x1f\x01\xf2\x00\x26\x00\x27\x00\x33\x00\x28\x00\x29\x00\x2a\x00\x11\x00\x12\x00\x13\x00\xf0\x00\x37\x00\x1a\x01\xf2\x00\x14\x00\xb7\x00\x15\x00\x75\x00\x04\x00\x16\x00\x17\x00\x18\x00\xbb\x00\x05\x00\x06\x00\x9a\x00\x07\x00\x19\x00\xf0\x00\xbd\x00\xf1\x00\xf2\x00\xc0\x00\x08\x00\x09\x00\x0a\x00\xc1\x00\x0b\x00\x0c\x00\x33\x00\x0d\x00\x37\x00\x1a\x00\x3f\x00\x0e\x00\x0f\x00\x1b\x00\x1c\x00\xf0\x00\x49\x00\xf5\x00\xf2\x00\xf0\x00\x4e\x00\xf6\x00\xf2\x00\x5b\x01\x1d\x00\x1e\x00\x30\x00\x31\x00\x54\x01\x1f\x00\x55\x01\x20\x00\x58\x01\x4f\x01\xa8\x00\x37\x00\x3d\x01\x22\x00\x3e\x01\x3f\x01\x23\x00\x24\x00\x25\x00\x40\x01\xa8\x00\x43\x01\x27\x00\x24\x01\x4b\x01\xa8\x00\x36\x01\xad\x00\x21\x01\x26\x00\x27\x00\x27\x00\x28\x00\x29\x00\x2a\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\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\x31\x01\x32\x01\xfa\x00\x11\x01\xfb\x00\x6f\x00\x37\x00\x09\x01\x70\x00\x71\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\x0a\x01\x13\x01\x15\x01\x14\x01\x16\x01\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\x18\x01\xc7\x00\x70\x00\x71\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\xa9\x00\x27\x00\x70\x00\x71\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\x04\x00\x1f\x01\x70\x00\x71\x00\xca\x00\x05\x00\x42\x00\x24\x01\x07\x00\xd1\x00\xbf\x00\xd4\x00\x27\x00\x37\x00\xdb\x00\x08\x00\x09\x00\x0a\x00\x27\x00\x0b\x00\x0c\x00\xa9\x00\x0d\x00\x37\x00\xef\x00\xf0\x00\x0e\x00\x0f\x00\xaa\x00\xb5\x00\xf9\x00\x79\x00\x6f\x00\x7a\x00\x7b\x00\x70\x00\x71\x00\x1f\x01\x5a\x01\x5d\x01\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\x57\x01\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\x27\x00\x9c\x00\x37\x00\xaa\x00\x6f\x00\x04\x00\xb5\x00\x70\x00\x71\x00\xb6\x00\x05\x00\x42\x00\x25\x01\x07\x00\x37\x00\xb9\x00\xba\x00\xbd\x00\x27\x00\x37\x00\x08\x00\x09\x00\x0a\x00\x37\x00\x0b\x00\x0c\x00\xff\xff\x0d\x00\x2c\x00\x2e\x00\x27\x00\x0e\x00\x0f\x00\x6f\x00\x32\x00\x37\x00\x70\x00\x71\x00\xd2\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\xd5\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\x27\x00\x72\x00\x73\x00\x00\x00\x6f\x00\x04\x00\x00\x00\x70\x00\x71\x00\x00\x00\x05\x00\x03\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x01\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x6f\x00\x00\x00\x00\x00\x70\x00\x71\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x42\x00\x06\x01\x07\x00\x34\x01\x35\x01\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x70\x00\x71\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\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\x00\x00\x00\x00\xc3\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x70\x00\x71\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\xc5\x00\x6f\x00\x00\x00\x00\x00\x70\x00\x71\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x70\x00\x71\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\x00\x00\x6b\x00\x00\x00\x00\x00\x00\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x42\x00\xcf\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x42\x00\xd2\x00\x07\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x70\x00\x71\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x42\x00\xe8\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x42\x00\x76\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x42\x00\xa4\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x42\x00\x43\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x42\x00\x44\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x5d\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x5b\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x4b\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x4d\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x4f\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x40\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x45\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x26\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x27\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x29\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x2b\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x02\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x19\x01\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xc7\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xc8\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xd5\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xd8\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xdb\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xdc\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xdd\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xde\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xe4\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x7b\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x7c\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x7d\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x7e\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x7f\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x80\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x81\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x82\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x83\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x84\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x85\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x86\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x87\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x88\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x89\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x8a\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x8b\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x8c\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x8d\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x8e\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x8f\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x90\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x91\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x92\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x93\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x94\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x95\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x96\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x97\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xb6\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xba\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xc3\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\xc5\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x2c\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x2e\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x3e\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x40\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x41\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x04\x00\x00\x00\x00\x00\x0e\x00\x0f\x00\x05\x00\x46\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x09\x00\x0a\x00\x00\x00\x0b\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0f\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#++happyReduceArr = array (1, 157) [+	(1 , happyReduce_1),+	(2 , happyReduce_2),+	(3 , happyReduce_3),+	(4 , happyReduce_4),+	(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),+	(18 , happyReduce_18),+	(19 , happyReduce_19),+	(20 , happyReduce_20),+	(21 , happyReduce_21),+	(22 , happyReduce_22),+	(23 , happyReduce_23),+	(24 , happyReduce_24),+	(25 , happyReduce_25),+	(26 , happyReduce_26),+	(27 , happyReduce_27),+	(28 , happyReduce_28),+	(29 , happyReduce_29),+	(30 , happyReduce_30),+	(31 , happyReduce_31),+	(32 , happyReduce_32),+	(33 , happyReduce_33),+	(34 , happyReduce_34),+	(35 , happyReduce_35),+	(36 , happyReduce_36),+	(37 , happyReduce_37),+	(38 , happyReduce_38),+	(39 , happyReduce_39),+	(40 , happyReduce_40),+	(41 , happyReduce_41),+	(42 , happyReduce_42),+	(43 , happyReduce_43),+	(44 , happyReduce_44),+	(45 , happyReduce_45),+	(46 , happyReduce_46),+	(47 , happyReduce_47),+	(48 , happyReduce_48),+	(49 , happyReduce_49),+	(50 , happyReduce_50),+	(51 , happyReduce_51),+	(52 , happyReduce_52),+	(53 , happyReduce_53),+	(54 , happyReduce_54),+	(55 , happyReduce_55),+	(56 , happyReduce_56),+	(57 , happyReduce_57),+	(58 , happyReduce_58),+	(59 , happyReduce_59),+	(60 , happyReduce_60),+	(61 , happyReduce_61),+	(62 , happyReduce_62),+	(63 , happyReduce_63),+	(64 , happyReduce_64),+	(65 , happyReduce_65),+	(66 , happyReduce_66),+	(67 , happyReduce_67),+	(68 , happyReduce_68),+	(69 , happyReduce_69),+	(70 , happyReduce_70),+	(71 , happyReduce_71),+	(72 , happyReduce_72),+	(73 , happyReduce_73),+	(74 , happyReduce_74),+	(75 , happyReduce_75),+	(76 , happyReduce_76),+	(77 , happyReduce_77),+	(78 , happyReduce_78),+	(79 , happyReduce_79),+	(80 , happyReduce_80),+	(81 , happyReduce_81),+	(82 , happyReduce_82),+	(83 , happyReduce_83),+	(84 , happyReduce_84),+	(85 , happyReduce_85),+	(86 , happyReduce_86),+	(87 , happyReduce_87),+	(88 , happyReduce_88),+	(89 , happyReduce_89),+	(90 , happyReduce_90),+	(91 , happyReduce_91),+	(92 , happyReduce_92),+	(93 , happyReduce_93),+	(94 , happyReduce_94),+	(95 , happyReduce_95),+	(96 , happyReduce_96),+	(97 , happyReduce_97),+	(98 , happyReduce_98),+	(99 , happyReduce_99),+	(100 , happyReduce_100),+	(101 , happyReduce_101),+	(102 , happyReduce_102),+	(103 , happyReduce_103),+	(104 , happyReduce_104),+	(105 , happyReduce_105),+	(106 , happyReduce_106),+	(107 , happyReduce_107),+	(108 , happyReduce_108),+	(109 , happyReduce_109),+	(110 , happyReduce_110),+	(111 , happyReduce_111),+	(112 , happyReduce_112),+	(113 , happyReduce_113),+	(114 , happyReduce_114),+	(115 , happyReduce_115),+	(116 , happyReduce_116),+	(117 , happyReduce_117),+	(118 , happyReduce_118),+	(119 , happyReduce_119),+	(120 , happyReduce_120),+	(121 , happyReduce_121),+	(122 , happyReduce_122),+	(123 , happyReduce_123),+	(124 , happyReduce_124),+	(125 , happyReduce_125),+	(126 , happyReduce_126),+	(127 , happyReduce_127),+	(128 , happyReduce_128),+	(129 , happyReduce_129),+	(130 , happyReduce_130),+	(131 , happyReduce_131),+	(132 , happyReduce_132),+	(133 , happyReduce_133),+	(134 , happyReduce_134),+	(135 , happyReduce_135),+	(136 , happyReduce_136),+	(137 , happyReduce_137),+	(138 , happyReduce_138),+	(139 , happyReduce_139),+	(140 , happyReduce_140),+	(141 , happyReduce_141),+	(142 , happyReduce_142),+	(143 , happyReduce_143),+	(144 , happyReduce_144),+	(145 , happyReduce_145),+	(146 , happyReduce_146),+	(147 , happyReduce_147),+	(148 , happyReduce_148),+	(149 , happyReduce_149),+	(150 , happyReduce_150),+	(151 , happyReduce_151),+	(152 , happyReduce_152),+	(153 , happyReduce_153),+	(154 , happyReduce_154),+	(155 , happyReduce_155),+	(156 , happyReduce_156),+	(157 , happyReduce_157)+	]++happy_n_terms = 89 :: Int+happy_n_nonterms = 32 :: Int++happyReduce_1 = happySpecReduce_2  0# happyReduction_1+happyReduction_1 happy_x_2+	happy_x_1+	 =  case happyOut5 happy_x_1 of { happy_var_1 -> +	happyIn4+		 (happy_var_1+	)}++happyReduce_2 = happySpecReduce_1  1# happyReduction_2+happyReduction_2 happy_x_1+	 =  case happyOut6 happy_x_1 of { happy_var_1 -> +	happyIn5+		 ([happy_var_1]+	)}++happyReduce_3 = happySpecReduce_2  1# happyReduction_3+happyReduction_3 happy_x_2+	happy_x_1+	 =  case happyOut6 happy_x_1 of { happy_var_1 -> +	happyIn5+		 ([happy_var_1]+	)}++happyReduce_4 = happySpecReduce_3  1# happyReduction_4+happyReduction_4 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut5 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_3 of { happy_var_3 -> +	happyIn5+		 (happy_var_1++[happy_var_3]+	)}}++happyReduce_5 = happyReduce 4# 1# happyReduction_5+happyReduction_5 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut5 happy_x_1 of { happy_var_1 -> +	case happyOut6 happy_x_3 of { happy_var_3 -> +	happyIn5+		 (happy_var_1++[happy_var_3]+	) `HappyStk` happyRest}}++happyReduce_6 = happySpecReduce_1  2# happyReduction_6+happyReduction_6 happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	happyIn6+		 (happy_var_1+	)}++happyReduce_7 = happyReduce 5# 2# happyReduction_7+happyReduction_7 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut12 happy_x_3 of { happy_var_3 -> +	case happyOut13 happy_x_5 of { happy_var_5 -> +	happyIn6+		 (Ast "variable" [happy_var_3,happy_var_5]+	) `HappyStk` happyRest}}++happyReduce_8 = happyReduce 7# 2# happyReduction_8+happyReduction_8 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut12 happy_x_3 of { happy_var_3 -> +	case happyOut13 happy_x_7 of { happy_var_7 -> +	happyIn6+		 (Ast "variable" [happy_var_3,happy_var_7]+	) `HappyStk` happyRest}}++happyReduce_9 = happyReduce 9# 2# happyReduction_9+happyReduction_9 (happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut7 happy_x_3 of { happy_var_3 -> +	case happyOut8 happy_x_5 of { happy_var_5 -> +	case happyOut13 happy_x_8 of { happy_var_8 -> +	happyIn6+		 (Ast "function" ([Avar happy_var_3,happy_var_8]++happy_var_5)+	) `HappyStk` happyRest}}}++happyReduce_10 = happyReduce 11# 2# happyReduction_10+happyReduction_10 (happy_x_11 `HappyStk`+	happy_x_10 `HappyStk`+	happy_x_9 `HappyStk`+	happy_x_8 `HappyStk`+	happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut7 happy_x_3 of { happy_var_3 -> +	case happyOut8 happy_x_5 of { happy_var_5 -> +	case happyOut13 happy_x_10 of { happy_var_10 -> +	happyIn6+		 (Ast "function" ([Avar happy_var_3,happy_var_10]++happy_var_5)+	) `HappyStk` happyRest}}}++happyReduce_11 = happySpecReduce_1  3# happyReduction_11+happyReduction_11 happy_x_1+	 =  case happyOutTok happy_x_1 of { (QName happy_var_1) -> +	happyIn7+		 (happy_var_1+	)}++happyReduce_12 = happySpecReduce_3  3# happyReduction_12+happyReduction_12 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOutTok happy_x_1 of { (QName happy_var_1) -> +	case happyOutTok happy_x_3 of { (QName happy_var_3) -> +	happyIn7+		 (happy_var_1++":"++happy_var_3+	)}}++happyReduce_13 = happySpecReduce_1  4# happyReduction_13+happyReduction_13 happy_x_1+	 =  case happyOut12 happy_x_1 of { happy_var_1 -> +	happyIn8+		 ([happy_var_1]+	)}++happyReduce_14 = happySpecReduce_3  4# happyReduction_14+happyReduction_14 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut12 happy_x_1 of { happy_var_1 -> +	happyIn8+		 ([happy_var_1]+	)}++happyReduce_15 = happySpecReduce_3  4# happyReduction_15+happyReduction_15 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut8 happy_x_1 of { happy_var_1 -> +	case happyOut12 happy_x_3 of { happy_var_3 -> +	happyIn8+		 (happy_var_1++[happy_var_3]+	)}}++happyReduce_16 = happyReduce 5# 4# happyReduction_16+happyReduction_16 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut8 happy_x_1 of { happy_var_1 -> +	case happyOut12 happy_x_3 of { happy_var_3 -> +	happyIn8+		 (happy_var_1++[happy_var_3]+	) `HappyStk` happyRest}}++happyReduce_17 = happySpecReduce_1  5# happyReduction_17+happyReduction_17 happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	happyIn9+		 (Avar happy_var_1+	)}++happyReduce_18 = happySpecReduce_2  5# happyReduction_18+happyReduction_18 happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	happyIn9+		 (Ast "+" [Avar happy_var_1]+	)}++happyReduce_19 = happySpecReduce_2  5# happyReduction_19+happyReduction_19 happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	happyIn9+		 (Ast "*" [Avar happy_var_1]+	)}++happyReduce_20 = happySpecReduce_2  5# happyReduction_20+happyReduction_20 happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	happyIn9+		 (Ast "?" [Avar happy_var_1]+	)}++happyReduce_21 = happySpecReduce_1  5# happyReduction_21+happyReduction_21 happy_x_1+	 =  case happyOut10 happy_x_1 of { happy_var_1 -> +	happyIn9+		 (happy_var_1+	)}++happyReduce_22 = happySpecReduce_2  5# happyReduction_22+happyReduction_22 happy_x_2+	happy_x_1+	 =  case happyOut10 happy_x_1 of { happy_var_1 -> +	happyIn9+		 (Ast "+" [happy_var_1]+	)}++happyReduce_23 = happySpecReduce_2  5# happyReduction_23+happyReduction_23 happy_x_2+	happy_x_1+	 =  case happyOut10 happy_x_1 of { happy_var_1 -> +	happyIn9+		 (Ast "*" [happy_var_1]+	)}++happyReduce_24 = happySpecReduce_2  5# happyReduction_24+happyReduction_24 happy_x_2+	happy_x_1+	 =  case happyOut10 happy_x_1 of { happy_var_1 -> +	happyIn9+		 (Ast "?" [happy_var_1]+	)}++happyReduce_25 = happySpecReduce_3  6# happyReduction_25+happyReduction_25 happy_x_3+	happy_x_2+	happy_x_1+	 =  happyIn10+		 (Ast "element" []+	)++happyReduce_26 = happySpecReduce_3  6# happyReduction_26+happyReduction_26 happy_x_3+	happy_x_2+	happy_x_1+	 =  happyIn10+		 (Ast "attribute" []+	)++happyReduce_27 = happySpecReduce_3  6# happyReduction_27+happyReduction_27 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	happyIn10+		 (Ast happy_var_1 []+	)}++happyReduce_28 = happyReduce 4# 6# happyReduction_28+happyReduction_28 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut11 happy_x_3 of { happy_var_3 -> +	happyIn10+		 (Ast "element" happy_var_3+	) `HappyStk` happyRest}++happyReduce_29 = happyReduce 4# 6# happyReduction_29+happyReduction_29 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut11 happy_x_3 of { happy_var_3 -> +	happyIn10+		 (Ast "attribute" happy_var_3+	) `HappyStk` happyRest}++happyReduce_30 = happySpecReduce_1  7# happyReduction_30+happyReduction_30 happy_x_1+	 =  happyIn11+		 ([Avar "*"]+	)++happyReduce_31 = happySpecReduce_1  7# happyReduction_31+happyReduction_31 happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	happyIn11+		 ([Avar happy_var_1]+	)}++happyReduce_32 = happySpecReduce_3  7# happyReduction_32+happyReduction_32 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_3 of { happy_var_3 -> +	happyIn11+		 ([Avar "*",Avar happy_var_3]+	)}++happyReduce_33 = happySpecReduce_3  7# happyReduction_33+happyReduction_33 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	case happyOut7 happy_x_3 of { happy_var_3 -> +	happyIn11+		 ([Avar happy_var_1,Avar happy_var_3]+	)}}++happyReduce_34 = happyReduce 4# 7# happyReduction_34+happyReduction_34 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut7 happy_x_3 of { happy_var_3 -> +	happyIn11+		 ([Avar "*",Ast "?" [Avar happy_var_3]]+	) `HappyStk` happyRest}++happyReduce_35 = happyReduce 4# 7# happyReduction_35+happyReduction_35 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut7 happy_x_1 of { happy_var_1 -> +	case happyOut7 happy_x_3 of { happy_var_3 -> +	happyIn11+		 ([Avar happy_var_1,Ast "?" [Avar happy_var_3]]+	) `HappyStk` happyRest}}++happyReduce_36 = happySpecReduce_1  8# happyReduction_36+happyReduction_36 happy_x_1+	 =  case happyOutTok happy_x_1 of { (Variable happy_var_1) -> +	happyIn12+		 (Avar happy_var_1+	)}++happyReduce_37 = happyReduce 5# 9# happyReduction_37+happyReduction_37 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut15 happy_x_1 of { happy_var_1 -> +	case happyOut18 happy_x_2 of { happy_var_2 -> +	case happyOut19 happy_x_3 of { happy_var_3 -> +	case happyOut13 happy_x_5 of { happy_var_5 -> +	happyIn13+		 ((snd happy_var_3) (happy_var_1 (happy_var_2 ((fst happy_var_3) happy_var_5)))+	) `HappyStk` happyRest}}}}++happyReduce_38 = happyReduce 4# 9# happyReduction_38+happyReduction_38 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut16 happy_x_2 of { happy_var_2 -> +	case happyOut13 happy_x_4 of { happy_var_4 -> +	happyIn13+		 (call "some" [happy_var_2 happy_var_4]+	) `HappyStk` happyRest}}++happyReduce_39 = happyReduce 4# 9# happyReduction_39+happyReduction_39 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut16 happy_x_2 of { happy_var_2 -> +	case happyOut13 happy_x_4 of { happy_var_4 -> +	happyIn13+		 (call "not" [call "some" [happy_var_2 (call "not" [happy_var_4])]]+	) `HappyStk` happyRest}}++happyReduce_40 = happyReduce 6# 9# happyReduction_40+happyReduction_40 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut13 happy_x_2 of { happy_var_2 -> +	case happyOut13 happy_x_4 of { happy_var_4 -> +	case happyOut13 happy_x_6 of { happy_var_6 -> +	happyIn13+		 (Ast "if" [happy_var_2,happy_var_4,happy_var_6]+	) `HappyStk` happyRest}}}++happyReduce_41 = happySpecReduce_1  9# happyReduction_41+happyReduction_41 happy_x_1+	 =  case happyOut29 happy_x_1 of { happy_var_1 -> +	happyIn13+		 (happy_var_1+	)}++happyReduce_42 = happySpecReduce_1  9# happyReduction_42+happyReduction_42 happy_x_1+	 =  case happyOut23 happy_x_1 of { happy_var_1 -> +	happyIn13+		 (happy_var_1+	)}++happyReduce_43 = happySpecReduce_1  9# happyReduction_43+happyReduction_43 happy_x_1+	 =  case happyOut22 happy_x_1 of { happy_var_1 -> +	happyIn13+		 (happy_var_1+	)}++happyReduce_44 = happySpecReduce_3  9# happyReduction_44+happyReduction_44 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "to" [happy_var_1,happy_var_3]+	)}}++happyReduce_45 = happySpecReduce_3  9# happyReduction_45+happyReduction_45 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "+" [happy_var_1,happy_var_3]+	)}}++happyReduce_46 = happySpecReduce_3  9# happyReduction_46+happyReduction_46 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "-" [happy_var_1,happy_var_3]+	)}}++happyReduce_47 = happySpecReduce_3  9# happyReduction_47+happyReduction_47 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "*" [happy_var_1,happy_var_3]+	)}}++happyReduce_48 = happySpecReduce_3  9# happyReduction_48+happyReduction_48 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "div" [happy_var_1,happy_var_3]+	)}}++happyReduce_49 = happySpecReduce_3  9# happyReduction_49+happyReduction_49 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "idiv" [happy_var_1,happy_var_3]+	)}}++happyReduce_50 = happySpecReduce_3  9# happyReduction_50+happyReduction_50 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "mod" [happy_var_1,happy_var_3]+	)}}++happyReduce_51 = happySpecReduce_3  9# happyReduction_51+happyReduction_51 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "=" [happy_var_1,happy_var_3]+	)}}++happyReduce_52 = happySpecReduce_3  9# happyReduction_52+happyReduction_52 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "!=" [happy_var_1,happy_var_3]+	)}}++happyReduce_53 = happySpecReduce_3  9# happyReduction_53+happyReduction_53 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "<" [happy_var_1,happy_var_3]+	)}}++happyReduce_54 = happySpecReduce_3  9# happyReduction_54+happyReduction_54 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "<=" [happy_var_1,happy_var_3]+	)}}++happyReduce_55 = happySpecReduce_3  9# happyReduction_55+happyReduction_55 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call ">" [happy_var_1,happy_var_3]+	)}}++happyReduce_56 = happySpecReduce_3  9# happyReduction_56+happyReduction_56 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call ">=" [happy_var_1,happy_var_3]+	)}}++happyReduce_57 = happySpecReduce_3  9# happyReduction_57+happyReduction_57 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "<<" [happy_var_1,happy_var_3]+	)}}++happyReduce_58 = happySpecReduce_3  9# happyReduction_58+happyReduction_58 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call ">>" [happy_var_1,happy_var_3]+	)}}++happyReduce_59 = happySpecReduce_3  9# happyReduction_59+happyReduction_59 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "is" [happy_var_1,happy_var_3]+	)}}++happyReduce_60 = happySpecReduce_3  9# happyReduction_60+happyReduction_60 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "eq" [happy_var_1,happy_var_3]+	)}}++happyReduce_61 = happySpecReduce_3  9# happyReduction_61+happyReduction_61 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "ne" [happy_var_1,happy_var_3]+	)}}++happyReduce_62 = happySpecReduce_3  9# happyReduction_62+happyReduction_62 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "lt" [happy_var_1,happy_var_3]+	)}}++happyReduce_63 = happySpecReduce_3  9# happyReduction_63+happyReduction_63 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "le" [happy_var_1,happy_var_3]+	)}}++happyReduce_64 = happySpecReduce_3  9# happyReduction_64+happyReduction_64 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "gt" [happy_var_1,happy_var_3]+	)}}++happyReduce_65 = happySpecReduce_3  9# happyReduction_65+happyReduction_65 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "ge" [happy_var_1,happy_var_3]+	)}}++happyReduce_66 = happySpecReduce_3  9# happyReduction_66+happyReduction_66 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "and" [happy_var_1,happy_var_3]+	)}}++happyReduce_67 = happySpecReduce_3  9# happyReduction_67+happyReduction_67 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "or" [happy_var_1,happy_var_3]+	)}}++happyReduce_68 = happySpecReduce_3  9# happyReduction_68+happyReduction_68 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "not" [happy_var_1,happy_var_3]+	)}}++happyReduce_69 = happySpecReduce_3  9# happyReduction_69+happyReduction_69 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "union" [happy_var_1,happy_var_3]+	)}}++happyReduce_70 = happySpecReduce_3  9# happyReduction_70+happyReduction_70 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "intersect" [happy_var_1,happy_var_3]+	)}}++happyReduce_71 = happySpecReduce_3  9# happyReduction_71+happyReduction_71 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (call "except" [happy_var_1,happy_var_3]+	)}}++happyReduce_72 = happyReduce 4# 9# happyReduction_72+happyReduction_72 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut9 happy_x_4 of { happy_var_4 -> +	happyIn13+		 (call "instance-of" [happy_var_1,Ast "type" [happy_var_4]]+	) `HappyStk` happyRest}}++happyReduce_73 = happyReduce 4# 9# happyReduction_73+happyReduction_73 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut9 happy_x_4 of { happy_var_4 -> +	happyIn13+		 (call "cast-as" [happy_var_1,Ast "type" [happy_var_4]]+	) `HappyStk` happyRest}}++happyReduce_74 = happyReduce 4# 9# happyReduction_74+happyReduction_74 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut9 happy_x_4 of { happy_var_4 -> +	happyIn13+		 (call "castable-as" [happy_var_1,Ast "type" [happy_var_4]]+	) `HappyStk` happyRest}}++happyReduce_75 = happyReduce 5# 9# happyReduction_75+happyReduction_75 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut13 happy_x_3 of { happy_var_3 -> +	case happyOut35 happy_x_5 of { happy_var_5 -> +	happyIn13+		 (let v = "_tc" in Ast "let" [Avar v,happy_var_3,happy_var_5 v]+	) `HappyStk` happyRest}}++happyReduce_76 = happySpecReduce_2  9# happyReduction_76+happyReduction_76 happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_2 of { happy_var_2 -> +	happyIn13+		 (call "uplus" [happy_var_2]+	)}++happyReduce_77 = happySpecReduce_2  9# happyReduction_77+happyReduction_77 happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_2 of { happy_var_2 -> +	happyIn13+		 (call "uminus" [happy_var_2]+	)}++happyReduce_78 = happySpecReduce_2  9# happyReduction_78+happyReduction_78 happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_2 of { happy_var_2 -> +	happyIn13+		 (call "not" [happy_var_2]+	)}++happyReduce_79 = happySpecReduce_1  9# happyReduction_79+happyReduction_79 happy_x_1+	 =  case happyOut26 happy_x_1 of { happy_var_1 -> +	happyIn13+		 (happy_var_1+	)}++happyReduce_80 = happySpecReduce_1  9# happyReduction_80+happyReduction_80 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TInteger happy_var_1) -> +	happyIn13+		 (Aint happy_var_1+	)}++happyReduce_81 = happySpecReduce_1  9# happyReduction_81+happyReduction_81 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TFloat happy_var_1) -> +	happyIn13+		 (Afloat happy_var_1+	)}++happyReduce_82 = happyReduce 4# 9# happyReduction_82+happyReduction_82 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut13 happy_x_2 of { happy_var_2 -> +	case happyOut13 happy_x_4 of { happy_var_4 -> +	happyIn13+		 (Ast "insert" [happy_var_2,Ast "destination" [happy_var_4]]+	) `HappyStk` happyRest}}++happyReduce_83 = happySpecReduce_3  9# happyReduction_83+happyReduction_83 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn13+		 (Ast "delete" [happy_var_3]+	)}++happyReduce_84 = happyReduce 4# 9# happyReduction_84+happyReduction_84 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut13 happy_x_2 of { happy_var_2 -> +	case happyOut13 happy_x_4 of { happy_var_4 -> +	happyIn13+		 (Ast "replace" [happy_var_2,happy_var_4]+	) `HappyStk` happyRest}}++happyReduce_85 = happySpecReduce_1  10# happyReduction_85+happyReduction_85 happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	happyIn14+		 ([happy_var_1]+	)}++happyReduce_86 = happySpecReduce_3  10# happyReduction_86+happyReduction_86 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut14 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn14+		 (happy_var_1++[happy_var_3]+	)}}++happyReduce_87 = happySpecReduce_2  11# happyReduction_87+happyReduction_87 happy_x_2+	happy_x_1+	 =  case happyOut16 happy_x_2 of { happy_var_2 -> +	happyIn15+		 (happy_var_2+	)}++happyReduce_88 = happySpecReduce_2  11# happyReduction_88+happyReduction_88 happy_x_2+	happy_x_1+	 =  case happyOut17 happy_x_2 of { happy_var_2 -> +	happyIn15+		 (happy_var_2+	)}++happyReduce_89 = happySpecReduce_3  11# happyReduction_89+happyReduction_89 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut15 happy_x_1 of { happy_var_1 -> +	case happyOut16 happy_x_3 of { happy_var_3 -> +	happyIn15+		 (happy_var_1 . happy_var_3+	)}}++happyReduce_90 = happySpecReduce_3  11# happyReduction_90+happyReduction_90 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut15 happy_x_1 of { happy_var_1 -> +	case happyOut17 happy_x_3 of { happy_var_3 -> +	happyIn15+		 (happy_var_1 . happy_var_3+	)}}++happyReduce_91 = happySpecReduce_3  12# happyReduction_91+happyReduction_91 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut12 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn16+		 (\x -> Ast "for" [happy_var_1,Avar "$",happy_var_3,x]+	)}}++happyReduce_92 = happyReduce 5# 12# happyReduction_92+happyReduction_92 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut12 happy_x_1 of { happy_var_1 -> +	case happyOut12 happy_x_3 of { happy_var_3 -> +	case happyOut13 happy_x_5 of { happy_var_5 -> +	happyIn16+		 (\x -> Ast "for" [happy_var_1,happy_var_3,happy_var_5,x]+	) `HappyStk` happyRest}}}++happyReduce_93 = happyReduce 5# 12# happyReduction_93+happyReduction_93 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut16 happy_x_1 of { happy_var_1 -> +	case happyOut12 happy_x_3 of { happy_var_3 -> +	case happyOut13 happy_x_5 of { happy_var_5 -> +	happyIn16+		 (\x -> happy_var_1(Ast "for" [happy_var_3,Avar "$",happy_var_5,x])+	) `HappyStk` happyRest}}}++happyReduce_94 = happyReduce 7# 12# happyReduction_94+happyReduction_94 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut16 happy_x_1 of { happy_var_1 -> +	case happyOut12 happy_x_3 of { happy_var_3 -> +	case happyOut12 happy_x_5 of { happy_var_5 -> +	case happyOut13 happy_x_7 of { happy_var_7 -> +	happyIn16+		 (\x -> happy_var_1(Ast "for" [happy_var_3,happy_var_5,happy_var_7,x])+	) `HappyStk` happyRest}}}}++happyReduce_95 = happySpecReduce_3  13# happyReduction_95+happyReduction_95 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut12 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn17+		 (\x -> Ast "let" [happy_var_1,happy_var_3,x]+	)}}++happyReduce_96 = happyReduce 5# 13# happyReduction_96+happyReduction_96 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut17 happy_x_1 of { happy_var_1 -> +	case happyOut12 happy_x_3 of { happy_var_3 -> +	case happyOut13 happy_x_5 of { happy_var_5 -> +	happyIn17+		 (\x -> happy_var_1(Ast "let" [happy_var_3,happy_var_5,x])+	) `HappyStk` happyRest}}}++happyReduce_97 = happySpecReduce_2  14# happyReduction_97+happyReduction_97 happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_2 of { happy_var_2 -> +	happyIn18+		 (\x -> Ast "predicate" [happy_var_2,x]+	)}++happyReduce_98 = happySpecReduce_0  14# happyReduction_98+happyReduction_98  =  happyIn18+		 (id+	)++happyReduce_99 = happySpecReduce_3  15# happyReduction_99+happyReduction_99 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut20 happy_x_3 of { happy_var_3 -> +	happyIn19+		 ((\x -> Ast "sortTuple" (x:(fst happy_var_3)),+                                                           \x -> Ast "sort" (x:(snd happy_var_3)))+	)}++happyReduce_100 = happySpecReduce_0  15# happyReduction_100+happyReduction_100  =  happyIn19+		 ((id,id)+	)++happyReduce_101 = happySpecReduce_2  16# happyReduction_101+happyReduction_101 happy_x_2+	happy_x_1+	 =  case happyOut13 happy_x_1 of { happy_var_1 -> +	case happyOut21 happy_x_2 of { happy_var_2 -> +	happyIn20+		 (([happy_var_1],[happy_var_2])+	)}}++happyReduce_102 = happyReduce 4# 16# happyReduction_102+happyReduction_102 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut20 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	case happyOut21 happy_x_4 of { happy_var_4 -> +	happyIn20+		 (((fst happy_var_1)++[happy_var_3],(snd happy_var_1)++[happy_var_4])+	) `HappyStk` happyRest}}}++happyReduce_103 = happySpecReduce_1  17# happyReduction_103+happyReduction_103 happy_x_1+	 =  happyIn21+		 (Avar "ascending"+	)++happyReduce_104 = happySpecReduce_1  17# happyReduction_104+happyReduction_104 happy_x_1+	 =  happyIn21+		 (Avar "descending"+	)++happyReduce_105 = happySpecReduce_0  17# happyReduction_105+happyReduction_105  =  happyIn21+		 (Avar "ascending"+	)++happyReduce_106 = happyReduce 4# 18# happyReduction_106+happyReduction_106 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut7 happy_x_3 of { happy_var_3 -> +	happyIn22+		 (call "element" [Avar happy_var_3]+	) `HappyStk` happyRest}++happyReduce_107 = happyReduce 4# 18# happyReduction_107+happyReduction_107 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut7 happy_x_3 of { happy_var_3 -> +	happyIn22+		 (call "attribute" [Avar happy_var_3]+	) `HappyStk` happyRest}++happyReduce_108 = happyReduce 6# 19# happyReduction_108+happyReduction_108 (happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut24 happy_x_1 of { happy_var_1 -> +	case happyOut25 happy_x_3 of { happy_var_3 -> +	case happyOut7 happy_x_5 of { happy_var_5 -> +	happyIn23+		 (if head happy_var_1 == Astring happy_var_5+                                                             then Ast "element_construction" (happy_var_1++[Ast "append" happy_var_3])+                                                          else parseError [TError ("Unmatched tags in element construction: "+                                                                                   ++(show (head happy_var_1))++" '"++happy_var_5++"'")]+	) `HappyStk` happyRest}}}++happyReduce_109 = happyReduce 5# 19# happyReduction_109+happyReduction_109 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut24 happy_x_1 of { happy_var_1 -> +	case happyOut7 happy_x_4 of { happy_var_4 -> +	happyIn23+		 (if head happy_var_1 == Astring happy_var_4+                                                             then Ast "element_construction" (happy_var_1++[Ast "append" []])+                                                          else parseError [TError ("Unmatched tags in element construction: "+                                                                                   ++(show (head happy_var_1))++" '"++happy_var_4++"'")]+	) `HappyStk` happyRest}}++happyReduce_110 = happySpecReduce_2  19# happyReduction_110+happyReduction_110 happy_x_2+	happy_x_1+	 =  case happyOut24 happy_x_1 of { happy_var_1 -> +	happyIn23+		 (Ast "element_construction" (happy_var_1++[Ast "append" []])+	)}++happyReduce_111 = happyReduce 7# 19# happyReduction_111+happyReduction_111 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut13 happy_x_3 of { happy_var_3 -> +	case happyOut14 happy_x_6 of { happy_var_6 -> +	happyIn23+		 (Ast "element_construction" [happy_var_3,Ast "attributes" [],concatenateAll happy_var_6]+	) `HappyStk` happyRest}}++happyReduce_112 = happyReduce 7# 19# happyReduction_112+happyReduction_112 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut13 happy_x_3 of { happy_var_3 -> +	case happyOut14 happy_x_6 of { happy_var_6 -> +	happyIn23+		 (Ast "attribute_construction" [happy_var_3,concatenateAll happy_var_6]+	) `HappyStk` happyRest}}++happyReduce_113 = happyReduce 5# 19# happyReduction_113+happyReduction_113 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut7 happy_x_2 of { happy_var_2 -> +	case happyOut14 happy_x_4 of { happy_var_4 -> +	happyIn23+		 (Ast "element_construction" [Astring happy_var_2,Ast "attributes" [],concatenateAll happy_var_4]+	) `HappyStk` happyRest}}++happyReduce_114 = happyReduce 5# 19# happyReduction_114+happyReduction_114 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut7 happy_x_2 of { happy_var_2 -> +	case happyOut14 happy_x_4 of { happy_var_4 -> +	happyIn23+		 (Ast "attribute_construction" [Astring happy_var_2,concatenateAll happy_var_4]+	) `HappyStk` happyRest}}++happyReduce_115 = happySpecReduce_2  20# happyReduction_115+happyReduction_115 happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_2 of { happy_var_2 -> +	happyIn24+		 ([Astring happy_var_2,Ast "attributes" []]+	)}++happyReduce_116 = happySpecReduce_3  20# happyReduction_116+happyReduction_116 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_2 of { happy_var_2 -> +	case happyOut28 happy_x_3 of { happy_var_3 -> +	happyIn24+		 ([Astring happy_var_2,Ast "attributes" happy_var_3]+	)}}++happyReduce_117 = happySpecReduce_3  21# happyReduction_117+happyReduction_117 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut14 happy_x_2 of { happy_var_2 -> +	happyIn25+		 ([concatenateAll happy_var_2]+	)}++happyReduce_118 = happySpecReduce_1  21# happyReduction_118+happyReduction_118 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TString happy_var_1) -> +	happyIn25+		 ([Astring happy_var_1]+	)}++happyReduce_119 = happySpecReduce_1  21# happyReduction_119+happyReduction_119 happy_x_1+	 =  case happyOutTok happy_x_1 of { (XMLtext happy_var_1) -> +	happyIn25+		 ([Astring happy_var_1]+	)}++happyReduce_120 = happySpecReduce_1  21# happyReduction_120+happyReduction_120 happy_x_1+	 =  case happyOut23 happy_x_1 of { happy_var_1 -> +	happyIn25+		 ([happy_var_1]+	)}++happyReduce_121 = happyReduce 4# 21# happyReduction_121+happyReduction_121 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut25 happy_x_1 of { happy_var_1 -> +	case happyOut14 happy_x_3 of { happy_var_3 -> +	happyIn25+		 (happy_var_1++[concatenateAll happy_var_3]+	) `HappyStk` happyRest}}++happyReduce_122 = happySpecReduce_2  21# happyReduction_122+happyReduction_122 happy_x_2+	happy_x_1+	 =  case happyOut25 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TString happy_var_2) -> +	happyIn25+		 (happy_var_1++[Astring happy_var_2]+	)}}++happyReduce_123 = happySpecReduce_2  21# happyReduction_123+happyReduction_123 happy_x_2+	happy_x_1+	 =  case happyOut25 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (XMLtext happy_var_2) -> +	happyIn25+		 (happy_var_1++[Astring happy_var_2]+	)}}++happyReduce_124 = happySpecReduce_2  21# happyReduction_124+happyReduction_124 happy_x_2+	happy_x_1+	 =  case happyOut25 happy_x_1 of { happy_var_1 -> +	case happyOut23 happy_x_2 of { happy_var_2 -> +	happyIn25+		 (happy_var_1++[happy_var_2]+	)}}++happyReduce_125 = happySpecReduce_1  22# happyReduction_125+happyReduction_125 happy_x_1+	 =  case happyOut27 happy_x_1 of { happy_var_1 -> +	happyIn26+		 (if length happy_var_1 == 0 then Astring ""+                                                          else if length happy_var_1 == 1 then head happy_var_1 else Ast "append" happy_var_1+	)}++happyReduce_126 = happySpecReduce_1  23# happyReduction_126+happyReduction_126 happy_x_1+	 =  case happyOutTok happy_x_1 of { (TString happy_var_1) -> +	happyIn27+		 (if happy_var_1=="" then [] else [Astring happy_var_1]+	)}++happyReduce_127 = happySpecReduce_3  23# happyReduction_127+happyReduction_127 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut14 happy_x_2 of { happy_var_2 -> +	happyIn27+		 ([concatAll happy_var_2]+	)}++happyReduce_128 = happySpecReduce_2  23# happyReduction_128+happyReduction_128 happy_x_2+	happy_x_1+	 =  case happyOut27 happy_x_1 of { happy_var_1 -> +	case happyOutTok happy_x_2 of { (TString happy_var_2) -> +	happyIn27+		 (if happy_var_2=="" then happy_var_1 else happy_var_1++[Astring happy_var_2]+	)}}++happyReduce_129 = happyReduce 4# 23# happyReduction_129+happyReduction_129 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut27 happy_x_1 of { happy_var_1 -> +	case happyOut14 happy_x_3 of { happy_var_3 -> +	happyIn27+		 (happy_var_1++[concatAll happy_var_3]+	) `HappyStk` happyRest}}++happyReduce_130 = happySpecReduce_3  24# happyReduction_130+happyReduction_130 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	case happyOut26 happy_x_3 of { happy_var_3 -> +	happyIn28+		 ([Ast "pair" [Astring happy_var_1,happy_var_3]]+	)}}++happyReduce_131 = happyReduce 4# 24# happyReduction_131+happyReduction_131 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut28 happy_x_1 of { happy_var_1 -> +	case happyOut7 happy_x_2 of { happy_var_2 -> +	case happyOut26 happy_x_4 of { happy_var_4 -> +	happyIn28+		 (happy_var_1++[Ast "pair" [Astring happy_var_2,happy_var_4]]+	) `HappyStk` happyRest}}}++happyReduce_132 = happySpecReduce_2  25# happyReduction_132+happyReduction_132 happy_x_2+	happy_x_1+	 =  case happyOut33 happy_x_1 of { happy_var_1 -> +	case happyOut32 happy_x_2 of { happy_var_2 -> +	happyIn29+		 (happy_var_1 "child" (Avar ".") happy_var_2+	)}}++happyReduce_133 = happySpecReduce_3  25# happyReduction_133+happyReduction_133 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut33 happy_x_2 of { happy_var_2 -> +	case happyOut32 happy_x_3 of { happy_var_3 -> +	happyIn29+		 (happy_var_2 "attribute" (Avar ".") happy_var_3+	)}}++happyReduce_134 = happySpecReduce_3  25# happyReduction_134+happyReduction_134 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut33 happy_x_1 of { happy_var_1 -> +	case happyOut32 happy_x_2 of { happy_var_2 -> +	case happyOut30 happy_x_3 of { happy_var_3 -> +	happyIn29+		 (happy_var_3 (happy_var_1 "child" (Avar ".") happy_var_2)+	)}}}++happyReduce_135 = happyReduce 4# 25# happyReduction_135+happyReduction_135 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut33 happy_x_2 of { happy_var_2 -> +	case happyOut32 happy_x_3 of { happy_var_3 -> +	case happyOut30 happy_x_4 of { happy_var_4 -> +	happyIn29+		 (happy_var_4 (happy_var_2 "attribute" (Avar ".") happy_var_3)+	) `HappyStk` happyRest}}}++happyReduce_136 = happySpecReduce_1  26# happyReduction_136+happyReduction_136 happy_x_1+	 =  case happyOut31 happy_x_1 of { happy_var_1 -> +	happyIn30+		 (happy_var_1+	)}++happyReduce_137 = happySpecReduce_2  26# happyReduction_137+happyReduction_137 happy_x_2+	happy_x_1+	 =  case happyOut30 happy_x_1 of { happy_var_1 -> +	case happyOut31 happy_x_2 of { happy_var_2 -> +	happyIn30+		 (happy_var_2 . happy_var_1+	)}}++happyReduce_138 = happySpecReduce_3  27# happyReduction_138+happyReduction_138 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut33 happy_x_2 of { happy_var_2 -> +	case happyOut32 happy_x_3 of { happy_var_3 -> +	happyIn31+		 (\e -> happy_var_2 "child" e happy_var_3+	)}}++happyReduce_139 = happyReduce 4# 27# happyReduction_139+happyReduction_139 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut33 happy_x_3 of { happy_var_3 -> +	case happyOut32 happy_x_4 of { happy_var_4 -> +	happyIn31+		 (\e -> happy_var_3 "attribute" e happy_var_4+	) `HappyStk` happyRest}}++happyReduce_140 = happyReduce 4# 27# happyReduction_140+happyReduction_140 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut33 happy_x_3 of { happy_var_3 -> +	case happyOut32 happy_x_4 of { happy_var_4 -> +	happyIn31+		 (\e -> happy_var_3 "descendant" e happy_var_4+	) `HappyStk` happyRest}}++happyReduce_141 = happyReduce 5# 27# happyReduction_141+happyReduction_141 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut33 happy_x_4 of { happy_var_4 -> +	case happyOut32 happy_x_5 of { happy_var_5 -> +	happyIn31+		 (\e -> happy_var_4 "attribute-descendant" e happy_var_5+	) `HappyStk` happyRest}}++happyReduce_142 = happySpecReduce_2  27# happyReduction_142+happyReduction_142 happy_x_2+	happy_x_1+	 =  happyIn31+		 (\e -> Ast "step" [Avar "parent",Astring "*",e]+	)++happyReduce_143 = happyReduce 4# 28# happyReduction_143+happyReduction_143 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut32 happy_x_1 of { happy_var_1 -> +	case happyOut13 happy_x_3 of { happy_var_3 -> +	happyIn32+		 (happy_var_1 ++ [happy_var_3]+	) `HappyStk` happyRest}}++happyReduce_144 = happySpecReduce_0  28# happyReduction_144+happyReduction_144  =  happyIn32+		 ([]+	)++happyReduce_145 = happySpecReduce_1  29# happyReduction_145+happyReduction_145 happy_x_1+	 =  case happyOut34 happy_x_1 of { happy_var_1 -> +	happyIn33+		 (\t e ps -> if null ps+								     then happy_var_1 t e+                                                                     else Ast "filter" (happy_var_1 t e:ps)+	)}++happyReduce_146 = happySpecReduce_1  29# happyReduction_146+happyReduction_146 happy_x_1+	 =  happyIn33+		 (\t e ps -> Ast "step" ((Avar t):(Astring "*"):e:ps)+	)++happyReduce_147 = happySpecReduce_1  29# happyReduction_147+happyReduction_147 happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	happyIn33+		 (\t e ps -> if elem happy_var_1 path_steps+                                                                     then parseError [TError ("Axis "++happy_var_1++" is missing a node step")]+                                                                     else Ast "step" ((Avar t):(Astring happy_var_1):e:ps)+	)}++happyReduce_148 = happyReduce 4# 29# happyReduction_148+happyReduction_148 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { (QName happy_var_1) -> +	case happyOut7 happy_x_4 of { happy_var_4 -> +	happyIn33+		 (\t e ps -> if elem happy_var_1 path_steps+                                                                     then if t == "child"+                                                                          then Ast "step" ((Avar happy_var_1):(Astring happy_var_4):e:ps)+                                                                          else parseError [TError ("The navigation step must be /"++happy_var_1++"::"++happy_var_4)]+                                                                     else parseError [TError ("Not a valid axis name: "++happy_var_1)]+	) `HappyStk` happyRest}}++happyReduce_149 = happyReduce 4# 29# happyReduction_149+happyReduction_149 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOutTok happy_x_1 of { (QName happy_var_1) -> +	happyIn33+		 (\t e ps -> if elem happy_var_1 path_steps+                                                                     then if t == "child"+                                                                          then Ast "step" ((Avar happy_var_1):(Astring "*"):e:ps)+                                                                          else parseError [TError ("The navigation step must be /"++happy_var_1++"::*")]+                                                                     else parseError [TError ("Not a valid axis name: "++happy_var_1)]+	) `HappyStk` happyRest}++happyReduce_150 = happySpecReduce_1  30# happyReduction_150+happyReduction_150 happy_x_1+	 =  case happyOut12 happy_x_1 of { happy_var_1 -> +	happyIn34+		 (\_ _ -> happy_var_1+	)}++happyReduce_151 = happySpecReduce_1  30# happyReduction_151+happyReduction_151 happy_x_1+	 =  happyIn34+		 (\_ e -> e+	)++happyReduce_152 = happySpecReduce_3  30# happyReduction_152+happyReduction_152 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut14 happy_x_2 of { happy_var_2 -> +	happyIn34+		 (\t e -> if e == Avar "."+                                                                  then concatenateAll happy_var_2+	                                                          else Ast "context" [e,Astring t,concatenateAll happy_var_2]+	)}++happyReduce_153 = happySpecReduce_2  30# happyReduction_153+happyReduction_153 happy_x_2+	happy_x_1+	 =  happyIn34+		 (\_ _ -> call "empty" []+	)++happyReduce_154 = happyReduce 4# 30# happyReduction_154+happyReduction_154 (happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut7 happy_x_1 of { happy_var_1 -> +	case happyOut14 happy_x_3 of { happy_var_3 -> +	happyIn34+		 (\t e -> if e == Avar "."+                                                                     then call happy_var_1 happy_var_3+                                                                  else Ast "context" [e,Astring t,call happy_var_1 happy_var_3]+	) `HappyStk` happyRest}}++happyReduce_155 = happySpecReduce_3  30# happyReduction_155+happyReduction_155 happy_x_3+	happy_x_2+	happy_x_1+	 =  case happyOut7 happy_x_1 of { happy_var_1 -> +	happyIn34+		 (\_ e -> if elem happy_var_1 ["last","position","true","false","empty","select"]+                                                                  then call happy_var_1 []+                                                                  else call happy_var_1 [e]+	)}++happyReduce_156 = happyReduce 7# 31# happyReduction_156+happyReduction_156 (happy_x_7 `HappyStk`+	happy_x_6 `HappyStk`+	happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut9 happy_x_2 of { happy_var_2 -> +	case happyOut13 happy_x_4 of { happy_var_4 -> +	case happyOut13 happy_x_7 of { happy_var_7 -> +	happyIn35+		 (\v -> Ast "if" [call "instance-of" [Avar v,Ast "type" [happy_var_2]],happy_var_4,happy_var_7]+	) `HappyStk` happyRest}}}++happyReduce_157 = happyReduce 5# 31# happyReduction_157+happyReduction_157 (happy_x_5 `HappyStk`+	happy_x_4 `HappyStk`+	happy_x_3 `HappyStk`+	happy_x_2 `HappyStk`+	happy_x_1 `HappyStk`+	happyRest)+	 = case happyOut9 happy_x_2 of { happy_var_2 -> +	case happyOut13 happy_x_4 of { happy_var_4 -> +	case happyOut35 happy_x_5 of { happy_var_5 -> +	happyIn35+		 (\v -> Ast "if" [call "instance-of" [Avar v,Ast "type" [happy_var_2]],happy_var_4,happy_var_5 v]+	) `HappyStk` happyRest}}}++happyNewToken action sts stk [] =+	happyDoAction 88# notHappyAtAll action sts stk []++happyNewToken action sts stk (tk:tks) =+	let cont i = happyDoAction i tk action sts stk tks in+	case tk of {+	RETURN -> cont 1#;+	SOME -> cont 2#;+	EVERY -> cont 3#;+	IF -> cont 4#;+	THEN -> cont 5#;+	ELSE -> cont 6#;+	LB -> cont 7#;+	RB -> cont 8#;+	LP -> cont 9#;+	RP -> cont 10#;+	LSB -> cont 11#;+	RSB -> cont 12#;+	TO -> cont 13#;+	PLUS -> cont 14#;+	MINUS -> cont 15#;+	TIMES -> cont 16#;+	DIV -> cont 17#;+	IDIV -> cont 18#;+	MOD -> cont 19#;+	TEQ -> cont 20#;+	TNE -> cont 21#;+	TLT -> cont 22#;+	TLE -> cont 23#;+	TGT -> cont 24#;+	TGE -> cont 25#;+	PRE -> cont 26#;+	POST -> cont 27#;+	IS -> cont 28#;+	SEQ -> cont 29#;+	SNE -> cont 30#;+	SLT -> cont 31#;+	SLE -> cont 32#;+	SGT -> cont 33#;+	SGE -> cont 34#;+	AND -> cont 35#;+	OR -> cont 36#;+	NOT -> cont 37#;+	UNION -> cont 38#;+	INTERSECT -> cont 39#;+	EXCEPT -> cont 40#;+	FOR -> cont 41#;+	LET -> cont 42#;+	IN -> cont 43#;+	AS -> cont 44#;+	COMMA -> cont 45#;+	ASSIGN -> cont 46#;+	WHERE -> cont 47#;+	ORDER -> cont 48#;+	BY -> cont 49#;+	ASCENDING -> cont 50#;+	DESCENDING -> cont 51#;+	ELEMENT -> cont 52#;+	ATTRIBUTE -> cont 53#;+	STAG -> cont 54#;+	ETAG -> cont 55#;+	SATISFIES -> cont 56#;+	ATSIGN -> cont 57#;+	SLASH -> cont 58#;+	QName happy_dollar_dollar -> cont 59#;+	DECLARE -> cont 60#;+	FUNCTION -> cont 61#;+	VARIABLE -> cont 62#;+	AT -> cont 63#;+	DOTS -> cont 64#;+	DOT -> cont 65#;+	SEMI -> cont 66#;+	COLON -> cont 67#;+	INSERT -> cont 68#;+	DELETE -> cont 69#;+	REPLACE -> cont 70#;+	INTO -> cont 71#;+	FROM -> cont 72#;+	WITH -> cont 73#;+	INSTANCE -> cont 74#;+	OF -> cont 75#;+	QMARK -> cont 76#;+	CAST -> cont 77#;+	CASTABLE -> cont 78#;+	CASE -> cont 79#;+	DEFAULT -> cont 80#;+	TYPESWITCH -> cont 81#;+	Variable happy_dollar_dollar -> cont 82#;+	XMLtext happy_dollar_dollar -> cont 83#;+	TInteger happy_dollar_dollar -> cont 84#;+	TFloat happy_dollar_dollar -> cont 85#;+	TString happy_dollar_dollar -> cont 86#;+	TokenEOF -> cont 87#;+	_ -> happyError' (tk:tks)+	}++happyError_ tk tks = happyError' (tk:tks)++newtype HappyIdentity a = HappyIdentity a+happyIdentity = HappyIdentity+happyRunIdentity (HappyIdentity a) = a++instance Monad HappyIdentity where+    return = HappyIdentity+    (HappyIdentity p) >>= q = q p++happyThen :: () => HappyIdentity a -> (a -> HappyIdentity b) -> HappyIdentity b+happyThen = (>>=)+happyReturn :: () => a -> HappyIdentity a+happyReturn = (return)+happyThen1 m k tks = (>>=) m (\a -> k a tks)+happyReturn1 :: () => a -> b -> HappyIdentity a+happyReturn1 = \a tks -> (return) a+happyError' :: () => [(Token)] -> HappyIdentity a+happyError' = HappyIdentity . parseError++parse tks = happyRunIdentity happySomeParser where+  happySomeParser = happyThen (happyParse 0# tks) (\x -> happyReturn (happyOut4 x))++happySeq = happyDontSeq+++-- Abstract Syntax Tree for XQueries+data Ast = Ast String [Ast]+         | Avar String+         | Aint Int+         | Afloat Double+         | Astring String+         deriving Eq+++instance Show Ast+  where show (Ast s []) = s ++ "()"+        show (Ast s (x:xs)) = s ++ "(" ++ show x+                              ++ foldr (\a r -> ","++show a++r) "" xs+                              ++ ")"+        show (Avar s) = s+        show (Aint n) = show n+        show (Afloat n) = show n+        show (Astring s) = "\'" ++ s ++ "\'"+++screenSize = 80::Int++prettyAst :: Ast -> Int -> (String,Int)+prettyAst (Avar s) p = (s,(length s)+p)+prettyAst (Aint n) p = let s = show n in (s,(length s)+p)+prettyAst (Afloat n) p = let s = show n in (s,(length s)+p)+prettyAst (Astring s) p = ("\'" ++ s ++ "\'",(length s)+p+2)+prettyAst (Ast s args) p+    = let (ps,np) = prettyArgs args+      in (s++"("++ps++")",np+1)+    where prettyArgs [] = ("",p+1)+          prettyArgs xs = let ss = show (head xs) ++ foldr (\a r -> ","++show a++r) "" (tail xs)+                              np = (length s)+p+1+                          in if (length ss)+p < screenSize+                             then (ss,(length ss)+p)+                             else let ds = map (\x -> let (s,ep) = prettyAst x np+                                                      in (s ++ ",\n" ++ space np,ep)) (init xs)+                                      (ls,lp) = prettyAst (last xs) np+                                  in (concatMap fst ds ++ ls,lp)+          space n = replicate n ' '+++ppAst :: Ast -> String+ppAst e = let (s,_) = prettyAst e 0 in s+++call :: String -> [Ast] -> Ast+call name args = Ast "call" ((Avar name):args)+++concatenateAll :: [Ast] -> Ast+concatenateAll [x] = x+concatenateAll (x:xs) = foldl (\a r -> call "concatenate" [a,r]) x xs+concatenateAll _ = call "empty" []+++concatAll :: [Ast] -> Ast+concatAll [x] = call "string" [x]+concatAll (x:xs) = foldl (\a r -> call "concatenate" [call "string" [a],r]) x xs+concatAll _ = call "empty" []+++path_steps = ["child", "descendant", "attribute", "self", "descendant-or-self", "following-sibling", "following",+              "attribute-descendant", "parent", "ancestor", "preceding-sibling", "preceding", "ancestor-or-self" ]+++data Token+  = RETURN | SOME | EVERY | IF | THEN | ELSE | LB | RB | LP | RP | LSB | RSB+  | TO | PLUS | MINUS | TIMES | DIV | IDIV | MOD | AS | QMARK+  | TEQ | TNE | TLT | TLE | TGT | TGE | SEQ | SNE | SLT | SLE | SGT | SGE+  | AND | OR | NOT | UNION | INTERSECT | EXCEPT | FOR | LET | IN | COMMA+  | ASSIGN | WHERE | ORDER | BY | ASCENDING | DESCENDING | ELEMENT+  | ATTRIBUTE | STAG | ETAG | SATISFIES | ATSIGN | SLASH | DECLARE | SEMI | COLON+  | FUNCTION | VARIABLE | AT | DOT | DOTS | TokenEOF | PRE | POST | IS+  | INSERT | INTO | DELETE | FROM | REPLACE | WITH | INSTANCE | OF+  | CAST | CASTABLE | CASE | DEFAULT | TYPESWITCH+  | QName String | Variable String | XMLtext String | TInteger Int+  | TFloat Double | TString String | TError String+    deriving Eq+++instance Show Token+    where show (QName s) = "QName("++s++")"+	  show (Variable s) = "Variable("++s++")"+	  show (XMLtext s) = "XMLtext("++s++")"+	  show (TInteger n) = "Integer("++(show n)++")"+	  show (TFloat n) = "Double("++(show n)++")"+	  show (TString s) = "String("++s++")"+	  show (TError s) = "'"++s++"'"+          show t = case filter (\(n,_) -> n==t) tokenList of+                     (_,b):_ -> b+                     _ -> "Illegal token"+++printToken (QName s) = s+printToken (Variable s) = "$"++s+printToken (XMLtext s) = "'"++s++"'"+printToken (TInteger n) = show n+printToken (TFloat n) = show n+printToken (TString s) = "\""++s++"\""+printToken (TError s) = "error("++s++")"+printToken t = case filter (\(n,_) -> n==t) tokenList of+           (_,b):_ -> b+           _ -> "Illegal token"+++tokenList :: [(Token,String)]+tokenList = [(TokenEOF,"EOF"),(RETURN,"return"),(SOME,"some"),(EVERY,"every"),(IF,"if"),(THEN,"then"),(ELSE,"else"),+             (LB,"["),(RB,"]"),(LP,"("),(RP,")"),(LSB,"{"),(RSB,"}"),(QMARK,"?"),+             (TO,"to"),(PLUS,"+"),(MINUS,"-"),(TIMES,"*"),(DIV,"div"),(IDIV,"idiv"),(MOD,"mod"),+             (TEQ,"="),(TNE,"!="),(TLT,"<"),(TLE,"<="),(TGT,">"),(TGE,">="),(PRE,"<<"),(POST,">>"),+             (IS,"is"),(SEQ,"eq"),(SNE,"ne"),(SLT,"lt"),(SLE,"le"),(SGT,"gt"),(SGE,"ge"),(AND,"and"),+             (OR,"or"),(NOT,"not"),(UNION,"|"),(INTERSECT,"intersect"),(EXCEPT,"except"),+             (FOR,"for"),(LET,"let"),(IN,"in"),(AS,"as"),(COMMA,"','"),(ASSIGN,":="),(WHERE,"where"),(ORDER,"order"),+             (BY,"by"),(ASCENDING,"ascending"),(DESCENDING,"descending"),(ELEMENT,"element"),+             (ATTRIBUTE,"attribute"),(STAG,"</"),(ETAG,"/>"),(SATISFIES,"satisfies"),(ATSIGN,"@"),+             (SLASH,"/"),(DECLARE,"declare"),(FUNCTION,"function"),(VARIABLE,"variable"),+  	     (INSERT,"insert"),(INTO,"into"),(DELETE,"delete"),(FROM,"from"),(REPLACE,"replace"),(WITH,"with"),+             (AT,"at"),(DOTS,".."),(DOT,"."),(SEMI,";"),(COLON,":"),(INSTANCE,"instance"),(OF,"of"),+             (CAST,"cast"),(CASTABLE,"castable"),(CASE,"case"),(DEFAULT,"default"),(TYPESWITCH,"typeswitch")]+++parseError tk = error (case tk of+                         ((TError s):_) -> "Parse error: "++s+                         (TokenEOF:_) -> "Parse error: Unexpected end of file"+		         _ -> "Parse error: "++(foldr (\a r -> (printToken a)++" "++r) "" (init (take 11 tk))))+++scan :: String -> [Token]+scan cs = lexer cs ""+++xmlText :: String -> [Token]+xmlText "" = []+xmlText text = [XMLtext text]+++-- scans XML syntax and returns an XMLtext token with the text+xml :: String -> String -> String -> [Token]+xml ('{':cs) text n = (xmlText text)++(LSB : lexer cs ('{':n))+xml ('<':'/':cs) text n = (xmlText text)++(STAG : lexer cs ('<':'/':n))+xml ('<':'!':'-':cs) text n = xmlComment cs (text++"<!-") n+xml ('<':cs) text n = (xmlText text)++(TLT : lexer cs ('<':n))+xml ('(':':':cs) text n = xqComment cs text n+xml (c:cs) text n = xml cs (text++[c]) n+xml [] text _ = xmlText text+++xqComment :: String -> String -> String -> [Token]+xqComment (':':')':cs) text n = xml cs text n+xqComment (_:cs) text n = xqComment cs text n+xqComment [] text _ = xmlText text+++xmlComment :: String -> String -> String -> [Token]+xmlComment ('-':'>':cs) text n = xml cs (text++"->") n+xmlComment (c:cs) text n = xmlComment cs (text++[c]) n+xmlComment [] text _ = xmlText text+++isQN :: Char -> Bool+isQN c = elem c "_-." || isDigit c || isAlpha c+++isVar :: Char -> Bool+isVar c = elem c "_-." || isDigit c || isAlpha c+++inXML :: String -> Bool+inXML ('>':'<':_) = True+inXML _ = False+++-- the XQuery scanner+lexer :: String -> String -> [Token]+lexer [] "" = [ TokenEOF ]+lexer [] _ = [ TError "Unexpected end of input" ]+lexer (' ':'>':' ':cs) n = TGT : lexer cs n+lexer (c:cs) n+      | isSpace c = lexer cs n+      | isAlpha c || c=='_' = lexVar (c:cs) n+      | isDigit c = lexNum (c:cs) n+lexer ('$':c:cs) n | isAlpha c+      = let (var,rest) = span isVar (c:cs)+        in (Variable var) : lexer rest n+lexer (':':'=':cs) n = ASSIGN : lexer cs n+lexer ('<':'/':cs) n = STAG : lexer cs ('<':'/':n)+lexer ('<':'=':cs) n = TLE : lexer cs n+lexer ('>':'=':cs) n = TGE : lexer cs n+lexer ('<':'<':cs) n = PRE : lexer cs n+lexer ('>':'>':cs) n = POST : lexer cs n+lexer ('/':'>':cs) m = case m of+                         '<':n -> ETAG : (if inXML n then xml cs "" n else lexer cs n)+                         _ -> [ TError "Unexpected token: '/>'" ]+lexer ('(':':':cs) n = lexComment cs n+lexer ('<':'!':'-':cs) n = lexXmlComment cs "<!-" n+lexer ('.':'.':cs) n = DOTS : lexer cs n+lexer ('.':cs) n = DOT : lexer cs n+lexer ('!':'=':cs) n = TNE : lexer cs n+lexer ('\'':cs) n = lexString cs "" ('\'':n)+lexer ('\"':cs) n = lexString cs "" ('\"': n)+lexer ('[':cs) n = LB : lexer cs n+lexer (']':cs) n = RB : lexer cs n+lexer ('(':cs) n = LP : lexer cs n+lexer (')':cs) n = RP : lexer cs n+lexer ('}':cs) m = case m of+                     '{':'\"':n -> RSB : lexString cs "" ('\"':n)+                     '{':'\'':n -> RSB : lexString cs "" ('\'':n)+                     '{':n -> RSB : (if inXML n then xml cs "" n else lexer cs n)+                     _ -> [ TError "Unexpected token: '}'" ]+lexer ('+':cs) n = PLUS : lexer cs n+lexer ('-':cs) n = MINUS : lexer cs n+lexer ('*':cs) n = TIMES : lexer cs n+lexer ('=':cs) n = TEQ : lexer cs n+lexer ('<':c:cs) n = TLT : (lexer (c:cs) (if isAlpha c then ('<':n) else n))+lexer ('>':cs) m = case m of+                     '<':'/':'>':'<':n -> TGT : (if inXML n then xml cs "" n else lexer cs n)+                     '<':n -> TGT : xml cs "" ('>':m) +                     _ -> TGT : lexer cs m+lexer (',':cs) n = COMMA : lexer cs n+lexer ('@':cs) n = ATSIGN : lexer cs n+lexer ('?':cs) n = QMARK : lexer cs n+lexer ('/':cs) n = SLASH : lexer cs n+lexer ('{':cs) n = LSB : lexer cs ('{':n)+lexer ('|':cs) n = UNION : lexer cs n+lexer (';':cs) n = SEMI : lexer cs n+lexer (':':cs) n = COLON : lexer cs n+lexer (c:cs) n = TError ("Illegal character: '"++[c,'\'']) : lexer cs n+++lexExp :: String -> (String,String)+lexExp (e:cs)+    | e == 'e' || e == 'E'+    = case cs of+        '+':rest -> span isDigit rest+        '-':rest -> let (s,rest1) = span isDigit rest+                    in ('-':s,rest1)+        rest -> span isDigit rest+lexExp cs = ("",cs)+++lexNum :: String -> String -> [Token]+lexNum cs n+    = let (si,rest) = span isDigit cs+      in case rest of+           '.':rest1+               -> let (sd,rest2) = span isDigit rest1+                  in case lexExp rest2 of+                       ("",_) -> (TFloat (read $ si ++ "." ++ sd)) : lexer rest2 n+                       (exp,rest3) -> (TFloat (read $ si ++ "." ++ sd ++ "e" ++ exp)) : lexer rest3 n+           _ -> case lexExp rest of+                  ("",_) -> (TInteger (read si)) : lexer rest n+                  (exp,rest3) -> (TFloat (read $ si ++ "e" ++ exp)) : lexer rest3 n+++lexString :: String -> String -> String -> [Token]+lexString ('\"':cs) s m = case m of+                            '\"':n -> (TString s) : (lexer cs n)+                            _ -> lexString cs (s++"\"") m+lexString ('\'':cs) s m = case m of+                            '\'':n -> (TString s) : (lexer cs n)+                            _ -> lexString cs (s++"\'") m+-- a string in an attribute value must evaluate between {}+lexString ('{':cs) s (c:'<':n) = (TString s) : LSB : (lexer cs ('{':c:'<':n))+lexString ('\\':'n':cs) s n = lexString cs (s++['\n']) n+lexString ('\\':'r':cs) s n = lexString cs (s++['\r']) n+lexString (c:cs) s n = lexString cs (s++[c]) n+lexString [] s n = [ TError "End of input while in string" ]+++lexComment :: String -> String -> [Token]+lexComment (':':')':cs) n = lexer cs n+lexComment (_:cs) n = lexComment cs n+lexComment [] n = [ TError "End of input while in comment" ]+++lexXmlComment :: String -> String -> String -> [Token]+lexXmlComment ('-':'>':cs) text n = (xmlText (text++"->"))++(lexer cs n)+lexXmlComment (c:cs) text n = lexXmlComment cs (text++[c]) n+lexXmlComment [] text _ = xmlText text+++lexVar :: String -> String -> [Token]+lexVar cs n =+    let (nm,rest) = span isQN cs+        token = case nm of+          "return" -> RETURN+          "some" -> SOME+          "every" -> EVERY+          "if" -> IF+          "then" -> THEN+          "else" -> ELSE+          "to" -> TO+          "div" -> DIV+          "idiv" -> IDIV+          "mod" -> MOD+          "and" -> AND+          "or" -> OR+          "not" -> NOT+          "union" -> UNION+          "intersect" -> INTERSECT+          "except" -> EXCEPT+          "for" -> FOR+          "let" -> LET+          "in" -> IN+          "as" -> AS+          "where" -> WHERE+          "order" -> ORDER+          "by" -> BY+          "ascending" -> ASCENDING+          "descending" -> DESCENDING+          "element" -> ELEMENT+          "attribute" -> ATTRIBUTE+          "satisfies" -> SATISFIES+          "declare" -> DECLARE+          "function" -> FUNCTION+          "variable" -> VARIABLE+          "at" -> AT+          "eq" -> SEQ+          "ne" -> SNE+          "lt" -> SLT+          "le" -> SLE+          "gt" -> SGT+          "ge" -> SGE+          "is" -> IS+	  "insert" -> INSERT+	  "into" -> INTO+	  "delete" -> DELETE+	  "from" -> FROM+	  "replace" -> REPLACE+	  "with" -> WITH+          "instance" -> INSTANCE+          "of" -> OF+          "cast" -> CAST+          "castable" -> CASTABLE+          "case" -> CASE+          "default" -> DEFAULT+          "typeswitch" -> TYPESWITCH+          var -> QName var+    in case token of+         QName v1 -> case rest of+                       ':':rest2 -> let (v2,rest3) = span isQN rest2+                                    in [QName v1,COLON,QName v2] ++ lexer rest3 n+                       _ -> QName v1 : lexer rest n+         x -> x : lexer rest n {-# LINE 1 "templates/GenericTemplate.hs" #-} {-# LINE 1 "templates/GenericTemplate.hs" #-} {-# LINE 1 "<built-in>" #-}
+ src/Text/XML/HXQ/Types.hs view
@@ -0,0 +1,257 @@+{-------------------------------------------------------------------------------------+-+- The XQuery type system+- Programmer: Leonidas Fegaras+- Email: fegaras@cse.uta.edu+- Web: http://lambda.uta.edu/+- Creation: 01/16/09, last update: 01/16/09+- +- Copyright (c) 2008 by Leonidas Fegaras, the University of Texas at Arlington. All rights reserved.+- This material is provided as is, with absolutely no warranty expressed or implied.+- Any use is at your own risk. Permission is hereby granted to use or copy this program+- for any purpose, provided the above notices are retained on all copies.+-+--------------------------------------------------------------------------------------}+++module Text.XML.HXQ.Types(readNum,toNum,toInt,toString,toFloat,+                          buildInTypes,isBuildInType,instanceOf,castAs,castableAs) where++import Char(isDigit)+import Text.XML.HXQ.Parser+import Text.XML.HXQ.XTree+++buildInTypes :: [(String,String)]+buildInTypes+    = map (\(n,m) -> ("xs:"++n,"xs:"++m))+      [("untypedAtomic","anyAtomicType"),+       ("dateTime","anyAtomicType"),+       ("date","anyAtomicType"),+       ("time","anyAtomicType"),+       ("duration","anyAtomicType"),+       ("float","anyAtomicType"),+       ("double","anyAtomicType"),+       ("decimal","anyAtomicType"),+       ("gYearMonth","anyAtomicType"),+       ("gYear","anyAtomicType"),+       ("gMonthDay","anyAtomicType"),+       ("gDay","anyAtomicType"),+       ("gMonth","anyAtomicType"),+       ("boolean","anyAtomicType"),+       ("base64Binary","anyAtomicType"),+       ("hexBinary","anyAtomicType"),+       ("anyURI","anyAtomicType"),+       ("QName","anyAtomicType"),+       ("NOTATION","anyAtomicType"),+       ("yearMonthDuration","duration"),+       ("dayTmeDuration","duration"),+       ("Integer","decimal"),+       ("nonPositiveInteger","Integer"),+       ("negativeInteger","nonPositiveInteger"),+       ("long","Integer"),+       ("int","long"),+       ("short","int"),+       ("byte","short"),+       ("nonNegativeInteger","Integer"),+       ("unsignedLong","nonNegativeInteger"),+       ("unsignedInt","unsignedLong"),+       ("unsignedShort","unsignedInt"),+       ("unsignedByte","unsignedShort"),+       ("positiveInteger","nonNegativeInteger"),+       ("string","anyAtomicType"),+       ("normalizedString","string"),+       ("token","normalizedString"),+       ("language","token"),+       ("NMTOKEN","token"),+       ("Name","token"),+       ("NCName","Name"),+       ("ID","NCName"),+       ("IDREF","NCName"),+       ("ENTITY","NCName")]+++isBuildInType :: String -> Bool+isBuildInType "xs:anyAtomicType" = True+isBuildInType name = memV name buildInTypes+++-- find the value of a variable in an association list+findV var ((n,b):_) | n==var = b+findV var (_:xs) = findV var xs+findV var _ = error ("Undefined variable: "++var)+++-- is the variable defined in the association list?+memV var ((n,_):_) | n==var = True+memV var (_:xs) = memV var xs+memV _ _ = False+++-- xs:string casting. Much like string()+toString :: XTree -> String+toString x+    = case x of+        XElem _ _ _ _ zs+            -> concatMap toString zs+        XAttr _ v -> v+        XText x -> x+        XInt n -> show n+        XFloat n -> show n+        XBool b -> if b then "true" else "false"+        _ -> ""+++-- parse a numeral (int or float) from a string+readNum :: String -> Maybe XTree+readNum cs+    = let readInt ('+':rest) = span isDigit rest+          readInt ('-':rest) = let (s,rest1) = span isDigit rest+                               in ('-':s,rest1)+          readInt rest = span isDigit rest+          readExp ('e':cs) = readInt cs+          readExp ('E':cs) = readInt cs+          readExp cs = ("",cs)+          (si,rest) = readInt cs+      in case rest of+           '.':rest1+               -> let (sd,rest2) = span isDigit rest1+                  in case readExp rest2 of+                       ("",[]) -> Just $ XFloat (read $ si ++ "." ++ sd)+                       (exp,[]) -> Just $ XFloat (read $ si ++ "." ++ sd ++ "e" ++ exp)+                       _ -> Nothing+           _ -> case readExp rest of+                  ("",[]) -> Just $ XInt (read si)+                  (exp,[]) -> Just $ XFloat (read $ si ++ "e" ++ exp)+                  _ -> Nothing+++-- casting to any kind of numeral+toNum :: XTree -> Maybe XTree+toNum (XElem _ _ _ _ [x]) = toNum x+toNum (XText s) = readNum s+toNum (x@(XInt n)) = Just x+toNum (x@(XFloat n)) = Just x+toNum (XBool b) = Just $ XInt (if b then 1 else 0)+toNum (XAttr _ v) = toNum (XText v)+toNum _ = Nothing+++-- xs:int casting+toInt :: XTree -> Maybe XTree+toInt (XElem _ _ _ _ [x]) = toInt x+toInt (XText s) = case readNum s of+                    Just (XFloat n) -> Just $ XInt (floor n)+                    x -> x+toInt (x@(XInt n)) = Just x+toInt (XFloat n) = Just $ XInt (floor n)+toInt (XBool b) = Just $ XInt (if b then 1 else 0)+toInt (XAttr _ v) = toInt (XText v)+toInt _ = Nothing+++-- xs:float casting+toFloat :: XTree -> Maybe XTree+toFloat (XElem _ _ _ _ [x]) = toFloat x+toFloat (XText s) = case readNum s of+                      Just (XInt n) -> Just $ XFloat $ fromIntegral n+                      x -> x+toFloat (XInt n) = Just $ XFloat $ fromIntegral n+toFloat (x@(XFloat n)) = Just x+toFloat (XBool b) = Just $ XFloat (if b then 1 else 0)+toFloat (XAttr _ v) = toFloat (XText v)+toFloat _ = Nothing+++-- xs:boolean casting+toBool :: XTree -> Maybe XTree+toBool (XText s) = Just $ XBool $ s /= ""+toBool (XInt n) = Just $ XBool $ n /= 0+toBool (XFloat n) = Just $ XBool $ n /= 0+toBool (XAttr _ v) = Just $ XBool $ v /= ""+toBool (XBool b) = Just $ XBool b+toBool x = Nothing+++-- all casting functions+casts :: [(String,XTree->Maybe XTree)]+casts+    = map (\(n,f) -> ("xs:"++n,f))+      [("anyAtomicType",Just . id),+       ("string",Just . XText . toString),+       ("float",toFloat),+       ("Integer",toInt),+       ("nonNegativeInteger",\x -> do XInt n <- toInt x+                                      return $! XInt $ abs n),+       ("boolean",toBool)]+++-- implements: expr instance of type+instanceOf :: XSeq -> Ast -> Bool+instanceOf expr typ+    = instOf expr typ+      where instOf [] (Ast "empty-sequence" []) = True+            instOf [] (Ast "?" _) = True+            instOf [x] (Ast "?" [tp]) = instOfOne x tp+            instOf xs (Ast "*" [tp])+                = all (\x -> instOfOne x tp) xs+            instOf xs (Ast "+" [tp])+                = (not $ null xs) && all (\x -> instOfOne x tp) xs+            instOf [x] tp = instOfOne x tp+            instOf _ _ = False+            instOfOne (XElem t _ _ _ xs) seqType+                = case seqType of+                    Ast "item" [] -> True+                    Ast "node" [] -> True+                    Ast "element" [] -> True+                    Ast "element" [Avar tag]+                        -> tag == "*" || t == tag+                    Ast "element" [Avar tag,Ast "?" [tp]]+                        -> (tag == "*" || t == tag)+                           && null xs || instOf xs tp+                    Ast "element" [Avar tag,tp]+                        -> (tag == "*" || t == tag) && instOf xs tp+                    _ -> False+            instOfOne (XAttr nm v) seqType+                = case seqType of+                    Ast "item" [] -> True+                    Ast "attribute" [Avar name]+                        -> name == "*" || nm == name+                    _ -> False+            instOfOne x (Avar tname)+                = if memV tname casts+                  then (findV tname casts x) /= Nothing+                  else if memV tname buildInTypes+                       then instOfOne x (Avar $ findV tname buildInTypes)+                       else error $ "Unrecognized build-in type: "++tname+            instOfOne _ _ = False+++-- implements: expr cast as type+castAs :: XSeq -> Ast -> XSeq+castAs [] (Ast "?" _) = []+castAs [XElem _ _ _ _ xs] tp = castAs xs tp+castAs [x] (Avar tname)+    = if memV tname casts+      then case findV tname casts x of+             Just v -> [v]+             Nothing -> error $ "Value "++show x++" cannot be cast to the atomic type: "++tname+      else if memV tname buildInTypes+           then castAs [x] (Avar $ findV tname buildInTypes)+           else error $ "Unrecognized build-in type: "++tname+castAs xs tp = error $ "Value "++show xs++" cannot be cast to the type "++show tp+++-- implements: expr castable as type+castableAs :: XSeq -> Ast -> Bool+castableAs [] (Ast "?" _) = True+castableAs [XElem _ _ _ _ xs] tp = castableAs xs tp+castableAs [x] (Avar tname)+    = if memV tname casts+      then case findV tname casts x of+             Just _ -> True+             Nothing -> False+      else if memV tname buildInTypes+           then castableAs [x] (Avar $ findV tname buildInTypes)+           else error $ "Unrecognized build-in type: "++tname+castableAs _ _ = False
src/Text/XML/HXQ/XQuery.hs view
@@ -4,7 +4,7 @@ - Programmer: Leonidas Fegaras - Email: fegaras@cse.uta.edu - Web: http://lambda.uta.edu/-- Creation: 03/22/08, last update: 08/19/08+- Creation: 03/22/08, last update: 01/17/09 -  - Copyright (c) 2008 by Leonidas Fegaras, the University of Texas at Arlington. All rights reserved. - This material is provided as is, with absolutely no warranty expressed or implied.@@ -13,7 +13,9 @@ - --------------------------------------------------------------------------------------} +{-# OPTIONS_HADDOCK prune #-} + -- | HXQ is a fast and space-efficient compiler from XQuery (the standard -- query language for XML) to embedded Haskell code. The translation is -- based on Haskell templates. It also provides an interpreter for@@ -22,11 +24,11 @@ -- For more information, look at <http://lambda.uta.edu/HXQ/>. module Text.XML.HXQ.XQuery (        -- * The XML Data Representation-       XTree(..), XSeq, Tag, AttList, putXSeq,+       Name, AttList, XTree(..), XSeq, putXSeq,        -- * The XQuery Compiler-       xq, xe,+       xq, xe, qx,        -- * The XQuery Interpreter-       xquery,+       xquery, eval,        -- * The XQuery Compiler with Database Connectivity        xqdb,        -- * The XQuery Interpreter with Database Connectivity@@ -34,12 +36,19 @@        -- * Shredding and Publishing XML Documents Using a Relational Database        genSchema, shred, shredC, printSchema, createIndex,        -- * Other Functions-       XMLEvent(..), connect, disconnect, commit, rollback, prepareSQL, executeSQL, qx+       XMLEvent(..), connect, disconnect, commit, rollback, prepareSQL, executeSQL     ) where -import HXML(AttList)+import HXML(Name,AttList) import Text.XML.HXQ.XTree import Text.XML.HXQ.OptionalDB import XMLParse import Text.XML.HXQ.Compiler import Text.XML.HXQ.Interpreter+++-- | The XQuery interpreter as an XQuery function.+eval :: XSeq -> IO XSeq+eval x = case x of+           [ XText q ] -> xquery q+           _ -> error $ "The eval argument must be a string: " ++ show x
src/Text/XML/HXQ/XTree.hs view
@@ -4,7 +4,7 @@ - Programmer: Leonidas Fegaras - Email: fegaras@cse.uta.edu - Web: http://lambda.uta.edu/-- Creation: 05/01/08, last update: 01/04/09+- Creation: 05/01/08, last update: 01/17/09 -  - Copyright (c) 2008 by Leonidas Fegaras, the University of Texas at Arlington. All rights reserved. - This material is provided as is, with absolutely no warranty expressed or implied.@@ -18,37 +18,36 @@   module Text.XML.HXQ.XTree-    ( Tag, XTree(..), XSeq, materialize, putXSeq, showXS ) where+    ( XTree(..), XSeq, materialize, putXSeq, showXS ) where  import System.IO import Char(isSpace) import XMLParse(XMLEvent(..))-import HXML(AttList)+import HXML(Name,AttList) import Text.XML.HXQ.Parser(Ast(..))  -type Tag = String-- -- | A rose tree representation of XML data. -- An XML element is:  @XElem tagname atributes preorder parent children@. -- The preorder numbering is the document order of elements. -- The parent is a cyclic reference to the parent element.-data XTree =  XElem    !Tag !AttList !Int XTree [XTree]   -- ^ an XML tree node (element)-           |  XAttr    !Tag !String     -- ^ attribute construction+data XTree =  XElem    !Name !AttList !Int XTree [XTree]   -- ^ an XML tree node (element)+           |  XAttr    !Name !String    -- ^ attribute construction            |  XText    !String          -- ^ an XML tree leaf (PCDATA)            |  XInt     !Int             -- ^ an XML tree leaf (int)-           |  XFloat   !Float           -- ^ an XML tree leaf (float)+           |  XFloat   !Double          -- ^ an XML tree leaf (double)            |  XBool    !Bool            -- ^ an XML tree leaf (boolean)-           |  XPI      Tag String	-- ^ processing instruction-           |  XGERef   Tag		-- ^ general entity reference+           |  XPI      Name String	-- ^ processing instruction+           |  XGERef   String		-- ^ general entity reference            |  XComment String		-- ^ comment            |  XError   String		-- ^ error report            |  XNull                     -- ^ null value+           |  XType    Ast              -- ^ type information            |  XNoPad                    -- ^ marker for no padding in XSeq            deriving Eq  +-- | A sequence of XML fragments type XSeq = [XTree]  @@ -70,6 +69,7 @@ showXT :: XTree -> Bool -> String showXT e pad     = case e of+        XElem "_document" _ _ _ xs -> showXS xs         XElem tag al _ _ [] -> "<"++tag++showAL al++"/>"         XElem _ _ _ _ _ | emptyElem e -> ""         XElem tag al _ _ xs | all emptyElem xs -> "<"++tag++showAL al++"/>"@@ -83,6 +83,7 @@         XPI n s -> "<?"++n++" "++s++">"         XError s -> error s         XNull -> "?"+        XType tp -> show tp         _ -> ""       where p = if pad then " " else "" @@ -113,7 +114,7 @@ -- Lazily materialize the SAX stream into a DOM tree without setting parent references. materializeWithoutParent :: Stream -> XTree materializeWithoutParent stream-    = XElem "document" [] 1 noParentError+    = XElem "_document" [] 1 noParentError             [head (filter (\x -> case x of XElem _ _ _ _ _ -> True; _ -> False)                           ((\(x,_,_)->x) (ml stream 2)))]       where m ((TextEvent t):xs) i = (XText t,xs,i)@@ -139,7 +140,7 @@ -- Used only if the query has backward steps that cannot be eliminated. materializeWithParent :: Stream -> XTree materializeWithParent stream = root-    where root = XElem "document" [] 1 (XError "Trying to access the root parent")+    where root = XElem "_document" [] 1 (XError "Trying to access the root parent")                        [head (filter (\x -> case x of XElem _ _ _ _ _ -> True; _ -> False)                                      ((\(x,_,_)->x) (ml stream 2 root)))]           m ((TextEvent t):xs) i _ = (XText t,xs,i)
src/hxml-0.2/XML.hs view
@@ -27,9 +27,11 @@  import Tree +-- | Element tagname or attribute name type Name 	= String		-- %%% XMLNS makes this more complex type GI 	= Name			-- generic identifier, element type name-type AttList	= [(Name,String)]	-- attribute list+-- | Attribute list+type AttList	= [(Name,String)] type XML	= Tree XMLNode  data XMLNode =
src/noDB/Text/XML/HXQ/OptionalDB.hs view
@@ -4,7 +4,7 @@ - Programmer: Leonidas Fegaras - Email: fegaras@cse.uta.edu - Web: http://lambda.uta.edu/-- Creation: 08/14/08, last update: 08/14/08+- Creation: 08/14/08, last update: 01/14/09 -  - Copyright (c) 2008 by Leonidas Fegaras, the University of Texas at Arlington. All rights reserved. - This material is provided as is, with absolutely no warranty expressed or implied.@@ -42,48 +42,66 @@ prepareSQL db sql = noDBerror  --- | Connect to the relational database in filepath-connect :: FilePath -> IO Connection-connect filepath = noDBerror+-- | Connect to a relational database+connect :: String   -- ^ database name+           -> IO Connection+connect dbname = noDBerror   -- | Disconnect from the relational database-disconnect :: Connection -> IO ()+disconnect :: Connection   -- ^ database connection+              -> IO () disconnect db = noDBerror   -- | commit the updates to the database-commit :: Connection -> IO ()+commit :: Connection   -- ^ database connection+          -> IO () commit db = noDBerror   -- | rollback the updates from the database-rollback :: Connection -> IO ()+rollback :: Connection   -- ^ database connection+            -> IO () rollback db = noDBerror   -- | Print the relational schema of the XML document stored in the database under the given name-printSchema :: Connection -> String -> IO ()+printSchema :: Connection   -- ^ database connection+               -> String    -- ^ schema name+               -> IO () printSchema db name = noDBerror   -- | Create a schema for an XML document into the database under the given name.-genSchema :: Connection -> String -> String -> IO Table+genSchema :: Connection   -- ^ database connection+             -> FilePath  -- ^ XML document pathname+             -> String    -- ^ schema name+             -> IO Table genSchema db file name = noDBerror   -- | Store an XML document into the database under the given name.-shred :: Connection -> String -> String -> IO ()+shred :: Connection   -- ^ database connection+         -> FilePath  -- ^ XML document pathname+         -> String    -- ^ schema name+         -> IO () shred db file name = noDBerror   -- | Store an XML document into the database under the given name. Generates Haskell code.-shredC :: String -> String -> String -> Q Exp+shredC :: String      -- ^ database name+          -> FilePath -- ^ XML document pathname+          -> String   -- ^ schema name+          -> Q Exp shredC db file name = noDBerror   -- | Create a secondary index on tagname for the shredded document under the given name..-createIndex :: Connection -> String -> String -> IO ()+createIndex :: Connection -- ^ database connection+               -> String  -- ^ schema name+               -> String  -- ^ the tag name of the elements to be indexed+               -> IO () createIndex db name tagname = noDBerror  
src/withDB/Text/XML/HXQ/DB.hs view
@@ -139,7 +139,7 @@ ----------------------------------------------------------------------------------------}  -type Path = [Tag]+type Path = [String]   data Table = Table String Path Bool [Table]  -- table-name relative-path mixed-content? components