fr.umlv.tatoo.cc.parser.table
Class ConflictResolverPolicy
java.lang.Object
fr.umlv.tatoo.cc.parser.table.ConflictResolverPolicy
- Direct Known Subclasses:
- DefaultConflictResolverPolicy
public abstract class ConflictResolverPolicy
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConflictResolverPolicy
public ConflictResolverPolicy()
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 actionsactionFactory
- factory for actionsnode
- the node corresponding to the actions, for logging purposeterminal
- 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 terminalseof
- the end-of-input terminal
- Returns:
- the priority action or null in case of unresolved conflict.