Generic Interpreter 0.9
Private API

gi
Class Lexicon.PosixClass

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

protected static class Lexicon.PosixClass
extends Lexicon.Alphabet

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

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

Field Summary
private  int posixclass
          The POSIX class whose set is denoted.
 
Fields inherited from class gi.Lexicon.Expression
accept, initial
 
Constructor Summary
private Lexicon.PosixClass(int posixclass)
          Constructs an Expression denoting the set of characters in a POSIX class.
 
Method Summary
static Lexicon.Expression alnum()
          Creates an Expression denoting the set of alphanumeric characters.
static Lexicon.Expression alpha()
          Creates an Expression denoting the set of alphabetic characters.
static Lexicon.Expression blank()
          Creates an Expression denoting the set of blank characters.
static Lexicon.Expression cntrl()
          Creates an Expression denoting the set of control characters.
(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.
static Lexicon.Expression digit()
          Creates an Expression denoting the set of decimal digit characters.
static Lexicon.Expression graph()
          Creates an Expression denoting the set of graphical characters.
static Lexicon.Expression lower()
          Creates an Expression denoting the set of lowercase alphabetic characters.
static Lexicon.Expression print()
          Creates an Expression denoting the set of printable characters.
static Lexicon.Expression punct()
          Creates an Expression denoting the set of punctuation characters.
static Lexicon.Expression space()
          Creates an Expression denoting the set of space characters.
static Lexicon.Expression upper()
          Creates an Expression denoting the set of uppercase alphabetic characters.
static Lexicon.Expression xdigit()
          Creates an Expression denoting the set of hexadecimal digit characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

posixclass

private final int posixclass

The POSIX class whose set is denoted.

Constructor Detail

Lexicon.PosixClass

private Lexicon.PosixClass(int posixclass)

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

Parameters:
class - the POSIX class whose set is denoted.
Method Detail

alnum

public static Lexicon.Expression alnum()

Creates an Expression denoting the set of alphanumeric characters.


alpha

public static Lexicon.Expression alpha()

Creates an Expression denoting the set of alphabetic characters.


blank

public static Lexicon.Expression blank()

Creates an Expression denoting the set of blank characters.


cntrl

public static Lexicon.Expression cntrl()

Creates an Expression denoting the set of control characters.


contains

boolean contains(char c)

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

Overrides:
contains in class Lexicon.Alphabet
Parameters:
c - the character whose status is requested.
Returns:
true if c is in this PosixClass; 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.Expression
Returns:
a copy of this Expression.

digit

public static Lexicon.Expression digit()

Creates an Expression denoting the set of decimal digit characters.


graph

public static Lexicon.Expression graph()

Creates an Expression denoting the set of graphical characters.


lower

public static Lexicon.Expression lower()

Creates an Expression denoting the set of lowercase alphabetic characters.


print

public static Lexicon.Expression print()

Creates an Expression denoting the set of printable characters.


punct

public static Lexicon.Expression punct()

Creates an Expression denoting the set of punctuation characters.


space

public static Lexicon.Expression space()

Creates an Expression denoting the set of space characters.


upper

public static Lexicon.Expression upper()

Creates an Expression denoting the set of uppercase alphabetic characters.


xdigit

public static Lexicon.Expression xdigit()

Creates an Expression denoting the set of hexadecimal digit characters.


 

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