public class ActionSignatureParser extends Object
| Constructor and Description |
|---|
ActionSignatureParser() |
| Modifier and Type | Method and Description |
|---|---|
ActionSignature |
parseSignature(Reader reader)
Parses the given reader into a signature of the given type.
|
ActionSignature |
parseSignature(String text)
Parses the given text into a signature of the given type.
|
ActionSignature |
parseSignatureFromFile(String filename)
Parses the file of the given filename into a signature.
|
protected void |
parseSortDeclaration(String s)
Parses a sort declaration of the form "SORTNAME "=" "{" (CONSTANTNAME ("," CONSTANTNAME)*)? "}""
and adds it to the signature.
|
protected void |
parseTypeDeclaration(String s)
Parses an action declaration of the form "action" "(" ACTIONNAME ("(" SORTNAME ("," SORTNAME)* ")")? ")"
or a fluent declaration of the form "fluent" "(" FLUENTNAME ("(" SORTNAME ("," SORTNAME)* ")")? ")"
and adds them to the signature.
|
public ActionSignature parseSignatureFromFile(String filename) throws FileNotFoundException, IOException, net.sf.tweety.commons.ParserException
filename - the name of a fileFileNotFoundException - if the file is not foundException - some parsing exceptions may be added here.IOExceptionnet.sf.tweety.commons.ParserExceptionpublic ActionSignature parseSignature(String text) throws IOException, net.sf.tweety.commons.ParserException
text - a stringException - some parsing exceptions may be added here.IOExceptionnet.sf.tweety.commons.ParserExceptionpublic ActionSignature parseSignature(Reader reader) throws IOException, net.sf.tweety.commons.ParserException
reader - a readerException - some parsing exceptions may be added here.IOExceptionnet.sf.tweety.commons.ParserExceptionprotected void parseSortDeclaration(String s) throws net.sf.tweety.commons.ParserException
s - a stringnet.sf.tweety.commons.ParserExceptionprotected void parseTypeDeclaration(String s) throws net.sf.tweety.commons.ParserException
s - a stringnet.sf.tweety.commons.ParserExceptionCopyright © 2018. All rights reserved.