Skip to content

Commit

Permalink
wip - migrate to oedipus_lex
Browse files Browse the repository at this point in the history
see prior work at #1337
  • Loading branch information
flavorjones committed Jul 19, 2023
1 parent 8f094b4 commit c1f733e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ group :development do
gem "hoe-markdown", "= 1.4.0"

# parser generator
gem "rexical", "= 1.0.7"
gem "oedipus_lex", "= 2.6.1"

# tests
gem "minitest", "5.18.1"
Expand Down
10 changes: 8 additions & 2 deletions rakelib/css-generate.rake
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ namespace "css" do
sh "racc -l -o #{t.name} #{t.prerequisites.first}"
end

casual_file_task.define_task(TOKENIZER_DEPS) do |t|
sh "rex --independent -o #{t.name} #{t.prerequisites.first}"
file TOKENIZER_DEPS do |t|
require "oedipus_lex"
rex = OedipusLex.new
rex.parse_file(t.source)

File.open(t.name, "w") do |f|
f.write(rex.generate)
end
end
end

Expand Down

0 comments on commit c1f733e

Please sign in to comment.