class SimpleLogic::Parser
Public Class Methods
parse(data)
click to toggle source
# File lib/simple_logic/parser.rb, line 10 def self.parse(data) # Pass the data over to the parser instance tree = @@parser.parse(data) # If the AST is nil then there was an error during parsing # we need to report a simple error message to help the user if(tree.nil?) raise ParseError.new(@@parser.index), "Parse error at offset: #{@@parser.index}" end return tree end