I have a program which recieves inputs in the form of text for example :
IF (A.4.1-1/1 OR A.4.1-1/2) AND A.4.4-1/9 AND (A.4.4-1/12 OR A.4.4-1/13 OR A.4.4-1/14 OR A.4.4-1/15) THEN R ELSE N/A
where A.4.1-1/1 etc. are variables with a value TRUE or FALSE. so far i have parsed up the text into the logical parts for the above example I have a list that looks like this:
['IF', '(', 'A.4.1-1/1', 'OR', 'A.4.1-1/2', ')', 'AND', 'A.4.4-1/9', 'AND', '(', 'A.4.4-1/12', 'OR', 'A.4.4-1/13', 'OR', 'A.4.4-1/14', 'OR', 'A.4.4-1/15', ')', 'THEN', 'R', 'ELSE', 'N/A']
I am just wondering is it possible to actually perform the logic on this list like combine all this up into the rquired python statements and provide the result. I am not sure were to start I have read on some sites that I should use a top down parser??