Package eu.bandm.tools.ramus.runtime2
Class Success<R,M,O>
java.lang.Object
eu.bandm.tools.ramus.runtime2.Action<R,M,O>
eu.bandm.tools.ramus.runtime2.Success<R,M,O>
Leaf 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).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).recycle
(S arg) toString()
Methods inherited from class eu.bandm.tools.ramus.runtime2.Action
choice, diagnosis, diagnosis, fail, fail, findFirstResult, forEachObstruction, forEachResult, map, optional, optional, pruneTo, succeed, succeed
-
Constructor Details
-
Success
-
-
Method Details
-
getResult
-
getLeafCount
protected int getLeafCount()- Specified by:
getLeafCount
in classAction<R,
M, O>
-
bind
Applies a monadic continuation to all leaves of this search tree (transition operation).This leaf node is advertised for recyling in the process.
-
recycle
-
prune
Description copied from class:Action
Simplifies this search tree by removing redundant choice nodes and all obstructions (transition operation). -
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.
-