Method: Confuscript.parser
- Defined in:
- lib/confuscript.rb
.parser ⇒ Object
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/confuscript.rb', line 60 def self.parser @parser ||= if File.file?("#{File.dirname(__FILE__)}/confuscript/grammar.rb") # Take compiled one require_relative "grammar" else # Else compile and load Treetop.load "#{File.dirname(__FILE__)}/confuscript/grammar.treetop" ConfuscriptParser.new end end |