Package net.sf.tweety.arg.aba.parser
Class AbaParser<T extends net.sf.tweety.commons.Formula>
- java.lang.Object
-
- net.sf.tweety.commons.Parser<AbaTheory<T>,net.sf.tweety.commons.Formula>
-
- net.sf.tweety.arg.aba.parser.AbaParser<T>
-
- Type Parameters:
T- the type of formulas (language) that the ABA theory ranges over
public class AbaParser<T extends net.sf.tweety.commons.Formula> extends net.sf.tweety.commons.Parser<AbaTheory<T>,net.sf.tweety.commons.Formula>
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.- Author:
- Nils Geilen
-
-
Constructor Summary
Constructors Constructor Description AbaParser(net.sf.tweety.commons.Parser<? extends net.sf.tweety.commons.BeliefBase,? extends net.sf.tweety.commons.Formula> formulaparser)Creates a new ABA parser
-
Method Summary
Modifier and Type Method Description StringgetSymbolArrow()StringgetSymbolComma()StringgetSymbolTrue()AbaTheory<T>parseBeliefBase(Reader reader)net.sf.tweety.commons.FormulaparseFormula(Reader reader)voidsetSymbolArrow(String symbolArrow)voidsetSymbolComma(String symbolComma)voidsetSymbolTrue(String symbolTrue)
-
-
-
Method Detail
-
parseBeliefBase
public AbaTheory<T> parseBeliefBase(Reader reader) throws IOException, net.sf.tweety.commons.ParserException
- Specified by:
parseBeliefBasein classnet.sf.tweety.commons.Parser<AbaTheory<T extends net.sf.tweety.commons.Formula>,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<AbaTheory<T extends net.sf.tweety.commons.Formula>,net.sf.tweety.commons.Formula>- Throws:
IOExceptionnet.sf.tweety.commons.ParserException
-
getSymbolTrue
public String getSymbolTrue()
- Returns:
- the symbolTrue
-
setSymbolTrue
public void setSymbolTrue(String symbolTrue)
- Parameters:
symbolTrue- the symbolTrue to set
-
getSymbolArrow
public String getSymbolArrow()
- Returns:
- the symbolArrow
-
setSymbolArrow
public void setSymbolArrow(String symbolArrow)
- Parameters:
symbolArrow- the symbolArrow to set
-
getSymbolComma
public String getSymbolComma()
- Returns:
- the symbolComma
-
setSymbolComma
public void setSymbolComma(String symbolComma)
- Parameters:
symbolComma- the symbolComma to set
-
-