Class DAutomaton.Trace

java.lang.Object
eu.bandm.tools.lexic.DAutomaton.Trace
All Implemented Interfaces:
Automaton.Trace<List<V>>
Enclosing class:
DAutomaton<V>

public class DAutomaton.Trace extends Object implements Automaton.Trace<List<V>>
Iterator-like mutable API for tracking the consumption of an input sequence of code points by an automaton.

This implementation is reasonably efficient; for performance-critical applications use ZAutomaton.Trace instead.

  • Method Details

    • restart

      public void restart()
      Jumps to the initial state(s).
      Specified by:
      restart in interface Automaton.Trace<List<V>>
    • step

      public boolean step(int c)
      Attempts a state transition by consuming one code point.
      Specified by:
      step in interface Automaton.Trace<List<V>>
      Parameters:
      c - the code point to consume
      Returns:
      true if the transition was successful; false otherwise
      See Also:
    • getLabel

      public List<V> getLabel()
      Returns the label associated with the current state(s).
      Specified by:
      getLabel in interface Automaton.Trace<List<V>>
      Returns:
      the label associated with the current state(s)