|
Building Parsers with Java | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--sjm.parse.Assembler
|
+--sjm.examples.logic.StructureWithTermsAssembler
Pops the terms and functor of a structure from an assembly's stack, builds a structure, and pushes it.
| Constructor Summary | |
StructureWithTermsAssembler()
|
|
| Method Summary | |
static Term[] |
vectorReversedIntoTerms(java.util.Vector v)
Reverse a vector into an array of terms. |
void |
workOn(Assembly a)
Pops the terms and functor of a structure from an assembly's stack, builds a structure, and pushes it. |
| Methods inherited from class sjm.parse.Assembler |
elementsAbove |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public StructureWithTermsAssembler()
| Method Detail |
public static Term[] vectorReversedIntoTerms(java.util.Vector v)
Vector - the vector to reversepublic void workOn(Assembly a)
This method expects a series of terms to lie on top of a
stack, with an open paren token lying underneath. If there
is no '(' marker, this class will throw an
EmptyStackException.
Beneath the terms of the structure, this method expects to find a token whose value is the functor of the structure.
Assembly - the assembly to work on
|
by Steve Metsker | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||