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 TypeMethodDescriptionvoid
defineAfterAction
(String pass, String rule, Consumer<Sexpr<?>> action) void
defineBeforeAction
(String pass, String rule, Consumer<Sexpr<?>> action) void
defineCondition
(String name, Predicate<Sexpr<?>> condition) This method defines a condition that can be referenced by a 'require' rule.void
definePass
(String name) void
defineRoot
(String root) Use this method to specify the root rule of this schema.This method performs a match-attempt.void
validate()
-
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()
-