Class CParser
- java.lang.Object
-
- net.sf.tweety.commons.Parser<CActionDescription,net.sf.tweety.commons.Formula>
-
- net.sf.tweety.action.description.parser.CParser
-
public class CParser extends net.sf.tweety.commons.Parser<CActionDescription,net.sf.tweety.commons.Formula>
This class implements a parser for an Action Description in C. The BNF is given by: (starting symbol is DESC)
DESC ::== ":- signature" "\n" SIGNATURE "\n" ":- laws" "\n" LAWS
where SIGNATURE is parsed by CSignatureParser and LAWS is parsed by CLawParser.- Author:
- Sebastian Homann
-
-
Field Summary
Fields Modifier and Type Field Description protected ActionSignaturesignature
-
Constructor Summary
Constructors Constructor Description CParser()
-
Method Summary
Modifier and Type Method Description ActionSignaturegetSignature()CActionDescriptionparseBeliefBase(Reader reader)net.sf.tweety.commons.FormulaparseFormula(Reader reader)net.sf.tweety.commons.FormulaparseFormula(String formula)voidsetSignature(ActionSignature signature)
-
-
-
Field Detail
-
signature
protected ActionSignature signature
-
-
Method Detail
-
parseBeliefBase
public CActionDescription parseBeliefBase(Reader reader) throws IOException, net.sf.tweety.commons.ParserException
- Specified by:
parseBeliefBasein classnet.sf.tweety.commons.Parser<CActionDescription,net.sf.tweety.commons.Formula>- Throws:
IOExceptionnet.sf.tweety.commons.ParserException
-
parseFormula
public net.sf.tweety.commons.Formula parseFormula(Reader reader) throws IOException, net.sf.tweety.commons.ParserException
- Specified by:
parseFormulain classnet.sf.tweety.commons.Parser<CActionDescription,net.sf.tweety.commons.Formula>- Throws:
IOExceptionnet.sf.tweety.commons.ParserException
-
parseFormula
public net.sf.tweety.commons.Formula parseFormula(String formula) throws net.sf.tweety.commons.ParserException, IOException
- Overrides:
parseFormulain classnet.sf.tweety.commons.Parser<CActionDescription,net.sf.tweety.commons.Formula>- Throws:
net.sf.tweety.commons.ParserExceptionIOException
-
setSignature
public void setSignature(ActionSignature signature)
-
getSignature
public ActionSignature getSignature()
-
-