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

java.lang.Object
  extended by fr.umlv.tatoo.cc.parser.table.ConflictResolverPolicy
Direct Known Subclasses:
DefaultConflictResolverPolicy

public abstract class ConflictResolverPolicy
extends Object


Constructor Summary
ConflictResolverPolicy()
           
 
Method Summary
abstract
<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

ConflictResolverPolicy

public ConflictResolverPolicy()
Method Detail

priorityAction

public abstract <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

Type Parameters:
A - type of action from Regular/BranchTableActionDecl (cast can be safely performed to A from a type which implements both interfaces)
Parameters:
actions - the set actions
actionFactory - factory for 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.