lambda in GFCC

This commit is contained in:
aarne
2006-09-13 16:49:23 +00:00
parent 0517ca7807
commit 0dec627fb9
7 changed files with 159 additions and 101 deletions

View File

@@ -20,6 +20,7 @@ import qualified GF.Canon.Look as Look
import qualified GF.Canon.GFCC.AbsGFCC as C
import qualified GF.Canon.GFCC.PrintGFCC as Pr
import GF.Canon.GFC
import GF.Canon.Share
import qualified GF.Grammar.Abstract as A
import qualified GF.Grammar.Macros as GM
import GF.Canon.MkGFC
@@ -39,9 +40,13 @@ import Debug.Trace ----
prCanon2gfcc :: CanonGrammar -> String
prCanon2gfcc =
Pr.printTree . canon2gfcc . reorder . canon2canon . unoptimizeCanon
-- phases defined below, except unoptimizeCanon. This is needed to
-- reorganize the grammar. GFCC has its own back-end optimization.
Pr.printTree . canon2gfcc . reorder . canon2canon . normalize
-- This is needed to reorganize the grammar. GFCC has its own back-end optimization.
-- But we need to have the canonical order in tables, created by valOpt
normalize :: CanonGrammar -> CanonGrammar
normalize = share . unoptimizeCanon where
share = M.MGrammar . map (shareModule allOpt) . M.modules --- valOpt
-- Generate GFCC from GFCM.
-- this assumes a grammar translated by canon2canon
@@ -70,10 +75,12 @@ mkTerm tr = case tr of
EInt i -> C.C i
R rs -> C.R [mkTerm t | Ass _ t <- rs]
P t l -> C.P (mkTerm t) (C.C (mkLab l))
T _ cs -> C.R [mkTerm t | Cas _ t <- cs]
T _ [Cas [PV (IC x)] t] -> C.A (C.CId x) (mkTerm t) -- abstraction
T _ cs -> C.R [mkTerm t | Cas _ t <- cs] --- should not appear after values opt
V _ cs -> C.R [mkTerm t | t <- cs]
S t p -> C.P (mkTerm t) (mkTerm p)
C s t -> C.S [mkTerm x | x <- [s,t]]
LI(IC x) -> C.L (C.CId x)
FV ts -> C.FV [mkTerm t | t <- ts]
K (KS s) -> C.K (C.KS s)
K (KP ss _) -> C.K (C.KP ss []) ---- TODO: prefix variants
@@ -168,6 +175,7 @@ term2term cgr env@(labels,untyps,typs) tr = case tr of
R [Ass (mkLab i) (t2t t) | (i,Ass l t) <- zip [0..] rs, not (isLock l t)]
R rs -> valNum tr
P t l -> r2r tr
T i [Cas p t] -> T i [Cas p (t2t t)]
T ty cs -> V ty [t2t t | Cas _ t <- cs]
S t p -> S (t2t t) (t2t p)
_ -> composSafeOp t2t tr
@@ -210,6 +218,7 @@ term2term cgr env@(labels,untyps,typs) tr = case tr of
mkCase c ps = EInt (prtTrace tr 66668) ---- TODO: expand param constr with var
prtTrace tr n = n ----trace ("-- ERROR" +++ A.prt tr +++ show n +++ show tr) n
prTrace tr n = trace ("-- OBSERVE" +++ A.prt tr +++ show n +++ show tr) n
-- back-end optimization:
-- suffix analysis followed by common subexpression elimination
@@ -225,6 +234,7 @@ optTerm tr = case tr of
C.R ts@(_:_:_) | all isK ts -> mkSuff $ optToks [s | C.K (C.KS s) <- ts]
C.R ts -> C.R $ map optTerm ts
C.P t v -> C.P (optTerm t) v
C.A x t -> C.A x (optTerm t)
_ -> tr
where
optToks ss = prf : suffs where
@@ -235,6 +245,7 @@ optTerm tr = case tr of
isK t = case t of
C.K (C.KS _) -> True
_ -> False
mkSuff ("":ws) = C.R (map (C.K . C.KS) ws)
mkSuff (p:ws) = C.W p (C.R (map (C.K . C.KS) ws))
@@ -262,6 +273,7 @@ addSubexpConsts tree lins =
C.S ts -> C.S $ map (recomp f) ts
C.W s t -> C.W s (recomp f t)
C.P t p -> C.P (recomp f t) (recomp f p)
C.A x t -> C.A x (recomp f t)
_ -> t
fid n = C.CId $ "_" ++ show n
list = Map.toList tree
@@ -284,6 +296,8 @@ collectSubterms t = case t of
C.S ts -> do
mapM collectSubterms ts
add t
C.A x b -> do
collectSubterms b -- t itself can only occur once in a grammar
C.W s u -> do
collectSubterms u
add t

View File

@@ -49,6 +49,8 @@ data Term =
| V Integer
| C Integer
| F CId
| L CId
| A CId Term
| FV [Term]
| W String Term
deriving (Eq,Ord,Show)

View File

@@ -46,24 +46,36 @@ kks :: String -> Term
kks = K . KS
compute :: GFCC -> CId -> [Term] -> Term -> Term
compute mcfg lang args trm = case trm of
P r p -> case (comp r, comp p) of
(W s t, C i) -> case comp t of
R ss -> case comp $ ss !! (fromInteger i) of
K (KS u) -> kks (s ++ u) -- the only case where W occurs
(R rs, C i) -> comp $ rs !! (fromInteger i)
(r',p') -> P r' p'
W s t -> W s (comp t)
R ts -> R $ Prelude.map comp ts
V i -> args !! (fromInteger i) -- already computed
S ts -> S (Prelude.map comp ts)
F c -> comp $ look c -- global constant: not yet comp'd (if contains argvar)
FV ts -> FV $ Prelude.map comp ts
_ -> trm
where
comp = compute mcfg lang args
look = lookLin mcfg lang
compute mcfg lang args = compg [] where
compg g trm = case trm of
-- for the abstraction optimization
P (A x t) p -> compg ((x,comp p):g) t
L x -> maybe (error (show x)) id $ Prelude.lookup x g
P r p -> case (comp r, comp p) of
-- for the suffix optimization
(W s t, C i) -> case comp t of
R ss -> case comp $ idx ss (fromInteger i) of
K (KS u) -> kks (s ++ u) -- the only case where W occurs
(R rs, C i) -> comp $ idx rs (fromInteger i)
(r',p') -> P r' p'
W s t -> W s (comp t)
R ts -> R $ Prelude.map comp ts
V i -> idx args (fromInteger i) -- already computed
S ts -> S (Prelude.map comp ts)
F c -> comp $ look c -- global const: not yet comp'd (if contains argvar)
FV ts -> FV $ Prelude.map comp ts
_ -> trm
where
comp = compg g
look = lookLin mcfg lang
idx xs i =
if length xs <= i ---- debug
then error (show xs ++ " !! " ++ show i) else
xs !! i
mkGFCC :: Grammar -> GFCC
mkGFCC (Grm (Hdr a cs) ab@(Abs funs) ccs) = GFCC {

View File

@@ -14,6 +14,8 @@ Tr. Exp ::= "(" Atom [Exp] ")" ;
AC. Atom ::= CId ;
AS. Atom ::= String ;
AI. Atom ::= Integer ;
trA. Exp ::= Atom ;
define trA a = Tr a [] ;
R. Term ::= "[" [Term] "]" ; -- record/table
P. Term ::= Term "[" Term "]" ; -- projection/selection
@@ -22,6 +24,8 @@ K. Term ::= Tokn ; -- token
V. Term ::= "$" Integer ; -- argument
C. Term ::= Integer ; -- parameter value/label
F. Term ::= CId ; -- global constant
L. Term ::= "$" CId ; -- local (bound) variable
A. Term ::= "(" CId "->" Term ")" ; -- lambda abstraction (compressed table)
FV. Term ::= "[|" [Term] "|]" ; -- free variation
W. Term ::= "(" String "+" Term ")" ; -- prefix + suffix table

View File

@@ -3,13 +3,6 @@
{-# OPTIONS -fno-warn-incomplete-patterns #-}
module GF.Canon.GFCC.LexGFCC where
#if __GLASGOW_HASKELL__ >= 603
#include "ghcconfig.h"
#else
#include "config.h"
#endif
#if __GLASGOW_HASKELL__ >= 503
import Data.Array
import Data.Char (ord)

View File

@@ -160,21 +160,21 @@ happyOutTok x = unsafeCoerce# x
{-# INLINE happyOutTok #-}
happyActOffsets :: HappyAddr
happyActOffsets = HappyA# "\xd1\x00\xd1\x00\xd2\x00\xce\x00\xcb\x00\xcb\x00\x00\x00\xc9\x00\x72\x00\x09\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\xc8\x00\xca\x00\x00\x00\xc6\x00\x6f\x00\xc5\x00\xf1\xff\xff\xff\x00\x00\x00\x00\x00\x00\x71\x00\x00\x00\xc5\x00\x09\x00\x05\x00\xc7\x00\x09\x00\x00\x00\x00\x00\x69\x00\x69\x00\x69\x00\x59\x00\xc3\x00\xc3\x00\xc4\x00\x0e\x00\x00\x00\x00\x00\x00\x00\xc2\x00\xc2\x00\x72\x00\xc2\x00\x2b\x00\xc1\x00\xc0\x00\xbf\x00\xbe\x00\xbe\x00\xb7\x00\xb6\x00\xbd\x00\xb4\x00\xb3\x00\xaa\x00\xbb\x00\xaf\x00\xbc\x00\x00\x00\xb9\x00\x00\x00\x09\x00\x00\x00\x8d\x00\x00\x00\x09\x00\x00\x00\xba\x00\xb8\x00\xb5\x00\xad\x00\x00\x00\xae\x00\xa9\x00\xb2\x00\x09\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x90\x00\x00\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfa\xff\x85\x00\x8a\x00\x00\x00\xab\x00\xac\x00\x00\x00\x2a\x00\x00\x00\xb1\x00\x00\x00\x06\x00\xb0\x00\x11\x00\xa8\x00\x00\x00\x00\x00\x1d\x00\x7c\x00\x00\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xa5\x00\x00\x00\x00\x00"#
happyActOffsets = HappyA# "\xee\x00\xee\x00\xed\x00\xeb\x00\xe8\x00\xe8\x00\x00\x00\x0d\x00\xa0\x00\x15\x00\x68\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\xe7\x00\xe5\x00\x00\x00\xe6\x00\x9d\x00\xe3\x00\x9b\x00\xff\xff\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\xe3\x00\x15\x00\x05\x00\xa4\x00\x15\x00\x00\x00\x00\x00\xef\xff\xef\xff\xef\xff\x62\x00\xe3\x00\xe3\x00\xe4\x00\x1f\x00\x00\x00\x00\x00\x00\x00\xe2\x00\xe2\x00\x00\x00\xa0\x00\xe2\x00\x37\x00\xe1\x00\xe0\x00\xdf\x00\xde\x00\xde\x00\xdd\x00\xdc\x00\xdb\x00\xd9\x00\xd8\x00\xd3\x00\xda\x00\xd1\x00\xd7\x00\x00\x00\xd6\x00\x00\x00\x15\x00\x00\x00\xd0\x00\x00\x00\x15\x00\x00\x00\xd5\x00\xd4\x00\xd2\x00\xcf\x00\x00\x00\x00\x00\xce\x00\xc9\x00\xcc\x00\xcd\x00\x15\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\xbd\x00\x00\x00\x00\x00\x15\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x65\x00\x7d\x00\x10\x00\x00\x00\xc8\x00\xc7\x00\x00\x00\x24\x00\x00\x00\xcb\x00\x00\x00\x06\x00\xca\x00\x08\x00\x0d\x00\x00\x00\x00\x00\x98\x00\xa2\x00\xa1\x00\x00\x00\x00\x00\xc5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\xc3\x00\x00\x00\x00\x00"#
happyGotoOffsets :: HappyAddr
happyGotoOffsets = HappyA# "\x87\x00\xa3\x00\xa4\x00\xa2\x00\x6e\x00\x7b\x00\x5c\x00\xa1\x00\x68\x00\x5a\x00\x51\x00\xf7\xff\x9f\x00\x9d\x00\x9b\x00\x94\x00\x3d\x00\x8f\x00\x8c\x00\x66\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\xa0\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x00\x29\x00\x9e\x00\x24\x00\x00\x00\x00\x00\x9c\x00\x55\x00\x39\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x00\x00\x00\x9a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x00\x00\x00\x00\x00\x00\x96\x00\x00\x00\x00\x00\x95\x00\x00\x00\x89\x00\x00\x00\xfb\xff\x54\x00\x00\x00\x92\x00\x83\x00\x4c\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\x00\x00\x00\x00\x00\x80\x00\x63\x00\x00\x00\x93\x00\x00\x00\x00\x00\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x93\x00\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x39\x00\x7f\x00\x00\x00\x77\x00\x5d\x00\x00\x00\x55\x00\x86\x00\x00\x00\x00\x00\x61\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
happyGotoOffsets = HappyA# "\xb5\x00\xc6\x00\xc4\x00\xc2\x00\xac\x00\x45\x00\xfa\xff\x83\x00\x8f\x00\x69\x00\x63\x00\x91\x00\xb8\x00\xb6\x00\xb4\x00\xb1\x00\x49\x00\xb0\x00\xad\x00\x8b\x00\x00\x00\x00\x00\x00\x00\xc1\x00\x00\x00\xc1\x00\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x00\x35\x00\x32\x00\x30\x00\x00\x00\x00\x00\xbe\x00\x02\x00\x90\x00\xb9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x00\x00\xbc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb7\x00\x00\x00\x9f\x00\x00\x00\xf9\xff\x66\x00\x00\x00\x96\x00\x7f\x00\x60\x00\x93\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x00\x00\x00\x00\x00\x8e\x00\x88\x00\x00\x00\x7c\x00\x00\x00\x00\x00\x58\x00\x52\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x00\x00\x00\x7e\x00\x00\x00\x00\x00\x00\x00\x5e\x00\x90\x00\x4b\x00\x00\x00\x4c\x00\x03\x00\x00\x00\x02\x00\x77\x00\x00\x00\x00\x00\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
happyDefActions :: HappyAddr
happyDefActions = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\xff\x00\x00\x00\x00\x00\x00\x00\x00\xc4\xff\xd1\xff\xcf\xff\xcd\xff\xcb\xff\xc9\xff\xc6\xff\xc4\xff\xc4\xff\x00\x00\xeb\xff\xc1\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd4\xff\xd8\xff\xd7\xff\xc8\xff\xda\xff\x00\x00\xc9\xff\xc9\xff\x00\x00\xc9\xff\xea\xff\xe9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\xff\xde\xff\xe0\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\xcf\xff\x00\x00\xcb\xff\x00\x00\xca\xff\x00\x00\xc6\xff\x00\x00\xc4\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xff\x00\x00\xd4\xff\x00\x00\xc9\xff\xc5\xff\xc3\xff\xc4\xff\xc2\xff\xc0\xff\xd2\xff\xc7\xff\xdb\xff\x00\x00\xdd\xff\xd6\xff\xcc\xff\xce\xff\xd0\xff\x00\x00\x00\x00\x00\x00\xe2\xff\xe3\xff\x00\x00\xcd\xff\x00\x00\xcb\xff\x00\x00\xd1\xff\x00\x00\x00\x00\x00\x00\x00\x00\xe1\xff\xdc\xff\xc2\xff\x00\x00\xd5\xff\x00\x00\xe4\xff\xe5\xff\xe6\xff\xe7\xff\x00\x00\xe8\xff\x00\x00\xd3\xff"#
happyDefActions = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8\xff\x00\x00\x00\x00\x00\x00\x00\x00\xc1\xff\xce\xff\xcc\xff\xca\xff\xc8\xff\xc6\xff\xc3\xff\xc1\xff\xc1\xff\x00\x00\xeb\xff\xbe\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd1\xff\xd7\xff\xd6\xff\xc5\xff\xd9\xff\x00\x00\xc6\xff\xc6\xff\x00\x00\xc6\xff\xea\xff\xe9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xff\xdd\xff\xdf\xff\x00\x00\x00\x00\xe0\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\xcc\xff\x00\x00\xc8\xff\x00\x00\xc7\xff\x00\x00\xc3\xff\x00\x00\xc1\xff\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xff\xd5\xff\x00\x00\xd1\xff\xd6\xff\x00\x00\xc6\xff\xc2\xff\xc0\xff\xc1\xff\xbf\xff\xbd\xff\xcf\xff\xc4\xff\xda\xff\x00\x00\x00\x00\xdc\xff\xd3\xff\xc9\xff\xcb\xff\xcd\xff\x00\x00\x00\x00\x00\x00\xe2\xff\xe3\xff\x00\x00\xca\xff\x00\x00\xc8\xff\x00\x00\xce\xff\x00\x00\x00\x00\x00\x00\x00\x00\xe1\xff\xdb\xff\xbf\xff\x00\x00\x00\x00\xd4\xff\xd2\xff\x00\x00\xe4\xff\xe5\xff\xe6\xff\xe7\xff\x00\x00\xe8\xff\x00\x00\xd0\xff"#
happyCheck :: HappyAddr
happyCheck = HappyA# "\xff\xff\x02\x00\x01\x00\x09\x00\x09\x00\x0e\x00\x15\x00\x02\x00\x06\x00\x03\x00\x19\x00\x02\x00\x15\x00\x12\x00\x09\x00\x15\x00\x0b\x00\x0c\x00\x09\x00\x12\x00\x0b\x00\x0c\x00\x05\x00\x09\x00\x19\x00\x14\x00\x15\x00\x16\x00\x17\x00\x17\x00\x15\x00\x16\x00\x17\x00\x00\x00\x01\x00\x02\x00\x00\x00\x01\x00\x02\x00\x19\x00\x17\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x0c\x00\x0d\x00\x05\x00\x0c\x00\x0d\x00\x15\x00\x08\x00\x13\x00\x0c\x00\x0d\x00\x13\x00\x00\x00\x01\x00\x02\x00\x02\x00\x13\x00\x00\x00\x01\x00\x02\x00\x07\x00\x17\x00\x17\x00\x09\x00\x0c\x00\x0d\x00\x00\x00\x01\x00\x02\x00\x0c\x00\x0d\x00\x13\x00\x00\x00\x01\x00\x02\x00\x15\x00\x13\x00\x00\x00\x0c\x00\x0d\x00\x00\x00\x01\x00\x02\x00\x02\x00\x0c\x00\x0d\x00\x00\x00\x01\x00\x02\x00\x08\x00\x0d\x00\x02\x00\x0c\x00\x0d\x00\x00\x00\x01\x00\x02\x00\x09\x00\x0c\x00\x0d\x00\x00\x00\x01\x00\x02\x00\x12\x00\x11\x00\x0b\x00\x12\x00\x0e\x00\x02\x00\x0e\x00\x19\x00\x0b\x00\x0e\x00\x07\x00\x15\x00\x16\x00\x15\x00\x16\x00\x09\x00\x15\x00\x16\x00\x02\x00\x0f\x00\x03\x00\x17\x00\x10\x00\x19\x00\x08\x00\x15\x00\x09\x00\x0f\x00\x15\x00\x16\x00\x17\x00\x03\x00\x04\x00\x02\x00\x03\x00\x09\x00\x0a\x00\x0a\x00\x12\x00\x0a\x00\x00\x00\x02\x00\x15\x00\x15\x00\x14\x00\x02\x00\x10\x00\x05\x00\x02\x00\x02\x00\x06\x00\x02\x00\x01\x00\x00\x00\x15\x00\x0a\x00\x14\x00\x17\x00\x15\x00\x12\x00\x04\x00\x06\x00\x05\x00\x02\x00\x0a\x00\x11\x00\x10\x00\x0f\x00\x0a\x00\x0a\x00\x01\x00\x01\x00\x07\x00\x09\x00\x03\x00\x01\x00\x0e\x00\x0a\x00\x01\x00\x0d\x00\x01\x00\x01\x00\x04\x00\x02\x00\xff\xff\x11\x00\x04\x00\xff\xff\x19\x00\xff\xff\x06\x00\xff\xff\xff\xff\x07\x00\xff\xff\x17\x00\x02\x00\xff\xff\x19\x00\x17\x00\x19\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x00\x19\x00\x14\x00\x19\x00\xff\xff\x19\x00\x19\x00\x16\x00\x19\x00\x15\x00\x12\x00\x19\x00\x17\x00\x11\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
happyCheck = HappyA# "\xff\xff\x02\x00\x09\x00\x09\x00\x02\x00\x02\x00\x17\x00\x02\x00\x19\x00\x03\x00\x08\x00\x12\x00\x12\x00\x05\x00\x09\x00\x02\x00\x0b\x00\x0c\x00\x02\x00\x03\x00\x15\x00\x16\x00\x17\x00\x02\x00\x19\x00\x14\x00\x15\x00\x16\x00\x17\x00\x17\x00\x09\x00\x17\x00\x0b\x00\x0c\x00\x15\x00\x16\x00\x17\x00\x15\x00\x16\x00\x17\x00\x09\x00\x05\x00\x15\x00\x16\x00\x17\x00\x00\x00\x01\x00\x02\x00\x00\x00\x01\x00\x02\x00\x01\x00\x02\x00\x00\x00\x01\x00\x02\x00\x19\x00\x0c\x00\x0d\x00\x17\x00\x0c\x00\x0d\x00\x01\x00\x08\x00\x13\x00\x0c\x00\x0d\x00\x13\x00\x00\x00\x01\x00\x02\x00\x02\x00\x13\x00\x00\x00\x01\x00\x02\x00\x06\x00\x08\x00\x17\x00\x12\x00\x0c\x00\x0d\x00\x00\x00\x01\x00\x02\x00\x0c\x00\x0d\x00\x13\x00\x00\x00\x01\x00\x02\x00\x0f\x00\x13\x00\x12\x00\x0c\x00\x0d\x00\x00\x00\x01\x00\x02\x00\x00\x00\x0c\x00\x0d\x00\x00\x00\x01\x00\x02\x00\x00\x00\x01\x00\x02\x00\x0c\x00\x0d\x00\x09\x00\x11\x00\x0d\x00\x09\x00\x0c\x00\x0d\x00\x12\x00\x0c\x00\x0d\x00\x00\x00\x01\x00\x02\x00\x15\x00\x19\x00\x00\x00\x15\x00\x00\x00\x01\x00\x02\x00\x0a\x00\x0b\x00\x00\x00\x01\x00\x02\x00\x09\x00\x0a\x00\x0a\x00\x0b\x00\x00\x00\x01\x00\x02\x00\x0a\x00\x0b\x00\x00\x00\x01\x00\x02\x00\x02\x00\x14\x00\x0e\x00\x0b\x00\x0e\x00\x07\x00\x02\x00\x0e\x00\x0b\x00\x15\x00\x16\x00\x15\x00\x16\x00\x0e\x00\x15\x00\x16\x00\x09\x00\x15\x00\x03\x00\x03\x00\x15\x00\x0f\x00\x15\x00\x10\x00\x09\x00\x09\x00\x0f\x00\x15\x00\x02\x00\x10\x00\x15\x00\x02\x00\x15\x00\x07\x00\x19\x00\x15\x00\x16\x00\x17\x00\x03\x00\x04\x00\x16\x00\x17\x00\x05\x00\x02\x00\x02\x00\x06\x00\x02\x00\x00\x00\x15\x00\x12\x00\x14\x00\x11\x00\x10\x00\x0f\x00\x06\x00\x05\x00\x04\x00\x01\x00\x01\x00\x0a\x00\x07\x00\x0a\x00\x03\x00\x09\x00\x15\x00\x01\x00\x08\x00\x01\x00\x01\x00\x0e\x00\x0a\x00\x02\x00\x04\x00\x01\x00\x0d\x00\xff\xff\xff\xff\x04\x00\xff\xff\xff\xff\x11\x00\xff\xff\xff\xff\x06\x00\xff\xff\x17\x00\x07\x00\xff\xff\xff\xff\xff\xff\x19\x00\xff\xff\xff\xff\x17\x00\xff\xff\xff\xff\x19\x00\xff\xff\x17\x00\x19\x00\x10\x00\x19\x00\x14\x00\x19\x00\x15\x00\x19\x00\x19\x00\x12\x00\x11\x00\x17\x00\x19\x00\x13\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
happyTable :: HappyAddr
happyTable = HappyA# "\x00\x00\x35\x00\x80\x00\x77\x00\x6a\x00\x2b\x00\x16\x00\x22\x00\x4e\x00\x7e\x00\xff\xff\x22\x00\x17\x00\x36\x00\x23\x00\x16\x00\x24\x00\x25\x00\x23\x00\x3d\x00\x24\x00\x25\x00\x7c\x00\x4d\x00\xff\xff\x4e\x00\x16\x00\x26\x00\x27\x00\x27\x00\x16\x00\x26\x00\x27\x00\x1b\x00\x1c\x00\x1d\x00\x1b\x00\x1c\x00\x1d\x00\xff\xff\x27\x00\x1b\x00\x1c\x00\x1d\x00\xc4\xff\x1e\x00\x1f\x00\x72\x00\x1e\x00\x1f\x00\xc4\xff\x4b\x00\x5d\x00\x1e\x00\x1f\x00\x51\x00\x54\x00\x1c\x00\x1d\x00\x39\x00\x53\x00\x1b\x00\x1c\x00\x1d\x00\x4f\x00\x27\x00\x27\x00\x2e\x00\x1e\x00\x1f\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x55\x00\x1b\x00\x1c\x00\x1d\x00\x16\x00\x20\x00\x1b\x00\x77\x00\x1f\x00\x1b\x00\x1c\x00\x1d\x00\x37\x00\x66\x00\x1f\x00\x1b\x00\x1c\x00\x1d\x00\x50\x00\x2c\x00\x49\x00\x69\x00\x1f\x00\x2f\x00\x30\x00\x31\x00\x35\x00\x2e\x00\x1f\x00\x2f\x00\x30\x00\x31\x00\x3d\x00\x72\x00\x4b\x00\x36\x00\x16\x00\x39\x00\x16\x00\xff\xff\x32\x00\x16\x00\x3a\x00\x17\x00\x79\x00\x17\x00\x5b\x00\x4d\x00\x17\x00\x18\x00\x37\x00\x5a\x00\x79\x00\x27\x00\x57\x00\xff\xff\x38\x00\x16\x00\x4d\x00\x7e\x00\x16\x00\x26\x00\x27\x00\x41\x00\x42\x00\x35\x00\x75\x00\x4d\x00\x76\x00\x7a\x00\x70\x00\x57\x00\x58\x00\x68\x00\x5c\x00\x65\x00\x67\x00\x44\x00\x6c\x00\x6e\x00\x46\x00\x49\x00\x4e\x00\x49\x00\x52\x00\x58\x00\x19\x00\x57\x00\x1a\x00\x27\x00\x16\x00\x27\x00\x3f\x00\x3b\x00\x3d\x00\x35\x00\x33\x00\x28\x00\x29\x00\x2a\x00\x82\x00\x81\x00\x7d\x00\x70\x00\x74\x00\x4d\x00\x5f\x00\x63\x00\x60\x00\x61\x00\x64\x00\x62\x00\x65\x00\x44\x00\x6c\x00\x6e\x00\x00\x00\x3f\x00\x46\x00\x00\x00\xff\xff\x00\x00\x48\x00\x00\x00\x00\x00\x49\x00\x00\x00\x27\x00\x35\x00\x00\x00\xff\xff\x27\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5b\x00\xff\xff\x4e\x00\xff\xff\x00\x00\xff\xff\xff\xff\x26\x00\xff\xff\x16\x00\x3d\x00\xc2\xff\x27\x00\x3f\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x36\x00\x6e\x00\x36\x00\x38\x00\x4a\x00\x27\x00\x22\x00\xff\xff\x84\x00\x51\x00\x37\x00\x37\x00\x82\x00\x23\x00\x36\x00\x24\x00\x25\x00\x36\x00\x79\x00\x16\x00\x26\x00\x27\x00\x22\x00\xff\xff\x4f\x00\x16\x00\x26\x00\x27\x00\x27\x00\x23\x00\x27\x00\x24\x00\x25\x00\x16\x00\x26\x00\x27\x00\x16\x00\x26\x00\x27\x00\x4e\x00\x76\x00\x16\x00\x26\x00\x27\x00\x1b\x00\x1c\x00\x1d\x00\x1b\x00\x1c\x00\x1d\x00\x53\x00\x54\x00\x1b\x00\x1c\x00\x1d\x00\xff\xff\x1e\x00\x1f\x00\x27\x00\x1e\x00\x1f\x00\x86\x00\x4c\x00\x60\x00\x1e\x00\x1f\x00\x52\x00\x56\x00\x1c\x00\x57\x00\x38\x00\x55\x00\x1b\x00\x1c\x00\x1d\x00\x4f\x00\x39\x00\x27\x00\x3e\x00\x1e\x00\x1f\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x58\x00\x1b\x00\x1c\x00\x1d\x00\x84\x00\x20\x00\x74\x00\x7b\x00\x1f\x00\x1b\x00\x1c\x00\x1d\x00\x1b\x00\x7c\x00\x1f\x00\x1b\x00\x1c\x00\x1d\x00\x1b\x00\x1c\x00\x1d\x00\x6a\x00\x1f\x00\x7b\x00\x76\x00\x2c\x00\x2e\x00\x6d\x00\x1f\x00\x3e\x00\x2e\x00\x1f\x00\x2f\x00\x30\x00\x31\x00\x16\x00\xff\xff\x5b\x00\x16\x00\x2f\x00\x30\x00\x31\x00\x80\x00\x34\x00\x2f\x00\x30\x00\x31\x00\x4e\x00\x7a\x00\x5a\x00\x34\x00\x2f\x00\x30\x00\x31\x00\x33\x00\x34\x00\x2f\x00\x30\x00\x31\x00\x3a\x00\x6b\x00\x16\x00\x4c\x00\x16\x00\x50\x00\x6c\x00\x16\x00\x32\x00\x17\x00\x7f\x00\x17\x00\x5e\x00\x2b\x00\x17\x00\x18\x00\x4e\x00\x5f\x00\x7e\x00\x7f\x00\x17\x00\xc1\xff\x69\x00\x5a\x00\x4e\x00\x4e\x00\x5d\x00\xc1\xff\x3a\x00\x70\x00\x16\x00\x45\x00\x16\x00\x3b\x00\xff\xff\x16\x00\x26\x00\x27\x00\x42\x00\x43\x00\x26\x00\x27\x00\x72\x00\x47\x00\x4a\x00\x4f\x00\x4a\x00\x5b\x00\x19\x00\x27\x00\x1a\x00\x28\x00\x29\x00\x2a\x00\x3c\x00\x3e\x00\x40\x00\x83\x00\x74\x00\x88\x00\x78\x00\x87\x00\x62\x00\x4e\x00\x16\x00\x67\x00\x63\x00\x68\x00\x69\x00\x64\x00\x65\x00\x72\x00\x70\x00\x45\x00\x66\x00\x00\x00\x00\x00\x47\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x49\x00\x00\x00\x27\x00\x4a\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x27\x00\x00\x00\x00\x00\xff\xff\x00\x00\x27\x00\xff\xff\x5e\x00\xff\xff\x4f\x00\xff\xff\x16\x00\xff\xff\xff\xff\x3e\x00\x40\x00\x27\x00\xbf\xff\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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 (20, 63) [
happyReduceArr = array (20, 66) [
(20 , happyReduce_20),
(21 , happyReduce_21),
(22 , happyReduce_22),
@@ -218,7 +218,10 @@ happyReduceArr = array (20, 63) [
(60 , happyReduce_60),
(61 , happyReduce_61),
(62 , happyReduce_62),
(63 , happyReduce_63)
(63 , happyReduce_63),
(64 , happyReduce_64),
(65 , happyReduce_65),
(66 , happyReduce_66)
]
happy_n_terms = 26 :: Int
@@ -344,29 +347,36 @@ happyReduction_30 (happy_x_4 `HappyStk`
(Tr happy_var_2 (reverse happy_var_3)
) `HappyStk` happyRest}}
happyReduce_31 = happySpecReduce_1 11# happyReduction_31
happyReduce_31 = happySpecReduce_1 10# happyReduction_31
happyReduction_31 happy_x_1
= case happyOut34 happy_x_1 of { happy_var_1 ->
happyIn33
(trA_ happy_var_1
)}
happyReduce_32 = happySpecReduce_1 11# happyReduction_32
happyReduction_32 happy_x_1
= case happyOut25 happy_x_1 of { happy_var_1 ->
happyIn34
(AC happy_var_1
)}
happyReduce_32 = happySpecReduce_1 11# happyReduction_32
happyReduction_32 happy_x_1
happyReduce_33 = happySpecReduce_1 11# happyReduction_33
happyReduction_33 happy_x_1
= case happyOut23 happy_x_1 of { happy_var_1 ->
happyIn34
(AS happy_var_1
)}
happyReduce_33 = happySpecReduce_1 11# happyReduction_33
happyReduction_33 happy_x_1
happyReduce_34 = happySpecReduce_1 11# happyReduction_34
happyReduction_34 happy_x_1
= case happyOut24 happy_x_1 of { happy_var_1 ->
happyIn34
(AI happy_var_1
)}
happyReduce_34 = happySpecReduce_3 12# happyReduction_34
happyReduction_34 happy_x_3
happyReduce_35 = happySpecReduce_3 12# happyReduction_35
happyReduction_35 happy_x_3
happy_x_2
happy_x_1
= case happyOut42 happy_x_2 of { happy_var_2 ->
@@ -374,8 +384,8 @@ happyReduction_34 happy_x_3
(R happy_var_2
)}
happyReduce_35 = happyReduce 4# 12# happyReduction_35
happyReduction_35 (happy_x_4 `HappyStk`
happyReduce_36 = happyReduce 4# 12# happyReduction_36
happyReduction_36 (happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
happy_x_1 `HappyStk`
@@ -386,8 +396,8 @@ happyReduction_35 (happy_x_4 `HappyStk`
(P happy_var_1 happy_var_3
) `HappyStk` happyRest}}
happyReduce_36 = happySpecReduce_3 12# happyReduction_36
happyReduction_36 happy_x_3
happyReduce_37 = happySpecReduce_3 12# happyReduction_37
happyReduction_37 happy_x_3
happy_x_2
happy_x_1
= case happyOut42 happy_x_2 of { happy_var_2 ->
@@ -395,37 +405,58 @@ happyReduction_36 happy_x_3
(S happy_var_2
)}
happyReduce_37 = happySpecReduce_1 12# happyReduction_37
happyReduction_37 happy_x_1
happyReduce_38 = happySpecReduce_1 12# happyReduction_38
happyReduction_38 happy_x_1
= case happyOut36 happy_x_1 of { happy_var_1 ->
happyIn35
(K happy_var_1
)}
happyReduce_38 = happySpecReduce_2 12# happyReduction_38
happyReduction_38 happy_x_2
happyReduce_39 = happySpecReduce_2 12# happyReduction_39
happyReduction_39 happy_x_2
happy_x_1
= case happyOut24 happy_x_2 of { happy_var_2 ->
happyIn35
(V happy_var_2
)}
happyReduce_39 = happySpecReduce_1 12# happyReduction_39
happyReduction_39 happy_x_1
happyReduce_40 = happySpecReduce_1 12# happyReduction_40
happyReduction_40 happy_x_1
= case happyOut24 happy_x_1 of { happy_var_1 ->
happyIn35
(C happy_var_1
)}
happyReduce_40 = happySpecReduce_1 12# happyReduction_40
happyReduction_40 happy_x_1
happyReduce_41 = happySpecReduce_1 12# happyReduction_41
happyReduction_41 happy_x_1
= case happyOut25 happy_x_1 of { happy_var_1 ->
happyIn35
(F happy_var_1
)}
happyReduce_41 = happySpecReduce_3 12# happyReduction_41
happyReduction_41 happy_x_3
happyReduce_42 = happySpecReduce_2 12# happyReduction_42
happyReduction_42 happy_x_2
happy_x_1
= case happyOut25 happy_x_2 of { happy_var_2 ->
happyIn35
(L happy_var_2
)}
happyReduce_43 = happyReduce 5# 12# happyReduction_43
happyReduction_43 (happy_x_5 `HappyStk`
happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
happy_x_1 `HappyStk`
happyRest)
= case happyOut25 happy_x_2 of { happy_var_2 ->
case happyOut35 happy_x_4 of { happy_var_4 ->
happyIn35
(A happy_var_2 happy_var_4
) `HappyStk` happyRest}}
happyReduce_44 = happySpecReduce_3 12# happyReduction_44
happyReduction_44 happy_x_3
happy_x_2
happy_x_1
= case happyOut42 happy_x_2 of { happy_var_2 ->
@@ -433,8 +464,8 @@ happyReduction_41 happy_x_3
(FV happy_var_2
)}
happyReduce_42 = happyReduce 5# 12# happyReduction_42
happyReduction_42 (happy_x_5 `HappyStk`
happyReduce_45 = happyReduce 5# 12# happyReduction_45
happyReduction_45 (happy_x_5 `HappyStk`
happy_x_4 `HappyStk`
happy_x_3 `HappyStk`
happy_x_2 `HappyStk`
@@ -446,15 +477,15 @@ happyReduction_42 (happy_x_5 `HappyStk`
(W happy_var_2 happy_var_4
) `HappyStk` happyRest}}
happyReduce_43 = happySpecReduce_1 13# happyReduction_43
happyReduction_43 happy_x_1
happyReduce_46 = happySpecReduce_1 13# happyReduction_46
happyReduction_46 happy_x_1
= case happyOut23 happy_x_1 of { happy_var_1 ->
happyIn36
(KS happy_var_1
)}
happyReduce_44 = happyReduce 7# 13# happyReduction_44
happyReduction_44 (happy_x_7 `HappyStk`
happyReduce_47 = happyReduce 7# 13# happyReduction_47
happyReduction_47 (happy_x_7 `HappyStk`
happy_x_6 `HappyStk`
happy_x_5 `HappyStk`
happy_x_4 `HappyStk`
@@ -468,8 +499,8 @@ happyReduction_44 (happy_x_7 `HappyStk`
(KP (reverse happy_var_3) happy_var_5
) `HappyStk` happyRest}}
happyReduce_45 = happySpecReduce_3 14# happyReduction_45
happyReduction_45 happy_x_3
happyReduce_48 = happySpecReduce_3 14# happyReduction_48
happyReduction_48 happy_x_3
happy_x_2
happy_x_1
= case happyOut44 happy_x_1 of { happy_var_1 ->
@@ -478,13 +509,13 @@ happyReduction_45 happy_x_3
(Var (reverse happy_var_1) (reverse happy_var_3)
)}}
happyReduce_46 = happySpecReduce_0 15# happyReduction_46
happyReduction_46 = happyIn38
happyReduce_49 = happySpecReduce_0 15# happyReduction_49
happyReduction_49 = happyIn38
([]
)
happyReduce_47 = happySpecReduce_3 15# happyReduction_47
happyReduction_47 happy_x_3
happyReduce_50 = happySpecReduce_3 15# happyReduction_50
happyReduction_50 happy_x_3
happy_x_2
happy_x_1
= case happyOut38 happy_x_1 of { happy_var_1 ->
@@ -493,13 +524,13 @@ happyReduction_47 happy_x_3
(flip (:) happy_var_1 happy_var_2
)}}
happyReduce_48 = happySpecReduce_0 16# happyReduction_48
happyReduction_48 = happyIn39
happyReduce_51 = happySpecReduce_0 16# happyReduction_51
happyReduction_51 = happyIn39
([]
)
happyReduce_49 = happySpecReduce_3 16# happyReduction_49
happyReduction_49 happy_x_3
happyReduce_52 = happySpecReduce_3 16# happyReduction_52
happyReduction_52 happy_x_3
happy_x_2
happy_x_1
= case happyOut39 happy_x_1 of { happy_var_1 ->
@@ -508,13 +539,13 @@ happyReduction_49 happy_x_3
(flip (:) happy_var_1 happy_var_2
)}}
happyReduce_50 = happySpecReduce_0 17# happyReduction_50
happyReduction_50 = happyIn40
happyReduce_53 = happySpecReduce_0 17# happyReduction_53
happyReduction_53 = happyIn40
([]
)
happyReduce_51 = happySpecReduce_3 17# happyReduction_51
happyReduction_51 happy_x_3
happyReduce_54 = happySpecReduce_3 17# happyReduction_54
happyReduction_54 happy_x_3
happy_x_2
happy_x_1
= case happyOut40 happy_x_1 of { happy_var_1 ->
@@ -523,13 +554,13 @@ happyReduction_51 happy_x_3
(flip (:) happy_var_1 happy_var_2
)}}
happyReduce_52 = happySpecReduce_0 18# happyReduction_52
happyReduction_52 = happyIn41
happyReduce_55 = happySpecReduce_0 18# happyReduction_55
happyReduction_55 = happyIn41
([]
)
happyReduce_53 = happySpecReduce_2 18# happyReduction_53
happyReduction_53 happy_x_2
happyReduce_56 = happySpecReduce_2 18# happyReduction_56
happyReduction_56 happy_x_2
happy_x_1
= case happyOut41 happy_x_1 of { happy_var_1 ->
case happyOut25 happy_x_2 of { happy_var_2 ->
@@ -537,20 +568,20 @@ happyReduction_53 happy_x_2
(flip (:) happy_var_1 happy_var_2
)}}
happyReduce_54 = happySpecReduce_0 19# happyReduction_54
happyReduction_54 = happyIn42
happyReduce_57 = happySpecReduce_0 19# happyReduction_57
happyReduction_57 = happyIn42
([]
)
happyReduce_55 = happySpecReduce_1 19# happyReduction_55
happyReduction_55 happy_x_1
happyReduce_58 = happySpecReduce_1 19# happyReduction_58
happyReduction_58 happy_x_1
= case happyOut35 happy_x_1 of { happy_var_1 ->
happyIn42
((:[]) happy_var_1
)}
happyReduce_56 = happySpecReduce_3 19# happyReduction_56
happyReduction_56 happy_x_3
happyReduce_59 = happySpecReduce_3 19# happyReduction_59
happyReduction_59 happy_x_3
happy_x_2
happy_x_1
= case happyOut35 happy_x_1 of { happy_var_1 ->
@@ -559,13 +590,13 @@ happyReduction_56 happy_x_3
((:) happy_var_1 happy_var_3
)}}
happyReduce_57 = happySpecReduce_0 20# happyReduction_57
happyReduction_57 = happyIn43
happyReduce_60 = happySpecReduce_0 20# happyReduction_60
happyReduction_60 = happyIn43
([]
)
happyReduce_58 = happySpecReduce_2 20# happyReduction_58
happyReduction_58 happy_x_2
happyReduce_61 = happySpecReduce_2 20# happyReduction_61
happyReduction_61 happy_x_2
happy_x_1
= case happyOut43 happy_x_1 of { happy_var_1 ->
case happyOut33 happy_x_2 of { happy_var_2 ->
@@ -573,13 +604,13 @@ happyReduction_58 happy_x_2
(flip (:) happy_var_1 happy_var_2
)}}
happyReduce_59 = happySpecReduce_0 21# happyReduction_59
happyReduction_59 = happyIn44
happyReduce_62 = happySpecReduce_0 21# happyReduction_62
happyReduction_62 = happyIn44
([]
)
happyReduce_60 = happySpecReduce_2 21# happyReduction_60
happyReduction_60 happy_x_2
happyReduce_63 = happySpecReduce_2 21# happyReduction_63
happyReduction_63 happy_x_2
happy_x_1
= case happyOut44 happy_x_1 of { happy_var_1 ->
case happyOut23 happy_x_2 of { happy_var_2 ->
@@ -587,20 +618,20 @@ happyReduction_60 happy_x_2
(flip (:) happy_var_1 happy_var_2
)}}
happyReduce_61 = happySpecReduce_0 22# happyReduction_61
happyReduction_61 = happyIn45
happyReduce_64 = happySpecReduce_0 22# happyReduction_64
happyReduction_64 = happyIn45
([]
)
happyReduce_62 = happySpecReduce_1 22# happyReduction_62
happyReduction_62 happy_x_1
happyReduce_65 = happySpecReduce_1 22# happyReduction_65
happyReduction_65 happy_x_1
= case happyOut37 happy_x_1 of { happy_var_1 ->
happyIn45
((:[]) happy_var_1
)}
happyReduce_63 = happySpecReduce_3 22# happyReduction_63
happyReduction_63 happy_x_3
happyReduce_66 = happySpecReduce_3 22# happyReduction_66
happyReduction_66 happy_x_3
happy_x_2
happy_x_1
= case happyOut37 happy_x_1 of { happy_var_1 ->
@@ -731,6 +762,7 @@ happyError ts =
_ -> " before " ++ unwords (map prToken (take 4 ts))
myLexer = tokens
trA_ a_ = Tr a_ []
{-# LINE 1 "GenericTemplate.hs" #-}
{-# LINE 1 "<built-in>" #-}
{-# LINE 1 "<command line>" #-}

View File

@@ -1,5 +1,4 @@
{-# OPTIONS -fno-warn-incomplete-patterns #-}
module GF.Canon.GFCC.PrintGFCC where
-- pretty-printer generated by the BNF converter
@@ -155,6 +154,8 @@ instance Print Term where
V n -> prPrec i 0 (concatD [doc (showString "$") , prt 0 n])
C n -> prPrec i 0 (concatD [prt 0 n])
F cid -> prPrec i 0 (concatD [prt 0 cid])
L cid -> prPrec i 0 (concatD [doc (showString "$") , prt 0 cid])
A cid term -> prPrec i 0 (concatD [doc (showString "(") , prt 0 cid , doc (showString "->") , prt 0 term , doc (showString ")")])
FV terms -> prPrec i 0 (concatD [doc (showString "[|") , prt 0 terms , doc (showString "|]")])
W str term -> prPrec i 0 (concatD [doc (showString "(") , prt 0 str , doc (showString "+") , prt 0 term , doc (showString ")")])