The ppCFm functor


signature PPCFM
functor ppCFm (LABEL) : PPCFM

This functor creates finite automata with an updatable counter collecting the input positions where a final state was reached.

Functor result interface

eqtype label
include FM
val display : label machine -> string -> OS.Process.status
val hits : ''a machine -> ''a list -> int list


eqtype label

display m s
writes a graphical representation of m to file and and displays it.

hits m l
returns the list of those positions in the input l where the machine m is in a final state.

See Also



Note that hits report end positions of matching strings, not initial position. To create a pattern matcher for a regular set of pattern strings, use the functor ppMatcher.