Package eu.bandm.tools.lexic
Class ZAutomaton.Trace
java.lang.Object
eu.bandm.tools.lexic.ZAutomaton.Trace
- All Implemented Interfaces:
Automaton.Trace<List<V>>
- Enclosing class:
- ZAutomaton<V>
Iterator-like mutable API for tracking the consumption of an
input sequence of code points by an automaton.
This implementation is very efficient and suitable for performance-critical applications.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Trace
public Trace()Creates a new instance.
-
-
Method Details
-
restart
public void restart()Description copied from interface:Automaton.Trace
Jumps to the initial state(s).- Specified by:
restart
in interfaceAutomaton.Trace<List<V>>
-
step
public boolean step(int c) Description copied from interface:Automaton.Trace
Attempts a state transition by consuming one code point.- Specified by:
step
in interfaceAutomaton.Trace<List<V>>
- Parameters:
c
- the code point to consume- Returns:
true
if the transition was successful;false
otherwise- See Also:
-
getLabel
Description copied from interface:Automaton.Trace
Returns the label associated with the current state(s).- Specified by:
getLabel
in interfaceAutomaton.Trace<List<V>>
- Returns:
- the label associated with the current state(s)
-