class Object

Public Instance Methods

dtb_parse_file(file_path) click to toggle source
# File lib/rbdtb.rb, line 288
def dtb_parse_file(file_path)
  begin
  file = File.open(file_path)
  rescue
    puts "#{file_path} open error"
  end
  return dtb_parse_string(file.read)
end
dtb_parse_string(in_string) click to toggle source
# File lib/rbdtb.rb, line 282
def dtb_parse_string(in_string)
  parse_string = pre_process(in_string)
  parser = DTBParse.new(DTBLex.new)
  return parser.parse(parse_string)
end
pre_process(in_string) click to toggle source
# File lib/rbdtb.rb, line 277
def pre_process(in_string)
  ps1 = in_string.gsub(/\/\/.+$/, "").split("\n").join().gsub(/\s+/, "\s").gsub(/\s=\s/, '=')
end