-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhsm_statechart-0.5-1.rockspec
55 lines (47 loc) · 1.65 KB
/
hsm_statechart-0.5-1.rockspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package = "hsm_statechart"
version = "0.5-1"
source = {
url = "http://hsm-statechart.googlecode.com/hg/zips/hsm_statechart-0.5.tar.gz"
}
description = {
summary = "State machine engine based on UML statecharts.",
maintainer = "ionous",
detailed = [[
hsm-statechart is a hierarchical statechart engine, written in C.
The Lua extension makes it dead simple to write statemachines:
you just declare a table.
chart = { state= { event= function() end, substate={ ... } } }
Both event handlers and states are key:value pairs.
Event names map to functions ( or, for simple transitions, directly to a state name ),
while states names map to sub-tables.
After defining a statechart, two calls: hsm= hsm_statechart( chart ) and hsm.signal( event_name )
are all that are need to run the statemachine.
Statemachines can be used for everything from building roboust text parsers,
to managing the control flow for applications, or even writing AI in games.
]],
homepage = "http://code.google.com/p/hsm-statechart/",
license = "New BSD License"
}
dependencies = {
"lua >= 5.1"
-- If you depend on other rocks, add them here
}
build = {
type= "builtin",
copy_directories = {"samples/hula/"},
modules = {
-- note: the module is the dll name
hsm_statechart = {
sources= {
"hsm/hsm_context.c",
"hsm/hsm_machine.c",
"hsm/builder/hash.c",
"hsm/builder/lower.c",
"hsm/builder/hsm_builder.c",
"hsm/hula/hula.c",
"hsm/hula/hula_lib.c",
},
incdirs= {"."},
},
},
}