Building Parsers with Java

sjm.examples.mechanics
Class VerboseRepetition

java.lang.Object
  |
  +--sjm.parse.Parser
        |
        +--sjm.parse.Repetition
              |
              +--sjm.examples.mechanics.VerboseRepetition

public class VerboseRepetition
extends Repetition

The match() method of this class prints the collection of assemblies it receives, and the new collection it creates.


Fields inherited from class sjm.parse.Repetition
EXPWIDTH, preAssembler, subparser
 
Fields inherited from class sjm.parse.Parser
assembler, name
 
Constructor Summary
VerboseRepetition(Parser p)
          Constructs a VerboseRepetition of the given parser.
VerboseRepetition(Parser p, java.lang.String name)
          Constructs a VerboseRepetition of the given parser with the given name.
 
Method Summary
 java.util.Vector match(java.util.Vector in)
          Just a verbose version of Repetition.match() .
 
Methods inherited from class sjm.parse.Repetition
accept, getSubparser, randomExpansion, setPreAssembler, unvisitedString
 
Methods inherited from class sjm.parse.Parser
accept, add, best, bestMatch, completeMatch, elementClone, getName, matchAndAssemble, randomInput, setAssembler, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VerboseRepetition

public VerboseRepetition(Parser p)
Constructs a VerboseRepetition of the given parser.
Parameters:
parser - the parser to repeat

VerboseRepetition

public VerboseRepetition(Parser p,
                         java.lang.String name)
Constructs a VerboseRepetition of the given parser with the given name.
Parameters:
parser - the parser to repeat
name - a name to be known by
Method Detail

match

public java.util.Vector match(java.util.Vector in)
Just a verbose version of Repetition.match() .
Overrides:
match in class Repetition
Tags copied from class: Repetition
Parameters:
Vector - a vector of assemblies to match against
Returns:
a Vector of assemblies that result from matching against a beginning set of assemblies

by Steve Metsker