ndtypes 0.2.0dev4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CONTRIBUTING.md +50 -0
- data/Gemfile +2 -0
- data/History.md +0 -0
- data/README.md +19 -0
- data/Rakefile +125 -0
- data/ext/ruby_ndtypes/extconf.rb +55 -0
- data/ext/ruby_ndtypes/gc_guard.c +36 -0
- data/ext/ruby_ndtypes/gc_guard.h +12 -0
- data/ext/ruby_ndtypes/ndtypes/AUTHORS.txt +5 -0
- data/ext/ruby_ndtypes/ndtypes/INSTALL.txt +101 -0
- data/ext/ruby_ndtypes/ndtypes/LICENSE.txt +29 -0
- data/ext/ruby_ndtypes/ndtypes/MANIFEST.in +3 -0
- data/ext/ruby_ndtypes/ndtypes/Makefile.in +87 -0
- data/ext/ruby_ndtypes/ndtypes/README.rst +47 -0
- data/ext/ruby_ndtypes/ndtypes/config.guess +1530 -0
- data/ext/ruby_ndtypes/ndtypes/config.h.in +67 -0
- data/ext/ruby_ndtypes/ndtypes/config.sub +1782 -0
- data/ext/ruby_ndtypes/ndtypes/configure +5260 -0
- data/ext/ruby_ndtypes/ndtypes/configure.ac +161 -0
- data/ext/ruby_ndtypes/ndtypes/doc/Makefile +14 -0
- data/ext/ruby_ndtypes/ndtypes/doc/_static/copybutton.js +66 -0
- data/ext/ruby_ndtypes/ndtypes/doc/conf.py +26 -0
- data/ext/ruby_ndtypes/ndtypes/doc/grammar/grammar.rst +27 -0
- data/ext/ruby_ndtypes/ndtypes/doc/index.rst +56 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/context.rst +131 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/encodings.rst +68 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/fields-values.rst +175 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/functions.rst +72 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/index.rst +43 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/init.rst +48 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/io.rst +100 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/memory.rst +124 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/predicates.rst +110 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/typedef.rst +31 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/types.rst +594 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/util.rst +166 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/buffer-protocol.rst +27 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/index.rst +21 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/pattern-matching.rst +330 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/quickstart.rst +144 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/types.rst +544 -0
- data/ext/ruby_ndtypes/ndtypes/doc/releases/index.rst +35 -0
- data/ext/ruby_ndtypes/ndtypes/install-sh +527 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.in +271 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.vc +269 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/alloc.c +230 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.c +268 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.h +109 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile.in +73 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile.vc +70 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/README.txt +16 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.c +2179 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.h +134 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.y +428 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.c +2543 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.h +735 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.l +176 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.c +543 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.c +110 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/context.c +228 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/copy.c +634 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/encodings.c +116 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/equal.c +288 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.c +3067 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.h +180 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.y +417 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/io.c +1658 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.c +2773 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.h +734 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.l +222 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/match.c +1132 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.c +2323 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h.in +893 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/overflow.h +161 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.c +473 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.h +92 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parser.c +246 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.c +269 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.h +197 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile.in +48 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile.vc +46 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.c +1007 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.c +442 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/slice.h +42 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.c +238 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.h +50 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.c +371 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.h +100 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.in +55 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.vc +45 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/alloc_fail.c +82 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/alloc_fail.h +49 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/runtest.c +1657 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test.h +85 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_array.c +115 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_buffer.c +137 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_indent.c +201 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_match.c +2397 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_numba.c +57 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse.c +349 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_error.c +27839 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_roundtrip.c +350 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_record.c +231 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typecheck.c +375 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typedef.c +65 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/valgrind.supp +30 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/bench.c +79 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/indent.c +94 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/print_ast.c +96 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/util.c +474 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/values.c +228 -0
- data/ext/ruby_ndtypes/ndtypes/python/bench.py +49 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndt_randtype.py +409 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndt_support.py +14 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/__init__.py +70 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/_ndtypes.c +1332 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/docstrings.h +319 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/pyndtypes.h +154 -0
- data/ext/ruby_ndtypes/ndtypes/python/test_ndtypes.py +1977 -0
- data/ext/ruby_ndtypes/ndtypes/setup.py +288 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/INSTALL.txt +41 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/runtest32.bat +15 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/runtest64.bat +13 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcbuild32.bat +38 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcbuild64.bat +38 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcclean.bat +13 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcdistclean.bat +14 -0
- data/ext/ruby_ndtypes/ruby_ndtypes.c +1003 -0
- data/ext/ruby_ndtypes/ruby_ndtypes.h +37 -0
- data/ext/ruby_ndtypes/ruby_ndtypes_internal.h +28 -0
- data/lib/ndtypes.rb +45 -0
- data/lib/ndtypes/errors.rb +2 -0
- data/lib/ndtypes/version.rb +6 -0
- data/ndtypes.gemspec +47 -0
- data/spec/gc_table_spec.rb +10 -0
- data/spec/ndtypes_spec.rb +289 -0
- data/spec/spec_helper.rb +241 -0
- metadata +242 -0
@@ -0,0 +1,735 @@
|
|
1
|
+
#ifndef ndt_bpHEADER_H
|
2
|
+
#define ndt_bpHEADER_H 1
|
3
|
+
#define ndt_bpIN_HEADER 1
|
4
|
+
|
5
|
+
#line 5 "bplexer.h"
|
6
|
+
|
7
|
+
#line 7 "bplexer.h"
|
8
|
+
|
9
|
+
#define YY_INT_ALIGNED short int
|
10
|
+
|
11
|
+
/* A lexical scanner generated by flex */
|
12
|
+
|
13
|
+
#define FLEX_SCANNER
|
14
|
+
#define YY_FLEX_MAJOR_VERSION 2
|
15
|
+
#define YY_FLEX_MINOR_VERSION 6
|
16
|
+
#define YY_FLEX_SUBMINOR_VERSION 4
|
17
|
+
#if YY_FLEX_SUBMINOR_VERSION > 0
|
18
|
+
#define FLEX_BETA
|
19
|
+
#endif
|
20
|
+
|
21
|
+
#ifdef yy_create_buffer
|
22
|
+
#define ndt_bp_create_buffer_ALREADY_DEFINED
|
23
|
+
#else
|
24
|
+
#define yy_create_buffer ndt_bp_create_buffer
|
25
|
+
#endif
|
26
|
+
|
27
|
+
#ifdef yy_delete_buffer
|
28
|
+
#define ndt_bp_delete_buffer_ALREADY_DEFINED
|
29
|
+
#else
|
30
|
+
#define yy_delete_buffer ndt_bp_delete_buffer
|
31
|
+
#endif
|
32
|
+
|
33
|
+
#ifdef yy_scan_buffer
|
34
|
+
#define ndt_bp_scan_buffer_ALREADY_DEFINED
|
35
|
+
#else
|
36
|
+
#define yy_scan_buffer ndt_bp_scan_buffer
|
37
|
+
#endif
|
38
|
+
|
39
|
+
#ifdef yy_scan_string
|
40
|
+
#define ndt_bp_scan_string_ALREADY_DEFINED
|
41
|
+
#else
|
42
|
+
#define yy_scan_string ndt_bp_scan_string
|
43
|
+
#endif
|
44
|
+
|
45
|
+
#ifdef yy_scan_bytes
|
46
|
+
#define ndt_bp_scan_bytes_ALREADY_DEFINED
|
47
|
+
#else
|
48
|
+
#define yy_scan_bytes ndt_bp_scan_bytes
|
49
|
+
#endif
|
50
|
+
|
51
|
+
#ifdef yy_init_buffer
|
52
|
+
#define ndt_bp_init_buffer_ALREADY_DEFINED
|
53
|
+
#else
|
54
|
+
#define yy_init_buffer ndt_bp_init_buffer
|
55
|
+
#endif
|
56
|
+
|
57
|
+
#ifdef yy_flush_buffer
|
58
|
+
#define ndt_bp_flush_buffer_ALREADY_DEFINED
|
59
|
+
#else
|
60
|
+
#define yy_flush_buffer ndt_bp_flush_buffer
|
61
|
+
#endif
|
62
|
+
|
63
|
+
#ifdef yy_load_buffer_state
|
64
|
+
#define ndt_bp_load_buffer_state_ALREADY_DEFINED
|
65
|
+
#else
|
66
|
+
#define yy_load_buffer_state ndt_bp_load_buffer_state
|
67
|
+
#endif
|
68
|
+
|
69
|
+
#ifdef yy_switch_to_buffer
|
70
|
+
#define ndt_bp_switch_to_buffer_ALREADY_DEFINED
|
71
|
+
#else
|
72
|
+
#define yy_switch_to_buffer ndt_bp_switch_to_buffer
|
73
|
+
#endif
|
74
|
+
|
75
|
+
#ifdef yypush_buffer_state
|
76
|
+
#define ndt_bppush_buffer_state_ALREADY_DEFINED
|
77
|
+
#else
|
78
|
+
#define yypush_buffer_state ndt_bppush_buffer_state
|
79
|
+
#endif
|
80
|
+
|
81
|
+
#ifdef yypop_buffer_state
|
82
|
+
#define ndt_bppop_buffer_state_ALREADY_DEFINED
|
83
|
+
#else
|
84
|
+
#define yypop_buffer_state ndt_bppop_buffer_state
|
85
|
+
#endif
|
86
|
+
|
87
|
+
#ifdef yyensure_buffer_stack
|
88
|
+
#define ndt_bpensure_buffer_stack_ALREADY_DEFINED
|
89
|
+
#else
|
90
|
+
#define yyensure_buffer_stack ndt_bpensure_buffer_stack
|
91
|
+
#endif
|
92
|
+
|
93
|
+
#ifdef yylex
|
94
|
+
#define ndt_bplex_ALREADY_DEFINED
|
95
|
+
#else
|
96
|
+
#define yylex ndt_bplex
|
97
|
+
#endif
|
98
|
+
|
99
|
+
#ifdef yyrestart
|
100
|
+
#define ndt_bprestart_ALREADY_DEFINED
|
101
|
+
#else
|
102
|
+
#define yyrestart ndt_bprestart
|
103
|
+
#endif
|
104
|
+
|
105
|
+
#ifdef yylex_init
|
106
|
+
#define ndt_bplex_init_ALREADY_DEFINED
|
107
|
+
#else
|
108
|
+
#define yylex_init ndt_bplex_init
|
109
|
+
#endif
|
110
|
+
|
111
|
+
#ifdef yylex_init_extra
|
112
|
+
#define ndt_bplex_init_extra_ALREADY_DEFINED
|
113
|
+
#else
|
114
|
+
#define yylex_init_extra ndt_bplex_init_extra
|
115
|
+
#endif
|
116
|
+
|
117
|
+
#ifdef yylex_destroy
|
118
|
+
#define ndt_bplex_destroy_ALREADY_DEFINED
|
119
|
+
#else
|
120
|
+
#define yylex_destroy ndt_bplex_destroy
|
121
|
+
#endif
|
122
|
+
|
123
|
+
#ifdef yyget_debug
|
124
|
+
#define ndt_bpget_debug_ALREADY_DEFINED
|
125
|
+
#else
|
126
|
+
#define yyget_debug ndt_bpget_debug
|
127
|
+
#endif
|
128
|
+
|
129
|
+
#ifdef yyset_debug
|
130
|
+
#define ndt_bpset_debug_ALREADY_DEFINED
|
131
|
+
#else
|
132
|
+
#define yyset_debug ndt_bpset_debug
|
133
|
+
#endif
|
134
|
+
|
135
|
+
#ifdef yyget_extra
|
136
|
+
#define ndt_bpget_extra_ALREADY_DEFINED
|
137
|
+
#else
|
138
|
+
#define yyget_extra ndt_bpget_extra
|
139
|
+
#endif
|
140
|
+
|
141
|
+
#ifdef yyset_extra
|
142
|
+
#define ndt_bpset_extra_ALREADY_DEFINED
|
143
|
+
#else
|
144
|
+
#define yyset_extra ndt_bpset_extra
|
145
|
+
#endif
|
146
|
+
|
147
|
+
#ifdef yyget_in
|
148
|
+
#define ndt_bpget_in_ALREADY_DEFINED
|
149
|
+
#else
|
150
|
+
#define yyget_in ndt_bpget_in
|
151
|
+
#endif
|
152
|
+
|
153
|
+
#ifdef yyset_in
|
154
|
+
#define ndt_bpset_in_ALREADY_DEFINED
|
155
|
+
#else
|
156
|
+
#define yyset_in ndt_bpset_in
|
157
|
+
#endif
|
158
|
+
|
159
|
+
#ifdef yyget_out
|
160
|
+
#define ndt_bpget_out_ALREADY_DEFINED
|
161
|
+
#else
|
162
|
+
#define yyget_out ndt_bpget_out
|
163
|
+
#endif
|
164
|
+
|
165
|
+
#ifdef yyset_out
|
166
|
+
#define ndt_bpset_out_ALREADY_DEFINED
|
167
|
+
#else
|
168
|
+
#define yyset_out ndt_bpset_out
|
169
|
+
#endif
|
170
|
+
|
171
|
+
#ifdef yyget_leng
|
172
|
+
#define ndt_bpget_leng_ALREADY_DEFINED
|
173
|
+
#else
|
174
|
+
#define yyget_leng ndt_bpget_leng
|
175
|
+
#endif
|
176
|
+
|
177
|
+
#ifdef yyget_text
|
178
|
+
#define ndt_bpget_text_ALREADY_DEFINED
|
179
|
+
#else
|
180
|
+
#define yyget_text ndt_bpget_text
|
181
|
+
#endif
|
182
|
+
|
183
|
+
#ifdef yyget_lineno
|
184
|
+
#define ndt_bpget_lineno_ALREADY_DEFINED
|
185
|
+
#else
|
186
|
+
#define yyget_lineno ndt_bpget_lineno
|
187
|
+
#endif
|
188
|
+
|
189
|
+
#ifdef yyset_lineno
|
190
|
+
#define ndt_bpset_lineno_ALREADY_DEFINED
|
191
|
+
#else
|
192
|
+
#define yyset_lineno ndt_bpset_lineno
|
193
|
+
#endif
|
194
|
+
|
195
|
+
#ifdef yyget_column
|
196
|
+
#define ndt_bpget_column_ALREADY_DEFINED
|
197
|
+
#else
|
198
|
+
#define yyget_column ndt_bpget_column
|
199
|
+
#endif
|
200
|
+
|
201
|
+
#ifdef yyset_column
|
202
|
+
#define ndt_bpset_column_ALREADY_DEFINED
|
203
|
+
#else
|
204
|
+
#define yyset_column ndt_bpset_column
|
205
|
+
#endif
|
206
|
+
|
207
|
+
#ifdef yywrap
|
208
|
+
#define ndt_bpwrap_ALREADY_DEFINED
|
209
|
+
#else
|
210
|
+
#define yywrap ndt_bpwrap
|
211
|
+
#endif
|
212
|
+
|
213
|
+
#ifdef yyget_lval
|
214
|
+
#define ndt_bpget_lval_ALREADY_DEFINED
|
215
|
+
#else
|
216
|
+
#define yyget_lval ndt_bpget_lval
|
217
|
+
#endif
|
218
|
+
|
219
|
+
#ifdef yyset_lval
|
220
|
+
#define ndt_bpset_lval_ALREADY_DEFINED
|
221
|
+
#else
|
222
|
+
#define yyset_lval ndt_bpset_lval
|
223
|
+
#endif
|
224
|
+
|
225
|
+
#ifdef yyget_lloc
|
226
|
+
#define ndt_bpget_lloc_ALREADY_DEFINED
|
227
|
+
#else
|
228
|
+
#define yyget_lloc ndt_bpget_lloc
|
229
|
+
#endif
|
230
|
+
|
231
|
+
#ifdef yyset_lloc
|
232
|
+
#define ndt_bpset_lloc_ALREADY_DEFINED
|
233
|
+
#else
|
234
|
+
#define yyset_lloc ndt_bpset_lloc
|
235
|
+
#endif
|
236
|
+
|
237
|
+
#ifdef yyalloc
|
238
|
+
#define ndt_bpalloc_ALREADY_DEFINED
|
239
|
+
#else
|
240
|
+
#define yyalloc ndt_bpalloc
|
241
|
+
#endif
|
242
|
+
|
243
|
+
#ifdef yyrealloc
|
244
|
+
#define ndt_bprealloc_ALREADY_DEFINED
|
245
|
+
#else
|
246
|
+
#define yyrealloc ndt_bprealloc
|
247
|
+
#endif
|
248
|
+
|
249
|
+
#ifdef yyfree
|
250
|
+
#define ndt_bpfree_ALREADY_DEFINED
|
251
|
+
#else
|
252
|
+
#define yyfree ndt_bpfree
|
253
|
+
#endif
|
254
|
+
|
255
|
+
/* First, we deal with platform-specific or compiler-specific issues. */
|
256
|
+
|
257
|
+
/* begin standard C headers. */
|
258
|
+
#include <stdio.h>
|
259
|
+
#include <string.h>
|
260
|
+
#include <errno.h>
|
261
|
+
#include <stdlib.h>
|
262
|
+
|
263
|
+
/* end standard C headers. */
|
264
|
+
|
265
|
+
/* flex integer type definitions */
|
266
|
+
|
267
|
+
#ifndef FLEXINT_H
|
268
|
+
#define FLEXINT_H
|
269
|
+
|
270
|
+
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
271
|
+
|
272
|
+
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
273
|
+
|
274
|
+
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
275
|
+
* if you want the limit (max/min) macros for int types.
|
276
|
+
*/
|
277
|
+
#ifndef __STDC_LIMIT_MACROS
|
278
|
+
#define __STDC_LIMIT_MACROS 1
|
279
|
+
#endif
|
280
|
+
|
281
|
+
#include <inttypes.h>
|
282
|
+
typedef int8_t flex_int8_t;
|
283
|
+
typedef uint8_t flex_uint8_t;
|
284
|
+
typedef int16_t flex_int16_t;
|
285
|
+
typedef uint16_t flex_uint16_t;
|
286
|
+
typedef int32_t flex_int32_t;
|
287
|
+
typedef uint32_t flex_uint32_t;
|
288
|
+
#else
|
289
|
+
typedef signed char flex_int8_t;
|
290
|
+
typedef short int flex_int16_t;
|
291
|
+
typedef int flex_int32_t;
|
292
|
+
typedef unsigned char flex_uint8_t;
|
293
|
+
typedef unsigned short int flex_uint16_t;
|
294
|
+
typedef unsigned int flex_uint32_t;
|
295
|
+
|
296
|
+
/* Limits of integral types. */
|
297
|
+
#ifndef INT8_MIN
|
298
|
+
#define INT8_MIN (-128)
|
299
|
+
#endif
|
300
|
+
#ifndef INT16_MIN
|
301
|
+
#define INT16_MIN (-32767-1)
|
302
|
+
#endif
|
303
|
+
#ifndef INT32_MIN
|
304
|
+
#define INT32_MIN (-2147483647-1)
|
305
|
+
#endif
|
306
|
+
#ifndef INT8_MAX
|
307
|
+
#define INT8_MAX (127)
|
308
|
+
#endif
|
309
|
+
#ifndef INT16_MAX
|
310
|
+
#define INT16_MAX (32767)
|
311
|
+
#endif
|
312
|
+
#ifndef INT32_MAX
|
313
|
+
#define INT32_MAX (2147483647)
|
314
|
+
#endif
|
315
|
+
#ifndef UINT8_MAX
|
316
|
+
#define UINT8_MAX (255U)
|
317
|
+
#endif
|
318
|
+
#ifndef UINT16_MAX
|
319
|
+
#define UINT16_MAX (65535U)
|
320
|
+
#endif
|
321
|
+
#ifndef UINT32_MAX
|
322
|
+
#define UINT32_MAX (4294967295U)
|
323
|
+
#endif
|
324
|
+
|
325
|
+
#ifndef SIZE_MAX
|
326
|
+
#define SIZE_MAX (~(size_t)0)
|
327
|
+
#endif
|
328
|
+
|
329
|
+
#endif /* ! C99 */
|
330
|
+
|
331
|
+
#endif /* ! FLEXINT_H */
|
332
|
+
|
333
|
+
/* begin standard C++ headers. */
|
334
|
+
|
335
|
+
/* TODO: this is always defined, so inline it */
|
336
|
+
#define yyconst const
|
337
|
+
|
338
|
+
#if defined(__GNUC__) && __GNUC__ >= 3
|
339
|
+
#define yynoreturn __attribute__((__noreturn__))
|
340
|
+
#else
|
341
|
+
#define yynoreturn
|
342
|
+
#endif
|
343
|
+
|
344
|
+
/* An opaque pointer. */
|
345
|
+
#ifndef YY_TYPEDEF_YY_SCANNER_T
|
346
|
+
#define YY_TYPEDEF_YY_SCANNER_T
|
347
|
+
typedef void* yyscan_t;
|
348
|
+
#endif
|
349
|
+
|
350
|
+
/* For convenience, these vars (plus the bison vars far below)
|
351
|
+
are macros in the reentrant scanner. */
|
352
|
+
#define yyin yyg->yyin_r
|
353
|
+
#define yyout yyg->yyout_r
|
354
|
+
#define yyextra yyg->yyextra_r
|
355
|
+
#define yyleng yyg->yyleng_r
|
356
|
+
#define yytext yyg->yytext_r
|
357
|
+
#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
|
358
|
+
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
|
359
|
+
#define yy_flex_debug yyg->yy_flex_debug_r
|
360
|
+
|
361
|
+
/* Size of default input buffer. */
|
362
|
+
#ifndef YY_BUF_SIZE
|
363
|
+
#ifdef __ia64__
|
364
|
+
/* On IA-64, the buffer size is 16k, not 8k.
|
365
|
+
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
366
|
+
* Ditto for the __ia64__ case accordingly.
|
367
|
+
*/
|
368
|
+
#define YY_BUF_SIZE 32768
|
369
|
+
#else
|
370
|
+
#define YY_BUF_SIZE 16384
|
371
|
+
#endif /* __ia64__ */
|
372
|
+
#endif
|
373
|
+
|
374
|
+
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
|
375
|
+
#define YY_TYPEDEF_YY_BUFFER_STATE
|
376
|
+
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
377
|
+
#endif
|
378
|
+
|
379
|
+
#ifndef YY_TYPEDEF_YY_SIZE_T
|
380
|
+
#define YY_TYPEDEF_YY_SIZE_T
|
381
|
+
typedef size_t yy_size_t;
|
382
|
+
#endif
|
383
|
+
|
384
|
+
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
385
|
+
#define YY_STRUCT_YY_BUFFER_STATE
|
386
|
+
struct yy_buffer_state
|
387
|
+
{
|
388
|
+
FILE *yy_input_file;
|
389
|
+
|
390
|
+
char *yy_ch_buf; /* input buffer */
|
391
|
+
char *yy_buf_pos; /* current position in input buffer */
|
392
|
+
|
393
|
+
/* Size of input buffer in bytes, not including room for EOB
|
394
|
+
* characters.
|
395
|
+
*/
|
396
|
+
int yy_buf_size;
|
397
|
+
|
398
|
+
/* Number of characters read into yy_ch_buf, not including EOB
|
399
|
+
* characters.
|
400
|
+
*/
|
401
|
+
int yy_n_chars;
|
402
|
+
|
403
|
+
/* Whether we "own" the buffer - i.e., we know we created it,
|
404
|
+
* and can realloc() it to grow it, and should free() it to
|
405
|
+
* delete it.
|
406
|
+
*/
|
407
|
+
int yy_is_our_buffer;
|
408
|
+
|
409
|
+
/* Whether this is an "interactive" input source; if so, and
|
410
|
+
* if we're using stdio for input, then we want to use getc()
|
411
|
+
* instead of fread(), to make sure we stop fetching input after
|
412
|
+
* each newline.
|
413
|
+
*/
|
414
|
+
int yy_is_interactive;
|
415
|
+
|
416
|
+
/* Whether we're considered to be at the beginning of a line.
|
417
|
+
* If so, '^' rules will be active on the next match, otherwise
|
418
|
+
* not.
|
419
|
+
*/
|
420
|
+
int yy_at_bol;
|
421
|
+
|
422
|
+
int yy_bs_lineno; /**< The line count. */
|
423
|
+
int yy_bs_column; /**< The column count. */
|
424
|
+
|
425
|
+
/* Whether to try to fill the input buffer when we reach the
|
426
|
+
* end of it.
|
427
|
+
*/
|
428
|
+
int yy_fill_buffer;
|
429
|
+
|
430
|
+
int yy_buffer_status;
|
431
|
+
|
432
|
+
};
|
433
|
+
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
|
434
|
+
|
435
|
+
void yyrestart ( FILE *input_file , yyscan_t yyscanner );
|
436
|
+
void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
|
437
|
+
YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
|
438
|
+
void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
|
439
|
+
void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
|
440
|
+
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
|
441
|
+
void yypop_buffer_state ( yyscan_t yyscanner );
|
442
|
+
|
443
|
+
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
|
444
|
+
YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
|
445
|
+
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
|
446
|
+
|
447
|
+
void *yyalloc ( yy_size_t , yyscan_t yyscanner );
|
448
|
+
void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
|
449
|
+
void yyfree ( void * , yyscan_t yyscanner );
|
450
|
+
|
451
|
+
/* Begin user sect3 */
|
452
|
+
|
453
|
+
#define ndt_bpwrap(yyscanner) (/*CONSTCOND*/1)
|
454
|
+
#define YY_SKIP_YYWRAP
|
455
|
+
|
456
|
+
#define yytext_ptr yytext_r
|
457
|
+
|
458
|
+
#ifdef YY_HEADER_EXPORT_START_CONDITIONS
|
459
|
+
#define INITIAL 0
|
460
|
+
#define FIELDNAME 1
|
461
|
+
|
462
|
+
#endif
|
463
|
+
|
464
|
+
#ifndef YY_NO_UNISTD_H
|
465
|
+
/* Special case for "unistd.h", since it is non-ANSI. We include it way
|
466
|
+
* down here because we want the user's section 1 to have been scanned first.
|
467
|
+
* The user has a chance to override it with an option.
|
468
|
+
*/
|
469
|
+
#include <unistd.h>
|
470
|
+
#endif
|
471
|
+
|
472
|
+
#define YY_EXTRA_TYPE ndt_context_t *
|
473
|
+
|
474
|
+
int yylex_init (yyscan_t* scanner);
|
475
|
+
|
476
|
+
int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
|
477
|
+
|
478
|
+
/* Accessor methods to globals.
|
479
|
+
These are made visible to non-reentrant scanners for convenience. */
|
480
|
+
|
481
|
+
int yylex_destroy ( yyscan_t yyscanner );
|
482
|
+
|
483
|
+
int yyget_debug ( yyscan_t yyscanner );
|
484
|
+
|
485
|
+
void yyset_debug ( int debug_flag , yyscan_t yyscanner );
|
486
|
+
|
487
|
+
YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
|
488
|
+
|
489
|
+
void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
|
490
|
+
|
491
|
+
FILE *yyget_in ( yyscan_t yyscanner );
|
492
|
+
|
493
|
+
void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
|
494
|
+
|
495
|
+
FILE *yyget_out ( yyscan_t yyscanner );
|
496
|
+
|
497
|
+
void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
|
498
|
+
|
499
|
+
int yyget_leng ( yyscan_t yyscanner );
|
500
|
+
|
501
|
+
char *yyget_text ( yyscan_t yyscanner );
|
502
|
+
|
503
|
+
int yyget_lineno ( yyscan_t yyscanner );
|
504
|
+
|
505
|
+
void yyset_lineno ( int _line_number , yyscan_t yyscanner );
|
506
|
+
|
507
|
+
int yyget_column ( yyscan_t yyscanner );
|
508
|
+
|
509
|
+
void yyset_column ( int _column_no , yyscan_t yyscanner );
|
510
|
+
|
511
|
+
YYSTYPE * yyget_lval ( yyscan_t yyscanner );
|
512
|
+
|
513
|
+
void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
|
514
|
+
|
515
|
+
YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
|
516
|
+
|
517
|
+
void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
|
518
|
+
|
519
|
+
/* Macros after this point can all be overridden by user definitions in
|
520
|
+
* section 1.
|
521
|
+
*/
|
522
|
+
|
523
|
+
#ifndef YY_SKIP_YYWRAP
|
524
|
+
#ifdef __cplusplus
|
525
|
+
extern "C" int yywrap ( yyscan_t yyscanner );
|
526
|
+
#else
|
527
|
+
extern int yywrap ( yyscan_t yyscanner );
|
528
|
+
#endif
|
529
|
+
#endif
|
530
|
+
|
531
|
+
#ifndef yytext_ptr
|
532
|
+
static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
|
533
|
+
#endif
|
534
|
+
|
535
|
+
#ifdef YY_NEED_STRLEN
|
536
|
+
static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
|
537
|
+
#endif
|
538
|
+
|
539
|
+
#ifndef YY_NO_INPUT
|
540
|
+
|
541
|
+
#endif
|
542
|
+
|
543
|
+
/* Amount of stuff to slurp up with each read. */
|
544
|
+
#ifndef YY_READ_BUF_SIZE
|
545
|
+
#ifdef __ia64__
|
546
|
+
/* On IA-64, the buffer size is 16k, not 8k */
|
547
|
+
#define YY_READ_BUF_SIZE 16384
|
548
|
+
#else
|
549
|
+
#define YY_READ_BUF_SIZE 8192
|
550
|
+
#endif /* __ia64__ */
|
551
|
+
#endif
|
552
|
+
|
553
|
+
/* Number of entries by which start-condition stack grows. */
|
554
|
+
#ifndef YY_START_STACK_INCR
|
555
|
+
#define YY_START_STACK_INCR 25
|
556
|
+
#endif
|
557
|
+
|
558
|
+
/* Default declaration of generated scanner - a define so the user can
|
559
|
+
* easily add parameters.
|
560
|
+
*/
|
561
|
+
#ifndef YY_DECL
|
562
|
+
#define YY_DECL_IS_OURS 1
|
563
|
+
|
564
|
+
extern int yylex \
|
565
|
+
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
|
566
|
+
|
567
|
+
#define YY_DECL int yylex \
|
568
|
+
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
|
569
|
+
#endif /* !YY_DECL */
|
570
|
+
|
571
|
+
/* yy_get_previous_state - get the state just before the EOB char was reached */
|
572
|
+
|
573
|
+
#undef YY_NEW_FILE
|
574
|
+
#undef YY_FLUSH_BUFFER
|
575
|
+
#undef yy_set_bol
|
576
|
+
#undef yy_new_buffer
|
577
|
+
#undef yy_set_interactive
|
578
|
+
#undef YY_DO_BEFORE_ACTION
|
579
|
+
|
580
|
+
#ifdef YY_DECL_IS_OURS
|
581
|
+
#undef YY_DECL_IS_OURS
|
582
|
+
#undef YY_DECL
|
583
|
+
#endif
|
584
|
+
|
585
|
+
#ifndef ndt_bp_create_buffer_ALREADY_DEFINED
|
586
|
+
#undef yy_create_buffer
|
587
|
+
#endif
|
588
|
+
#ifndef ndt_bp_delete_buffer_ALREADY_DEFINED
|
589
|
+
#undef yy_delete_buffer
|
590
|
+
#endif
|
591
|
+
#ifndef ndt_bp_scan_buffer_ALREADY_DEFINED
|
592
|
+
#undef yy_scan_buffer
|
593
|
+
#endif
|
594
|
+
#ifndef ndt_bp_scan_string_ALREADY_DEFINED
|
595
|
+
#undef yy_scan_string
|
596
|
+
#endif
|
597
|
+
#ifndef ndt_bp_scan_bytes_ALREADY_DEFINED
|
598
|
+
#undef yy_scan_bytes
|
599
|
+
#endif
|
600
|
+
#ifndef ndt_bp_init_buffer_ALREADY_DEFINED
|
601
|
+
#undef yy_init_buffer
|
602
|
+
#endif
|
603
|
+
#ifndef ndt_bp_flush_buffer_ALREADY_DEFINED
|
604
|
+
#undef yy_flush_buffer
|
605
|
+
#endif
|
606
|
+
#ifndef ndt_bp_load_buffer_state_ALREADY_DEFINED
|
607
|
+
#undef yy_load_buffer_state
|
608
|
+
#endif
|
609
|
+
#ifndef ndt_bp_switch_to_buffer_ALREADY_DEFINED
|
610
|
+
#undef yy_switch_to_buffer
|
611
|
+
#endif
|
612
|
+
#ifndef ndt_bppush_buffer_state_ALREADY_DEFINED
|
613
|
+
#undef yypush_buffer_state
|
614
|
+
#endif
|
615
|
+
#ifndef ndt_bppop_buffer_state_ALREADY_DEFINED
|
616
|
+
#undef yypop_buffer_state
|
617
|
+
#endif
|
618
|
+
#ifndef ndt_bpensure_buffer_stack_ALREADY_DEFINED
|
619
|
+
#undef yyensure_buffer_stack
|
620
|
+
#endif
|
621
|
+
#ifndef ndt_bplex_ALREADY_DEFINED
|
622
|
+
#undef yylex
|
623
|
+
#endif
|
624
|
+
#ifndef ndt_bprestart_ALREADY_DEFINED
|
625
|
+
#undef yyrestart
|
626
|
+
#endif
|
627
|
+
#ifndef ndt_bplex_init_ALREADY_DEFINED
|
628
|
+
#undef yylex_init
|
629
|
+
#endif
|
630
|
+
#ifndef ndt_bplex_init_extra_ALREADY_DEFINED
|
631
|
+
#undef yylex_init_extra
|
632
|
+
#endif
|
633
|
+
#ifndef ndt_bplex_destroy_ALREADY_DEFINED
|
634
|
+
#undef yylex_destroy
|
635
|
+
#endif
|
636
|
+
#ifndef ndt_bpget_debug_ALREADY_DEFINED
|
637
|
+
#undef yyget_debug
|
638
|
+
#endif
|
639
|
+
#ifndef ndt_bpset_debug_ALREADY_DEFINED
|
640
|
+
#undef yyset_debug
|
641
|
+
#endif
|
642
|
+
#ifndef ndt_bpget_extra_ALREADY_DEFINED
|
643
|
+
#undef yyget_extra
|
644
|
+
#endif
|
645
|
+
#ifndef ndt_bpset_extra_ALREADY_DEFINED
|
646
|
+
#undef yyset_extra
|
647
|
+
#endif
|
648
|
+
#ifndef ndt_bpget_in_ALREADY_DEFINED
|
649
|
+
#undef yyget_in
|
650
|
+
#endif
|
651
|
+
#ifndef ndt_bpset_in_ALREADY_DEFINED
|
652
|
+
#undef yyset_in
|
653
|
+
#endif
|
654
|
+
#ifndef ndt_bpget_out_ALREADY_DEFINED
|
655
|
+
#undef yyget_out
|
656
|
+
#endif
|
657
|
+
#ifndef ndt_bpset_out_ALREADY_DEFINED
|
658
|
+
#undef yyset_out
|
659
|
+
#endif
|
660
|
+
#ifndef ndt_bpget_leng_ALREADY_DEFINED
|
661
|
+
#undef yyget_leng
|
662
|
+
#endif
|
663
|
+
#ifndef ndt_bpget_text_ALREADY_DEFINED
|
664
|
+
#undef yyget_text
|
665
|
+
#endif
|
666
|
+
#ifndef ndt_bpget_lineno_ALREADY_DEFINED
|
667
|
+
#undef yyget_lineno
|
668
|
+
#endif
|
669
|
+
#ifndef ndt_bpset_lineno_ALREADY_DEFINED
|
670
|
+
#undef yyset_lineno
|
671
|
+
#endif
|
672
|
+
#ifndef ndt_bpget_column_ALREADY_DEFINED
|
673
|
+
#undef yyget_column
|
674
|
+
#endif
|
675
|
+
#ifndef ndt_bpset_column_ALREADY_DEFINED
|
676
|
+
#undef yyset_column
|
677
|
+
#endif
|
678
|
+
#ifndef ndt_bpwrap_ALREADY_DEFINED
|
679
|
+
#undef yywrap
|
680
|
+
#endif
|
681
|
+
#ifndef ndt_bpget_lval_ALREADY_DEFINED
|
682
|
+
#undef yyget_lval
|
683
|
+
#endif
|
684
|
+
#ifndef ndt_bpset_lval_ALREADY_DEFINED
|
685
|
+
#undef yyset_lval
|
686
|
+
#endif
|
687
|
+
#ifndef ndt_bpget_lloc_ALREADY_DEFINED
|
688
|
+
#undef yyget_lloc
|
689
|
+
#endif
|
690
|
+
#ifndef ndt_bpset_lloc_ALREADY_DEFINED
|
691
|
+
#undef yyset_lloc
|
692
|
+
#endif
|
693
|
+
#ifndef ndt_bpalloc_ALREADY_DEFINED
|
694
|
+
#undef yyalloc
|
695
|
+
#endif
|
696
|
+
#ifndef ndt_bprealloc_ALREADY_DEFINED
|
697
|
+
#undef yyrealloc
|
698
|
+
#endif
|
699
|
+
#ifndef ndt_bpfree_ALREADY_DEFINED
|
700
|
+
#undef yyfree
|
701
|
+
#endif
|
702
|
+
#ifndef ndt_bptext_ALREADY_DEFINED
|
703
|
+
#undef yytext
|
704
|
+
#endif
|
705
|
+
#ifndef ndt_bpleng_ALREADY_DEFINED
|
706
|
+
#undef yyleng
|
707
|
+
#endif
|
708
|
+
#ifndef ndt_bpin_ALREADY_DEFINED
|
709
|
+
#undef yyin
|
710
|
+
#endif
|
711
|
+
#ifndef ndt_bpout_ALREADY_DEFINED
|
712
|
+
#undef yyout
|
713
|
+
#endif
|
714
|
+
#ifndef ndt_bp_flex_debug_ALREADY_DEFINED
|
715
|
+
#undef yy_flex_debug
|
716
|
+
#endif
|
717
|
+
#ifndef ndt_bplineno_ALREADY_DEFINED
|
718
|
+
#undef yylineno
|
719
|
+
#endif
|
720
|
+
#ifndef ndt_bptables_fload_ALREADY_DEFINED
|
721
|
+
#undef yytables_fload
|
722
|
+
#endif
|
723
|
+
#ifndef ndt_bptables_destroy_ALREADY_DEFINED
|
724
|
+
#undef yytables_destroy
|
725
|
+
#endif
|
726
|
+
#ifndef ndt_bpTABLES_NAME_ALREADY_DEFINED
|
727
|
+
#undef yyTABLES_NAME
|
728
|
+
#endif
|
729
|
+
|
730
|
+
#line 176 "bplexer.l"
|
731
|
+
|
732
|
+
|
733
|
+
#line 733 "bplexer.h"
|
734
|
+
#undef ndt_bpIN_HEADER
|
735
|
+
#endif /* ndt_bpHEADER_H */
|