public class GroundingRequirementsParser
extends java.lang.Object
| Constructor and Description | 
|---|
GroundingRequirementsParser()  | 
| Modifier and Type | Method and Description | 
|---|---|
private Constant | 
getConstant(java.lang.String name,
           Sort sort)
Returns the constant with the name 'name' of the sort 'sort', if one
 exists, null otherwise. 
 | 
GroundingRequirement | 
parseRequirement(java.lang.String s,
                java.util.Set<Variable> variables)
Parses a string of the following form: 
   (VARIABLENAME "<>" VARIABLENAME | VARIABLENAME "<>" CONSTANTNAME) 
 where the constant CONSTANTNAME has to be of the same sort as the 
 variable VARIABLENAME. 
 | 
java.util.Set<GroundingRequirement> | 
parseRequirements(java.lang.String s,
                 java.util.Set<Variable> variables)
Parses a string of the following form: REQUIREMENT ("," REQUIREMENT)* 
 | 
public java.util.Set<GroundingRequirement> parseRequirements(java.lang.String s, java.util.Set<Variable> variables) throws ParserException
s - A set of variables which are allowed in these requirements.ParserExceptionpublic GroundingRequirement parseRequirement(java.lang.String s, java.util.Set<Variable> variables) throws ParserException
s - a string containing a single requirementParserExceptionprivate Constant getConstant(java.lang.String name, Sort sort)
name - some constant name represented by a stringsort - the sort of that constant