breily / states

Ruby library for creating finite state machines

This URL has Read+Write access

states / states.h
100644 22 lines (14 sloc) 0.252 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef STATES_H
#define STATES_H
 
typedef struct transition TRANS;
typedef struct state STATE;
 
struct transition {
    int input;
    state *next;
};
 
struct state {
    int id;
    transition **exits;
};
 
 
 
state *next(state *a, int input);
 
#endif