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

java.lang.Object
  extended by fr.umlv.tatoo.runtime.parser.Action<T,P,V>
      extended by fr.umlv.tatoo.runtime.parser.BranchAction<T,P,V>

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


Constructor Summary
BranchAction(String message)
           
 
Method Summary
<N> ActionReturn
doPerform(Parser<T,N,P,V> parser, T terminal)
          Performs necessary computations required by the action.
protected  String getMessage()
          Returns the error action message.
 boolean isError(V version)
          Indicates if the action is an error.
 String toString()
           
 
Methods inherited from class fr.umlv.tatoo.runtime.parser.Action
isShift
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BranchAction

public BranchAction(String message)
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.

isError

public boolean isError(V version)
Description copied from class: Action
Indicates if the action is an error.

Parameters:
version - version of the action to consider, see VersionedAction.
Returns:
true if the action is an errror.

toString

public String toString()
Overrides:
toString in class Object

getMessage

protected String getMessage()
Returns the error action message.

Returns:
the error action message.