Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finite State Machine compiler [closed]

What is the best Opensource FSM compiler which can generate c++ code ?

like image 802
Vijay Angelo Avatar asked Jun 18 '09 14:06

Vijay Angelo


2 Answers

I don't know about the best, but you could look at Ragel:

Ragel compiles executable finite state machines from regular languages. Ragel targets C, C++, Objective-C, D, Java and Ruby. Ragel state machines can not only recognize byte sequences as regular expression machines do, but can also execute code at arbitrary points in the recognition of a regular language.

like image 100
Nat Avatar answered Sep 21 '22 10:09

Nat


Please refer to the answer I gave to this question, SMC can also generate C++ code. I can't comment on the quality of the generated C++ but for C# it's satisfactory.

like image 40
Bas Bossink Avatar answered Sep 23 '22 10:09

Bas Bossink