Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunxfancy/fsmlanguage
https://github.com/sunxfancy/fsmlanguage
Last synced: about 21 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/sunxfancy/fsmlanguage
- Owner: sunxfancy
- License: mit
- Created: 2017-10-17T19:19:55.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-01T16:16:34.000Z (about 1 year ago)
- Last Synced: 2023-12-01T17:28:49.469Z (about 1 year ago)
- Language: C++
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FSMLanguage
FSMLanguage is a FSM definition langauge for NFA/DFA research.
This project provided a parser for loading the FSM and provide a memory model for easily access the FSM.# Example FSM Definition
```
Robot(found_human, found_enemy) : void {
state : stop, move
state2: fire, ceasefire
move[found_human==0] -> stop
stop[found_human==1] -> move
fire[found_enemy==0] -> ceasefire
ceasefire[found_enemy==1] -> fire
}
```We provided a list of API parsing and loading this FSM definition:
```cpp
fsm::Module mod;
mod.src = fopen(argv[1], "r");
mod.Parse();
fclose(mod.src);
for (auto p : *(mod.root)) {
p->print();
}
```