[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: FSM table in lua
- From: romeo kalebic <romeo.kalebic@...>
- Date: Tue, 16 May 2000 10:16:02 +0200
I'm new to lua but from my first tests it is like to be great
I'm learning lua with small fsm machine built in C and all actions are
built in lua.
FSM is described with: old_state, event, new_state and action.
state1, event1, state2, action1
state1, event2, state3, action2
So: if in state1 there is event1 fsm execute action action1 and goes to
With this architecture I can easily change all actions, just change
But to change whole fsm i have to change fsm.c file where fsm is
described and recompile.
Now, I like to describe fsm in lua, maybe in lua table or ?.
Then, I will dynamically build fsm transition table in my main C
program and maybe destroy lua table to not waste memory.
So, this is what I like to do, but I don't know how to do that.
I'm looking for help from this group.
Best Regards, Romeo