diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-10-03 08:21:31 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-10-03 08:21:31 +0000 |
| commit | 71868fa053192f7250373eb984690f8e27cbb247 (patch) | |
| tree | 6e80d805d37ef5729486d3a3d3aa02b40701d883 | |
| parent | bbf6bd52c039b2b91020b770e212c6bf6314cb7a (diff) | |
the symbol for nonExist in the GF runtime should be the last. this simplifies the binary search in the C runtime
| -rw-r--r-- | src/runtime/c/pgf/data.h | 4 | ||||
| -rw-r--r-- | src/runtime/haskell/PGF/Data.hs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/c/pgf/data.h b/src/runtime/c/pgf/data.h index 2d7fc450e..f4513d240 100644 --- a/src/runtime/c/pgf/data.h +++ b/src/runtime/c/pgf/data.h @@ -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 { diff --git a/src/runtime/haskell/PGF/Data.hs b/src/runtime/haskell/PGF/Data.hs index e86b02778..06ace4565 100644 --- a/src/runtime/haskell/PGF/Data.hs +++ b/src/runtime/haskell/PGF/Data.hs @@ -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] |
