diff options
Diffstat (limited to 'subex')
-rw-r--r-- | subex/main.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/subex/main.go b/subex/main.go index ae829d9..c1718a4 100644 --- a/subex/main.go +++ b/subex/main.go @@ -112,6 +112,9 @@ func RunTransducer(transducer SubexState, input []walk.Atom) (output []walk.Atom newStates = append(newStates, state.eat(piece)...) } states = pruneStates(newStates) + if len(states) == 0 { + return nil, true + } } for _, state := range states { acceptingStacks := state.accepting() |