diff options
author | Adrian Thurston <thurston@complang.org> | 2012-05-19 21:59:43 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2012-05-19 21:59:43 -0400 |
commit | 577e7426eb757aa118fbabf7dfa70d1308b8ac22 (patch) | |
tree | e8139ea0427fce258c053a1013413bc1c55d5d19 /colm/pdarun.h | |
parent | 8125026c4e458a9b3d6ef35508e59488343b890d (diff) | |
download | colm-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.h | 4 |
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 |