File: oedipus_lex.rake

package info (click to toggle)
ruby-oedipus-lex 2.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240 kB
  • sloc: ruby: 1,218; lisp: 12; ansic: 5; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 306 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- ruby -*-

$: << "lib"
require "oedipus_lex"

$rex_option = {}

rule ".rex.rb" => proc {|path| path.sub(/\.rb$/, "") } do |t|
  warn "Generating #{t.name} from #{t.source}"
  rex = OedipusLex.new $rex_option
  rex.parse_file t.source

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