Parsing Boolean Expressions into DNF with ANTLR
Motivation #
To determine if a student had successfully completed ANY of the numerous prerequisite combinations. The prerequisites for courses at Ontario Tech are structured like this;
To take CSCI 3055U
, the expression (CSCI 1060U or CSCI 2030U) and CSCI 2110U
must evaluate to true.
An easy way to do this was to check if any of the possible combinations were true, this lends itself to the idea of Disjunctive Normal Form.
...