Class PclParser
java.lang.Object
org.tweetyproject.commons.Parser<PclBeliefSet,ProbabilisticConditional>
 
org.tweetyproject.logics.pcl.parser.PclParser
This class implements a parser for probabilistic conditional logic. The BNF for a conditional
 knowledge base is given by (starting symbol is KB)
 
 
KB ::== (CONDITIONAL "\n")*
CONDITIONAL ::== "(" FORMULA ")" "[" PROB "]" | "(" FORMULA "|" FORMULA ")" "[" PROB "]"
FORMULA ::== PROPOSITION | "(" FORMULA ")" | FORMULA "&&" FORMULA | FORMULA "||" FORMULA | "!" FORMULA | "+" | "-"
 
 
where PROPOSITION is a sequence of symbols from {a,...,z,A,...,Z,0,...,9} with a letter at the beginning and PROB is a float in [0,1].
KB ::== (CONDITIONAL "\n")*
CONDITIONAL ::== "(" FORMULA ")" "[" PROB "]" | "(" FORMULA "|" FORMULA ")" "[" PROB "]"
FORMULA ::== PROPOSITION | "(" FORMULA ")" | FORMULA "&&" FORMULA | FORMULA "||" FORMULA | "!" FORMULA | "+" | "-"
where PROPOSITION is a sequence of symbols from {a,...,z,A,...,Z,0,...,9} with a letter at the beginning and PROB is a float in [0,1].
- 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
- 
PclParser
public PclParser()Default Constructor 
 - 
 - 
Method Details
- 
parseBeliefBase
Description copied from class:ParserParses the given reader into a belief base of the given type.- Specified by:
 parseBeliefBasein classParser<PclBeliefSet,ProbabilisticConditional> - 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<PclBeliefSet,ProbabilisticConditional> - Parameters:
 reader- a reader- Returns:
 - a formula
 - Throws:
 IOException- if some IO issue occurred.ParserException- some parsing exceptions may be added here.
 
 -