Class Expansion_
java.lang.Object
EDU.purdue.jtb.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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe OS line separatorbooleanThis flag is used for bookkeeping by the minimumSize method in classUnusedParseEngine.longTo avoid right-recursive loops when calculating follow sets, we use a generation number which indicates if this expansion was visited byin the same generation.invalid reference
UnusedLookaheadWalk#genFollowSet(List, Expansion_, long)static longTo avoid right-recursive loops when calculating follow sets, we use a generation number which indicates if this expansion was visited byin the same generation.invalid reference
UnusedLookaheadWalk#genFollowSet(List, Expansion_, long)The parent of this expansion node. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringBuilderdumpPrefix(int indent) 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 byin the same generation. New generations are obtained by incrementing the static counterinvalid reference
UnusedLookaheadWalk#genFollowSet(List, Expansion_, long)nextGenerationIndex, and the current generation is stored in the non-static variablemyGeneration. -
myGeneration
public long myGenerationTo avoid right-recursive loops when calculating follow sets, we use a generation number which indicates if this expansion was visited byin the same generation. New generations are obtained by incrementing the static counterinvalid reference
UnusedLookaheadWalk#genFollowSet(List, Expansion_, long)nextGenerationIndex, and the current generation is stored in the non-static variablemyGeneration. -
inMinimumSize
public boolean inMinimumSizeThis flag is used for bookkeeping by the minimumSize method in classUnusedParseEngine. -
EOL
The OS line separator
-
-
Constructor Details
-
Expansion_
public Expansion_()
-
-
Method Details
-
toString
-
dumpPrefix
- Parameters:
indent- - the number of indentation level- Returns:
- a
StringBuilderwith twice the number of spaces given by the parameter
-
dump
- Parameters:
indent- - the number of spaces for indentingalreadyDumped- - a Set of objects already dumped (unused)- Returns:
- the formatted string dumping the class
-