Package org.javacc.parser
Class Expansion
java.lang.Object
org.javacc.parser.Expansion
- Direct Known Subclasses:
Action
,Choice
,Lookahead
,NonTerminal
,OneOrMore
,RegularExpression
,Sequence
,TryBlock
,ZeroOrMore
,ZeroOrOne
Describes expansions - entities that may occur on the
right hand sides of productions. This is the base class of
a bunch of other more specific classes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
boolean
This flag is used for bookkeeping by the minimumSize method in class ParseEngine.long
static long
To avoid right-recursive loops when calculating follow sets, we use a generation number which indicates if this expansion was visited by LookaheadWalk.genFollowSet in the same generation.The parent of this expansion node. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringBuffer
dumpPrefix
(int indent) int
hashCode()
A reimplementing of Object.hashCode() to be deterministic.static void
reInit()
toString()
-
Field Details
-
parent
The parent of this expansion node. In case this is the top level expansion of the production it is a reference to the production node otherwise it is a reference to another Expansion node. In case this is the top level of a lookahead expansion,then the parent is null. -
nextGenerationIndex
public static long nextGenerationIndexTo avoid right-recursive loops when calculating follow sets, we use a generation number which indicates if this expansion was visited by LookaheadWalk.genFollowSet in the same generation. New generations are obtained by incrementing the static counter below, and the current generation is stored in the non-static variable below. -
myGeneration
public long myGeneration -
inMinimumSize
public boolean inMinimumSizeThis flag is used for bookkeeping by the minimumSize method in class ParseEngine. -
eol
-
-
Constructor Details
-
Expansion
public Expansion()
-
-
Method Details
-
hashCode
public int hashCode()A reimplementing of Object.hashCode() to be deterministic. This uses the line and column fields to generate an arbitrary number - we assume that this method is called only after line and column are set to their actual values. -
reInit
public static void reInit() -
toString
-
dumpPrefix
-
dump
-
getProductionName
-