I have a number of strings in a query-like format (using column names, 'and', 'or', parentheses, and the relational operators) that I need to parse in the form:
"column1 > 100"
"column1 = 120 and column3 = 200"
"((column2 = 100) or (column3 = 50 and column1 = 20))"
What would be the best way that I could parse and store each expression for use? I think parsing the string using a bunch of string.substring() and string.indexOf would be good, but I'm unsure how I could store each expression in a useful way to pop() them.