Class Diagnosis<R,M,O>

java.lang.Object
eu.bandm.tools.ramus.runtime2.Action<R,M,O>
eu.bandm.tools.ramus.runtime2.Diagnosis<R,M,O>

public class Diagnosis<R,M,O> extends Action<R,M,O>
  • Constructor Details

  • Method Details

    • getBody

      public Action<? extends R,M,O> getBody()
    • getMessages

      public List<M> getMessages()
    • getLeafCount

      protected int getLeafCount()
      Specified by:
      getLeafCount in class Action<R,M,O>
    • bind

      public <S> Action<S,M,O> bind(Action.Continuation<? super R,S,M,O> cont)
      Description copied from class: Action
      Applies a monadic continuation to all leaves of this search tree (transition operation).
      Specified by:
      bind in class Action<R,M,O>
      Type Parameters:
      S - the output parsing result type of the continuation
      Parameters:
      cont - the continuation to apply
      Returns:
      an updated search tree
    • prune

      public <Q> Action<? extends R,M,Q> prune()
      Description copied from class: Action
      Simplifies this search tree by removing redundant choice nodes and all obstructions (transition operation).
      Specified by:
      prune in class Action<R,M,O>
      Type Parameters:
      Q - the new type of obstructions
      Returns:
      a simplified search tree without nested or unary choice nodes
    • isEmpty

      public boolean isEmpty()
      Description copied from class: Action
      Checks whether this search tree is empty.
      Specified by:
      isEmpty in class Action<R,M,O>
      Returns:
      true iff this tree has no leaves
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • host

      public void host(Action.Visitor<? super R,M,O> v)
      Description copied from class: Action
      Performs a double dispatch to the appropriate method of a visitor.
      Specified by:
      host in class Action<R,M,O>
      Parameters:
      v - the visitor