Class SimplePlLogicParser
java.lang.Object
org.tweetyproject.commons.Parser<SimplePlLogicDeductiveKnowledgebase,SimplePlRule>
org.tweetyproject.arg.deductive.parser.SimplePlLogicParser
- 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
-
Method Summary
Modifier and TypeMethodDescriptionparseBeliefBase
(Reader reader) Read an entire piece of text and send each line to the actual parserparseFormula
(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
-
SimplePlLogicParser
public SimplePlLogicParser()
-
-
Method Details
-
parseBeliefBase
public SimplePlLogicDeductiveKnowledgebase parseBeliefBase(Reader reader) throws 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:
IOException
- if some IO issue occurred.ParserException
- some parsing exceptions may be added here.
-
parseFormula
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:
IOException
- if some IO issue occurred.ParserException
- some parsing exceptions may be added here.- See Also:
-