Class SimplePlLogicParser
- java.lang.Object
-
- net.sf.tweety.commons.Parser<SimplePlLogicDeductiveKnowledgebase,SimplePlRule>
-
- net.sf.tweety.arg.deductive.parser.SimplePlLogicParser
-
public class SimplePlLogicParser extends Parser<SimplePlLogicDeductiveKnowledgebase,SimplePlRule>
- Author:
- Federico Cerutti (federico.cerutti@acm.org) Parses a simple logic knowledge base out of an input text. Each line contains either a literal or a simple rule of the form l1, ..., ln -> c
-
-
Constructor Summary
Constructors Constructor Description SimplePlLogicParser()
-
Method Summary
Modifier and Type Method Description SimplePlLogicDeductiveKnowledgebase
parseBeliefBase(java.io.Reader reader)
Read an entire piece of text and send each line to the actual parserSimplePlRule
parseFormula(java.io.Reader reader)
Parses the given reader into a formula of the given type.-
Methods inherited from class net.sf.tweety.commons.Parser
isNumeric, parseBeliefBase, parseBeliefBaseFromFile, parseFormula, parseFormulaFromFile
-
-
-
-
Method Detail
-
parseBeliefBase
public SimplePlLogicDeductiveKnowledgebase parseBeliefBase(java.io.Reader reader) throws java.io.IOException, ParserException
Read an entire piece of text and send each line to the actual parser- Specified by:
parseBeliefBase
in classParser<SimplePlLogicDeductiveKnowledgebase,SimplePlRule>
- Parameters:
reader
- a reader- Returns:
- the simple logic knowledge base read from the input
- Throws:
java.io.IOException
- if some IO issue occurred.ParserException
- some parsing exceptions may be added here.
-
parseFormula
public SimplePlRule parseFormula(java.io.Reader reader) throws java.io.IOException, ParserException
Description copied from class:Parser
Parses the given reader into a formula of the given type.- Specified by:
parseFormula
in classParser<SimplePlLogicDeductiveKnowledgebase,SimplePlRule>
- Parameters:
reader
- a reader- Returns:
- a formula
- Throws:
java.io.IOException
- if some IO issue occurred.ParserException
- some parsing exceptions may be added here.- See Also:
Parser.parseFormula(java.io.Reader)
-
-