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.tcl 2022-11-13 2.3 kB
checkstring.tcl 2022-11-13 1.9 kB
Makefile 2022-11-13 2.4 kB
README.txt 2022-11-13 756 Bytes
AppClass.sm 2022-11-13 1.6 kB
Totals: 5 Items   8.9 kB 0


                          Tcl Example 1


This state machine "recognizes" the string 0*1* (which includes
the empty string).


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

NOTE: Smc.jar must be built and installed.

Unix & Windows:
    $ java -jar ../../../bin/Smc.jar -tcl AppClass.sm


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

Unix & Windows

    $ tclsh checkstring.tcl <string>

Try several different strings, such as:

    $ tclsh checkstring.tcl ""
      -> acceptable
      
    $ tclsh checkstring.tcl 000
      -> acceptable
      
    $ tclsh checkstring.tcl 00011
      -> acceptable
      
    $ tclsh checkstring.tcl 111
      -> acceptable
      
    $ tclsh checkstring.tcl 000111100
      -> unacceptable
      
    $ tclsh checkstring.tcl 00011a1b10c0
      -> unacceptable
Source: README.txt, updated 2022-11-13