NB: These pages were mostly written in 2001 or so. The résumé dates are accurate but the code is aged and unlike whiskey, 8 year-old code doesn't usually taste better. For a look at my current skills and to see my CPAN modules, sample code, and code discussions, please see these pages instead: Perl resources and sample code and PangyreSoft.
Finite automata in Perl
Social links
View Ashley Pond V's profile on LinkedIn
Miscellaneous

Other pages

Description

This is about as basic as you can get.

Code
One more; watch a functional script act object oriented
Usage
jinx[13]>automata-grammar
Give me some input.
jinx[14]>automata-grammar asdsdfaposidfuasdkn
Final state for "asdsdfaposidfuasdkn" is m14.
       There's no way that's a word.
jinx[15]>automata-grammar bookkeeper
Final state for "bookkeeper" is m7.
       Looks like a word.
jinx[16]>automata-grammar fiddle-dee-dee
Final state for "fiddle-dee-dee" is m11.
       Looks like a word.

Discussion

There shall be no discussion! Play around with them if you’re inclined. Perl’s strengths as a text engine make it naturally good for this kind of thing.

Thanks to Terrence Brannon for discovering a buglet in the code whereby a tape of “0” would fail though it shouldn’t—fixed now with a defined() check.

Search these pages via Google
Text, original code, fonts, and graphics ©1990-2009 Ashley Pond V.