Building Parsers with Java

Uses of Class
sjm.parse.Assembler

Packages that use Assembler
sjm.examples.arithmetic   
sjm.examples.coffee   
sjm.examples.design   
sjm.examples.logic   
sjm.examples.pretty   
sjm.examples.query   
sjm.examples.regular   
sjm.examples.robot   
sjm.examples.sling   
sjm.parse   
 

Uses of Assembler in sjm.examples.arithmetic
 

Subclasses of Assembler in sjm.examples.arithmetic
 class DivideAssembler
          Pop two numbers from the stack and push the result of dividing the top number into the one below it.
 class ExpAssembler
          Pop two numbers from the stack and push the result of exponentiating the lower number to the upper one.
 class MinusAssembler
          Pop two numbers from the stack and push the result of subtracting the top number from the one below it.
 class NumAssembler
          Replace the top token in the stack with the token's Double value.
 class PlusAssembler
          Pop two numbers from the stack and push their sum.
 class TimesAssembler
          Pop two numbers from the stack and push the result of multiplying the top number by the one below it.
 

Uses of Assembler in sjm.examples.coffee
 

Subclasses of Assembler in sjm.examples.coffee
 class AlsoFrenchAssembler
          This assembler sets a target coffee object boolean that indicates the type of coffee also comes in a french roast.
 class CountryAssembler
          This assembler pops a string, and sets the target coffee's country to this string.
 class FormerNameAssembler
          This assembler pops a string, and sets the target coffee's former name to this string.
 class NameAssembler
          This assembler pops a coffee's name from an assembly's stack, and sets the assembly's target to be a new Coffee object with this name.
 class PriceAssembler
          Pops a number and sets the target coffee's price to this number.
 class RoastAssembler
          This assembler pops a string, and sets the target coffee's roast to this string.
 

Uses of Assembler in sjm.examples.design
 

Subclasses of Assembler in sjm.examples.design
 class AverageAssembler
          This assembler updates a running average.
 

Uses of Assembler in sjm.examples.logic
 

Subclasses of Assembler in sjm.examples.logic
 class AnonymousAssembler
          Pushes an anonymous variable onto an assembly's stack.
 class ArithmeticAssembler
          This assembler pops two arithmetic operands, builds an ArithmeticOperator from them, and pushes it.
 class AtomAssembler
          Exchanges a token on an assembly's stack with an atom that has the token's value as its functor.
 class AxiomAssembler
          Pops the structures of a rule from an assembly's stack, and constructs and pushes a rule.
 class EvaluationAssembler
          Pops two terms, constructs an Evaluation from these terms, and pushes it.
 class ListAssembler
          Pops the terms of a list from an assembly's stack, builds the list, and pushes it.
 class ListWithTailAssembler
          Pops the tail and terms of a list from an assembly's stack, builds the list, and pushes it.
 class NotAssembler
          Pops a structure from the top of the stack and pushes a Not version of it.
 class StructureWithTermsAssembler
          Pops the terms and functor of a structure from an assembly's stack, builds a structure, and pushes it.
 

Uses of Assembler in sjm.examples.pretty
 

Subclasses of Assembler in sjm.examples.pretty
 class FenceAssembler
          Places a given "fence" or marker object on an assembly's stack.
 class PrettyAlternationAssembler
          Replace a ComponentNode object on the stack with a new composite that holds the popped node as its only child.
 class PrettyEmptyAssembler
          Push a TerminalNode that contains the word "empty" on the assembly's stack.
 class PrettyRepetitionAssembler
          Replace the nodes above a given "fence" object with a new composite that holds the popped nodes as its children.
 class PrettySequenceAssembler
          Replace a given number of nodes on the stack with a new composite that holds the popped nodes as its children.
 class PrettyTerminalAssembler
          Replace a Token object on the stack with a TerminalNode that holds the token's value.
 

Uses of Assembler in sjm.examples.query
 

Subclasses of Assembler in sjm.examples.query
 class ClassNameAssembler
          Pops a class name, and informs a QueryBuilder that this is a class to select from.
 class ComparisonAssembler
          This assembler pops a comparison term, an operator, and another comparison term.
 class SelectTermAssembler
          This assembler pops a term and passes it to a query builder.
 class VariableAssembler
          This assembler pops a token from the stack, extracts its string, and pushes a Variable of that name.
 

Uses of Assembler in sjm.examples.regular
 

Subclasses of Assembler in sjm.examples.regular
 class AndAssembler
          Pop two Parsers from the stack and push a new Sequence of them.
 class CharAssembler
          Pop a Character from the stack and push a SpecificChar parser in its place.
 class OrAssembler
          Pop two parsers from the stack and push a new Alternation of them.
 class StarAssembler
          Pop a parser from the stack and push a new Repetition of it.
 

Uses of Assembler in sjm.examples.robot
 

Subclasses of Assembler in sjm.examples.robot
 class PickAssembler
          Sets an assembly's target to be a PickCommand and note its location.
 class PlaceAssembler
          Sets an assembly's target to be a PlaceCommand and note its location.
 class ScanAssembler
          Sets an assembly's target to be a ScanCommand and note its location.
 

Uses of Assembler in sjm.examples.sling
 

Subclasses of Assembler in sjm.examples.sling
 class AssignmentAssembler
          Pops a function and a variable, constructs an AssignFunctionCommand from these terms, and pushes the command.
 class ForAssembler
          Builds a "for" command from elements on the stack, which should be: a variable, a "from" function, a "to" function, a '{' token, and a series of commands.
 class FunctionAssembler
          This assembler uses information from a prototypical function object received in a constructor to guide the construction of a new function.
 class NegativeAssembler
          Pop the assembly, and push a new function that multiplies this function by -1.
 class PiAssembler
          Pushes the function (t, pi).
 class PlotAssembler
          Pops a function, and pushes an AddFunctionCommand object.
 class ScaleAssembler
          This class augments the stack with default scale arguments, and then uses a FunctionAssembler with a Scale object to work on the assembly.
 class SliderAssembler
          Uses one of the sliders in an assembly's target to create a Slider function, and pushes this function.
 

Uses of Assembler in sjm.parse
 

Fields in sjm.parse declared as Assembler
protected  Assembler Parser.assembler
           
protected  Assembler Repetition.preAssembler
           
 

Methods in sjm.parse with parameters of type Assembler
 Parser Parser.setAssembler(Assembler assembler)
          Sets the object that will work on an assembly whenever this parser successfully matches against the assembly.
 Parser Repetition.setPreAssembler(Assembler preAssembler)
          Sets the object that will work on every assembly before matching against it.
 


by Steve Metsker