Class CParser
- java.lang.Object
- 
- net.sf.tweety.commons.Parser<CActionDescription,Formula>
- 
- net.sf.tweety.action.description.parser.CParser
 
 
- 
 public class CParser extends Parser<CActionDescription,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
 
- 
- 
Constructor SummaryConstructors Constructor Description CParser()
 - 
Method SummaryModifier and Type Method Description ActionSignaturegetSignature()CActionDescriptionparseBeliefBase(java.io.Reader reader)Parses the given reader into a belief base of the given type.FormulaparseFormula(java.io.Reader reader)Parses the given reader into a formula of the given type.FormulaparseFormula(java.lang.String formula)Parses the given text into a formula of the given type.voidsetSignature(ActionSignature signature)- 
Methods inherited from class net.sf.tweety.commons.ParserisNumeric, parseBeliefBase, parseBeliefBaseFromFile, parseFormulaFromFile
 
- 
 
- 
- 
- 
Method Detail- 
parseBeliefBasepublic CActionDescription parseBeliefBase(java.io.Reader reader) throws java.io.IOException, ParserException Description copied from class:ParserParses the given reader into a belief base of the given type.- Specified by:
- parseBeliefBasein class- Parser<CActionDescription,Formula>
- Parameters:
- reader- a reader
- Returns:
- a belief base
- Throws:
- java.io.IOException- if some IO issue occurred.
- ParserException- some parsing exceptions may be added here.
 
 - 
parseFormulapublic Formula parseFormula(java.io.Reader reader) throws java.io.IOException, ParserException Description copied from class:ParserParses the given reader into a formula of the given type.- Specified by:
- parseFormulain class- Parser<CActionDescription,Formula>
- Parameters:
- reader- a reader
- Returns:
- a formula
- Throws:
- java.io.IOException- if some IO issue occurred.
- ParserException- some parsing exceptions may be added here.
 
 - 
parseFormulapublic Formula parseFormula(java.lang.String formula) throws ParserException, java.io.IOException Description copied from class:ParserParses the given text into a formula of the given type.- Overrides:
- parseFormulain class- Parser<CActionDescription,Formula>
- Parameters:
- formula- a string
- Returns:
- a formula
- Throws:
- ParserException- some parsing exceptions may be added here.
- java.io.IOException- if some IO issue occurred.
 
 - 
setSignaturepublic void setSignature(ActionSignature signature) 
 - 
getSignaturepublic ActionSignature getSignature() 
 
- 
 
-