Package net.sf.tweety.logics.qbf.parser
Class QbfParser
- java.lang.Object
-
- net.sf.tweety.commons.Parser<net.sf.tweety.logics.pl.syntax.PlBeliefSet,net.sf.tweety.logics.pl.syntax.PlFormula>
-
- net.sf.tweety.logics.pl.parser.PlParser
-
- net.sf.tweety.logics.qbf.parser.QbfParser
-
public class QbfParser extends net.sf.tweety.logics.pl.parser.PlParserThis class implements a parser for quantified boolean formulas. The BNF for a qbf belief set is given by (starting symbol is KB)
KB ::== VARDECLAR FORMULAS
VARDECLAR ::== "{" (VARIABLENAME ("," VARIABLENAME)*)? "}"
FORMULAS ::== FORMULA ( "\n" FORMULA )*
FORMULA ::== VARIABLENAME | "(" FORMULA ")" | FORMULA ">>" FORMULA | FORMULA "||" FORMULA | FORMULA "=>" FORMULA | FORMULA "<=>" FORMULA | "!" FORMULA | "+" | "-" | "forall" VARIABLENAME ":" "(" FORMULA ")" | "exists" VARIABLENAME ":" "(" FORMULA ")" |
VARIABLENAME is a sequence of characters excluding |,&,!,(,),=,<,> and whitespace characters.- Author:
- Anna Gessler, Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description QbfParser()
-
Method Summary
Modifier and Type Method Description net.sf.tweety.logics.pl.syntax.PlBeliefSetparseBeliefBase(Reader reader)net.sf.tweety.logics.pl.syntax.PlFormulaparseFormula(Reader reader)-
Methods inherited from class net.sf.tweety.logics.pl.parser.PlParser
parseDisjunction, parseExclusiveDisjunction
-
-
-
-
Method Detail
-
parseBeliefBase
public net.sf.tweety.logics.pl.syntax.PlBeliefSet parseBeliefBase(Reader reader) throws net.sf.tweety.commons.ParserException
- Overrides:
parseBeliefBasein classnet.sf.tweety.logics.pl.parser.PlParser- Throws:
net.sf.tweety.commons.ParserException
-
parseFormula
public net.sf.tweety.logics.pl.syntax.PlFormula parseFormula(Reader reader) throws net.sf.tweety.commons.ParserException
- Overrides:
parseFormulain classnet.sf.tweety.logics.pl.parser.PlParser- Throws:
net.sf.tweety.commons.ParserException
-
-