Generic Interpreter 0.9
Private API

gi
Class Lexicon.NonMatch

java.lang.Object
  |
  +--gi.Lexicon.Expression
        |
        +--gi.Lexicon.Alphabet
              |
              +--gi.Lexicon.Match
                    |
                    +--gi.Lexicon.NonMatch
Enclosing class:
Lexicon

protected static class Lexicon.NonMatch
extends Lexicon.Match

This class implements an Expression denoting the set of characters not in a string.

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

Fields inherited from class gi.Lexicon.Match
c, list, string
 
Fields inherited from class gi.Lexicon.Expression
accept, initial
 
Constructor Summary
  Lexicon.NonMatch(char c)
          Constructs an Expression denoting the set of characters except one.
(package private) Lexicon.NonMatch(Lexicon.Set list)
          Constructs an Expression denoting the set of characters not in an Alphabet list.
  Lexicon.NonMatch(String string)
          Constructs an Expression denoting the set of characters not in a string.
 
Method Summary
(package private)  boolean contains(char c)
          Indicates whether a character is in the set denoted by this Expression.
(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
 

Constructor Detail

Lexicon.NonMatch

public Lexicon.NonMatch(char c)

Constructs an Expression denoting the set of characters except one. An NFA recognizing the language denoted by this Expression is constructed.

Parameters:
c - the character whose complement is denoted.

Lexicon.NonMatch

Lexicon.NonMatch(Lexicon.Set list)

Constructs an Expression denoting the set of characters not in an Alphabet list. An NFA recognizing the language denoted by this Expression is constructed.

Parameters:
list - the Alphabet list whose complement is denoted.

Lexicon.NonMatch

public Lexicon.NonMatch(String string)

Constructs an Expression denoting the set of characters not in a string. An NFA recognizing the language denoted by this Expression is constructed.

Parameters:
string - the string of characters whose complement is denoted.
Method Detail

contains

boolean contains(char c)

Indicates whether a character is in the set denoted by this Expression.

Overrides:
contains in class Lexicon.Match
Parameters:
c - the character whose status is requested.
Returns:
true if c is in the set denoted by this Expression; false otherwise.

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.Match
Returns:
a copy of this Expression.

 

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