Module biodivine_lib_bdd::boolean_expression::_impl_parser
source · [−]Expand description
(internal) Parsing functions for boolean expressions.
Expression parsing proceeds in recursive manner in the order of operator precedence:
<=>
, =>
, |
, &
and ^
. For each operator, if there is no occurrence in the root of the
token tree, we forward the tree to next operator. If there is an occurrence, we split
the token tree at this point. Left part goes to the next operator, right part is processed
by the same operator to extract additional occurrences.
Enums
(internal) Tokens that can appear in the boolean expression. The tokens form a token tree defined by parenthesis groups.
Functions
(internal) Recursive parsing step 4: extract &
operators.
(internal) Recursive parsing step 1: extract <=>
operators.
(internal) Recursive parsing step 2: extract =>
operators.
(internal) Utility method to find first occurrence of a specific token in the token tree.
(internal) Recursive parsing step 3: extract |
operators.
Takes a String
and turns it into a BooleanExpression
or Error
if the string is not valid.
(internal) Parse a ExprToken
tree into a BooleanExpression
(or error if invalid).
(internal) Recursive parsing step 6: extract terminals and negations.
(internal) Process a peekable iterator of characters into a vector of ExprToken
s.
(internal) Recursive parsing step 5: extract ^
operators.