Class InternalSchema
java.lang.Object
com.mackenziehigh.sexpr.internal.schema.InternalSchema
An instance of this class is a pattern that describes a symbolic-expression.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddefineAfterAction(String pass, String rule, Consumer<Sexpr<?>> action) voiddefineBeforeAction(String pass, String rule, Consumer<Sexpr<?>> action) voiddefineCondition(String name, Predicate<Sexpr<?>> condition) This method defines a condition that can be referenced by a 'require' rule.voiddefinePass(String name) voiddefineRoot(String root) Use this method to specify the root rule of this schema.This method performs a match-attempt.voidvalidate()
-
Constructor Details
-
InternalSchema
public InternalSchema()Sole Constructor.
-
-
Method Details
-
defineRoot
Use this method to specify the root rule of this schema.- Parameters:
root- is the name of the root rule.
-
defineCondition
This method defines a condition that can be referenced by a 'require' rule.- Parameters:
name- is the name of the user-defined condition.condition- is the user-defined condition itself.
-
definePass
-
defineBeforeAction
-
defineAfterAction
-
match
This method performs a match-attempt.- Parameters:
tree- is the symbolic-expression that this schema may match.- Returns:
- an object describing the result.
-
validate
public void validate()
-