Python compiler for simple language to java vm code algorithm Python compiler for simple language to java vm code algorithm python python

Python compiler for simple language to java vm code algorithm


if you want a method to chain OR's and AND'syou can use this property:

p v q === ¬p ^ ¬q

Is equivalent, you can process all in the AND form. for example.

p v q ^ r v s === ¬p ^ ¬q ^ ¬r ^ ¬s

So evaluate the expression in AND form is simple with an algorithm.

I guess the expression doesn't have any parenthesis, in other way you need prioritize the grouping symbols (), [], {}.