summaryrefslogtreecommitdiff
path: root/colm/pdarun.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-05-19 21:59:43 -0400
committerAdrian Thurston <thurston@complang.org>2012-05-19 21:59:43 -0400
commit577e7426eb757aa118fbabf7dfa70d1308b8ac22 (patch)
treee8139ea0427fce258c053a1013413bc1c55d5d19 /colm/pdarun.h
parent8125026c4e458a9b3d6ef35508e59488343b890d (diff)
downloadcolm-577e7426eb757aa118fbabf7dfa70d1308b8ac22.tar.gz
a follow-ignore that appears to work
Duplicated the tokenRegion array with the preRegion taken from the same state. This turns the region into a pair of values. The pre-region is tried first. Eliminates the need to carry the pre-region anywhere in runtime state. Just checked when setting cs. If present cs is set using the pre-region and ncs is used for the real region. Not optimal space usage but that's okay for now. Many test case failures. Need to verify thew new output is correct.
Diffstat (limited to 'colm/pdarun.h')
-rw-r--r--colm/pdarun.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/colm/pdarun.h b/colm/pdarun.h
index 9f2c3a4c..263f9deb 100644
--- a/colm/pdarun.h
+++ b/colm/pdarun.h
@@ -238,8 +238,8 @@ typedef struct _PdaTables
unsigned int *actions;
int *commitLen;
int *tokenRegionInds;
- int *tokenPreRegionInds;
int *tokenRegions;
+ int *tokenPreRegions;
int numIndicies;
int numKeys;
@@ -249,6 +249,7 @@ typedef struct _PdaTables
int numActions;
int numCommitLen;
int numRegionItems;
+ int numPreRegionItems;
} PdaTables;
typedef struct _PoolBlock
@@ -408,6 +409,7 @@ void pdaRunMatch( PdaRun *pdaRun, Kid *tree, Kid *pattern );
/* Offset can be used to look at the next nextRegionInd. */
int pdaRunGetNextRegion( PdaRun *pdaRun, int offset );
+int pdaRunGetNextPreRegion( PdaRun *pdaRun );
#define PcrStart 1
#define PcrDone 2