fr.umlv.tatoo.cc.parser.table
Class DefaultConflictResolverPolicy

java.lang.Object
  extended by fr.umlv.tatoo.cc.parser.table.ConflictResolverPolicy
      extended by fr.umlv.tatoo.cc.parser.table.DefaultConflictResolverPolicy

public class DefaultConflictResolverPolicy
extends ConflictResolverPolicy


Constructor Summary
DefaultConflictResolverPolicy()
           
 
Method Summary
<A extends ActionDecl>
A
priorityAction(Class<A> type, AbstractConflictDiagnosticReporter reporter, ActionDeclFactory actionFactory, Set<ActionEntry<A>> actions, NodeDecl<?> node, TerminalDecl terminal, TerminalDecl eof)
          Computes the priority action from a set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConflictResolverPolicy

public DefaultConflictResolverPolicy()
Method Detail

priorityAction

public <A extends ActionDecl> A priorityAction(Class<A> type,
                                               AbstractConflictDiagnosticReporter reporter,
                                               ActionDeclFactory actionFactory,
                                               Set<ActionEntry<A>> actions,
                                               NodeDecl<?> node,
                                               TerminalDecl terminal,
                                               TerminalDecl eof)
Description copied from class: ConflictResolverPolicy
Computes the priority action from a set

Specified by:
priorityAction in class ConflictResolverPolicy
Type Parameters:
A - type of action from Regular/BranchTableActionDecl (cast can be safely performed to A from a type which implements both interfaces)
actionFactory - factory for actions
actions - the set actions
node - the node corresponding to the actions, for logging purpose
terminal - the terminal corresponding to the actions, for logging purpose. if the action set is a standard one, there is only one terminal in the set, if the action set is a branching action set, this set contains all conflicting branching terminals
eof - the end-of-input terminal
Returns:
the priority action or null in case of unresolved conflict.