Finite State Machines in Forth

A technical note on building finite state machines in Forth from a state table.

Author
J.V. Noble, Institute for Nuclear and Particle Physics, University of Virginia
Published
Undated (the page notes it was formatted 11 June 1994 and 17 April 1995)
Kind
Technical note for Forth programmers, with worked code
Original
www.forth.org/literature/noble.html
Subject
Compilers and interpreters
Themes
Small means, Rules that generate

What it is

J.V. Noble, of a university physics institute, wrote this note for Forth programmers. It gives methods for deterministic and nondeterministic finite state automata. The stated goal is a one-to-one match between the definition and the state table.

What it says

What evidence it gives

The note gives complete Forth definitions and short console tests for the number-entry example. It adds an identifier recognizer and floating-point recognizers. It cites no benchmarks, so the speed claims are argument only.

Interests and limits

Some code works only on indirect-threaded Forths, and an appendix gives alternatives. Some helper words are left as an exercise. The claim about speed was not measured.

Connections

These links are this wiki's own reading, not claims the sources make.