Generic Interpreter 0.9
Protected API

gi
Class Lexicon.Repetition

java.lang.Object
  |
  +--gi.Lexicon.Expression
        |
        +--gi.Lexicon.Repetition
Enclosing class:
Lexicon

protected static class Lexicon.Repetition
extends gi.Lexicon.Expression

This class implements an Expression denoting the repetition of a regular language.

Version:
0.9
Author:
© 1999-2000 Craig A. Rich <carich@acm.org>

Constructor Summary
Lexicon.Repetition(gi.Lexicon.Expression kernel, int min, int max)
          Constructs an Expression denoting the repetition of a regular language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lexicon.Repetition

public Lexicon.Repetition(gi.Lexicon.Expression kernel,
                          int min,
                          int max)

Constructs an Expression denoting the repetition of a regular language. An NFA recognizing the language denoted by this Expression is constructed. Large finite values for the minimum or maximum cause the kernel NFA to be cloned many times, resulting in a space-inefficient NFA.

Parameters:
kernel - the Expression denoting the language whose repetition is expressed.
min - the minimum number of times kernel is repeated. If negative, it is assumed to be zero.
max - the maximum number of times kernel is repeated. If negative, it is assumed to be infinity.

 

© 1999-2000 Craig A. Rich <carich@acm.org>