summaryrefslogtreecommitdiff
path: root/src/runtime/haskell/PGF/Data.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-08-09 10:10:08 +0000
committerkrasimir <krasimir@chalmers.se>2010-08-09 10:10:08 +0000
commitb0e110cf4f7c6e43d044f05fdedde3ffaabb9843 (patch)
treebbbcf12cc8940277b3f04076fb0c84979c149bfd /src/runtime/haskell/PGF/Data.hs
parent68d04c9136baee39d3c0bf1b345f7d669d9e6072 (diff)
native representation for HOAS in PMCFG and incremental type checking of the parse forest
Diffstat (limited to 'src/runtime/haskell/PGF/Data.hs')
-rw-r--r--src/runtime/haskell/PGF/Data.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/runtime/haskell/PGF/Data.hs b/src/runtime/haskell/PGF/Data.hs
index 490e25a84..ec119fc0d 100644
--- a/src/runtime/haskell/PGF/Data.hs
+++ b/src/runtime/haskell/PGF/Data.hs
@@ -36,6 +36,7 @@ data Concr = Concr {
cflags :: Map.Map CId Literal, -- value of a flag
printnames :: Map.Map CId String, -- printname of a cat or a fun
cncfuns :: Array FunId CncFun,
+ lindefs :: IntMap.IntMap [FunId],
sequences :: Array SeqId Sequence,
productions :: IntMap.IntMap (Set.Set Production), -- the original productions loaded from the PGF file
pproductions :: IntMap.IntMap (Set.Set Production), -- productions needed for parsing
@@ -51,14 +52,16 @@ type DotPos = Int
data Symbol
= SymCat {-# UNPACK #-} !Int {-# UNPACK #-} !LIndex
| SymLit {-# UNPACK #-} !Int {-# UNPACK #-} !LIndex
+ | SymVar {-# UNPACK #-} !Int {-# UNPACK #-} !Int
| SymKS [Token]
| SymKP [Token] [Alternative]
deriving (Eq,Ord,Show)
data Production
- = PApply {-# UNPACK #-} !FunId [FId]
+ = PApply {-# UNPACK #-} !FunId [PArg]
| PCoerce {-# UNPACK #-} !FId
| PConst CId Expr [Token]
deriving (Eq,Ord,Show)
+data PArg = PArg [(FId,FId)] {-# UNPACK #-} !FId deriving (Eq,Ord,Show)
data CncCat = CncCat {-# UNPACK #-} !FId {-# UNPACK #-} !FId {-# UNPACK #-} !(Array LIndex String)
data CncFun = CncFun CId {-# UNPACK #-} !(UArray LIndex SeqId) deriving (Eq,Ord,Show)
type Sequence = Array DotPos Symbol