Class ApxParser
java.lang.Object
org.tweetyproject.commons.Parser<DungTheory,Formula>
org.tweetyproject.arg.dung.parser.AbstractDungParser
org.tweetyproject.arg.dung.parser.ApxParser
Parses abstract argumentation frameworks in the logic programming
format which is given by the following BNF
(start symbol is S):
S ::== "" | "arg" "(" ARGUMENT ")" "\n" S | "att" "(" ARGUMENT "," ARGUMENT ")" "\n" S
where "ARGUMENT" represents any string (without blanks) as a terminal symbol.
S ::== "" | "arg" "(" ARGUMENT ")" "\n" S | "att" "(" ARGUMENT "," ARGUMENT ")" "\n" S
where "ARGUMENT" represents any string (without blanks) as a terminal symbol.
- Author:
- Matthias Thimm
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionParses the given file into an abstract argumentation frameworkparseIgnoreComments
(Reader reader, boolean printCommands) Parses an argumentation framework from a reader source with options to ignore comments and optionally print commands.Methods inherited from class org.tweetyproject.arg.dung.parser.AbstractDungParser
getParser, parseArgumentList, parseBeliefBase, parseBoolean, parseExtensionList, parseFormula, parseJavaStringRepresentation, parseLabeling, parseLabelingList
Methods inherited from class org.tweetyproject.commons.Parser
isNumeric, parseBeliefBase, parseBeliefBaseFromFile, parseFormula, parseFormulaFromFile, parseListOfBeliefBases, parseListOfBeliefBases, parseListOfBeliefBasesFromFile, parseListOfBeliefBasesFromFile
-
Constructor Details
-
ApxParser
public ApxParser()
-
-
Method Details
-
parse
Description copied from class:AbstractDungParser
Parses the given file into an abstract argumentation framework- Specified by:
parse
in classAbstractDungParser
- Parameters:
reader
- some reader- Returns:
- an abstract argumentation framework
- Throws:
IOException
- for all errors concerning file reading.
-
parseIgnoreComments
Parses an argumentation framework from a reader source with options to ignore comments and optionally print commands. This method is useful when you want to preprocess the data or when debug outputs are needed.- Parameters:
reader
- The reader to parse the argumentation framework from.printCommands
- A boolean flag that when set to true, prints each row of the input to standard output.- Returns:
- A
DungTheory
representing the parsed argumentation framework. - Throws:
IOException
- If an I/O error occurs during reading or parsing the input.
-