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:
@@ -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 {
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user