Package com.javacc.core
Class RegularExpression
- java.lang.Object
-
- com.javacc.parser.BaseNode
-
- com.javacc.core.Expansion
-
- com.javacc.core.RegularExpression
-
- All Implemented Interfaces:
JavaCCConstants,Node,freemarker.template.TemplateHashModel,freemarker.template.TemplateModel,freemarker.template.TemplateNodeModel,freemarker.template.TemplateScalarModel,Comparable<Node>
- Direct Known Subclasses:
CharacterList,EndOfFile,OneOrMoreRegexp,RegexpChoice,RegexpRef,RegexpSequence,RegexpStringLiteral,RepetitionRange,ZeroOrMoreRegexp,ZeroOrOneRegexp
public abstract class RegularExpression extends Expansion
An abstract base class from which all the AST nodes that are regular expressions inherit.
-
-
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 RegularExpression()RegularExpression(Grammar grammar)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CodeBlockgetCodeSnippet()TokenSetgetFinalSet()TokenSetgetFirstSet()StringgetGeneratedClassName()StringgetGeneratedSuperClassName()protected booleangetIgnoreCase()StringgetImage()StringgetLabel()LexicalStateDatagetLexicalState()NamegetLHS()intgetMaximumSize()intgetMinimumSize()LexicalStateDatagetNewLexicalState()intgetOrdinal()booleangetRequiresScanAhead()protected TokenProductiongetTokenProduction()booleanisPossiblyEmpty()booleanisPrivate()abstract booleanmatchesEmptyString()voidsetGeneratedClassName(String generatedClassName)voidsetGeneratedSuperClassName(String generatedSuperClassName)voidsetLHS(Name lhs)voidsetNewLexicalState(LexicalStateData newLexicalState)protected voidsetOrdinal(int id)voidsetPrivate(boolean _private)-
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, getLookahead, getLookaheadAmount, getLookaheadExpansion, getLookBehind, getNestedExpansion, getNonSuperfluousParent, getPredicateMethodName, getRecoverMethodName, getRecoverToMethodName, getRequiresPredicateMethod, getRequiresRecoverMethod, getScanLimitPlus, getScanRoutineName, getSemanticLookahead, getSpecifiedLexicalState, getSpecifiesLexicalStateSwitch, 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, 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
-
-
-
-
Constructor Detail
-
RegularExpression
public RegularExpression(Grammar grammar)
-
RegularExpression
public RegularExpression()
-
-
Method Detail
-
getCodeSnippet
public CodeBlock getCodeSnippet()
-
getIgnoreCase
protected boolean getIgnoreCase()
-
getTokenProduction
protected TokenProduction getTokenProduction()
-
getOrdinal
public final int getOrdinal()
-
setOrdinal
protected final void setOrdinal(int id)
-
getLHS
public Name getLHS()
-
setLHS
public void setLHS(Name lhs)
-
getLexicalState
public LexicalStateData getLexicalState()
-
setNewLexicalState
public void setNewLexicalState(LexicalStateData newLexicalState)
-
getNewLexicalState
public LexicalStateData getNewLexicalState()
-
isPrivate
public boolean isPrivate()
-
getImage
public String getImage()
-
setPrivate
public void setPrivate(boolean _private)
-
getGeneratedClassName
public String getGeneratedClassName()
-
setGeneratedClassName
public void setGeneratedClassName(String generatedClassName)
-
getGeneratedSuperClassName
public String getGeneratedSuperClassName()
-
setGeneratedSuperClassName
public void setGeneratedSuperClassName(String generatedSuperClassName)
-
getFirstSet
public TokenSet getFirstSet()
- Specified by:
getFirstSetin classExpansion
-
getFinalSet
public TokenSet getFinalSet()
- Specified by:
getFinalSetin classExpansion
-
isPossiblyEmpty
public final boolean isPossiblyEmpty()
- Specified by:
isPossiblyEmptyin classExpansion- Returns:
- Can this expansion be matched by the empty string.
-
getRequiresScanAhead
public final boolean getRequiresScanAhead()
- Overrides:
getRequiresScanAheadin classExpansion
-
getMinimumSize
public final int getMinimumSize()
- Specified by:
getMinimumSizein classExpansion- Returns:
- the minimum number of tokens that this expansion consumes.
-
getMaximumSize
public final int getMaximumSize()
- Specified by:
getMaximumSizein classExpansion- Returns:
- the maximum number of tokens that this expansion consumes.
-
matchesEmptyString
public abstract boolean matchesEmptyString()
-
-