Class PlParserThreeValued
java.lang.Object
org.tweetyproject.commons.Parser<PlBeliefSet,PlFormula>
org.tweetyproject.logics.translators.adfrevision.PlParserThreeValued
Adapted from "PlParser" for the use of 3-valued logic (WeakNegation and Indecision-Operator):
- Author:
- Jonas Schumacher
ORIGINAL DOCUMENTATION:
This class implements a parser for propositional logic. The BNF for a
propositional belief set is given by (starting symbol is FORMULASET)
FORMULASET ::== FORMULA ( "\n" FORMULA )*
FORMULA ::== PROPOSITION | "(" FORMULA ")" | FORMULA ">>" FORMULA | FORMULA "||" FORMULA | FORMULA "=>" FORMULA | FORMULA "<=>" FORMULA | FORMULA "^^" FORMULA | "!" FORMULA | "+" | "-"
PROPOSITION is a sequence of characters excluding |,&,!,(,),=,<,> and whitespace characters., Matthias Thimm, Bastian Wolf
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionparseBeliefBase
(Reader reader) Parses the given reader into a belief base of the given type.parseFormula
(Reader reader) Parses the given reader into a formula of the given type.Methods inherited from class org.tweetyproject.commons.Parser
isNumeric, parseBeliefBase, parseBeliefBaseFromFile, parseFormula, parseFormulaFromFile, parseListOfBeliefBases, parseListOfBeliefBases, parseListOfBeliefBasesFromFile, parseListOfBeliefBasesFromFile
-
Constructor Details
-
PlParserThreeValued
public PlParserThreeValued()
-
-
Method Details
-
parseBeliefBase
Description copied from class:Parser
Parses the given reader into a belief base of the given type.- Specified by:
parseBeliefBase
in classParser<PlBeliefSet,
PlFormula> - Parameters:
reader
- a reader- Returns:
- a belief base
- Throws:
ParserException
- some parsing exceptions may be added here.
-
parseFormula
Description copied from class:Parser
Parses the given reader into a formula of the given type.- Specified by:
parseFormula
in classParser<PlBeliefSet,
PlFormula> - Parameters:
reader
- a reader- Returns:
- a formula
- Throws:
ParserException
- some parsing exceptions may be added here.
-