From 5ea07dac9cbdda5333a77b0b90cec8cf5465131a Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 1 Apr 2021 12:35:47 -0600 Subject: actually handle concat logic correctly --- bird-machine-macros/src/nfa.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bird-machine-macros/src/nfa.rs b/bird-machine-macros/src/nfa.rs index 833353e..d964de7 100644 --- a/bird-machine-macros/src/nfa.rs +++ b/bird-machine-macros/src/nfa.rs @@ -146,7 +146,11 @@ impl NFA { .insert(other_state_offset); } // steal the other machine's accept states - self.accept_states = other.accept_states; + self.accept_states = other + .accept_states + .into_iter() + .map(|x| x + other_state_offset) + .collect(); self } -- cgit v1.2.3