|
Building Parsers with Java | ||||||||
| PREV NEXT | FRAMES NO FRAMES | ||||||||
| Uses of Assembly in sjm.examples.arithmetic |
| Methods in sjm.examples.arithmetic with parameters of type Assembly | |
void |
PlusAssembler.workOn(Assembly a)
Pop two numbers from the stack and push their sum. |
void |
ExpAssembler.workOn(Assembly a)
Pop two numbers from the stack and push the result of exponentiation the lower number to the upper one. |
void |
DivideAssembler.workOn(Assembly a)
Pop two numbers from the stack and push the result of dividing the top number into the one below it. |
void |
NumAssembler.workOn(Assembly a)
Replace the top token in the stack with the token's Double value. |
void |
MinusAssembler.workOn(Assembly a)
Pop two numbers from the stack and push the result of subtracting the top number from the one below it. |
void |
TimesAssembler.workOn(Assembly a)
Pop two numbers from the stack and push the result of multiplying the top number by the one below it. |
| Uses of Assembly in sjm.examples.coffee |
| Methods in sjm.examples.coffee with parameters of type Assembly | |
void |
CountryAssembler.workOn(Assembly a)
Pop a string, and set the target coffee's country to this string. |
void |
AlsoFrenchAssembler.workOn(Assembly a)
Set a target coffee object's boolean to indicate that this type of coffee also comes in a french roast. |
void |
PriceAssembler.workOn(Assembly a)
Pop a number, and set the target coffee's price to this string. |
void |
NameAssembler.workOn(Assembly a)
Pop a coffee's name from an assembly's stack, and set the assembly's target to be a new Coffee object with this name. |
void |
RoastAssembler.workOn(Assembly a)
Pop a string, and set the target coffee's roast to this string. |
void |
FormerNameAssembler.workOn(Assembly a)
Pop a string, and set the target coffee's former name to this string. |
| Uses of Assembly in sjm.examples.design |
| Methods in sjm.examples.design with parameters of type Assembly | |
void |
AverageAssembler.workOn(Assembly a)
Increases a running average, by the length of the string on the stack. |
| Uses of Assembly in sjm.examples.logic |
| Methods in sjm.examples.logic with parameters of type Assembly | |
void |
VariableAssembler.workOn(Assembly a)
Pops a string like "X" or "Person" from an assembly's stack and pushes a variable with that name. |
void |
ListAssembler.workOn(Assembly a)
Pops the terms of a list from an assembly's stack, builds the list, and pushes it. |
void |
AxiomAssembler.workOn(Assembly a)
Pops all of the structures on the stack, builds a rule from them, and pushes it. |
void |
NotAssembler.workOn(Assembly a)
Pops a structure from the top of the stack and pushes a Not version of it. |
void |
ComparisonAssembler.workOn(Assembly a)
Pops two comparison terms and an operator, builds the comparison, and pushes it. |
void |
AnonymousAssembler.workOn(Assembly a)
Pushes an anonymous variable onto an assembly's stack. |
void |
EvaluationAssembler.workOn(Assembly a)
Pops two terms, constructs an Evaluation from these terms, and pushes it. |
void |
ArithmeticAssembler.workOn(Assembly a)
Pop two arithmetic operands, build an ArithmeticOperator from them, and push it. |
void |
StructureWithTermsAssembler.workOn(Assembly a)
Pops the terms and functor of a structure from an assembly's stack, builds a structure, and pushes it. |
protected static java.lang.Object |
LogikusFacade.reportLeftovers(Assembly out,
java.lang.String type)
|
void |
AtomAssembler.workOn(Assembly a)
Exchanges a token on an assembly's stack with an atom that has the token's value as its functor. |
void |
ListWithTailAssembler.workOn(Assembly a)
Pops the tail and terms of a list from an assembly's stack, builds the list, and pushes it. |
| Uses of Assembly in sjm.examples.pretty |
| Methods in sjm.examples.pretty with parameters of type Assembly | |
void |
FenceAssembler.workOn(Assembly a)
Place the fence object on the assembly's stack. |
void |
PrettyRepetitionAssembler.workOn(Assembly a)
Replace the nodes above a given "fence" object with a new composite that holds the popped nodes as its children. |
void |
PrettyTerminalAssembler.workOn(Assembly a)
Replace a Token object on the stack with a
TerminalNode that holds the token's value. |
protected java.util.Vector |
PrettyParser.completeMatches(Assembly inAssembly)
|
java.util.Vector |
PrettyParser.parseTrees(Assembly inAssembly)
Returns a collection of strings that show the order of a parse of the given assembly. |
void |
PrettySequenceAssembler.workOn(Assembly a)
Replace a given number of nodes on the stack with a new composite that holds the popped nodes as its children. |
void |
PrettyAlternationAssembler.workOn(Assembly a)
Replace a ComponentNode object on the stack
with a new composite that holds the popped node as its
only child. |
void |
PrettyEmptyAssembler.workOn(Assembly a)
Push a TerminalNode that contains the word
"empty" on the assembly's stack. |
| Uses of Assembly in sjm.examples.query |
| Methods in sjm.examples.query that return Assembly | |
protected Assembly |
JaqlMediator.parseInput()
|
| Methods in sjm.examples.query with parameters of type Assembly | |
void |
SelectTermAssembler.workOn(Assembly a)
Pop a term and pass it to a query builder. |
void |
ComparisonAssembler.workOn(Assembly a)
Pops a comparison term, an operator, and another comparison term. |
void |
VariableAssembler.workOn(Assembly a)
Pop a token from the stack, extract its string, and push a Variable of that name. |
void |
ClassNameAssembler.workOn(Assembly a)
Pop a class name, and inform a QueryBuilder that this is a class to select from. |
| Uses of Assembly in sjm.examples.regular |
| Methods in sjm.examples.regular with parameters of type Assembly | |
void |
OrAssembler.workOn(Assembly a)
Pop two parsers from the stack and push a new Alternation of them. |
void |
AndAssembler.workOn(Assembly a)
Pop two parsers from the stack and push a new Sequence of them. |
void |
StarAssembler.workOn(Assembly a)
Pop a parser from the stack and push a new
Repetition of it. |
void |
CharAssembler.workOn(Assembly a)
Pop a Character from the stack and push a
SpecificChar interpeter in its place. |
| Uses of Assembly in sjm.examples.robot |
| Methods in sjm.examples.robot with parameters of type Assembly | |
void |
PlaceAssembler.workOn(Assembly a)
Sets an assembly's target to be a PlaceCommand object and note its location. |
void |
PickAssembler.workOn(Assembly a)
Sets an assembly's target to be a PickCommand object and note its location. |
void |
ScanAssembler.workOn(Assembly a)
Sets an assembly's target to be a ScanCommand object and note its location. |
| Uses of Assembly in sjm.examples.sling |
| Methods in sjm.examples.sling that return Assembly | |
protected Assembly |
SlingTester.assembly(java.lang.String s)
|
protected Assembly |
SlingMediator.tryMatch(TokenAssembly ta)
|
| Methods in sjm.examples.sling with parameters of type Assembly | |
void |
NegativeAssembler.workOn(Assembly a)
Push the point (-1, -1), and ask an Arithmetic
"times" object to work on the assembly. |
void |
ScaleAssembler.workOn(Assembly a)
Slip the arguments (0, t, 1) into the stack, and use a normal Scale object to work on the assembly. |
protected static CommandSequence |
ForAssembler.popCommandSequence(Assembly a)
|
void |
ForAssembler.workOn(Assembly a)
Pop the elements of a "for" loop, construct a
ForCommand, and push it. |
void |
FunctionAssembler.workOn(Assembly a)
Pop as many source functions as the prototype function has, create a fresh copy of the prototype using these sources, and push the copy. |
void |
PlotAssembler.workOn(Assembly a)
Pop a function, and push a command that will, at execution time, create a renderable function. |
void |
AssignmentAssembler.workOn(Assembly a)
Pops a function and a variable, constructs an
AssignFunctionCommand from these terms, and
pushes the command. |
void |
SliderAssembler.workOn(Assembly a)
Push a Slider object formed from a
JSlider
|
void |
VariableAssembler.workOn(Assembly a)
Pop the name of a variable, lookup the variable in the target's scope, and push the variable. |
void |
NumAssembler.workOn(Assembly a)
Pop a number n, and push the function (t, n). |
void |
PiAssembler.workOn(Assembly a)
Push the function (t, pi). |
protected void |
SlingMediator.checkReserved(Assembly in,
Assembly out)
|
protected void |
SlingMediator.checkResult(java.lang.String program,
Assembly in,
Assembly out)
|
protected CommandSequence |
SlingMediator.command(Assembly out)
|
| Uses of Assembly in sjm.parse |
| Methods in sjm.parse that return Assembly | |
protected abstract Assembly |
ParserTester.assembly(java.lang.String s)
|
Assembly |
Parser.best(java.util.Vector v)
Returns the most-matched assembly in a collection. |
Assembly |
Parser.bestMatch(Assembly a)
Returns an assembly with the greatest possible number of elements consumed by matches of this parser. |
Assembly |
Parser.completeMatch(Assembly a)
Returns either null, or a completely matched version of the supplied assembly. |
protected Assembly |
Terminal.matchOneAssembly(Assembly in)
Returns an assembly equivalent to the supplied assembly, except that this terminal will have been removed from the front of the assembly. |
| Methods in sjm.parse with parameters of type Assembly | |
Assembly |
Parser.bestMatch(Assembly a)
Returns an assembly with the greatest possible number of elements consumed by matches of this parser. |
Assembly |
Parser.completeMatch(Assembly a)
Returns either null, or a completely matched version of the supplied assembly. |
protected Assembly |
Terminal.matchOneAssembly(Assembly in)
Returns an assembly equivalent to the supplied assembly, except that this terminal will have been removed from the front of the assembly. |
static java.util.Vector |
Assembler.elementsAbove(Assembly a,
java.lang.Object fence)
Returns a vector of the elements on an assembly's stack that appear before a specified fence. |
abstract void |
Assembler.workOn(Assembly a)
This is the one method all subclasses must implement. |
| Uses of Assembly in sjm.parse.chars |
| Subclasses of Assembly in sjm.parse.chars | |
class |
CharacterAssembly
A CharacterAssembly is an Assembly whose elements are characters. |
| Methods in sjm.parse.chars that return Assembly | |
protected Assembly |
CharacterTester.assembly(java.lang.String s)
assembly method comment. |
| Uses of Assembly in sjm.parse.tokens |
| Subclasses of Assembly in sjm.parse.tokens | |
class |
TokenAssembly
A TokenAssembly is an Assembly whose elements are Tokens. |
| Methods in sjm.parse.tokens that return Assembly | |
protected Assembly |
TokenTester.assembly(java.lang.String s)
assembly method comment. |
|
by Steve Metsker | ||||||||
| PREV NEXT | FRAMES NO FRAMES | ||||||||