Class PropositionalParser


  • public final class PropositionalParser
    extends FormulaParser
    A parser for propositional formulas.

    The syntax for propositional formulas in LogicNG is:

    • $true for the constant TRUE
    • $false for the constant FALSE
    • ~ for the negation
    • | for the disjunction (OR)
    • & for the conjunction (AND)
    • => for the implication
    • <=> for the equivalence
    Brackets are ( and ). For variable names, there are the following rules:
    • must begin with a alphabetic character, _, @, or #
    • can only contain alphanumerical character, _, or #
    • @ is only allowed at the beginning of the variable name and is reserved for special internal variables
    Since:
    1.0
    Version:
    2.4.1
    • Constructor Detail

      • PropositionalParser

        public PropositionalParser​(org.logicng.formulas.FormulaFactory f)
        Constructs a new parser.
        Parameters:
        f - the formula factory