Class ClParser
java.lang.Object
org.tweetyproject.commons.Parser<ClBeliefSet,Conditional>
org.tweetyproject.logics.cl.parser.ClParser
This class implements a parser for conditional logic. The BNF for a conditional
knowledge base is given by (starting symbol is KB)
KB ::== CONDITIONAL ( "\n" CONDITIONAL )*
CONDITIONAL ::== "(" FORMULA ")" | "(" FORMULA "|" FORMULA ")"
FORMULA is a propositional formula (@see org.tweetyproject.kr.l.parser.PlParser).
KB ::== CONDITIONAL ( "\n" CONDITIONAL )*
CONDITIONAL ::== "(" FORMULA ")" | "(" FORMULA "|" FORMULA ")"
FORMULA is a propositional formula (@see org.tweetyproject.kr.l.parser.PlParser).
- Author:
- Matthias Thimm
-
Constructor Summary
Constructors -
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
-
ClParser
public ClParser()Default
-
-
Method Details
-
parseBeliefBase
Description copied from class:ParserParses the given reader into a belief base of the given type.- Specified by:
parseBeliefBasein classParser<ClBeliefSet,Conditional> - Parameters:
reader- a reader- Returns:
- a belief base
- Throws:
IOException- if some IO issue occurred.ParserException- some parsing exceptions may be added here.
-
parseFormula
Description copied from class:ParserParses the given reader into a formula of the given type.- Specified by:
parseFormulain classParser<ClBeliefSet,Conditional> - Parameters:
reader- a reader- Returns:
- a formula
- Throws:
IOException- if some IO issue occurred.ParserException- some parsing exceptions may be added here.
-