Building Parsers with Java

sjm.examples.mechanics
Class VerboseSequence

java.lang.Object
  |
  +--sjm.parse.Parser
        |
        +--sjm.parse.CollectionParser
              |
              +--sjm.parse.Sequence
                    |
                    +--sjm.examples.mechanics.VerboseSequence

public class VerboseSequence
extends Sequence

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


Fields inherited from class sjm.parse.CollectionParser
subparsers
 
Fields inherited from class sjm.parse.Parser
assembler, name
 
Constructor Summary
VerboseSequence()
          Constructs a nameless VerboseSequence.
VerboseSequence(java.lang.String name)
          Constructs a Sequence with the given name.
 
Method Summary
 java.util.Vector match(java.util.Vector inputState)
          Just a verbose version of Sequence.match().
 
Methods inherited from class sjm.parse.Sequence
accept, randomExpansion, toStringSeparator
 
Methods inherited from class sjm.parse.CollectionParser
add, getSubparsers, 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

VerboseSequence

public VerboseSequence()
Constructs a nameless VerboseSequence.

VerboseSequence

public VerboseSequence(java.lang.String name)
Constructs a Sequence with the given name.
Parameters:
name - a name to be known by
Method Detail

match

public java.util.Vector match(java.util.Vector inputState)
Just a verbose version of Sequence.match().
Overrides:
match in class Sequence
Tags copied from class: Sequence
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