Package org.tweetyproject.arg.adf.io
Class KppADFFormatParser
- java.lang.Object
-
- org.tweetyproject.arg.adf.io.KppADFFormatParser
-
public final class KppADFFormatParser extends java.lang.Object
A parser for the input format described at https://www.cs.helsinki.fi/group/coreo/k++adf/ Since the input format is only described informally, we assume that each argument has to be defined before it can be used in some way, e.g. 's(a). ac(a,c(v)).' is a valid input but 'ac(a,c(v)). s(a).' is not. This assumption makes error handling and reporting much easier. However, this also means that the order of the input statements matter and we are thus not fully declarative.- Author:
- Mathias Hofer
-
-
Constructor Summary
Constructors Constructor Description KppADFFormatParser(LinkStrategy linkStrategy, boolean lazy)
-
Method Summary
Modifier and Type Method Description AbstractDialecticalFramework
parse(java.io.File file)
AbstractDialecticalFramework
parse(java.io.Reader reader)
AbstractDialecticalFramework
parse(java.lang.String text)
-
-
-
Constructor Detail
-
KppADFFormatParser
public KppADFFormatParser(LinkStrategy linkStrategy, boolean lazy)
- Parameters:
linkStrategy
- the strategy which is used to compute the linkslazy
- specifies if the link computation should be done lazily
-
-
Method Detail
-
parse
public AbstractDialecticalFramework parse(java.lang.String text) throws java.io.IOException
- Throws:
java.io.IOException
-
parse
public AbstractDialecticalFramework parse(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
-
parse
public AbstractDialecticalFramework parse(java.io.Reader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
-