class Spells::Parser

Public Class Methods

new() click to toggle source
# File lib/spells/parser.rb, line 5
def initialize
  Treetop.load File.expand_path('../../../grammar/spells/punctuation.treetop', __FILE__)
  Treetop.load File.expand_path('../../../grammar/spells/symbols.treetop', __FILE__)
  Treetop.load File.expand_path('../../../grammar/spells.treetop', __FILE__)
  @parser = SpellsParser.new
end

Public Instance Methods

parse(text) click to toggle source
# File lib/spells/parser.rb, line 12
def parse(text)
  @parser.parse text
end