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.sm 2022-11-13 3.4 kB
AppClass.tcl 2022-11-13 5.0 kB
checkstring.tcl 2022-11-13 2.0 kB
Makefile 2022-11-13 2.4 kB
README.txt 2022-11-13 942 Bytes
Totals: 5 Items   13.7 kB 0


                          Tcl Example 3


This state machine "recognizes" the palindromes (words that read the
same backwards as forwards). The words consist of the alphabet
{0, 1, c} where the letter 'c' may appear only once and marks the
words center.


+ 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 ""
      -> unacceptable
      
    $ tclsh checkstring.tcl 00
      -> unacceptable
      
    $ tclsh checkstring.tcl 1c
      -> unacceptable
      
    $ tclsh checkstring.tcl c0
      -> unacceptable
      
    $ tclsh checkstring.tcl abcba
      -> unacceptable

    $ tclsh checkstring.tcl 110010c010011
      -> acceptable

    $ tclsh checkstring.tcl 110010c110010
      -> unacceptable
Source: README.txt, updated 2022-11-13