autogen_back

Interesting projects using AutoGen

Main
AutoGen
Pages

Home
Announce
FAQ
docs
XML Defs
testimonials
downloads

Automated
Options

AutoOpts
Comparison
Man example
Redistribute
Licensing
local use
using getopt

GCC's
Fixincludes

fixincludes

Automated
FSM

description
example
usagefsm

Addons
addon

Project GNU
Home Page

Automated
XDR

xdr project

i

Automated Event Management

Define events with embedded markup comments, and derive documentation, invocation macros, handling tables, dispatch tables, and display functions.

Produce Finite State Machine Code

The machine is derived from a list of states and transitions.

Bit map manager

Create a header file that enumerates a bit mask and, optionally, a source file that will convert between strings and the bit masks.

Create customized character classifications

This program will take a list of character classes and convert them into bit map tests.

Config file editor

Create a program to edit a daemon config file by processing the options, rewriting the config file and sending SIGHUP to the daemon.

Call a function based on an input name

The input name is converted to an enumeration value and used as an index into a dispatch table.


Produce Finite State Machine Code

   This template collection will produce a finite state machine based on a
   description of such a machine.  The presumption is that you generally
   do not need to know what the current state is in order to determine what
   kind of transition is to be taken.  That is to say, there is a global
   transition table that is indexed by the current state and the next
   transition type to determine the next state and trigger any optional
   transition handling code.
   The finite state machine may be either the master, driving the other
   parts of the program, or act as a subroutine keeping track of state
   between calls.  Consequently, the "type" attribute may be set to:
   looping
       If the machine processes transitions until it reaches a terminal
       state (error or done).
   stepping
       If the FSM code will process a single transition and then return.
   reentrant
       This method is much the same as stepping, except that the caller
       must save the current state and provide it on the next call.
       In this fashion, an FSM may be used in a multi threaded application.
   The machine can be constructed in either of three formats, depending
   on the value of the "method" attribute:
   callout
       This method will use a callout table instead of a switch statement
       to implement the machine.
   case
       This is the alternate implementation method.
   none
       Do not supply the "method" attribute.  Choosing this will cause only
       the dispatch table to be created.  The implementation code is omitted.
       The "type" attribute is then ignored.

Primary File(s) for autofsm

    fsm-macro.tpl
    fsm-trans.tpl
    fsm.tpl

autofsm Example source

    example.def

autofsm Example output

    example-fsm.c
    example-fsm.h

Auxilary files for building example

    run.sh
    Makefile
    README
    NEWS
    ChangeLog


Bit map manager

   This template produces a header file with an enumeration of all the defined
   bits.  If the bit collection fits in a 32 or 64 bit word, then the bit values
   will also be #defined.  A set of macros will also be defined for manipulating
   the bit collections.  The interface to these macros is consistent, even if
   the implementation has to resort to arrays of words to hold all the bits.
   (That is, if there are more than 64 bits.)
   Unless suppressed, a .c file is also produced with two routines for convert-
   ing from a list of bit names to a bit collection and back again.

Primary File(s) for bits

    bits.tpl

bits Example source

    b-test.def
    bit-test.tpl

bits Example output

    b-test.c
    b-test.h

Auxilary files for building example

    Makefile


Create customized character classifications

   This program will take a list of character classes and convert them
   into bit map tests.  If all you ever need are "isspace" or "isalpha"
   or the other tests included in , then by all means use that.
   On the other hand, if you find yourself writing code like:
      if (isalnum(*p) || (*p == '_'))
   Then this might be handy.

Primary File(s) for char-mapper

    char-mapper.c
    mk-str2enum.sh
    mk-opt-table.sh

char-mapper Example source

    test.sh

char-mapper Example output

    test-cmap.map
    test-cmap.h

Auxilary files for building example

    Makefile


Config file editor

   This template will produce a program that will process its configuration
   file and command line options, save the option state to its config file,
   and then signal its associated daemon file with a SIGHUP.  Included with
   this template are some auxialiary options and attributes in a file named
   "editor.def".

Primary File(s) for config_edit

    editor.tpl

config_edit Example source

    editor.def

config_edit Example output

    edit-daemon-conf.c
    edit-daemon-conf.h

Auxilary files for building example

    Makefile
    daemon.c
    daemon-opts.c
    daemon-opts.def
    daemon-opts.h


Call a function based on an input name

   This template will produce a header file and one or two source files.
   You supply a list of commands as values for "cmd" and it will produce
   an enumeration of these commands and code that will match strings against
   these command names.  The input command name need only be as long as
   needed for a unique partial match.  For example, if there is only one
   command that starts with "x", then the single letter "x" is sufficient
   for a unique match.

Primary File(s) for dispatch

    dispatch.tpl

dispatch Example source

    greek.def

dispatch Example output

    greek.c
    greek.h

Auxilary files for building example

    Makefile
    test-all.sh

top  Viewable With Any Browser  Valid XHTML 1.0!


AutoGen, AutoOpts, columns, getdefs, AutoFSM, AutoXDR and these web pages copyright (c) 1999-2002 Bruce Korb, all rights reserved.

Return to GNU's home page.

Please send FSF & GNU inquiries & questions to gnu@gnu.org. There are also other ways to contact the FSF.

Please send comments on these web pages to webmasters@www.gnu.org, send other questions to gnu@gnu.org.

This article, Copyright © 2000-2002 by Bruce Korb

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. Last modified: Wed Dec 31 19:50:22 PST 2008