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
@@ -1,4 +1,4 @@
|
||||
module Imbecile
|
||||
class Imbecile
|
||||
describe CodePointRange do
|
||||
|
||||
describe "#<=>" do
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module Imbecile
|
||||
class Imbecile
|
||||
RSpec.describe Regex do
|
||||
|
||||
it "parses an empty expression" do
|
||||
|
||||
Reference in new issue
Block a user