add engine forking

This commit is contained in:
Sven M. Hallberg 2013-06-20 11:05:57 +02:00
parent 4f36fcd2c1
commit b1e8e29774
5 changed files with 71 additions and 9 deletions

View file

@ -67,6 +67,7 @@ typedef struct HLREnhGrammar_ {
typedef struct HLREngine_ {
const HLRTable *table;
size_t state;
// stack layout:
// on the left stack, we put pairs: (saved state, semantic value)
@ -74,7 +75,6 @@ typedef struct HLREngine_ {
HSlist *left; // left stack; reductions happen here
HSlist *right; // right stack; input appears here
size_t state;
HArena *arena; // will hold the results
HArena *tarena; // tmp, deleted after parse
} HLREngine;