nabaztag_hack_kit 0.1.0.beta3 → 0.1.0.beta8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +7 -2
- data/.gitmodules +3 -0
- data/.travis.yml +2 -2
- data/CHANGELOG.md +17 -2
- data/LICENSE +21 -0
- data/README.md +115 -44
- data/Rakefile +2 -6
- data/bytecode/{Commands.md → _docs/commands.md} +0 -0
- data/bytecode/{Docs.md → _docs/grammar.md} +0 -0
- data/bytecode/_docs/grammar.pdf +0 -0
- data/bytecode/{src → _original}/README.md +0 -0
- data/bytecode/{src → _original}/lib/arp.mtl +0 -0
- data/bytecode/{src → _original}/lib/cfg.mtl +0 -0
- data/bytecode/{src → _original}/lib/choreos.mtl +0 -0
- data/bytecode/{src → _original}/lib/dhcp.mtl +0 -0
- data/bytecode/{src → _original}/lib/dns.mtl +0 -0
- data/bytecode/{src → _original}/lib/http.mtl +0 -0
- data/bytecode/{src → _original}/lib/tcp.mtl +0 -0
- data/bytecode/{src → _original}/lib/udp.mtl +0 -0
- data/bytecode/{src → _original}/lib/util.mtl +0 -0
- data/bytecode/{src → _original}/lib/var.mtl +0 -0
- data/bytecode/{src → _original}/lib/wav.mtl +0 -0
- data/bytecode/{src → _original}/lib/wifi.mtl +0 -0
- data/bytecode/{src → _original}/nominal-ping.mtl +0 -0
- data/bytecode/main.mtl +11 -11
- data/bytecode/test/test.mtl +8 -8
- data/examples/basic/Gemfile +1 -3
- data/examples/basic/config.ru +14 -4
- data/examples/record/Gemfile +0 -5
- data/examples/record/{config.ru.example → config.ru} +2 -2
- data/examples/record/server.rb +0 -2
- data/ext/Makefile +10 -0
- data/ext/bin/mtl_comp +29 -0
- data/{bytecode → ext}/bin/mtl_merge +0 -0
- data/ext/bin/mtl_simu +29 -0
- data/{bytecode/src/mtl → ext}/extconf.rb +0 -0
- data/ext/mtl_linux/.gitignore +7 -0
- data/ext/mtl_linux/LICENSE +21 -0
- data/ext/mtl_linux/Makefile +116 -0
- data/ext/mtl_linux/MetalC.project +196 -0
- data/ext/mtl_linux/conf.bin +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux}/conf.bin.sans_password +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux}/config.txt +0 -0
- data/ext/mtl_linux/inc/log.h +21 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc}/properties.h +0 -0
- data/{bytecode/src/mtl/linux_simuaudio.h → ext/mtl_linux/inc/simu/linux/simuaudio.h} +0 -0
- data/{bytecode/src/mtl/linux_simunet.h → ext/mtl_linux/inc/simu/linux/simunet.h} +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc/simu/win}/simuaudio.h +18 -18
- data/{bytecode/src/mtl → ext/mtl_linux/inc/simu/win}/simunet.h +0 -0
- data/ext/mtl_linux/inc/vcomp/compiler.h +200 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/file.h +11 -11
- data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/filesystem.h +0 -0
- data/ext/mtl_linux/inc/vcomp/interpreter.h +121 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/memory.h +120 -92
- data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/param.h +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/parser.h +27 -27
- data/ext/mtl_linux/inc/vcomp/prodbuffer.h +42 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/resource.h +1 -1
- data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/terminal.h +8 -8
- data/{bytecode/src/mtl → ext/mtl_linux/inc}/vcomp/util.h +7 -7
- data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vaudio.h +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vbc.h +1 -1
- data/ext/mtl_linux/inc/vm/vbc_str.h +167 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vinterp.h +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vloader.h +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vlog.h +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vmem.h +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux/inc/vm}/vnet.h +0 -0
- data/ext/mtl_linux/nominal.mtl +3959 -0
- data/ext/mtl_linux/src/comp/main.cpp +123 -0
- data/ext/mtl_linux/src/simu/dumpbc.c +2566 -0
- data/ext/mtl_linux/src/simu/linux/main.cpp +288 -0
- data/ext/mtl_linux/src/simu/linux/simu.c +309 -0
- data/ext/mtl_linux/src/simu/linux/simuaudio.c +44 -0
- data/ext/mtl_linux/src/simu/linux/simunet.c +707 -0
- data/ext/mtl_linux/src/simu/log.c +340 -0
- data/ext/mtl_linux/src/simu/properties.c +368 -0
- data/{bytecode/src/mtl → ext/mtl_linux/src/simu/win}/mp3/GTKANAL.H +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux/src/simu/win}/mp3/LAYER3.C +0 -0
- data/{bytecode/src/mtl → ext/mtl_linux/src/simu/win}/mp3/TABINIT.C +0 -0
- data/ext/mtl_linux/src/simu/win/mp3/common.c +302 -0
- data/ext/mtl_linux/src/simu/win/mp3/dct64_i386.c +316 -0
- data/ext/mtl_linux/src/simu/win/mp3/decode_i386.c +160 -0
- data/ext/mtl_linux/src/simu/win/mp3/huffman.h +332 -0
- data/ext/mtl_linux/src/simu/win/mp3/interface.c +276 -0
- data/{bytecode/src/mtl → ext/mtl_linux/src/simu/win}/mp3/mpg123.h +34 -30
- data/ext/mtl_linux/src/simu/win/mp3/mpglib.h +47 -0
- data/ext/mtl_linux/src/simu/win/simu.c +819 -0
- data/ext/mtl_linux/src/simu/win/simuaudio.c +787 -0
- data/ext/mtl_linux/src/simu/win/simunet.c +489 -0
- data/ext/mtl_linux/src/vcomp/bootstrap.cpp +95 -0
- data/ext/mtl_linux/src/vcomp/compiler.cpp +587 -0
- data/ext/mtl_linux/src/vcomp/compiler_file.cpp +1253 -0
- data/ext/mtl_linux/src/vcomp/compiler_prog.cpp +437 -0
- data/ext/mtl_linux/src/vcomp/compiler_term.cpp +1500 -0
- data/ext/mtl_linux/src/vcomp/compiler_type.cpp +1238 -0
- data/ext/mtl_linux/src/vcomp/compiler_var.cpp +502 -0
- data/ext/mtl_linux/src/vcomp/file.cpp +100 -0
- data/ext/mtl_linux/src/vcomp/interpreter.cpp +93 -0
- data/ext/mtl_linux/src/vcomp/memory.cpp +313 -0
- data/ext/mtl_linux/src/vcomp/parser.cpp +584 -0
- data/ext/mtl_linux/src/vcomp/parser_xml.cpp +137 -0
- data/{bytecode/src/mtl → ext/mtl_linux/src}/vcomp/prodbuffer.cpp +57 -36
- data/ext/mtl_linux/src/vcomp/stdlib_core.cpp +130 -0
- data/ext/mtl_linux/src/vcomp/terminal.cpp +80 -0
- data/{bytecode/src/mtl → ext/mtl_linux/src}/vcomp/util.cpp +18 -11
- data/ext/mtl_linux/src/vm/vaudio.c +830 -0
- data/ext/mtl_linux/src/vm/vinterp.c +1780 -0
- data/ext/mtl_linux/src/vm/vloader.c +139 -0
- data/ext/mtl_linux/src/vm/vlog.c +782 -0
- data/ext/mtl_linux/src/vm/vmem.c +461 -0
- data/ext/mtl_linux/src/vm/vnet.c +298 -0
- data/{bytecode/src/mtl → ext/mtl_linux}/utils/correct_const.sh +0 -0
- data/lib/nabaztag_hack_kit/server.rb +4 -7
- data/lib/nabaztag_hack_kit/version.rb +1 -1
- data/lib/nabaztag_hack_kit.rb +2 -2
- data/nabaztag_hack_kit.gemspec +10 -11
- data/spec/integration/server_spec.rb +3 -3
- data/spec/spec_helper.rb +2 -0
- data/spec/unit/message_spec.rb +12 -18
- data/spec/unit/server_spec.rb +13 -10
- metadata +145 -137
- data/bytecode/bin/mtl_comp +0 -50
- data/bytecode/bin/mtl_simu +0 -49
- data/bytecode/src/mtl/Makefile +0 -42
- data/bytecode/src/mtl/README.md +0 -13
- data/bytecode/src/mtl/bc.cpp +0 -1891
- data/bytecode/src/mtl/dumpbc.c +0 -2566
- data/bytecode/src/mtl/linux_simu.c +0 -271
- data/bytecode/src/mtl/linux_simuaudio.c +0 -16
- data/bytecode/src/mtl/linux_simunet.c +0 -620
- data/bytecode/src/mtl/log.c +0 -297
- data/bytecode/src/mtl/log.h +0 -20
- data/bytecode/src/mtl/main_compiler.cpp +0 -104
- data/bytecode/src/mtl/main_simu.cpp +0 -221
- data/bytecode/src/mtl/mp3/common.c +0 -265
- data/bytecode/src/mtl/mp3/dct64_i386.c +0 -316
- data/bytecode/src/mtl/mp3/decode_i386.c +0 -155
- data/bytecode/src/mtl/mp3/huffman.h +0 -332
- data/bytecode/src/mtl/mp3/interface.c +0 -258
- data/bytecode/src/mtl/mp3/mpglib.h +0 -44
- data/bytecode/src/mtl/properties.c +0 -293
- data/bytecode/src/mtl/simu.c +0 -750
- data/bytecode/src/mtl/simuaudio.c +0 -662
- data/bytecode/src/mtl/simunet.c +0 -400
- data/bytecode/src/mtl/vaudio.c +0 -677
- data/bytecode/src/mtl/vbc_str.h +0 -166
- data/bytecode/src/mtl/vcomp/Makefile +0 -29
- data/bytecode/src/mtl/vcomp/bootstrap.cpp +0 -89
- data/bytecode/src/mtl/vcomp/compiler.cpp +0 -470
- data/bytecode/src/mtl/vcomp/compiler.h +0 -200
- data/bytecode/src/mtl/vcomp/compiler_file.cpp +0 -929
- data/bytecode/src/mtl/vcomp/compiler_prog.cpp +0 -250
- data/bytecode/src/mtl/vcomp/compiler_term.cpp +0 -1053
- data/bytecode/src/mtl/vcomp/compiler_type.cpp +0 -872
- data/bytecode/src/mtl/vcomp/compiler_var.cpp +0 -289
- data/bytecode/src/mtl/vcomp/file.cpp +0 -79
- data/bytecode/src/mtl/vcomp/interpreter.cpp +0 -85
- data/bytecode/src/mtl/vcomp/interpreter.h +0 -121
- data/bytecode/src/mtl/vcomp/memory.cpp +0 -241
- data/bytecode/src/mtl/vcomp/parser.cpp +0 -427
- data/bytecode/src/mtl/vcomp/parser_xml.cpp +0 -124
- data/bytecode/src/mtl/vcomp/prodbuffer.h +0 -42
- data/bytecode/src/mtl/vcomp/stdlib_core.cpp +0 -122
- data/bytecode/src/mtl/vcomp/terminal.cpp +0 -73
- data/bytecode/src/mtl/vinterp.c +0 -1349
- data/bytecode/src/mtl/vloader.c +0 -127
- data/bytecode/src/mtl/vlog.c +0 -589
- data/bytecode/src/mtl/vmem.c +0 -424
- data/bytecode/src/mtl/vnet.c +0 -255
- data/examples/basic/Procfile +0 -2
- data/examples/basic/server.rb +0 -14
@@ -0,0 +1,167 @@
|
|
1
|
+
// VLISP Virtual Machine - 2006 - by Sylvain Huet
|
2
|
+
// Lowcost IS Powerfull
|
3
|
+
|
4
|
+
#ifndef VBC_STR_H_
|
5
|
+
# define VBC_STR_H_
|
6
|
+
|
7
|
+
// cette table ne sert qu'� l'affichage du bytecode dans la console
|
8
|
+
#define MaxOpcode 153
|
9
|
+
const char* strbytecod[MaxOpcode]=
|
10
|
+
{
|
11
|
+
"exec",
|
12
|
+
"ret",
|
13
|
+
"intb",
|
14
|
+
"int",
|
15
|
+
"nil",
|
16
|
+
"drop",
|
17
|
+
"dup",
|
18
|
+
"getlocalb",
|
19
|
+
"getlocal",
|
20
|
+
"add",
|
21
|
+
"sub",
|
22
|
+
"mul",
|
23
|
+
"div",
|
24
|
+
"mod",
|
25
|
+
"and",
|
26
|
+
"or",
|
27
|
+
"eor",
|
28
|
+
"shl",
|
29
|
+
"shr",
|
30
|
+
"neg",
|
31
|
+
"not",
|
32
|
+
"non",
|
33
|
+
"eq",
|
34
|
+
"ne",
|
35
|
+
"lt",
|
36
|
+
"gt",
|
37
|
+
"le",
|
38
|
+
"ge",
|
39
|
+
"goto",
|
40
|
+
"else",
|
41
|
+
"mktabb",
|
42
|
+
"mktab",
|
43
|
+
"deftabb",
|
44
|
+
"deftab",
|
45
|
+
"fetchb",
|
46
|
+
"fetch",
|
47
|
+
"getglobalb",
|
48
|
+
"getglobal",
|
49
|
+
"Secho",
|
50
|
+
"Iecho",
|
51
|
+
"setlocalb",
|
52
|
+
"setlocal",
|
53
|
+
"setglobal",
|
54
|
+
"setstructb",
|
55
|
+
"setstruct",
|
56
|
+
"hd",
|
57
|
+
"tl",
|
58
|
+
"setlocal2",
|
59
|
+
"store",
|
60
|
+
"call",
|
61
|
+
"callrb",
|
62
|
+
"callr",
|
63
|
+
"first",
|
64
|
+
"time_ms",
|
65
|
+
"tabnew",
|
66
|
+
"fixarg",
|
67
|
+
"abs",
|
68
|
+
"max",
|
69
|
+
"min",
|
70
|
+
"rand",
|
71
|
+
"srand",
|
72
|
+
"time",
|
73
|
+
"strnew",
|
74
|
+
"strset",
|
75
|
+
"strcpy",
|
76
|
+
"vstrcmp",
|
77
|
+
"strfind",
|
78
|
+
"strfindrev",
|
79
|
+
"strlen",
|
80
|
+
"strget",
|
81
|
+
"strsub",
|
82
|
+
"strcat",
|
83
|
+
"tablen",
|
84
|
+
"strcatlist",
|
85
|
+
"led",
|
86
|
+
"motorset",
|
87
|
+
"motorget",
|
88
|
+
"button2",
|
89
|
+
"button3",
|
90
|
+
"playStart",
|
91
|
+
"playFeed",
|
92
|
+
"playStop",
|
93
|
+
"load",
|
94
|
+
"udpStart",
|
95
|
+
"udpCb",
|
96
|
+
"udpStop",
|
97
|
+
"udpSend",
|
98
|
+
"gc",
|
99
|
+
"tcpOpen",
|
100
|
+
"tcpClose",
|
101
|
+
"tcpSend",
|
102
|
+
"tcpCb",
|
103
|
+
"save",
|
104
|
+
"bytecode",
|
105
|
+
"loopcb",
|
106
|
+
"Iecholn",
|
107
|
+
"Secholn",
|
108
|
+
"tcpListen",
|
109
|
+
"envget",
|
110
|
+
"envset",
|
111
|
+
"sndVol",
|
112
|
+
"rfidGet",
|
113
|
+
"playTime",
|
114
|
+
"netCb",
|
115
|
+
"netSend",
|
116
|
+
"netState",
|
117
|
+
"netMac",
|
118
|
+
"netChk",
|
119
|
+
"netSetmode",
|
120
|
+
"netScan",
|
121
|
+
"netAuth",
|
122
|
+
"recStart",
|
123
|
+
"recStop",
|
124
|
+
"recVol",
|
125
|
+
"netSeqAdd",
|
126
|
+
"strgetword",
|
127
|
+
"strputword",
|
128
|
+
"atoi",
|
129
|
+
"htoi",
|
130
|
+
"itoa",
|
131
|
+
"ctoa",
|
132
|
+
"itoh",
|
133
|
+
"ctoh",
|
134
|
+
"itobin2",
|
135
|
+
"listswitch",
|
136
|
+
"listswitchstr",
|
137
|
+
"sndRefresh",
|
138
|
+
"sndWrite",
|
139
|
+
"sndRead",
|
140
|
+
"sndFeed",
|
141
|
+
"sndAmpli",
|
142
|
+
"corePP",
|
143
|
+
"corePush",
|
144
|
+
"corePull",
|
145
|
+
"coreBit0",
|
146
|
+
"tcpEnable",
|
147
|
+
"reboot",
|
148
|
+
"strcmp",
|
149
|
+
"adp2wav",
|
150
|
+
"wav2adp",
|
151
|
+
"alaw2wav",
|
152
|
+
"wav2alaw",
|
153
|
+
"netPmk",
|
154
|
+
"flashFirmware",
|
155
|
+
"crypt",
|
156
|
+
"uncrypt",
|
157
|
+
"netRssi",
|
158
|
+
"rfidGetList",
|
159
|
+
"rfidRead",
|
160
|
+
"rfidWrite",
|
161
|
+
"i2cRead",
|
162
|
+
"i2cWrite",
|
163
|
+
"strright"
|
164
|
+
};
|
165
|
+
|
166
|
+
#endif // ! VBC_STR_H_
|
167
|
+
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|