Package jflex

Class RegExp1


public class RegExp1 extends RegExp
Stores a regular expression from the rules section of a JFlex specification.

This class provides storage for one Object of content. It is used for all regular expressions that are constructed from one object.

For instance: a* is new RegExp1(sym.STAR, 'a');

Version:
JFlex 1.7.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) Object
    The child of this expression node in the syntax tree of a regular expression.
    (package private) boolean
    true if this regexp was created from a dot/point (.) metachar

    Fields inherited from class jflex.RegExp

    type
  • Constructor Summary

    Constructors
    Constructor
    Description
    RegExp1(int type, Object content)
    Constructs a new regular expression with one child object.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a String-representation of this regular expression with the specified indentation.
    Returns a String-representation of this regular expression

    Methods inherited from class jflex.RegExp

    anyChar, isCharClass, resolveTilde, rev, revString, size

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • content

      Object content
      The child of this expression node in the syntax tree of a regular expression.
    • isPoint

      boolean isPoint
      true if this regexp was created from a dot/point (.) metachar
  • Constructor Details

    • RegExp1

      public RegExp1(int type, Object content)
      Constructs a new regular expression with one child object.
      Parameters:
      type - a value from the cup generated class sym, defining the kind of this regular expression
      content - the child of this expression
  • Method Details

    • print

      public String print(String tab)
      Returns a String-representation of this regular expression with the specified indentation.

      Returns a String-representation of this regular expression with the specified indentation.

      Overrides:
      print in class RegExp
      Parameters:
      tab - a String that should contain only space characters and that is inserted in front of standard String-representation pf this object.
      Returns:
      a String object.
    • toString

      public String toString()
      Returns a String-representation of this regular expression
      Overrides:
      toString in class RegExp
      Returns:
      a String object.