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.m 2022-11-13 1.8 kB
README.txt 2022-11-13 812 Bytes
AppClass.h 2022-11-13 1.2 kB
AppClass.sm 2022-11-13 3.3 kB
main.m 2022-11-13 1.6 kB
Makefile 2022-11-13 2.8 kB
Totals: 6 Items   11.4 kB 0


                          C++ 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:
    $ make checkstring

Windows Visual C++:
    1. Load ex1.dsw.
    2. Rebuild all.


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

Unix & Windows:

    $ checkstring <string>

Try several different strings, such as:

    $ checkstring "" -> unacceptable
    $ checkstring 00 -> unacceptable
    $ checkstring 1c -> unacceptable
    $ checkstring c0 -> unacceptable
    $ checkstring abcba -> unacceptable
    $ checkstring 110010c010011 -> acceptable
    $ checkstring 110010c110010 -> unacceptable
Source: README.txt, updated 2022-11-13