Generic Interpreter 1.3
Private API

gi
Class Lexicon.Range

java.lang.Object
  extended by gi.Lexicon.Expression
      extended by gi.Lexicon.Alphabet
          extended by gi.Lexicon.Range
All Implemented Interfaces:
Cloneable
Enclosing class:
Lexicon

protected static class Lexicon.Range
extends Lexicon.Alphabet

This class implements an Alphabet containing the characters in a range.

Version:
1.3
Author:
© 1999-2009 Craig A. Rich <carich@csupomona.edu>

Field Summary
private  char a1
          The first character in the range.
private  char a2
          The last character in the range.
 
Fields inherited from class gi.Lexicon.Expression
f, i
 
Constructor Summary
Lexicon.Range(char a1, char a2)
          Constructs an Alphabet containing the characters in a range, and builds the NFA constructed from this Expression.
 
Method Summary
 Object clone()
          Creates a clone of this Alphabet, and replicates the NFA constructed from this Expression.
(package private)  boolean contains(char a)
          Indicates whether a character occurs in this Alphabet.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a1

private final char a1

The first character in the range.


a2

private final char a2

The last character in the range.

Constructor Detail

Lexicon.Range

public Lexicon.Range(char a1,
                     char a2)

Constructs an Alphabet containing the characters in a range, and builds the NFA constructed from this Expression.

Parameters:
a1 - the first character in the range.
a2 - the last character in the range.
Method Detail

contains

boolean contains(char a)

Indicates whether a character occurs in this Alphabet.

Specified by:
contains in class Lexicon.Alphabet
Parameters:
a - the character whose status is requested.
Returns:
true if a occurs in this Alphabet; false otherwise.

clone

public Object clone()

Creates a clone of this Alphabet, and replicates the NFA constructed from this Expression.

Specified by:
clone in class Lexicon.Expression
Returns:
a clone of this Alphabet.

 

© 1999-2009 Craig A. Rich <carich@csupomona.edu>