Generic Interpreter 1.2
Private API

gi
Class Lexicon.Match

java.lang.Object
  extended bygi.Lexicon.Expression
      extended bygi.Lexicon.Alphabet
          extended bygi.Lexicon.Match
Direct Known Subclasses:
Lexicon.NonMatch
Enclosing class:
Lexicon

protected static class Lexicon.Match
extends Lexicon.Alphabet

This class implements an Alphabet containing some characters.

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

Field Summary
(package private)  Object A
          The Character or String representing this Alphabet.
 
Fields inherited from class gi.Lexicon.Expression
f, i
 
Constructor Summary
  Lexicon.Match(char a)
          Constructs an Alphabet containing one character, and builds the NFA constructed from this Expression.
private Lexicon.Match(Integer i, char a, Integer f)
          Constructs an Alphabet containing one character, and builds the NFA constructed from this Expression.
private Lexicon.Match(Integer i, Object A, Integer f)
          Constructs an Alphabet containing some characters, and builds the NFA constructed from this Expression.
  Lexicon.Match(Object A)
          Constructs an Alphabet containing some characters, and builds the NFA constructed from this Expression.
 
Method Summary
(package private)  boolean contains(char a)
          Indicates whether a character occurs in this Alphabet.
(package private)  Lexicon.Expression copy()
          Creates a copy of this Alphabet, and replicates the NFA constructed from this Expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

A

final Object A

The Character or String representing this Alphabet.

Constructor Detail

Lexicon.Match

public Lexicon.Match(char a)

Constructs an Alphabet containing one character, and builds the NFA constructed from this Expression.

Parameters:
a - the character in this Alphabet.

Lexicon.Match

private Lexicon.Match(Integer i,
                      char a,
                      Integer f)

Constructs an Alphabet containing one character, and builds the NFA constructed from this Expression.

Parameters:
i - the initial state of the NFA constructed.
a - the character in this Alphabet.
f - the final state of the NFA constructed.

Lexicon.Match

private Lexicon.Match(Integer i,
                      Object A,
                      Integer f)

Constructs an Alphabet containing some characters, and builds the NFA constructed from this Expression.

Parameters:
i - the initial state of the NFA constructed.
A - the Character or String of characters in this Alphabet.
f - the final state of the NFA constructed.

Lexicon.Match

public Lexicon.Match(Object A)

Constructs an Alphabet containing some characters, and builds the NFA constructed from this Expression.

Parameters:
A - the Character or String of characters in this Alphabet.
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.

copy

Lexicon.Expression copy()

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

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

 

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