RegExp

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.core.parser.JFlex
Class RegExp

    java.lang.Object
      weka.core.parser.JFlex.RegExp

Direct Known Subclasses:
  RegExp1, RegExp2

    public class RegExp

extends java.lang.Object

Stores a regular expression of rules section in a JFlex-specification. This base class has no content other than its type.

Version:
  JFlex 1.4.1, $Revision: 1.1 $, $Date: 2008-05-09 09:14:10 $
Author:
  Gerwin Klein

Constructor Summary
`RegExp(int type)` Create a new regular expression of the specified type.

Method Summary
`boolean` | `isCharClass(Macros macros)` Find out if this regexp is a char class or equivalent to one.
`java.lang.String` | `print(java.lang.String tab)` Returns a String-representation of this regular expression with the specified indentation.
`int` | `size(Macros macros)` The approximate number of NFA states this expression will need (only works correctly after macro expansion and without negation)
`java.lang.String` | `toString()` Returns a String-representation of this regular expression

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### RegExp

    public RegExp(int type)

  Create a new regular expression of the specified type.

  Parameters:
    `type` - a value from the cup generated class sym.
  See Also:
    `JFlex.sym`

Method Detail

### print

    public java.lang.String print(java.lang.String tab)

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

  Parameters:
    `tab` - a String that should contain only space characters and that is inserted in front of standard String-representation pf this object.

### toString

    public java.lang.String toString()

  Returns a String-representation of this regular expression

  Overrides:
    `toString` in class `java.lang.Object`

### isCharClass

    public boolean isCharClass(Macros macros)

  Find out if this regexp is a char class or equivalent to one.

  Parameters:
    `macros` - for macro expansion
  Returns:
    true if the regexp is equivalent to a char class.

### size

    public int size(Macros macros)

  The approximate number of NFA states this expression will need (only works correctly after macro expansion and without negation)

  Parameters:
    `macros` - macro table for expansion

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD