Questions tagged [state-machine]
A state machine is a model for designing systems which change based upon their current state and what input they receive.
135 questions
7 votes
1 answer
915 views
Yet another finite state machine in C++
I know there are several implementation of FSM in C++ containing different set of features and written in different styles. Nevertheless, I've decided to write my own. Here are some key points : c++...
2 votes
1 answer
190 views
Rust state-machine lexer
I tried implementing a lexer in rust that peeks ahead at the next character and makes a decision based on that. However, i am told that this is bad practice, and instead i should be using finite-state-...
1 vote
1 answer
116 views
State machine for parsing GitHub URL formats
A while ago, I wrote a small Rust crate for parsing & generating URLs for GitHub repositories in various formats (HTTPS, SSH, git://, etc.), with the parsing done using regular expressions with ...
0 votes
1 answer
151 views
Simultanous states in a state machine
In Dungeons and Dragons, we have many spells, e.g. the Charm spell to get anyone to do what you want, the Web spell to entangle someone, the Invisibility spell to make yourself invisible (but once you ...
2 votes
2 answers
286 views
State-machine class based upon arduino toolchain
In my quest to search or develop the 'perfect' state machine I have built the following class. With the class you can make a state machine object which comes with timing and transition methods. Being ...
8 votes
1 answer
616 views
Haskell Tic-Tac-Toe (with automation and GUI)
There are already many Tic Tac Toe posts. But as far as I can tell, none of the ones in Haskell are complete with a GUI Here is my implementation with Gloss. Gist Link for convenience ...
2 votes
1 answer
264 views
Simple state machine
I tried implementing a state machine in C. This is for a Stratosphere Balloon and I wanted to use a state machine to make it better. This will be later implemented in ARM CMSIS. The state function ...
3 votes
1 answer
114 views
Sequence state machine
I tried to parse command line arguments. The program requires four arguments. I iterate over the arguments. If the argument is an option, I process the option. Otherwise the argument is one of the ...