Class: Shog::Yacc

Inherits:
Object show all
Defined in:
lib/rule/yacc.rb

Instance Method Summary collapse

Instance Method Details

#idObject



5
6
7
# File 'lib/rule/yacc.rb', line 5

def id
  :yacc
end

#ruleObject



9
10
11
12
13
14
# File 'lib/rule/yacc.rb', line 9

def rule
  {
    "command" => "yacc -o $out $in",
    "description" => "Yacc $in",
  }
end

#target(params) ⇒ Object



16
17
18
19
20
# File 'lib/rule/yacc.rb', line 16

def target(params)
  input = PathSet.make(params[:input])
  output = PathSet.make(Path.make(params[:output], :outoftree => true))
  {:rule => "yacc", :input => input, :output => output, :variables => {}}
end