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
@@ -50,8 +50,8 @@ class TestLexer
end
def run(grammar, input)
propane = Propane.new(grammar)
token_dfa = Propane::Lexer::DFA.new(propane.instance_variable_get(:@tokens))
grammar = Propane::Grammar.new(grammar)
token_dfa = Propane::Lexer::DFA.new(grammar.tokens, grammar.drop_tokens)
test_lexer = TestLexer.new(token_dfa)
test_lexer.lex(input)
end