https://github.com/superjmn/statemachinecompiler
State Machine Compiler inspired by Uncle Bob
https://github.com/superjmn/statemachinecompiler
clean-code compiler csharp dotnet finite-state-machine parser-combinators visitor-pattern
Last synced: about 1 year ago
JSON representation
State Machine Compiler inspired by Uncle Bob
- Host: GitHub
- URL: https://github.com/superjmn/statemachinecompiler
- Owner: SuperJMN
- Created: 2018-11-18T18:31:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-03T16:17:49.000Z (over 6 years ago)
- Last Synced: 2025-03-18T16:40:27.833Z (about 1 year ago)
- Topics: clean-code, compiler, csharp, dotnet, finite-state-machine, parser-combinators, visitor-pattern
- Language: C#
- Size: 44.9 KB
- Stars: 17
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# State Machine Compiler
State Machine Compiler inspired by [Robert C. Martin](https://twitter.com/unclebobmartin), AKA "Uncle Bob", and his work.
This the State Machine Compiler (SMC) that Robert C. Martin builds in episodes [28](https://cleancoders.com/episode/clean-code-episode-28/show), [29](https://cleancoders.com/episode/clean-code-episode-29/show) and [30](https://cleancoders.com/episode/clean-code-episode-30/show) of [Clean Coders](https://cleancoders.com/), built from scratch in C#.
It can be used to create Finite State Machines in several programming languages, like Java, C, Python, and C#, of course. In fact, it's built on C# 😄
# Syntax
```
Actions: Turnstile
FSM: TwoCoinTurnstile
Initial: Locked
{
(Base) Reset Locked Lock
Locked : Base
{
Pass Alarming -
Coin FirstCoin -
}
Alarming : Base >AlarmOn action` and exit actions are denoted by `