Package com.javacc.parser.tree
Class ExpansionSequence
- java.lang.Object
-
- com.javacc.parser.BaseNode
-
- com.javacc.core.Expansion
-
- com.javacc.parser.tree.ExpansionSequence
-
- All Implemented Interfaces:
JavaCCConstants,Node,freemarker.template.TemplateHashModel,freemarker.template.TemplateModel,freemarker.template.TemplateNodeModel,freemarker.template.TemplateScalarModel,Comparable<Node>
public class ExpansionSequence extends Expansion
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.javacc.parser.JavaCCConstants
JavaCCConstants.LexicalState, JavaCCConstants.TokenType
-
Nested classes/interfaces inherited from interface com.javacc.parser.Node
Node.Visitor
-
-
Field Summary
-
Fields inherited from interface com.javacc.parser.JavaCCConstants
BUF_SIZE
-
-
Constructor Summary
Constructors Constructor Description ExpansionSequence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Expansion>allUnits()ExpansionfirstNonEmpty()TokenSetgetFinalSet()TokenSetgetFirstSet()booleangetHasExplicitLookahead()booleangetHasExplicitScanLimit()booleangetHasScanLimit()booleangetHasTokenActivation()LookaheadgetLookahead()intgetMaximumSize()intgetMinimumSize()booleangetRequiresScanAhead()booleangetSpecifiesLexicalStateSwitch()List<Expansion>getUnits()booleanisAlwaysSuccessful()booleanisPossiblyEmpty()voidsetLookahead(Lookahead lookahead)-
Methods inherited from class com.javacc.core.Expansion
beginsSequence, getContainingProduction, getCustomErrorRecoveryBlock, getFinalSetSize, getFinalSetVarName, getFirstSetVarName, getFollowingExpansion, getFollowSet, getFollowSetVarName, getHasExplicitNumericalLookahead, getHasFullFollowSet, getHasGlobalSemanticActions, getHasImplicitSyntacticLookahead, getHasInnerScanLimit, getHasLookBehind, getHasSemanticLookahead, getHasSeparateSyntacticLookahead, getIndex, getIsRegexp, getLabel, getLookaheadAmount, getLookaheadExpansion, getLookBehind, getNestedExpansion, getNonSuperfluousParent, getPredicateMethodName, getRecoverMethodName, getRecoverToMethodName, getRequiresPredicateMethod, getRequiresRecoverMethod, getScanLimitPlus, getScanRoutineName, getSemanticLookahead, getSpecifiedLexicalState, getTokenActivation, getTreeNodeBehavior, getUpToExpansion, isAtChoicePoint, isBeforeLexicalStateSwitch, isInsideLookahead, isNegated, isScanLimit, isSingleToken, isTolerantParsing, setCustomErrorRecoveryBlock, setLabel, setScanLimit, setScanLimitPlus, setTolerantParsing, setTreeNodeBehavior, superfluousParentheses, toString
-
Methods inherited from class com.javacc.parser.BaseNode
addChild, addChild, children, clearChildren, get, getAsString, getBeginOffset, getChild, getChildCount, getChildNodes, getEndOffset, getGrammar, getInnerText, getLiteralText, getNodeName, getNodeNamespace, getNodeType, getParent, getParentNode, getSimpleName, getTokenSource, hasKeyWord, isEmpty, isUnparsed, prepend, removeChild, setBeginOffset, setChild, setEndOffset, setGrammar, setListClass, setParent, setTokenSource, setUnparsed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.javacc.parser.Node
appendChild, children, childrenOfType, close, compareTo, copyLocationInfo, copyLocationInfo, descendants, descendants, descendants, descendants, descendantsOfType, dump, dump, firstAncestorOfType, firstChildOfType, firstChildOfType, firstChildOfType, firstDescendantOfType, firstDescendantOfType, getAllTokens, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getFirstChild, getFirstToken, getInputSource, getLastChild, getLastToken, getLocation, getRealTokens, getRoot, getSource, getTokenType, hasChildNodes, indexOf, iterator, nextSibling, open, prependChild, previousSibling, removeChild, replace, replaceChild
-
-
-
-
Method Detail
-
allUnits
public List<Expansion> allUnits()
- Returns:
- a List that includes child expansions that are inside of superfluous parentheses.
-
firstNonEmpty
public Expansion firstNonEmpty()
-
getSpecifiesLexicalStateSwitch
public boolean getSpecifiesLexicalStateSwitch()
- Overrides:
getSpecifiesLexicalStateSwitchin classExpansion
-
isAlwaysSuccessful
public boolean isAlwaysSuccessful()
- Overrides:
isAlwaysSuccessfulin classExpansion
-
getFirstSet
public TokenSet getFirstSet()
- Specified by:
getFirstSetin classExpansion
-
getFinalSet
public TokenSet getFinalSet()
- Specified by:
getFinalSetin classExpansion
-
getRequiresScanAhead
public boolean getRequiresScanAhead()
- Overrides:
getRequiresScanAheadin classExpansion
-
getHasTokenActivation
public boolean getHasTokenActivation()
- Overrides:
getHasTokenActivationin classExpansion
-
setLookahead
public void setLookahead(Lookahead lookahead)
-
getLookahead
public Lookahead getLookahead()
- Overrides:
getLookaheadin classExpansion
-
getHasExplicitLookahead
public boolean getHasExplicitLookahead()
- Overrides:
getHasExplicitLookaheadin classExpansion
-
isPossiblyEmpty
public boolean isPossiblyEmpty()
- Specified by:
isPossiblyEmptyin classExpansion- Returns:
- Can this expansion be matched by the empty string.
-
getMinimumSize
public int getMinimumSize()
- Specified by:
getMinimumSizein classExpansion- Returns:
- the minimum number of tokens that this expansion consumes.
-
getMaximumSize
public int getMaximumSize()
- Specified by:
getMaximumSizein classExpansion- Returns:
- the maximum number of tokens that this expansion consumes.
-
getHasScanLimit
public boolean getHasScanLimit()
- Overrides:
getHasScanLimitin classExpansion- Returns:
- whether we have a scan limit, including an implicit one inside a nested NonTerminal
-
getHasExplicitScanLimit
public boolean getHasExplicitScanLimit()
- Returns:
- whether we have an explicit scan limit, i.e. not including one that is inside a NonTerminal expansion.
-
-