Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

7 May, 2024: fms is rebuilding. Don't expect much in that section for quite a few days, maybe longer.


devel / comp.lang.c / In search of state machines

SubjectAuthor
o In search of state machinesAnton Shepelev

1
In search of state machines

<20231006210841.867a0ab1e3c0457b1236df27@gmail.moc>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=30994&group=comp.lang.c#30994

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@gmail.moc (Anton Shepelev)
Newsgroups: comp.lang.c
Subject: In search of state machines
Date: Fri, 6 Oct 2023 21:08:41 +0300
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <20231006210841.867a0ab1e3c0457b1236df27@gmail.moc>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="1781e3619ff106c9d27ef67029dd82f3";
logging-data="1900981"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ejbeXeYeS4C3wYYMdwhj5cCXBl6U91lc="
Cancel-Lock: sha1:/95M7prIf+IZHs3ViyuX9KE+P68=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Fri, 6 Oct 2023 18:08 UTC

Hello, all

I have decided cautiously to follow David's advice, and
write a microscopic C project in a less conservative style,
using:

1. the ternary ?: operator,
2. combined declaration and initialisation of variables,
3. declaration of variables in their natural {}-scope,
wherever appropriate.

I want to write absolutely minimalist state-machine engive,
without nesting or any form of comilation. Can you come up
with beautiful parsing example that is not too large, yet
naturally demostrates all of the major features of an UML
state machine:

1. actions (self-transitions),
2. exit events,
3. entry events,
4. transition events,

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor