Generic Interpreter 0.9
Private API

gi
Class Lexicon.Singleton

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

protected static class Lexicon.Singleton
extends Lexicon.Expression

This class implements an Expression denoting the set containing a string.

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

Field Summary
private  String string
          The string whose singleton set is denoted.
 
Fields inherited from class gi.Lexicon.Expression
accept, initial
 
Constructor Summary
Lexicon.Singleton(String string)
          Constructs an Expression denoting the set containing a string.
 
Method Summary
(package private)  Lexicon.Expression copy()
          Creates a copy of this Expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

string

private final String string

The string whose singleton set is denoted.

Constructor Detail

Lexicon.Singleton

public Lexicon.Singleton(String string)

Constructs an Expression denoting the set containing a string. An NFA recognizing the language denoted by this Expression is constructed.

Parameters:
string - the string whose singleton set is denoted.
Method Detail

copy

Lexicon.Expression copy()

Creates a copy of this Expression. The NFA recognizing the language denoted by this Expression is replicated.

Overrides:
copy in class Lexicon.Expression
Returns:
a copy of this Expression.

 

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