summaryrefslogtreecommitdiff
path: root/src/libfsm/asm.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2021-12-28 18:23:45 +0000
committerAdrian Thurston <thurston@colm.net>2021-12-28 18:26:40 +0000
commit2d8ba76ddaf6634f285d0a81ee42d5ee77d084cf (patch)
tree1633004184b2281a14ab876df19437ab44f185df /src/libfsm/asm.cc
parentbe2c9cf238ec1d048e3b2d05f1b56a9f2a267668 (diff)
downloadcolm-2d8ba76ddaf6634f285d0a81ee42d5ee77d084cf.tar.gz
generate a check for EOF if there are from-state actions
From-state actions now execute on EOF, but we don't check for their presence when deciding if we should test against EOF. This led to from-state actions executing only if other conditions necessitating EOF-testing are present. Added the check. refs adrian-thurston/ragel#80
Diffstat (limited to 'src/libfsm/asm.cc')
-rw-r--r--src/libfsm/asm.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libfsm/asm.cc b/src/libfsm/asm.cc
index ecfe1c0f..db084d6e 100644
--- a/src/libfsm/asm.cc
+++ b/src/libfsm/asm.cc
@@ -1160,7 +1160,7 @@ void AsmCodeGen::NFA_PUSH( RedStateAp *st )
void AsmCodeGen::STATE_GOTOS()
{
- bool eof = redFsm->anyEofActivity() || redFsm->anyNfaStates();
+ bool eof = redFsm->anyEofActivity() || redFsm->anyNfaStates() || redFsm->anyFromStateActions();
for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) {
/* Writing code above state gotos. */