Class: Grammar::Ruby2CExt
- Defined in:
- lib/grammar/ruby2cext.rb,
lib/grammar/ruby2cext_hack.rb
Class Method Summary collapse
Methods inherited from Ruby
#<<, #[], #alternation, #always, #and, #any, #assign, #backref, #backtrack, #call, #consume, #discard, dump, #dump, #eof, #failure, #if, #initialize, #match, #negative, #not, #or, #output, #pipe, #positive, #recurse, #redirect, #send, #send_splat, #sequence, #steps, #supply, #variables
Constructor Details
This class inherits a constructor from Grammar::Ruby
Class Method Details
.compile(gram, input_method = :[]) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/grammar/ruby2cext.rb', line 10 def self.compile(gram, input_method=:[]) code = new(input_method).dump(gram) #p(code) #code.lined Ruby2CExtension::Eval2C.new.compile_to_proc(code.to_s).call.new end |