1
0
forked from GitHub/gf-core

the symbol for nonExist in the GF runtime should be the last. this simplifies the binary search in the C runtime

This commit is contained in:
kr.angelov
2013-10-03 08:21:31 +00:00
parent bbf6bd52c0
commit 71868fa053
2 changed files with 4 additions and 4 deletions

View File

@@ -178,8 +178,8 @@ typedef enum {
PGF_SYMBOL_VAR,
PGF_SYMBOL_KS,
PGF_SYMBOL_KP,
PGF_SYMBOL_NE,
PGF_SYMBOL_BIND
PGF_SYMBOL_BIND,
PGF_SYMBOL_NE
} PgfSymbolTag;
typedef struct {

View File

@@ -59,9 +59,9 @@ data Symbol
| SymLit {-# UNPACK #-} !Int {-# UNPACK #-} !LIndex
| SymVar {-# UNPACK #-} !Int {-# UNPACK #-} !Int
| SymKS Token
| SymNE -- non exist
| SymBIND -- the special BIND token
| SymKP [Symbol] [([Symbol],[String])]
| SymBIND -- the special BIND token
| SymNE -- non exist (this should be last constructor to simplify the binary search in the runtime)
deriving (Eq,Ord,Show)
data Production
= PApply {-# UNPACK #-} !FunId [PArg]