org.inxar.syntacs.grammar.regular
Interface CharClass

All Superinterfaces:
Cloneable, RegularExpression
All Known Implementing Classes:
RECharClass

public interface CharClass
extends RegularExpression

The CharClass interface is another 'utility' interface for assembling complex Unions. A Character class is known by the (example) syntax [^a-z], which reads 'any single character other than lowercase a to z'.


Method Summary
 void add(char c)
          Adds the given char to the list of alternatives.
 void add(char lo, char hi)
          Adds the given range of characters to the character class.
 boolean isNegated()
          Returns true if this is a 'negated' character class, grammatically symbolized by the caret '^'.
 void isNegated(boolean value)
          Sets the negate flag.
 
Methods inherited from interface org.inxar.syntacs.grammar.regular.RegularExpression
clone, follow, getFirstSet, getLastSet, isNullable
 

Method Detail

isNegated

public boolean isNegated()
Returns true if this is a 'negated' character class, grammatically symbolized by the caret '^'.

isNegated

public void isNegated(boolean value)
Sets the negate flag. The default is false.

add

public void add(char c)
Adds the given char to the list of alternatives.

add

public void add(char lo,
                char hi)
Adds the given range of characters to the character class. For example, 'a-z' would be encoded by a the call CharClass.add('a','z');