Class 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.
  • Constructor Details

    • RegularExpression

      public RegularExpression(Grammar grammar)
    • RegularExpression

      public RegularExpression()
  • Method Details

    • getCodeSnippet

      public CodeBlock getCodeSnippet()
    • getIgnoreCase

      protected boolean getIgnoreCase()
    • getTokenProduction

      protected TokenProduction getTokenProduction()
    • getLabel

      public final String getLabel()
      Overrides:
      getLabel in class Expansion
    • 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:
      getFirstSet in class Expansion
    • getFinalSet

      public TokenSet getFinalSet()
      Specified by:
      getFinalSet in class Expansion
    • isPossiblyEmpty

      public final boolean isPossiblyEmpty()
      Specified by:
      isPossiblyEmpty in class Expansion
      Returns:
      Can this expansion be matched by the empty string.
    • getRequiresScanAhead

      public final boolean getRequiresScanAhead()
      Overrides:
      getRequiresScanAhead in class Expansion
    • getMinimumSize

      public final int getMinimumSize()
      Specified by:
      getMinimumSize in class Expansion
      Returns:
      the minimum number of tokens that this expansion consumes.
    • getMaximumSize

      public final int getMaximumSize()
      Specified by:
      getMaximumSize in class Expansion
      Returns:
      the maximum number of tokens that this expansion consumes.
    • matchesEmptyString

      public abstract boolean matchesEmptyString()