mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
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_VAR,
|
||||||
PGF_SYMBOL_KS,
|
PGF_SYMBOL_KS,
|
||||||
PGF_SYMBOL_KP,
|
PGF_SYMBOL_KP,
|
||||||
PGF_SYMBOL_NE,
|
PGF_SYMBOL_BIND,
|
||||||
PGF_SYMBOL_BIND
|
PGF_SYMBOL_NE
|
||||||
} PgfSymbolTag;
|
} PgfSymbolTag;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ data Symbol
|
|||||||
| SymLit {-# UNPACK #-} !Int {-# UNPACK #-} !LIndex
|
| SymLit {-# UNPACK #-} !Int {-# UNPACK #-} !LIndex
|
||||||
| SymVar {-# UNPACK #-} !Int {-# UNPACK #-} !Int
|
| SymVar {-# UNPACK #-} !Int {-# UNPACK #-} !Int
|
||||||
| SymKS Token
|
| SymKS Token
|
||||||
| SymNE -- non exist
|
|
||||||
| SymBIND -- the special BIND token
|
|
||||||
| SymKP [Symbol] [([Symbol],[String])]
|
| 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)
|
deriving (Eq,Ord,Show)
|
||||||
data Production
|
data Production
|
||||||
= PApply {-# UNPACK #-} !FunId [PArg]
|
= PApply {-# UNPACK #-} !FunId [PArg]
|
||||||
|
|||||||
Reference in New Issue
Block a user