|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectix.util.match.MatchCase
ix.iface.domain.LTF_Parser.ConstraintParser
public abstract static class LTF_Parser.ConstraintParser
Used to parse a constraint and also, via the makeTemplate method, to describe the syntax.
| Field Summary |
|---|
| Fields inherited from class ix.util.match.MatchCase |
|---|
pattern |
| Constructor Summary | |
|---|---|
LTF_Parser.ConstraintParser(java.lang.String pat)
Constructs a parser for constraints that match the given pattern. |
|
| Method Summary | |
|---|---|
java.lang.Object |
ifSelected(java.lang.Object spec,
java.lang.Object match)
Just calls makeConstraint. |
abstract Constraint |
makeConstraint(LList spec,
MatchEnv env)
Construct a constraint based on the spec and any bindings in the MatchEnv. |
abstract Constraint |
makeTemplate()
Returns a constraint that represents the syntax of the constraints handled by this constraint-parser. |
java.lang.Object |
tryMatch(java.lang.Object spec)
Matches this parser's pattern against the spec by calling SimpleMatcher.match(Object, Object). |
| Methods inherited from class ix.util.match.MatchCase |
|---|
getPattern |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
LTF_Parser.ConstraintParser(java.lang.String pat)
Lisp.readFromString(String).
| Method Detail |
|---|
public java.lang.Object tryMatch(java.lang.Object spec)
SimpleMatcher.match(Object, Object).
The 'spec' is the piece of LTF source code that's
meant to represent a constraint. If the match is
successful, ifSelected will then be called,
passing the spec and the MatchEnv that SimpleMatcher
returned. ifSelected will then call
makeConstraint.
tryMatch in class MatchCase
public java.lang.Object ifSelected(java.lang.Object spec,
java.lang.Object match)
ifSelected in class MatchCase
public abstract Constraint makeConstraint(LList spec,
MatchEnv env)
public abstract Constraint makeTemplate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||