Download Latest Version smc-maven-plugin-7.6.0.jar (25.9 kB)
Email in envelope

Get an email when there's a new version of SMC - The State Machine Compiler

Name Modified Size InfoDownloads / Week
Parent folder
AppClass.lua 2021-11-11 1.9 kB
Makefile 2021-11-11 2.6 kB
README.txt 2021-11-11 720 Bytes
AppClass.sm 2021-11-11 2.1 kB
checkstring.lua 2021-11-11 1.7 kB
Totals: 5 Items   9.0 kB 0


                         Lua Example 2


This state machine "recognizes" the string 0*1*. Example 2 differs
from example 1 in that example 2 uses default transitions.


+ Building
----------

NOTE: Smc.jar must be built and installed.

Unix & Windows:
    $ make checkstring


+ Executing
-----------

Unix & Windows:

    $ lua checkstring.lua <string>

Try several different strings, such as:

    $ lua checkstring.lua ""
      -> acceptable
    $ lua checkstring.lua 000
      -> acceptable
    $ lua checkstring.lua 00011
      -> acceptable
    $ lua checkstring.lua 111
      -> acceptable
    $ lua checkstring.lua 000111100
      -> unacceptable
    $ lua checkstring.lua 00011a1b10c0
      -> unacceptable

Source: README.txt, updated 2021-11-11