Method: LogicTools#string2logic

Defined in:
lib/logic_tools/logicparse.rb

#string2logic(str) ⇒ Object

The parser/gerator main fuction: converts the text in str to a

logic tree.


90
91
92
93
94
95
# File 'lib/logic_tools/logicparse.rb', line 90

def string2logic(str)
    # Remove the spaces
    str = str.gsub(/\s+/, "")
    # Parse the string
    return Transform.new.apply(Parser.new.parse(str))
end