Package eu.bandm.tools.ramus.runtime2
Class Choice<R,M,O>
java.lang.Object
eu.bandm.tools.ramus.runtime2.Action<R,M,O>
eu.bandm.tools.ramus.runtime2.Choice<R,M,O>
Choice node class of the parsing search-tree monad.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbind
(Action.Continuation<? super R, S, M, O> cont) Applies a monadic continuation to all leaves of this search tree (transition operation).static <R,
M, O> Choice<R, M, O> getAlts()
protected int
void
host
(Action.Visitor<? super R, M, O> v) Performs a double dispatch to the appropriate method of a visitor.boolean
isEmpty()
Checks whether this search tree is empty.prune()
Simplifies this search tree by removing redundant choice nodes and all obstructions (transition operation).protected <Q> boolean
Adds a pruned variant of this search subtree to a list of choice alternatives.toString()
Methods inherited from class eu.bandm.tools.ramus.runtime2.Action
choice, diagnosis, diagnosis, fail, fail, findFirstResult, forEachObstruction, forEachResult, map, optional, optional, succeed, succeed
-
Constructor Details
-
Choice
Choice() -
Choice
-
Choice
-
-
Method Details
-
either
-
getAlts
-
getLeafCount
protected int getLeafCount()- Specified by:
getLeafCount
in classAction<R,
M, O>
-
bind
Description copied from class:Action
Applies a monadic continuation to all leaves of this search tree (transition operation). -
prune
Description copied from class:Action
Simplifies this search tree by removing redundant choice nodes and all obstructions (transition operation). -
pruneTo
Description copied from class:Action
Adds a pruned variant of this search subtree to a list of choice alternatives. -
isEmpty
public boolean isEmpty()Description copied from class:Action
Checks whether this search tree is empty. -
toString
-
host
Description copied from class:Action
Performs a double dispatch to the appropriate method of a visitor.
-