grammar::fa::dacceptor(n) | Finite automaton operations and usage | grammar::fa::dacceptor(n) |
grammar::fa::dacceptor - Create and use deterministic acceptors
package require Tcl 8.4
package require snit
package require struct::set
package require grammar::fa::dacceptor ?0.1.1?
::grammar::fa::dacceptor daName fa ?-any any?
daName option ?arg arg ...?
daName destroy
daName accept? symbols
This package provides a class for acceptors constructed from deterministic finite automatons (DFA). Acceptors are objects which can be given a string of symbols and tell if the DFA they are constructed from would accept that string. For the actual creation of the DFAs the acceptors are based on we have the packages grammar::fa and grammar::fa::op.
The package exports the API described here.
The acceptor will be based on the deterministic finite automaton stored in the object fa. It will keep a copy of the relevant data of the FA in its own storage, in a form easy to use for its purposes. This also means that changes made to the fa after the construction of the acceptor will not influence the acceptor.
If any has been specified, then the acceptor will convert all symbols in the input which are unknown to the base FA to that symbol before proceeding with the processing.
All acceptors provide the following methods for their manipulation:
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category grammar_fa of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation.
acceptance, acceptor, automaton, finite automaton, grammar, parsing, regular expression, regular grammar, regular languages, state, transducer
Grammars and finite automata
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users.sourceforge.net>
0.1.1 | grammar_fa |