next up previous
Next: Declaration of an adapter Up: Declarations Previous: Declarations

Declaration of a DFA

To be able to use an automaton class you must provide two types, the alphabet type and the tag type. You will find base classes in the files tag.hh (class STag) and alphabet.hh (class templates Type_alphabet and Range_alphabet) which suffice most of the time.
Say you want to use a DFA_map with an alphabet ranging from letter a to z and with a tag containing the finality of a state :
#include "dfa_map.hh"
#include "tag.hh"
#include "alphabet.hh"

main()
{
  DFA_map<Range_alphabet<char, 'a', 'z'>, STag> dfa;
}


Vincent Lemaout
12/9/1997