Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dacceptor(n) [suse man page]

grammar::fa::dacceptor(n)			       Finite automaton operations and usage				 grammar::fa::dacceptor(n)

__________________________________________________________________________________________________________________________________________________

NAME
grammar::fa::dacceptor - Create and use deterministic acceptors SYNOPSIS
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 _________________________________________________________________ DESCRIPTION
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. API
The package exports the API described here. ::grammar::fa::dacceptor daName fa ?-any any? Creates a new deterministic acceptor with an associated global Tcl command whose name is daName. This command may be used to invoke various operations on the acceptor. It has the following general form: daName option ?arg arg ...? Option and the args determine the exact behavior of the command. See section ACCEPTOR METHODS for more explanations. 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. ACCEPTOR METHODS
All acceptors provide the following methods for their manipulation: daName destroy Destroys the automaton, including its storage space and associated command. daName accept? symbols Takes the list of symbols and checks if the FA the acceptor is based on would accept it. The result is a boolean value. True is returned if the symbols are accepted, and False otherwise. Note that bogus symbols in the input are either translated to the any symbol (if specified), or cause the acceptance test to simply fail. No errors will be thrown. The method will process only just that prefix of the input which is enough to fully determine (non-)acceptance. EXAMPLES
BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category gram- mar_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. KEYWORDS
acceptance, acceptor, automaton, finite automaton, grammar, parsing, regular expression, regular grammar, regular languages, state, trans- ducer COPYRIGHT
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users.sourceforge.net> grammar_fa 0.1.1 grammar::fa::dacceptor(n)

Check Out this Related Man Page

grammar::me_intro(n)					   Grammar operations and usage 				      grammar::me_intro(n)

__________________________________________________________________________________________________________________________________________________

NAME
grammar::me_intro - Introduction to virtual machines for parsing token streams DESCRIPTION
This document is an introduction to and overview of the basic facilities for the parsing and/or matching of token streams. One possibility often used for the token domain are characters. The packages themselves all provide variants of one virtual machine, called a match engine (short ME), which has all the facilities needed for the matching and parsing of a stream, and which are either controlled directly, or are customized with a match program. The virtual machine is basically a pushdown automaton, with additional elements for backtracking and/or handling of semantic data and construction of abstract syntax trees (AST). Because of the high degree of similarity in the actual implementations of the aforementioned virtual machine and the data structures they receive and generate these common parts are specified in a separate document which will be referenced by the documentation for packages actually implementing it. The relevant documents are: grammar::me_vm Virtual machine specification. grammar::me_ast Specification of various representations used for abstract syntax trees. grammar::me::util Utility commands. grammar::me::tcl Singleton ME virtual machine implementation tied to Tcl for control flow and stacks. Hardwired for pull operation. Uninteruptible during processing. grammar::me::cpu Object-based ME virtual machine implementation with explicit control flow, and stacks, using bytecodes. Suspend/Resumable. Push/pull operation. grammar::me::cpu::core Core functionality for state manipulation and stepping used in the bytecode based implementation of ME virtual machines. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category gram- mar_me 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. KEYWORDS
CFG, CFL, LL(k), PEG, TPDL, context-free grammar, context-free languages, expression, grammar, matching, parsing, parsing expression gram- mar, push down automaton, recursive descent, top-down parsing languages, transducer, virtual machine CATEGORY
Grammars and finite automata COPYRIGHT
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users.sourceforge.net> grammar_me 0.1 grammar::me_intro(n)
Man Page