1
0
forked from GitHub/gf-core

JS.cf : Changed the JS grammar to support strings as property names in objects. Changed pretty much all the files in the same folder as well as GFCCToJS.hs and SISR.hs to reflect the changes.

This commit is contained in:
meza
2008-04-29 13:05:24 +00:00
parent 50a1381a27
commit 9f1e3e7b89
10 changed files with 148 additions and 115 deletions

View File

@@ -38,21 +38,22 @@ abstract2js start ds = new "GFAbstract" [JS.EStr start, JS.EObj $ map absdef2js
absdef2js :: (CId,(D.Type,D.Exp)) -> JS.Property
absdef2js (CId f,(typ,_)) =
let (args,CId cat) = M.catSkeleton typ in
JS.Prop (JS.Ident f) (new "Type" [JS.EArray [JS.EStr x | CId x <- args], JS.EStr cat])
JS.Prop (JS.StringPropName f) (new "Type" [JS.EArray [JS.EStr x | CId x <- args], JS.EStr cat])
concrete2js :: String -> String -> (CId,D.Concr) -> JS.Property
concrete2js start n (CId c, cnc) =
JS.Prop l (new "GFConcrete" ([(JS.EObj $ ((map (cncdef2js n c) ds) ++ litslins))] ++
maybe [] (parser2js start) (D.parser cnc)))
where
l = JS.Ident c
l = JS.StringPropName c
ds = concatMap Map.assocs [D.lins cnc, D.opers cnc, D.lindefs cnc]
litslins = [JS.Prop (JS.Ident "Int") (JS.EFun [children] [JS.SReturn $ new "Arr" [JS.EIndex (JS.EVar children) (JS.EInt 0)]]),
JS.Prop (JS.Ident "Float") (JS.EFun [children] [JS.SReturn $ new "Arr" [JS.EIndex (JS.EVar children) (JS.EInt 0)]]),
JS.Prop (JS.Ident "String") (JS.EFun [children] [JS.SReturn $ new "Arr" [JS.EIndex (JS.EVar children) (JS.EInt 0)]])]
litslins = [JS.Prop (JS.StringPropName "Int") (JS.EFun [children] [JS.SReturn $ new "Arr" [JS.EIndex (JS.EVar children) (JS.EInt 0)]]),
JS.Prop (JS.StringPropName "Float") (JS.EFun [children] [JS.SReturn $ new "Arr" [JS.EIndex (JS.EVar children) (JS.EInt 0)]]),
JS.Prop (JS.StringPropName "String") (JS.EFun [children] [JS.SReturn $ new "Arr" [JS.EIndex (JS.EVar children) (JS.EInt 0)]])]
cncdef2js :: String -> String -> (CId,D.Term) -> JS.Property
cncdef2js n l (CId f, t) = JS.Prop (JS.Ident f) (JS.EFun [children] [JS.SReturn (term2js n l t)])
cncdef2js n l (CId f, t) = JS.Prop (JS.StringPropName f) (JS.EFun [children] [JS.SReturn (term2js n l t)])
term2js :: String -> String -> D.Term -> JS.Expr
term2js n l t = f t
@@ -94,7 +95,7 @@ parser2js start p = [new "Parser" [JS.EStr start,
JS.EArray $ map frule2js (Array.elems (allRules p)),
JS.EObj $ map cats (Map.assocs (startupCats p))]]
where
cats (CId c,is) = JS.Prop (JS.Ident c) (JS.EArray (map JS.EInt is))
cats (CId c,is) = JS.Prop (JS.StringPropName c) (JS.EArray (map JS.EInt is))
frule2js :: FRule -> JS.Expr
frule2js (FRule n args res lins) = new "Rule" [JS.EInt res, name2js n, JS.EArray (map JS.EInt args), lins2js lins]

View File

@@ -50,6 +50,11 @@ data Expr =
deriving (Eq,Ord,Show)
data Property =
Prop Ident Expr
Prop PropertyName Expr
deriving (Eq,Ord,Show)
data PropertyName =
IdentPropName Ident
| StringPropName String
deriving (Eq,Ord,Show)

View File

@@ -48,5 +48,8 @@ define eseq1 x xs = ESeq (x:xs);
separator Expr "," ;
coercions Expr 16 ;
Prop. Property ::= Ident ":" Expr ;
separator Property "," ;
Prop. Property ::= PropertyName ":" Expr ;
separator Property "," ;
IdentPropName. PropertyName ::= Ident ;
StringPropName. PropertyName ::= String ;

View File

@@ -114,19 +114,19 @@ alexMove (Pn a l c) '\n' = Pn (a+1) (l+1) 1
alexMove (Pn a l c) _ = Pn (a+1) l (c+1)
type AlexInput = (Posn, -- current position,
Char, -- previous char
String) -- current input string
Char, -- previous char
String) -- current input string
tokens :: String -> [Token]
tokens str = go (alexStartPos, '\n', str)
where
go :: (Posn, Char, String) -> [Token]
go inp@(pos, _, str) =
case alexScan inp 0 of
AlexEOF -> []
AlexError (pos, _, _) -> [Err pos]
AlexSkip inp' len -> go inp'
AlexToken inp' len act -> act pos (take len str) : (go inp')
case alexScan inp 0 of
AlexEOF -> []
AlexError (pos, _, _) -> [Err pos]
AlexSkip inp' len -> go inp'
AlexToken inp' len act -> act pos (take len str) : (go inp')
alexGetChar :: AlexInput -> Maybe (Char,AlexInput)
alexGetChar (p, c, []) = Nothing

View File

@@ -107,19 +107,19 @@ alexMove (Pn a l c) '\n' = Pn (a+1) (l+1) 1
alexMove (Pn a l c) _ = Pn (a+1) l (c+1)
type AlexInput = (Posn, -- current position,
Char, -- previous char
String) -- current input string
Char, -- previous char
String) -- current input string
tokens :: String -> [Token]
tokens str = go (alexStartPos, '\n', str)
where
go :: (Posn, Char, String) -> [Token]
go inp@(pos, _, str) =
case alexScan inp 0 of
AlexEOF -> []
AlexError (pos, _, _) -> [Err pos]
AlexSkip inp' len -> go inp'
AlexToken inp' len act -> act pos (take len str) : (go inp')
case alexScan inp 0 of
AlexEOF -> []
AlexError (pos, _, _) -> [Err pos]
AlexSkip inp' len -> go inp'
AlexToken inp' len act -> act pos (take len str) : (go inp')
alexGetChar :: AlexInput -> Maybe (Char,AlexInput)
alexGetChar (p, c, []) = Nothing

View File

@@ -216,6 +216,12 @@ happyIn36 x = unsafeCoerce# x
happyOut36 :: (HappyAbsSyn ) -> ([Property])
happyOut36 x = unsafeCoerce# x
{-# INLINE happyOut36 #-}
happyIn37 :: (PropertyName) -> (HappyAbsSyn )
happyIn37 x = unsafeCoerce# x
{-# INLINE happyIn37 #-}
happyOut37 :: (HappyAbsSyn ) -> (PropertyName)
happyOut37 x = unsafeCoerce# x
{-# INLINE happyOut37 #-}
happyInTok :: Token -> (HappyAbsSyn )
happyInTok x = unsafeCoerce# x
{-# INLINE happyInTok #-}
@@ -224,21 +230,21 @@ happyOutTok x = unsafeCoerce# x
{-# INLINE happyOutTok #-}
happyActOffsets :: HappyAddr
happyActOffsets = HappyA# "\x00\x00\xb3\x00\x00\x00\x94\x00\xe6\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00\x00\x00\xbf\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x02\xfe\xff\x14\x02\x00\x00\x36\x00\x98\x00\x00\x00\xfd\x01\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\xbe\x00\xa9\x00\x00\x00\xa5\x00\x00\x00\x96\x00\x00\x00\xa8\x00\xa7\x00\xa6\x00\x92\x00\x85\x00\x89\x00\x81\x00\xcf\x01\x88\x00\x87\x00\x2a\x00\x14\x02\x76\x00\x14\x02\x14\x02\x00\x00\x00\x00\x7f\x00\x00\x00\x86\x00\x00\x00\x14\x02\x00\x00\x5c\x00\x00\x00\x00\x00\x14\x02\x14\x02\x00\x00\x82\x00\x6d\x00\x5a\x00\x14\x02\x00\x00\x5a\x00\x14\x02\x00\x00\x00\x00\x6b\x00\x6a\x00\x68\x00\x56\x00\x00\x00\x00\x00\x00\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x65\x00\x00\x00\x00\x00\xb8\x01\x00\x00\x08\x00\x00\x00\x00\x00"#
happyActOffsets = HappyA# "\x00\x00\x9d\x00\x00\x00\x96\x00\x02\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\xab\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x02\xfe\xff\x30\x02\x00\x00\x02\x00\x9a\x00\x00\x00\x19\x02\x00\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\xa9\x00\xa8\x00\x00\x00\xa6\x00\x00\x00\x3c\x00\x00\x00\xaa\x00\x93\x00\x92\x00\x7e\x00\x87\x00\x8b\x00\x00\x00\x00\x00\xeb\x01\x8a\x00\x89\x00\x83\x00\x12\x00\x30\x02\x61\x00\x30\x02\x30\x02\x00\x00\x00\x00\x82\x00\x00\x00\x72\x00\x00\x00\x30\x02\x30\x02\x00\x00\x20\x00\x00\x00\x00\x00\x30\x02\x00\x00\x6e\x00\x70\x00\x5d\x00\x30\x02\x00\x00\x5d\x00\x30\x02\x00\x00\x00\x00\x6d\x00\x6b\x00\x59\x00\x3d\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\xd4\x01\x00\x00\xbd\x01\x00\x00\x00\x00"#
happyGotoOffsets :: HappyAddr
happyGotoOffsets = HappyA# "\x48\x00\x00\x00\x00\x00\x00\x00\x26\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9a\x01\x01\x00\xff\x00\x00\x00\x51\x00\x38\x00\x00\x00\x7b\x01\x00\x00\x00\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x00\x00\xc1\x00\x2d\x00\x5c\x01\x2c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x00\x00\x00\x03\x00\x00\x00\x00\x00\x3d\x01\x83\x00\x00\x00\x00\x00\x00\x00\x07\x00\x64\x00\x00\x00\x04\x00\x1e\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x00\x00\xff\xff\x45\x00\x00\x00\x45\x00\x00\x00\x00\x00"#
happyGotoOffsets = HappyA# "\x6a\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x01\x01\x00\x04\x01\x00\x00\x27\x00\x0b\x00\x00\x00\x80\x01\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\x07\x00\x61\x01\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa7\x00\x42\x01\x00\x00\x05\x00\x00\x00\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x4e\x00\x69\x00\x00\x00\x13\x00\x23\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\xfd\xff\x4a\x00\x00\x00\x4a\x00\x00\x00\x00\x00"#
happyDefActions :: HappyAddr
happyDefActions = HappyA# "\xf7\xff\x00\x00\xfe\xff\x00\x00\xfa\xff\xdd\xff\xdc\xff\xdb\xff\xda\xff\xf6\xff\xf8\xff\x00\x00\xc1\xff\xe4\xff\xe2\xff\xde\xff\xeb\xff\xcc\xff\xcb\xff\xca\xff\xc9\xff\xc8\xff\xc7\xff\xc6\xff\xc5\xff\xc4\xff\xc3\xff\xc2\xff\x00\x00\xee\xff\xd0\xff\xd8\xff\x00\x00\x00\x00\xd7\xff\x00\x00\xd6\xff\xd9\xff\xe8\xff\xfd\xff\xfc\xff\xfb\xff\xea\xff\xe7\xff\xec\xff\x00\x00\xcd\xff\xbf\xff\xf1\xff\x00\x00\x00\x00\x00\x00\xf5\xff\x00\x00\xcf\xff\x00\x00\x00\x00\xbe\xff\x00\x00\x00\x00\xd0\xff\x00\x00\x00\x00\x00\x00\xef\xff\xe5\xff\x00\x00\xe1\xff\x00\x00\xd1\xff\xd0\xff\xd3\xff\xbf\xff\xed\xff\xf2\xff\x00\x00\xd0\xff\xd4\xff\xf4\xff\x00\x00\xf5\xff\xd0\xff\xf0\xff\xe8\xff\x00\x00\xe9\xff\xe6\xff\x00\x00\x00\x00\x00\x00\xf5\xff\xce\xff\xc0\xff\xbd\xff\x00\x00\xdf\xff\xe0\xff\xd2\xff\xf3\xff\xee\xff\x00\x00\xe3\xff\xee\xff\x00\x00\xd5\xff\x00\x00\xf9\xff"#
happyDefActions = HappyA# "\xf7\xff\x00\x00\xfe\xff\x00\x00\xfa\xff\xdd\xff\xdc\xff\xdb\xff\xda\xff\xf6\xff\xf8\xff\x00\x00\xc1\xff\xe4\xff\xe2\xff\xde\xff\xeb\xff\xcc\xff\xcb\xff\xca\xff\xc9\xff\xc8\xff\xc7\xff\xc6\xff\xc5\xff\xc4\xff\xc3\xff\xc2\xff\x00\x00\xee\xff\xd0\xff\xd8\xff\x00\x00\x00\x00\xd7\xff\x00\x00\xd6\xff\xd9\xff\xe8\xff\xfd\xff\xfc\xff\xfb\xff\xea\xff\xe7\xff\xec\xff\x00\x00\xcd\xff\xbf\xff\xf1\xff\x00\x00\x00\x00\x00\x00\xf5\xff\x00\x00\xcf\xff\xbc\xff\xbb\xff\x00\x00\xbe\xff\x00\x00\x00\x00\x00\x00\xd0\xff\x00\x00\x00\x00\x00\x00\xef\xff\xe5\xff\x00\x00\xe1\xff\x00\x00\xd1\xff\xd0\xff\x00\x00\xd3\xff\xbf\xff\xed\xff\xf2\xff\xd0\xff\xd4\xff\xf4\xff\x00\x00\xf5\xff\xd0\xff\xf0\xff\xe8\xff\x00\x00\xe9\xff\xe6\xff\x00\x00\x00\x00\x00\x00\xf5\xff\xce\xff\xbd\xff\xc0\xff\x00\x00\xdf\xff\xe0\xff\xd2\xff\xf3\xff\xee\xff\x00\x00\xe3\xff\xee\xff\x00\x00\xd5\xff\x00\x00\xf9\xff"#
happyCheck :: HappyAddr
happyCheck = HappyA# "\xff\xff\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x01\x00\x09\x00\x03\x00\x04\x00\x07\x00\x07\x00\x0b\x00\x0c\x00\x09\x00\x14\x00\x09\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\x1f\x00\x20\x00\x1f\x00\x20\x00\x1f\x00\x20\x00\x00\x00\x01\x00\x02\x00\x03\x00\x01\x00\x05\x00\x02\x00\x00\x00\x08\x00\x05\x00\x0a\x00\x08\x00\x09\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x01\x00\x00\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\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x14\x00\x00\x00\x04\x00\x08\x00\x06\x00\x0a\x00\x07\x00\x00\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x0b\x00\x0c\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\x00\x00\x01\x00\x02\x00\x03\x00\x03\x00\x02\x00\x14\x00\x03\x00\x02\x00\x02\x00\x14\x00\x02\x00\x14\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\x00\x00\x01\x00\x02\x00\x03\x00\x05\x00\x02\x00\x0a\x00\x14\x00\x04\x00\x0b\x00\x05\x00\x05\x00\x0a\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\x00\x00\x01\x00\x02\x00\x03\x00\x14\x00\x01\x00\x01\x00\x01\x00\x14\x00\x06\x00\x14\x00\x19\x00\x05\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\x00\x00\x01\x00\x02\x00\x03\x00\x07\x00\x07\x00\x14\x00\x06\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\xff\xff\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\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\x01\x00\xff\xff\x03\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x01\x00\xff\xff\x03\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x01\x00\xff\xff\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x01\x00\xff\xff\x03\x00\xff\xff\xff\xff\x06\x00\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\x16\x00\x17\x00\x01\x00\xff\xff\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\x16\x00\x17\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\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"#
happyCheck = HappyA# "\xff\xff\x00\x00\x04\x00\x01\x00\x03\x00\x00\x00\x09\x00\x00\x00\x03\x00\x00\x00\x09\x00\x00\x00\x03\x00\x00\x00\x01\x00\x02\x00\x03\x00\x01\x00\x14\x00\x00\x00\x02\x00\x17\x00\x14\x00\x05\x00\x08\x00\x09\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x0b\x00\x0c\x00\x1f\x00\x20\x00\x21\x00\x09\x00\x1f\x00\x20\x00\x21\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x05\x00\x00\x00\x02\x00\x08\x00\x14\x00\x0a\x00\x07\x00\x17\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x0b\x00\x0c\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\x00\x00\x01\x00\x02\x00\x03\x00\x00\x00\x00\x00\x14\x00\x14\x00\x08\x00\x17\x00\x0a\x00\x07\x00\x07\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x03\x00\x03\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\x00\x00\x01\x00\x02\x00\x03\x00\x02\x00\x04\x00\x02\x00\x06\x00\x14\x00\x02\x00\x05\x00\x02\x00\x14\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\x00\x00\x01\x00\x02\x00\x03\x00\x0a\x00\x04\x00\x0b\x00\x05\x00\x05\x00\x0a\x00\x14\x00\x01\x00\x01\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\x00\x00\x01\x00\x02\x00\x03\x00\x01\x00\x06\x00\x05\x00\x14\x00\x19\x00\x07\x00\x14\x00\x07\x00\x06\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\x08\x00\xff\xff\x0a\x00\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\xff\xff\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\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\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\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\x01\x00\xff\xff\x03\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x01\x00\xff\xff\x03\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x01\x00\xff\xff\x03\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x01\x00\xff\xff\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x01\x00\xff\xff\x03\x00\xff\xff\xff\xff\x06\x00\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\x16\x00\x17\x00\x01\x00\xff\xff\x03\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x09\x00\xff\xff\xff\xff\x0c\x00\x0d\x00\x0e\x00\x0f\x00\xff\xff\x11\x00\x12\x00\xff\xff\x14\x00\x15\x00\x16\x00\x17\x00\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\x37\x00\xbf\xff\x37\x00\x2a\x00\x37\x00\x4e\x00\x4e\x00\x69\x00\x1d\x00\x38\x00\x1e\x00\x6b\x00\x62\x00\x58\x00\x2b\x00\x56\x00\x1f\x00\x03\x00\x67\x00\x20\x00\x32\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x39\x00\x3a\x00\x39\x00\x5d\x00\x39\x00\x3a\x00\x05\x00\x06\x00\x07\x00\x08\x00\x3d\x00\x09\x00\x46\x00\x43\x00\x0a\x00\x47\x00\x0b\x00\x3e\x00\x3f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x35\x00\x32\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\x05\x00\x06\x00\x07\x00\x08\x00\x4e\x00\x03\x00\x2a\x00\x03\x00\x49\x00\x04\x00\x0b\x00\x4f\x00\x33\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x2b\x00\x2c\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\x05\x00\x06\x00\x07\x00\x08\x00\x67\x00\x62\x00\x03\x00\x64\x00\x65\x00\x66\x00\x03\x00\x5a\x00\x03\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x57\x00\x36\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x5b\x00\x60\x00\x61\x00\x03\x00\x48\x00\x4c\x00\x49\x00\x4d\x00\x4e\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x5b\x00\x36\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x03\x00\x51\x00\x52\x00\x35\x00\x03\x00\x53\x00\x03\x00\xff\xff\x54\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x5e\x00\x36\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x55\x00\x40\x00\x03\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x44\x00\x36\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x00\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\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x35\x00\x36\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x55\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x5c\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x42\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x2d\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x3b\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1d\x00\x00\x00\x1e\x00\x69\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1d\x00\x00\x00\x1e\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1d\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1d\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1d\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
happyTable = HappyA# "\x00\x00\x37\x00\xbf\xff\x35\x00\x38\x00\x37\x00\x6b\x00\x45\x00\x38\x00\x37\x00\x39\x00\x32\x00\x38\x00\x05\x00\x06\x00\x07\x00\x08\x00\x3f\x00\x03\x00\x2a\x00\x48\x00\x2a\x00\x03\x00\x49\x00\x40\x00\x41\x00\x43\x00\x0d\x00\x0e\x00\x0f\x00\x2b\x00\x58\x00\x3a\x00\x3b\x00\x3c\x00\x69\x00\x3a\x00\x5e\x00\x3c\x00\x33\x00\x3a\x00\x3b\x00\x3c\x00\x05\x00\x06\x00\x07\x00\x08\x00\x50\x00\x09\x00\x2a\x00\x64\x00\x0a\x00\x03\x00\x0b\x00\x64\x00\x2a\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x2b\x00\x2c\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\x05\x00\x06\x00\x07\x00\x08\x00\x50\x00\x50\x00\x03\x00\x03\x00\x4c\x00\x2a\x00\x0b\x00\x5a\x00\x51\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x69\x00\x66\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\x05\x00\x06\x00\x07\x00\x08\x00\x67\x00\x03\x00\x68\x00\x04\x00\x03\x00\x5c\x00\x5d\x00\x62\x00\x03\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x59\x00\x36\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x63\x00\x4b\x00\x4a\x00\x4c\x00\x4f\x00\x50\x00\x03\x00\x53\x00\x54\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x5d\x00\x36\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x35\x00\x55\x00\x56\x00\x03\x00\xff\xff\x57\x00\x03\x00\x42\x00\x43\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x60\x00\x36\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x46\x00\x36\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x00\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\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x35\x00\x36\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x57\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x5f\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x44\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x2d\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x05\x00\x06\x00\x07\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x00\x00\x3d\x00\x2e\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1d\x00\x00\x00\x1e\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1d\x00\x00\x00\x1e\x00\x6b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1d\x00\x00\x00\x1e\x00\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1d\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x21\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1d\x00\x00\x00\x30\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x03\x00\x28\x00\x29\x00\x2a\x00\x1d\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x00\x00\x00\x00\x20\x00\x32\x00\x22\x00\x23\x00\x00\x00\x25\x00\x26\x00\x00\x00\x03\x00\x28\x00\x29\x00\x2a\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, 66) [
happyReduceArr = array (1, 68) [
(1 , happyReduce_1),
(2 , happyReduce_2),
(3 , happyReduce_3),
@@ -304,41 +310,43 @@ happyReduceArr = array (1, 66) [
(63 , happyReduce_63),
(64 , happyReduce_64),
(65 , happyReduce_65),
(66 , happyReduce_66)
(66 , happyReduce_66),
(67 , happyReduce_67),
(68 , happyReduce_68)
]
happy_n_terms = 26 :: Int
happy_n_nonterms = 33 :: Int
happy_n_nonterms = 34 :: Int
happyReduce_1 = happySpecReduce_1 0# happyReduction_1
happyReduce_1 = happySpecReduce_1 0# happyReduction_1
happyReduction_1 happy_x_1
= case happyOutTok happy_x_1 of { (PT _ (TV happy_var_1)) ->
happyIn4
(Ident happy_var_1
)}
happyReduce_2 = happySpecReduce_1 1# happyReduction_2
happyReduce_2 = happySpecReduce_1 1# happyReduction_2
happyReduction_2 happy_x_1
= case happyOutTok happy_x_1 of { (PT _ (TI happy_var_1)) ->
happyIn5
((read happy_var_1) :: Integer
)}
happyReduce_3 = happySpecReduce_1 2# happyReduction_3
happyReduce_3 = happySpecReduce_1 2# happyReduction_3
happyReduction_3 happy_x_1
= case happyOutTok happy_x_1 of { (PT _ (TD happy_var_1)) ->
happyIn6
((read happy_var_1) :: Double
)}
happyReduce_4 = happySpecReduce_1 3# happyReduction_4
happyReduce_4 = happySpecReduce_1 3# happyReduction_4
happyReduction_4 happy_x_1
= case happyOutTok happy_x_1 of { (PT _ (TL happy_var_1)) ->
happyIn7
(happy_var_1
)}
happyReduce_5 = happySpecReduce_1 4# happyReduction_5
happyReduce_5 = happySpecReduce_1 4# happyReduction_5
happyReduction_5 happy_x_1
= case happyOut10 happy_x_1 of { happy_var_1 ->
happyIn8
@@ -362,19 +370,19 @@ happyReduction_6 (happy_x_8 `HappyStk`
(FunDef happy_var_2 happy_var_4 (reverse happy_var_7)
) `HappyStk` happyRest}}}
happyReduce_7 = happySpecReduce_1 5# happyReduction_7
happyReduce_7 = happySpecReduce_1 5# happyReduction_7
happyReduction_7 happy_x_1
= case happyOut12 happy_x_1 of { happy_var_1 ->
happyIn9
(ElStmt happy_var_1
)}
happyReduce_8 = happySpecReduce_0 6# happyReduction_8
happyReduce_8 = happySpecReduce_0 6# happyReduction_8
happyReduction_8 = happyIn10
([]
)
happyReduce_9 = happySpecReduce_2 6# happyReduction_9
happyReduce_9 = happySpecReduce_2 6# happyReduction_9
happyReduction_9 happy_x_2
happy_x_1
= case happyOut10 happy_x_1 of { happy_var_1 ->
@@ -383,19 +391,19 @@ happyReduction_9 happy_x_2
(flip (:) happy_var_1 happy_var_2
)}}
happyReduce_10 = happySpecReduce_0 7# happyReduction_10
happyReduce_10 = happySpecReduce_0 7# happyReduction_10
happyReduction_10 = happyIn11
([]
)
happyReduce_11 = happySpecReduce_1 7# happyReduction_11
happyReduce_11 = happySpecReduce_1 7# happyReduction_11
happyReduction_11 happy_x_1
= case happyOut4 happy_x_1 of { happy_var_1 ->
happyIn11
((:[]) happy_var_1
)}
happyReduce_12 = happySpecReduce_3 7# happyReduction_12
happyReduce_12 = happySpecReduce_3 7# happyReduction_12
happyReduction_12 happy_x_3
happy_x_2
happy_x_1
@@ -405,7 +413,7 @@ happyReduction_12 happy_x_3
((:) happy_var_1 happy_var_3
)}}
happyReduce_13 = happySpecReduce_3 8# happyReduction_13
happyReduce_13 = happySpecReduce_3 8# happyReduction_13
happyReduction_13 happy_x_3
happy_x_2
happy_x_1
@@ -414,14 +422,14 @@ happyReduction_13 happy_x_3
(SCompound (reverse happy_var_2)
)}
happyReduce_14 = happySpecReduce_2 8# happyReduction_14
happyReduce_14 = happySpecReduce_2 8# happyReduction_14
happyReduction_14 happy_x_2
happy_x_1
= happyIn12
(SReturnVoid
)
happyReduce_15 = happySpecReduce_3 8# happyReduction_15
happyReduce_15 = happySpecReduce_3 8# happyReduction_15
happyReduction_15 happy_x_3
happy_x_2
happy_x_1
@@ -430,7 +438,7 @@ happyReduction_15 happy_x_3
(SReturn happy_var_2
)}
happyReduce_16 = happySpecReduce_2 8# happyReduction_16
happyReduce_16 = happySpecReduce_2 8# happyReduction_16
happyReduction_16 happy_x_2
happy_x_1
= case happyOut14 happy_x_1 of { happy_var_1 ->
@@ -438,12 +446,12 @@ happyReduction_16 happy_x_2
(SDeclOrExpr happy_var_1
)}
happyReduce_17 = happySpecReduce_0 9# happyReduction_17
happyReduce_17 = happySpecReduce_0 9# happyReduction_17
happyReduction_17 = happyIn13
([]
)
happyReduce_18 = happySpecReduce_2 9# happyReduction_18
happyReduce_18 = happySpecReduce_2 9# happyReduction_18
happyReduction_18 happy_x_2
happy_x_1
= case happyOut13 happy_x_1 of { happy_var_1 ->
@@ -452,7 +460,7 @@ happyReduction_18 happy_x_2
(flip (:) happy_var_1 happy_var_2
)}}
happyReduce_19 = happySpecReduce_2 10# happyReduction_19
happyReduce_19 = happySpecReduce_2 10# happyReduction_19
happyReduction_19 happy_x_2
happy_x_1
= case happyOut16 happy_x_2 of { happy_var_2 ->
@@ -460,21 +468,21 @@ happyReduction_19 happy_x_2
(Decl happy_var_2
)}
happyReduce_20 = happySpecReduce_1 10# happyReduction_20
happyReduce_20 = happySpecReduce_1 10# happyReduction_20
happyReduction_20 happy_x_1
= case happyOut23 happy_x_1 of { happy_var_1 ->
happyIn14
(DExpr happy_var_1
)}
happyReduce_21 = happySpecReduce_1 11# happyReduction_21
happyReduce_21 = happySpecReduce_1 11# happyReduction_21
happyReduction_21 happy_x_1
= case happyOut4 happy_x_1 of { happy_var_1 ->
happyIn15
(DVar happy_var_1
)}
happyReduce_22 = happySpecReduce_3 11# happyReduction_22
happyReduce_22 = happySpecReduce_3 11# happyReduction_22
happyReduction_22 happy_x_3
happy_x_2
happy_x_1
@@ -484,19 +492,19 @@ happyReduction_22 happy_x_3
(DInit happy_var_1 happy_var_3
)}}
happyReduce_23 = happySpecReduce_0 12# happyReduction_23
happyReduce_23 = happySpecReduce_0 12# happyReduction_23
happyReduction_23 = happyIn16
([]
)
happyReduce_24 = happySpecReduce_1 12# happyReduction_24
happyReduce_24 = happySpecReduce_1 12# happyReduction_24
happyReduction_24 happy_x_1
= case happyOut15 happy_x_1 of { happy_var_1 ->
happyIn16
((:[]) happy_var_1
)}
happyReduce_25 = happySpecReduce_3 12# happyReduction_25
happyReduce_25 = happySpecReduce_3 12# happyReduction_25
happyReduction_25 happy_x_3
happy_x_2
happy_x_1
@@ -506,7 +514,7 @@ happyReduction_25 happy_x_3
((:) happy_var_1 happy_var_3
)}}
happyReduce_26 = happySpecReduce_3 13# happyReduction_26
happyReduce_26 = happySpecReduce_3 13# happyReduction_26
happyReduction_26 happy_x_3
happy_x_2
happy_x_1
@@ -516,7 +524,7 @@ happyReduction_26 happy_x_3
(EAssign happy_var_1 happy_var_3
)}}
happyReduce_27 = happySpecReduce_1 13# happyReduction_27
happyReduce_27 = happySpecReduce_1 13# happyReduction_27
happyReduction_27 happy_x_1
= case happyOut18 happy_x_1 of { happy_var_1 ->
happyIn17
@@ -536,14 +544,14 @@ happyReduction_28 (happy_x_5 `HappyStk`
(ENew happy_var_2 happy_var_4
) `HappyStk` happyRest}}
happyReduce_29 = happySpecReduce_1 14# happyReduction_29
happyReduce_29 = happySpecReduce_1 14# happyReduction_29
happyReduction_29 happy_x_1
= case happyOut19 happy_x_1 of { happy_var_1 ->
happyIn18
(happy_var_1
)}
happyReduce_30 = happySpecReduce_3 15# happyReduction_30
happyReduce_30 = happySpecReduce_3 15# happyReduction_30
happyReduction_30 happy_x_3
happy_x_2
happy_x_1
@@ -577,60 +585,60 @@ happyReduction_32 (happy_x_4 `HappyStk`
(ECall happy_var_1 happy_var_3
) `HappyStk` happyRest}}
happyReduce_33 = happySpecReduce_1 15# happyReduction_33
happyReduce_33 = happySpecReduce_1 15# happyReduction_33
happyReduction_33 happy_x_1
= case happyOut20 happy_x_1 of { happy_var_1 ->
happyIn19
(happy_var_1
)}
happyReduce_34 = happySpecReduce_1 16# happyReduction_34
happyReduce_34 = happySpecReduce_1 16# happyReduction_34
happyReduction_34 happy_x_1
= case happyOut4 happy_x_1 of { happy_var_1 ->
happyIn20
(EVar happy_var_1
)}
happyReduce_35 = happySpecReduce_1 16# happyReduction_35
happyReduce_35 = happySpecReduce_1 16# happyReduction_35
happyReduction_35 happy_x_1
= case happyOut5 happy_x_1 of { happy_var_1 ->
happyIn20
(EInt happy_var_1
)}
happyReduce_36 = happySpecReduce_1 16# happyReduction_36
happyReduce_36 = happySpecReduce_1 16# happyReduction_36
happyReduction_36 happy_x_1
= case happyOut6 happy_x_1 of { happy_var_1 ->
happyIn20
(EDbl happy_var_1
)}
happyReduce_37 = happySpecReduce_1 16# happyReduction_37
happyReduce_37 = happySpecReduce_1 16# happyReduction_37
happyReduction_37 happy_x_1
= case happyOut7 happy_x_1 of { happy_var_1 ->
happyIn20
(EStr happy_var_1
)}
happyReduce_38 = happySpecReduce_1 16# happyReduction_38
happyReduce_38 = happySpecReduce_1 16# happyReduction_38
happyReduction_38 happy_x_1
= happyIn20
(ETrue
)
happyReduce_39 = happySpecReduce_1 16# happyReduction_39
happyReduce_39 = happySpecReduce_1 16# happyReduction_39
happyReduction_39 happy_x_1
= happyIn20
(EFalse
)
happyReduce_40 = happySpecReduce_1 16# happyReduction_40
happyReduce_40 = happySpecReduce_1 16# happyReduction_40
happyReduction_40 happy_x_1
= happyIn20
(ENull
)
happyReduce_41 = happySpecReduce_1 16# happyReduction_41
happyReduce_41 = happySpecReduce_1 16# happyReduction_41
happyReduction_41 happy_x_1
= happyIn20
(EThis
@@ -651,7 +659,7 @@ happyReduction_42 (happy_x_7 `HappyStk`
(EFun happy_var_3 (reverse happy_var_6)
) `HappyStk` happyRest}}
happyReduce_43 = happySpecReduce_3 16# happyReduction_43
happyReduce_43 = happySpecReduce_3 16# happyReduction_43
happyReduction_43 happy_x_3
happy_x_2
happy_x_1
@@ -660,7 +668,7 @@ happyReduction_43 happy_x_3
(EArray happy_var_2
)}
happyReduce_44 = happySpecReduce_3 16# happyReduction_44
happyReduce_44 = happySpecReduce_3 16# happyReduction_44
happyReduction_44 happy_x_3
happy_x_2
happy_x_1
@@ -682,7 +690,7 @@ happyReduction_45 (happy_x_5 `HappyStk`
(eseq1_ happy_var_2 happy_var_4
) `HappyStk` happyRest}}
happyReduce_46 = happySpecReduce_3 16# happyReduction_46
happyReduce_46 = happySpecReduce_3 16# happyReduction_46
happyReduction_46 happy_x_3
happy_x_2
happy_x_1
@@ -691,19 +699,19 @@ happyReduction_46 happy_x_3
(happy_var_2
)}
happyReduce_47 = happySpecReduce_0 17# happyReduction_47
happyReduce_47 = happySpecReduce_0 17# happyReduction_47
happyReduction_47 = happyIn21
([]
)
happyReduce_48 = happySpecReduce_1 17# happyReduction_48
happyReduce_48 = happySpecReduce_1 17# happyReduction_48
happyReduction_48 happy_x_1
= case happyOut22 happy_x_1 of { happy_var_1 ->
happyIn21
((:[]) happy_var_1
)}
happyReduce_49 = happySpecReduce_3 17# happyReduction_49
happyReduce_49 = happySpecReduce_3 17# happyReduction_49
happyReduction_49 happy_x_3
happy_x_2
happy_x_1
@@ -713,120 +721,120 @@ happyReduction_49 happy_x_3
((:) happy_var_1 happy_var_3
)}}
happyReduce_50 = happySpecReduce_1 18# happyReduction_50
happyReduce_50 = happySpecReduce_1 18# happyReduction_50
happyReduction_50 happy_x_1
= case happyOut23 happy_x_1 of { happy_var_1 ->
happyIn22
(happy_var_1
)}
happyReduce_51 = happySpecReduce_1 19# happyReduction_51
happyReduce_51 = happySpecReduce_1 19# happyReduction_51
happyReduction_51 happy_x_1
= case happyOut24 happy_x_1 of { happy_var_1 ->
happyIn23
(happy_var_1
)}
happyReduce_52 = happySpecReduce_1 20# happyReduction_52
happyReduce_52 = happySpecReduce_1 20# happyReduction_52
happyReduction_52 happy_x_1
= case happyOut25 happy_x_1 of { happy_var_1 ->
happyIn24
(happy_var_1
)}
happyReduce_53 = happySpecReduce_1 21# happyReduction_53
happyReduce_53 = happySpecReduce_1 21# happyReduction_53
happyReduction_53 happy_x_1
= case happyOut26 happy_x_1 of { happy_var_1 ->
happyIn25
(happy_var_1
)}
happyReduce_54 = happySpecReduce_1 22# happyReduction_54
happyReduce_54 = happySpecReduce_1 22# happyReduction_54
happyReduction_54 happy_x_1
= case happyOut27 happy_x_1 of { happy_var_1 ->
happyIn26
(happy_var_1
)}
happyReduce_55 = happySpecReduce_1 23# happyReduction_55
happyReduce_55 = happySpecReduce_1 23# happyReduction_55
happyReduction_55 happy_x_1
= case happyOut28 happy_x_1 of { happy_var_1 ->
happyIn27
(happy_var_1
)}
happyReduce_56 = happySpecReduce_1 24# happyReduction_56
happyReduce_56 = happySpecReduce_1 24# happyReduction_56
happyReduction_56 happy_x_1
= case happyOut29 happy_x_1 of { happy_var_1 ->
happyIn28
(happy_var_1
)}
happyReduce_57 = happySpecReduce_1 25# happyReduction_57
happyReduce_57 = happySpecReduce_1 25# happyReduction_57
happyReduction_57 happy_x_1
= case happyOut30 happy_x_1 of { happy_var_1 ->
happyIn29
(happy_var_1
)}
happyReduce_58 = happySpecReduce_1 26# happyReduction_58
happyReduce_58 = happySpecReduce_1 26# happyReduction_58
happyReduction_58 happy_x_1
= case happyOut31 happy_x_1 of { happy_var_1 ->
happyIn30
(happy_var_1
)}
happyReduce_59 = happySpecReduce_1 27# happyReduction_59
happyReduce_59 = happySpecReduce_1 27# happyReduction_59
happyReduction_59 happy_x_1
= case happyOut32 happy_x_1 of { happy_var_1 ->
happyIn31
(happy_var_1
)}
happyReduce_60 = happySpecReduce_1 28# happyReduction_60
happyReduce_60 = happySpecReduce_1 28# happyReduction_60
happyReduction_60 happy_x_1
= case happyOut33 happy_x_1 of { happy_var_1 ->
happyIn32
(happy_var_1
)}
happyReduce_61 = happySpecReduce_1 29# happyReduction_61
happyReduce_61 = happySpecReduce_1 29# happyReduction_61
happyReduction_61 happy_x_1
= case happyOut34 happy_x_1 of { happy_var_1 ->
happyIn33
(happy_var_1
)}
happyReduce_62 = happySpecReduce_1 30# happyReduction_62
happyReduce_62 = happySpecReduce_1 30# happyReduction_62
happyReduction_62 happy_x_1
= case happyOut17 happy_x_1 of { happy_var_1 ->
happyIn34
(happy_var_1
)}
happyReduce_63 = happySpecReduce_3 31# happyReduction_63
happyReduce_63 = happySpecReduce_3 31# happyReduction_63
happyReduction_63 happy_x_3
happy_x_2
happy_x_1
= case happyOut4 happy_x_1 of { happy_var_1 ->
= case happyOut37 happy_x_1 of { happy_var_1 ->
case happyOut22 happy_x_3 of { happy_var_3 ->
happyIn35
(Prop happy_var_1 happy_var_3
)}}
happyReduce_64 = happySpecReduce_0 32# happyReduction_64
happyReduce_64 = happySpecReduce_0 32# happyReduction_64
happyReduction_64 = happyIn36
([]
)
happyReduce_65 = happySpecReduce_1 32# happyReduction_65
happyReduce_65 = happySpecReduce_1 32# happyReduction_65
happyReduction_65 happy_x_1
= case happyOut35 happy_x_1 of { happy_var_1 ->
happyIn36
((:[]) happy_var_1
)}
happyReduce_66 = happySpecReduce_3 32# happyReduction_66
happyReduce_66 = happySpecReduce_3 32# happyReduction_66
happyReduction_66 happy_x_3
happy_x_2
happy_x_1
@@ -836,8 +844,22 @@ happyReduction_66 happy_x_3
((:) happy_var_1 happy_var_3
)}}
happyReduce_67 = happySpecReduce_1 33# happyReduction_67
happyReduction_67 happy_x_1
= case happyOut4 happy_x_1 of { happy_var_1 ->
happyIn37
(IdentPropName happy_var_1
)}
happyReduce_68 = happySpecReduce_1 33# happyReduction_68
happyReduction_68 happy_x_1
= case happyOut7 happy_x_1 of { happy_var_1 ->
happyIn37
(StringPropName happy_var_1
)}
happyNewToken action sts stk [] =
happyDoAction 25# notHappyAtAll action sts stk []
happyDoAction 25# (error "reading EOF!") action sts stk []
happyNewToken action sts stk (tk:tks) =
let cont i = happyDoAction i tk action sts stk tks in
@@ -886,7 +908,6 @@ pProgram tks = happySomeParser where
happySeq = happyDontSeq
returnM :: a -> Err a
returnM = return
@@ -907,7 +928,7 @@ eseq1_ x_ xs_ = ESeq (x_ : xs_)
{-# LINE 1 "<built-in>" #-}
{-# LINE 1 "<command line>" #-}
{-# LINE 1 "GenericTemplate.hs" #-}
-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp
-- $Id$
{-# LINE 28 "GenericTemplate.hs" #-}
@@ -1056,24 +1077,10 @@ happyReduce k nt fn j tk st sts stk
happyMonadReduce k nt fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyMonadReduce k nt fn j tk st sts stk =
happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
happyThen1 (fn stk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
where sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))
drop_stk = happyDropStk k stk
happyMonad2Reduce k nt fn 0# tk st sts stk
= happyFail 0# tk st sts stk
happyMonad2Reduce k nt fn j tk st sts stk =
happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
where sts1@((HappyCons (st1@(action)) (_))) = happyDrop k (HappyCons (st) (sts))
drop_stk = happyDropStk k stk
off = indexShortOffAddr happyGotoOffsets st1
off_i = (off +# nt)
new_state = indexShortOffAddr happyTable off_i
happyDrop 0# l = l
happyDrop n (HappyCons (_) (t)) = happyDrop (n -# (1# :: Int#)) t

View File

@@ -188,7 +188,7 @@ Expr12 : Expr13 { $1 }
Property :: { Property }
Property : Ident ':' Expr { Prop $1 $3 }
Property : PropertyName ':' Expr { Prop $1 $3 }
ListProperty :: { [Property] }
@@ -197,6 +197,11 @@ ListProperty : {- empty -} { [] }
| Property ',' ListProperty { (:) $1 $3 }
PropertyName :: { PropertyName }
PropertyName : Ident { IdentPropName $1 }
| String { StringPropName $1 }
{

View File

@@ -153,11 +153,17 @@ instance Print Expr where
instance Print Property where
prt i e = case e of
Prop id expr -> prPrec i 0 (concatD [prt 0 id , doc (showString ":") , prt 0 expr])
Prop propertyname expr -> prPrec i 0 (concatD [prt 0 propertyname , doc (showString ":") , prt 0 expr])
prtList es = case es of
[] -> (concatD [])
[x] -> (concatD [prt 0 x])
x:xs -> (concatD [prt 0 x , doc (showString ",") , prt 0 xs])
instance Print PropertyName where
prt i e = case e of
IdentPropName id -> prPrec i 0 (concatD [prt 0 id])
StringPropName str -> prPrec i 0 (concatD [prt 0 str])

View File

@@ -68,7 +68,13 @@ transExpr x = case x of
transProperty :: Property -> Result
transProperty x = case x of
Prop id expr -> failure x
Prop propertyname expr -> failure x
transPropertyName :: PropertyName -> Result
transPropertyName x = case x of
IdentPropName id -> failure x
StringPropName str -> failure x

View File

@@ -83,5 +83,5 @@ ass = JS.EAssign
tree n xs = obj [("name", JS.EStr n), ("args", JS.EArray xs)]
obj ps = JS.EObj [JS.Prop (JS.Ident x) y | (x,y) <- ps]
obj ps = JS.EObj [JS.Prop (JS.StringPropName x) y | (x,y) <- ps]