fr.umlv.tatoo.runtime.parser
Class EnterAction<T,P,V>

java.lang.Object
  extended by fr.umlv.tatoo.runtime.parser.Action<T,P,V>
      extended by fr.umlv.tatoo.runtime.parser.EnterAction<T,P,V>
Type Parameters:
T - type of terminals.
P - type of productions.
V - type of versions.

public class EnterAction<T,P,V>
extends Action<T,P,V>

Enter in a sub parser action class.

Author:
Remi
See Also:
ExitAction

Constructor Summary
EnterAction(T terminal, int shift)
          Creates an enter action with an error action that will be used if enter doesn't succeed.
 
Method Summary
<N> ActionReturn
doPerform(Parser<T,N,P,V> parser, T terminal)
          Performs necessary computations required by the action.
 String toString()
           
 
Methods inherited from class fr.umlv.tatoo.runtime.parser.Action
isError, isShift
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnterAction

public EnterAction(T terminal,
                   int shift)
Creates an enter action with an error action that will be used if enter doesn't succeed.

Parameters:
terminal - magic terminal that can be replaced by a sub-grammar.
Method Detail

doPerform

public <N> ActionReturn doPerform(Parser<T,N,P,V> parser,
                                  T terminal)
Description copied from class: Action
Performs necessary computations required by the action.

Specified by:
doPerform in class Action<T,P,V>
Type Parameters:
N - type of non-terminals.
Parameters:
parser - the parser object.
terminal - terminal on which the shift is performed.
Returns:
NEXT if action consumed terminal, and KEEP else.

toString

public String toString()
Overrides:
toString in class Object