Package com.javacc.parser.tree
Class CodeBlock
- java.lang.Object
-
- com.javacc.parser.BaseNode
-
- com.javacc.core.Expansion
-
- com.javacc.core.EmptyExpansion
-
- com.javacc.parser.tree.CodeBlock
-
- All Implemented Interfaces:
JavaCCConstants,Node,Expression,freemarker.template.TemplateHashModel,freemarker.template.TemplateModel,freemarker.template.TemplateNodeModel,freemarker.template.TemplateScalarModel,Comparable<Node>
public class CodeBlock extends EmptyExpansion implements Expression
-
-
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 CodeBlock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAsString()CodeBlockgetJavaCode()booleanisAppliesInLookahead()booleanisEmpty()The block is empty if it only consists of { and }booleanisPossiblyEmpty()voidsetAppliesInLookahead(boolean appliesInLookahead)-
Methods inherited from class com.javacc.core.EmptyExpansion
getFinalSet, getFirstSet, getMaximumSize, getMinimumSize, getRequiresScanAhead, getSpecifiesLexicalStateSwitch
-
Methods inherited from class com.javacc.core.Expansion
beginsSequence, getContainingProduction, getCustomErrorRecoveryBlock, getFinalSetSize, getFinalSetVarName, getFirstSetVarName, getFollowingExpansion, getFollowSet, getFollowSetVarName, getHasExplicitLookahead, getHasExplicitNumericalLookahead, getHasFullFollowSet, getHasGlobalSemanticActions, getHasImplicitSyntacticLookahead, getHasInnerScanLimit, getHasLookBehind, getHasScanLimit, getHasSemanticLookahead, getHasSeparateSyntacticLookahead, getHasTokenActivation, getIndex, getIsRegexp, getLabel, getLookahead, getLookaheadAmount, getLookaheadExpansion, getLookBehind, getNestedExpansion, getNonSuperfluousParent, getPredicateMethodName, getRecoverMethodName, getRecoverToMethodName, getRequiresPredicateMethod, getRequiresRecoverMethod, getScanLimitPlus, getScanRoutineName, getSemanticLookahead, getSpecifiedLexicalState, getTokenActivation, getTreeNodeBehavior, getUpToExpansion, isAlwaysSuccessful, 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, getBeginOffset, getChild, getChildCount, getChildNodes, getEndOffset, getGrammar, getInnerText, getLiteralText, getNodeName, getNodeNamespace, getNodeType, getParent, getParentNode, getSimpleName, getTokenSource, hasKeyWord, 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.tree.Expression
isAssignableTo
-
Methods inherited from interface com.javacc.parser.Node
addChild, addChild, appendChild, children, children, childrenOfType, clearChildren, close, compareTo, copyLocationInfo, copyLocationInfo, descendants, descendants, descendants, descendants, descendantsOfType, dump, dump, firstAncestorOfType, firstChildOfType, firstChildOfType, firstChildOfType, firstDescendantOfType, firstDescendantOfType, getAllTokens, getBeginColumn, getBeginLine, getBeginOffset, getChild, getChildCount, getEndColumn, getEndLine, getEndOffset, getFirstChild, getFirstToken, getGrammar, getInputSource, getLastChild, getLastToken, getLocation, getParent, getRealTokens, getRoot, getSource, getTokenSource, getTokenType, hasChildNodes, indexOf, isUnparsed, iterator, nextSibling, open, prependChild, previousSibling, removeChild, removeChild, replace, replaceChild, setBeginOffset, setChild, setEndOffset, setGrammar, setParent, setTokenSource, setUnparsed
-
-
-
-
Method Detail
-
getAsString
public String getAsString()
- Specified by:
getAsStringin interfaceExpression- Specified by:
getAsStringin interfacefreemarker.template.TemplateScalarModel- Overrides:
getAsStringin classBaseNode
-
isEmpty
public boolean isEmpty()
The block is empty if it only consists of { and }
-
isAppliesInLookahead
public boolean isAppliesInLookahead()
-
setAppliesInLookahead
public void setAppliesInLookahead(boolean appliesInLookahead)
-
getJavaCode
public CodeBlock getJavaCode()
-
isPossiblyEmpty
public boolean isPossiblyEmpty()
- Overrides:
isPossiblyEmptyin classEmptyExpansion- Returns:
- Can this expansion be matched by the empty string.
-
-