Store tokens and drop tokens separately

This commit is contained in:
josh committed 2022-06-05 14:36:19 -04:00
1 parent 6f1ce32775
commit f37801ec9e
8 files changed
+42 -36

No files matched your search

+2 -2
View File
@@ -3,10 +3,10 @@ class Propane
class DFA < FA
def initialize(tokens)
def initialize(tokens, drop_tokens)
super()
start_nfa = Regex::NFA.new
tokens.each do |name, token|
(tokens + drop_tokens).each do |token|
start_nfa.start_state.add_transition(nil, token.nfa.start_state)
end
@nfa_state_sets = {}