Package eu.bandm.tools.d2d2.base
Class StackPrinter.FollowSet
java.lang.Object
eu.bandm.tools.umod.runtime.OptimizingVisitor
eu.bandm.tools.d2d2.rt.MATCH_ONLY_00
eu.bandm.tools.d2d2.rt.SinglePhase_rt
eu.bandm.tools.d2d2.base.StackPrinter.FollowSet
- Enclosing class:
StackPrinter
Single-use tool to find all sub-expressions of the current content model which
are allowed to enter as next input in the current parsing situation.
Operates for a certain State_singleton, which represents an
element definition and its contents model.
The total parsing state is realized by the stack frames "above" this
State_singleton: (a) by index positions in a State_sequ,
(b) by the "check list" in a State_perm.
The collected set is used for highlighting in error message
stack frame prints. It can be used to show the correct alternatives
to some erroneous input.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classPut all reached references into the global setresultand stop after a non-epsilon sequence element.protected static classIs thrown to signal the end of the search for possible input tags in a sequence state.Nested classes/interfaces inherited from class eu.bandm.tools.umod.runtime.OptimizingVisitor
OptimizingVisitor.DataByName -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<Expression> Empty result setstatic final ReferencePseudo-reference to mark empty content.protected static final StackPrinter.FollowSet.NoMoreEpsilonprotected Set<Expression> The result to return.Fields inherited from class eu.bandm.tools.d2d2.rt.MATCH_ONLY_00
_visitor_debug_stream, partialFields inherited from class eu.bandm.tools.umod.runtime.OptimizingVisitor
affectedClasses, fieldFlags, hasdescend, haspost, haspre, methodname_action, METHODNAME_allFields2codeNumber, METHODNAMEPREFIX_DESCEND, SUFFIX_FILENAME_SCC_DATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaction(State_perm permstate) Extract all first-tags of all sub-expresions, which have not been used yet.voidAdd the allowed input for this parsing state to the result set.voidaction(State_sequ state) Extract all first-tags of the suffix of the sequence, starting after the current position.Central service method: calculate the result.Methods inherited from class eu.bandm.tools.d2d2.rt.SinglePhase_rt
action, action, action, action, action, action, action, action, action, action, action, action, collectFlags, follow_assoc, follow_consumed, follow_obligates, follow_sequ, follow_subs, follow_subs, getKey, getLowestGeneratedClassMethods inherited from class eu.bandm.tools.d2d2.rt.MATCH_ONLY_00
_visitor_trace, action, action, action, action, action, action, action, action, action, action, action, allFields2codeNumber, compile, followAll_assoc, followAll_consumed, followAll_obligates, followAll_sequ, followAll_subs, followAll_subs, foreignObject, get_class2reachedSccs, get_class2scc, get_field2sccs, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, nomatchMethods inherited from class eu.bandm.tools.umod.runtime.OptimizingVisitor
calculateFlags, collectFlags_action, collectFlags_actionPreDescendPost, collectFlags_actionRewritefields, collectMethods, readSccData
-
Field Details
-
result
The result to return. -
epsilonRefence
Pseudo-reference to mark empty content. -
empty
Empty result set -
noMoreEpsilon
-
-
Constructor Details
-
FollowSet
protected FollowSet()
-
-
Method Details
-
calculate
Central service method: calculate the result. -
action
Add the allowed input for this parsing state to the result set.- Overrides:
actionin classSinglePhase_rt
-
action
Extract all first-tags of the suffix of the sequence, starting after the current position.- Overrides:
actionin classSinglePhase_rt
-
action
Extract all first-tags of all sub-expresions, which have not been used yet.- Overrides:
actionin classSinglePhase_rt
-