public class FolParser extends net.sf.tweety.commons.Parser<FolBeliefSet>
| Modifier and Type | Field and Description |
|---|---|
static String |
EXISTS_QUANTIFIER
exists-quantifier used in syntax
|
static String |
FORALL_QUANTIFIER
forall-quantifier used in syntax
|
| Constructor and Description |
|---|
FolParser() |
| Modifier and Type | Method and Description |
|---|---|
FolSignature |
getSignature()
Returns the signature of this parser.
|
Map<String,net.sf.tweety.logics.commons.syntax.Variable> |
getVariables() |
FolBeliefSet |
parseBeliefBase(Reader reader) |
net.sf.tweety.commons.Formula |
parseFormula(Reader reader) |
void |
parseSortDeclaration(String s,
FolSignature sig)
Parses a sort declaration of the form "SORTNAME "=" "{" (CONSTANTNAME ("," CONSTANTNAME)*)? "}""
and modifies the given signature accordingly.
|
void |
parseTypeDeclaration(String s,
FolSignature sig)
Parses a predicate declaration of the form "type" "(" PREDICATENAME "(" (SORTNAME ("," SORTNAME)*)? ")" ")"
or a functor declaration of the form "type" "(" SORTNAME "=" FUNCTORNAME "(" (SORTNAME ("," SORTNAME)*)? ")" ")"
and modifies the given signature accordingly.
|
void |
setSignature(FolSignature signature)
Sets the signature for this parser.
|
void |
setVariables(Map<String,net.sf.tweety.logics.commons.syntax.Variable> variables) |
public static final String FORALL_QUANTIFIER
public static final String EXISTS_QUANTIFIER
public FolBeliefSet parseBeliefBase(Reader reader) throws IOException, net.sf.tweety.commons.ParserException
parseBeliefBase in class net.sf.tweety.commons.Parser<FolBeliefSet>IOExceptionnet.sf.tweety.commons.ParserExceptionpublic void parseSortDeclaration(String s, FolSignature sig) throws net.sf.tweety.commons.ParserException
s - a stringsig - a signaturenet.sf.tweety.commons.ParserExceptionpublic void parseTypeDeclaration(String s, FolSignature sig) throws net.sf.tweety.commons.ParserException
s - a stringsig - a signaturenet.sf.tweety.commons.ParserExceptionpublic net.sf.tweety.commons.Formula parseFormula(Reader reader) throws IOException, net.sf.tweety.commons.ParserException
parseFormula in class net.sf.tweety.commons.Parser<FolBeliefSet>IOExceptionnet.sf.tweety.commons.ParserExceptionpublic void setSignature(FolSignature signature)
signature - a fol signature.public FolSignature getSignature()
Copyright © 2018. All rights reserved.