org.metasyntactic.math.automata
Interface FiniteAutomata
- All Superinterfaces:
- java.io.Serializable
- All Known Subinterfaces:
- RegularExpression
- All Known Implementing Classes:
- AbstractFiniteAutomata, AbstractRegularExpression, ContextFreeGrammar, LRParseTable, TuringMachine
- public interface FiniteAutomata
- extends java.io.Serializable
FORMAL DEFINITION OF A FINITE AUTOMATA
A finite automaton has several parts. It has a set of states and rules for
going from one state to another, depending on the input symbol. It has an
input alphabet that indicates the allowed input symbols. It has a start
state and a set of accept states. The formal definition says that a finite
automaton is a list of those five objects: set of states, input alphabet,
rules for moving, start state, and accept states. In mathematical language a
list of five elements is often called a 5-tuple. Hence we define a finite
automaton to be a r-tuple consisting of these five parts.
Method Summary |
boolean |
accept(java.util.Iterator w)
|
accept
public boolean accept(java.util.Iterator w)
throws ParseException
- Parameters:
w
- A string over some alphabet Σ
- Returns:
true
if this machine accepts w
- Throws:
ParseException
- if along the way of testing for acceptance, an
exception occurred over the format of w