org.waxeye.parser
Class CharTransition<E extends java.lang.Enum<?>>

java.lang.Object
  extended by org.waxeye.parser.CharTransition<E>
Type Parameters:
E - The AST type.
All Implemented Interfaces:
ITransition<E>

public final class CharTransition<E extends java.lang.Enum<?>>
extends java.lang.Object
implements ITransition<E>

A transition cost of matching a char from a set.

Author:
Orlando Hill

Constructor Summary
CharTransition(char[] single, char[] min, char[] max)
          Creates a new CharTransition.
 
Method Summary
 IAST<E> acceptVisitor(ITransitionVisitor<E> visitor)
          If this transition cost can be accepted by the parser.
 boolean withinSet(char ch)
          Whether the char is within the char transition set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharTransition

public CharTransition(char[] single,
                      char[] min,
                      char[] max)
Creates a new CharTransition.

Parameters:
single - Individual chars in the set.
min - The min values for the ranges in the set.
max - The max values for the ranges in the set.
Method Detail

withinSet

public boolean withinSet(char ch)
Whether the char is within the char transition set.

Parameters:
ch - The char to test.
Returns:
Whether the char is within the char transition set.

acceptVisitor

public IAST<E> acceptVisitor(ITransitionVisitor<E> visitor)
If this transition cost can be accepted by the parser.

Specified by:
acceptVisitor in interface ITransition<E extends java.lang.Enum<?>>
Parameters:
visitor - The transition visitor.
Returns:
If this transition cost can be accepted by the parser.


Waxeye Parser Generator