Generic Interpreter 1.0
Private API

gi
Class Lexicon.UnicodeCategory

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

protected static class Lexicon.UnicodeCategory
extends Lexicon.Alphabet

This class implements an Expression denoting the set of characters in a Unicode category.

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

Field Summary
(package private)  Integer accept
          The accept state of the NFA recognizing the language denoted by this Expression.
private  byte category
          The Unicode category whose set is denoted.
(package private)  Integer initial
          The initial state of the NFA recognizing the language denoted by this Expression.
 
Constructor Summary
Lexicon.UnicodeCategory(byte category)
          Constructs an Expression denoting the set of characters in a Unicode category.
 
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, toString, wait, wait, wait
 

Field Detail

category

private final byte category

The Unicode category whose set is denoted.


accept

Integer accept

The accept state of the NFA recognizing the language denoted by this Expression.


initial

Integer initial

The initial state of the NFA recognizing the language denoted by this Expression.

Constructor Detail

Lexicon.UnicodeCategory

public Lexicon.UnicodeCategory(byte category)

Constructs an Expression denoting the set of characters in a Unicode category. An NFA recognizing the language denoted by this Expression is constructed. The class Character defines byte constants for each of the Unicode category types.

Parameters:
category - the Unicode category whose set is denoted.
See Also:
Character
Method Detail

contains

boolean contains(char c)

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

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

copy

Lexicon.Expression copy()

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

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

 

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