Parsing Engine

danbikel.parser.lang
Class AbstractHeadFinder.HeadFindInstruction

java.lang.Object
  extended by danbikel.parser.lang.AbstractHeadFinder.HeadFindInstruction
All Implemented Interfaces:
Serializable
Enclosing class:
AbstractHeadFinder

protected static final class AbstractHeadFinder.HeadFindInstruction
extends Object
implements Serializable

Data structure for specifying a way to search for a head in a grammar production: a set of symbols to scan for and the direction of that scan.

See Also:
Serialized Form

Field Summary
protected  boolean direction
          The direction in which to scan: a value equal to Constants.LEFT indicates a left-to-right scan, and a value equal to Constants.RIGHT indicates a right-to-left scan.
protected  Symbol[] scanSet
          The set of symbols to scan for.
 
Constructor Summary
protected AbstractHeadFinder.HeadFindInstruction(boolean direction, Symbol[] scanSet)
          Constructs a new HeadFindInstruction object.
 
Method Summary
 String toString()
          Converts this object to a human-readable string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

scanSet

protected Symbol[] scanSet
The set of symbols to scan for.


direction

protected boolean direction
The direction in which to scan: a value equal to Constants.LEFT indicates a left-to-right scan, and a value equal to Constants.RIGHT indicates a right-to-left scan.

Constructor Detail

AbstractHeadFinder.HeadFindInstruction

protected AbstractHeadFinder.HeadFindInstruction(boolean direction,
                                                 Symbol[] scanSet)
Constructs a new HeadFindInstruction object.

Parameters:
direction - the direction in which to scan: a value equal to Constants.LEFT indicates a left-to-right scan, and a value equal to Constants.RIGHT indicates a right-to-left scan
scanSet - the set of symbols to scan for
Method Detail

toString

public String toString()
Converts this object to a human-readable string representation.

Overrides:
toString in class Object
Returns:
a human-readable string representation of this object

Parsing Engine

Author: Dan Bikel.