Package org.tweetyproject.arg.aba.parser
Class AbaParser<T extends Formula>
java.lang.Object
org.tweetyproject.commons.Parser<AbaTheory<T>,Formula>
org.tweetyproject.arg.aba.parser.AbaParser<T>
- Type Parameters:
T
- the type of formulas (language) that the ABA theory ranges over
Parses a Assumption Based Argumentation System out of an input text. With
standard symbols, every line contains one of the following:
<rule> ::= <head> '<-' <body>?
<head> ::= <word>
<body> ::= 'true' | <word> (',' <word>)*
<assumption> ::= <word>
<assumptions> ::= '{' <assumption> (',' <assumption>)* '}'
with <word> in the theory's language.
<rule> ::= <head> '<-' <body>?
<head> ::= <word>
<body> ::= 'true' | <word> (',' <word>)*
<assumption> ::= <word>
<assumptions> ::= '{' <assumption> (',' <assumption>)* '}'
with <word> in the theory's language.
- Author:
- Nils Geilen
-
Constructor Summary
ConstructorDescriptionAbaParser
(Parser<? extends BeliefBase, ? extends Formula> formulaparser) Creates a new ABA parser -
Method Summary
Modifier and TypeMethodDescriptionparseBeliefBase
(Reader reader) Parses the given reader into a belief base of the given type.parseFormula
(Reader reader) Parses the given reader into a formula of the given type.void
setSymbolArrow
(String symbolArrow) void
setSymbolComma
(String symbolComma) void
setSymbolTrue
(String symbolTrue) Methods inherited from class org.tweetyproject.commons.Parser
isNumeric, parseBeliefBase, parseBeliefBaseFromFile, parseFormula, parseFormulaFromFile, parseListOfBeliefBases, parseListOfBeliefBases, parseListOfBeliefBasesFromFile, parseListOfBeliefBasesFromFile
-
Constructor Details
-
AbaParser
Creates a new ABA parser- Parameters:
formulaparser
- parses formulae of the language
-
-
Method Details
-
parseBeliefBase
Description copied from class:Parser
Parses the given reader into a belief base of the given type.- Specified by:
parseBeliefBase
in classParser<AbaTheory<T extends Formula>,
Formula> - Parameters:
reader
- a reader- Returns:
- a belief base
- 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<AbaTheory<T extends Formula>,
Formula> - Parameters:
reader
- a reader- Returns:
- a formula
- Throws:
IOException
- if some IO issue occurred.ParserException
- some parsing exceptions may be added here.
-
getSymbolTrue
- Returns:
- the symbolTrue
-
setSymbolTrue
- Parameters:
symbolTrue
- the symbolTrue to set
-
getSymbolArrow
- Returns:
- the symbolArrow
-
setSymbolArrow
- Parameters:
symbolArrow
- the symbolArrow to set
-
getSymbolComma
- Returns:
- the symbolComma
-
setSymbolComma
- Parameters:
symbolComma
- the symbolComma to set
-