Combine Grammar and Generator into top-level Imbecile class
This commit is contained in:
1 parent
9273bfccf6
commit
00016f16b3
20 files changed
+96
-133
No files matched your search
@@ -50,8 +50,8 @@ class TestLexer
|
||||
end
|
||||
|
||||
def run(grammar, input)
|
||||
g = Imbecile::Grammar.new(grammar)
|
||||
token_dfa = Imbecile::Lexer::DFA.new(g.tokens)
|
||||
imbecile = Imbecile.new(grammar)
|
||||
token_dfa = Imbecile::Lexer::DFA.new(imbecile.instance_variable_get(:@tokens))
|
||||
test_lexer = TestLexer.new(token_dfa)
|
||||
test_lexer.lex(input)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user