ndtypes 0.2.0dev4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.md +50 -0
  3. data/Gemfile +2 -0
  4. data/History.md +0 -0
  5. data/README.md +19 -0
  6. data/Rakefile +125 -0
  7. data/ext/ruby_ndtypes/extconf.rb +55 -0
  8. data/ext/ruby_ndtypes/gc_guard.c +36 -0
  9. data/ext/ruby_ndtypes/gc_guard.h +12 -0
  10. data/ext/ruby_ndtypes/ndtypes/AUTHORS.txt +5 -0
  11. data/ext/ruby_ndtypes/ndtypes/INSTALL.txt +101 -0
  12. data/ext/ruby_ndtypes/ndtypes/LICENSE.txt +29 -0
  13. data/ext/ruby_ndtypes/ndtypes/MANIFEST.in +3 -0
  14. data/ext/ruby_ndtypes/ndtypes/Makefile.in +87 -0
  15. data/ext/ruby_ndtypes/ndtypes/README.rst +47 -0
  16. data/ext/ruby_ndtypes/ndtypes/config.guess +1530 -0
  17. data/ext/ruby_ndtypes/ndtypes/config.h.in +67 -0
  18. data/ext/ruby_ndtypes/ndtypes/config.sub +1782 -0
  19. data/ext/ruby_ndtypes/ndtypes/configure +5260 -0
  20. data/ext/ruby_ndtypes/ndtypes/configure.ac +161 -0
  21. data/ext/ruby_ndtypes/ndtypes/doc/Makefile +14 -0
  22. data/ext/ruby_ndtypes/ndtypes/doc/_static/copybutton.js +66 -0
  23. data/ext/ruby_ndtypes/ndtypes/doc/conf.py +26 -0
  24. data/ext/ruby_ndtypes/ndtypes/doc/grammar/grammar.rst +27 -0
  25. data/ext/ruby_ndtypes/ndtypes/doc/index.rst +56 -0
  26. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/context.rst +131 -0
  27. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/encodings.rst +68 -0
  28. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/fields-values.rst +175 -0
  29. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/functions.rst +72 -0
  30. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/index.rst +43 -0
  31. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/init.rst +48 -0
  32. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/io.rst +100 -0
  33. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/memory.rst +124 -0
  34. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/predicates.rst +110 -0
  35. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/typedef.rst +31 -0
  36. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/types.rst +594 -0
  37. data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/util.rst +166 -0
  38. data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/buffer-protocol.rst +27 -0
  39. data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/index.rst +21 -0
  40. data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/pattern-matching.rst +330 -0
  41. data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/quickstart.rst +144 -0
  42. data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/types.rst +544 -0
  43. data/ext/ruby_ndtypes/ndtypes/doc/releases/index.rst +35 -0
  44. data/ext/ruby_ndtypes/ndtypes/install-sh +527 -0
  45. data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.in +271 -0
  46. data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.vc +269 -0
  47. data/ext/ruby_ndtypes/ndtypes/libndtypes/alloc.c +230 -0
  48. data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.c +268 -0
  49. data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.h +109 -0
  50. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile.in +73 -0
  51. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile.vc +70 -0
  52. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/README.txt +16 -0
  53. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.c +2179 -0
  54. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.h +134 -0
  55. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.y +428 -0
  56. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.c +2543 -0
  57. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.h +735 -0
  58. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.l +176 -0
  59. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.c +543 -0
  60. data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.c +110 -0
  61. data/ext/ruby_ndtypes/ndtypes/libndtypes/context.c +228 -0
  62. data/ext/ruby_ndtypes/ndtypes/libndtypes/copy.c +634 -0
  63. data/ext/ruby_ndtypes/ndtypes/libndtypes/encodings.c +116 -0
  64. data/ext/ruby_ndtypes/ndtypes/libndtypes/equal.c +288 -0
  65. data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.c +3067 -0
  66. data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.h +180 -0
  67. data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.y +417 -0
  68. data/ext/ruby_ndtypes/ndtypes/libndtypes/io.c +1658 -0
  69. data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.c +2773 -0
  70. data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.h +734 -0
  71. data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.l +222 -0
  72. data/ext/ruby_ndtypes/ndtypes/libndtypes/match.c +1132 -0
  73. data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.c +2323 -0
  74. data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h.in +893 -0
  75. data/ext/ruby_ndtypes/ndtypes/libndtypes/overflow.h +161 -0
  76. data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.c +473 -0
  77. data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.h +92 -0
  78. data/ext/ruby_ndtypes/ndtypes/libndtypes/parser.c +246 -0
  79. data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.c +269 -0
  80. data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.h +197 -0
  81. data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile.in +48 -0
  82. data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile.vc +46 -0
  83. data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.c +1007 -0
  84. data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.c +442 -0
  85. data/ext/ruby_ndtypes/ndtypes/libndtypes/slice.h +42 -0
  86. data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.c +238 -0
  87. data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.h +50 -0
  88. data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.c +371 -0
  89. data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.h +100 -0
  90. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.in +55 -0
  91. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.vc +45 -0
  92. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/alloc_fail.c +82 -0
  93. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/alloc_fail.h +49 -0
  94. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/runtest.c +1657 -0
  95. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test.h +85 -0
  96. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_array.c +115 -0
  97. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_buffer.c +137 -0
  98. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_indent.c +201 -0
  99. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_match.c +2397 -0
  100. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_numba.c +57 -0
  101. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse.c +349 -0
  102. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_error.c +27839 -0
  103. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_roundtrip.c +350 -0
  104. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_record.c +231 -0
  105. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typecheck.c +375 -0
  106. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typedef.c +65 -0
  107. data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/valgrind.supp +30 -0
  108. data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/bench.c +79 -0
  109. data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/indent.c +94 -0
  110. data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/print_ast.c +96 -0
  111. data/ext/ruby_ndtypes/ndtypes/libndtypes/util.c +474 -0
  112. data/ext/ruby_ndtypes/ndtypes/libndtypes/values.c +228 -0
  113. data/ext/ruby_ndtypes/ndtypes/python/bench.py +49 -0
  114. data/ext/ruby_ndtypes/ndtypes/python/ndt_randtype.py +409 -0
  115. data/ext/ruby_ndtypes/ndtypes/python/ndt_support.py +14 -0
  116. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/__init__.py +70 -0
  117. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/_ndtypes.c +1332 -0
  118. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/docstrings.h +319 -0
  119. data/ext/ruby_ndtypes/ndtypes/python/ndtypes/pyndtypes.h +154 -0
  120. data/ext/ruby_ndtypes/ndtypes/python/test_ndtypes.py +1977 -0
  121. data/ext/ruby_ndtypes/ndtypes/setup.py +288 -0
  122. data/ext/ruby_ndtypes/ndtypes/vcbuild/INSTALL.txt +41 -0
  123. data/ext/ruby_ndtypes/ndtypes/vcbuild/runtest32.bat +15 -0
  124. data/ext/ruby_ndtypes/ndtypes/vcbuild/runtest64.bat +13 -0
  125. data/ext/ruby_ndtypes/ndtypes/vcbuild/vcbuild32.bat +38 -0
  126. data/ext/ruby_ndtypes/ndtypes/vcbuild/vcbuild64.bat +38 -0
  127. data/ext/ruby_ndtypes/ndtypes/vcbuild/vcclean.bat +13 -0
  128. data/ext/ruby_ndtypes/ndtypes/vcbuild/vcdistclean.bat +14 -0
  129. data/ext/ruby_ndtypes/ruby_ndtypes.c +1003 -0
  130. data/ext/ruby_ndtypes/ruby_ndtypes.h +37 -0
  131. data/ext/ruby_ndtypes/ruby_ndtypes_internal.h +28 -0
  132. data/lib/ndtypes.rb +45 -0
  133. data/lib/ndtypes/errors.rb +2 -0
  134. data/lib/ndtypes/version.rb +6 -0
  135. data/ndtypes.gemspec +47 -0
  136. data/spec/gc_table_spec.rb +10 -0
  137. data/spec/ndtypes_spec.rb +289 -0
  138. data/spec/spec_helper.rb +241 -0
  139. metadata +242 -0
@@ -0,0 +1,734 @@
1
+ #ifndef ndt_yyHEADER_H
2
+ #define ndt_yyHEADER_H 1
3
+ #define ndt_yyIN_HEADER 1
4
+
5
+ #line 5 "lexer.h"
6
+
7
+ #line 7 "lexer.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_yy_create_buffer_ALREADY_DEFINED
23
+ #else
24
+ #define yy_create_buffer ndt_yy_create_buffer
25
+ #endif
26
+
27
+ #ifdef yy_delete_buffer
28
+ #define ndt_yy_delete_buffer_ALREADY_DEFINED
29
+ #else
30
+ #define yy_delete_buffer ndt_yy_delete_buffer
31
+ #endif
32
+
33
+ #ifdef yy_scan_buffer
34
+ #define ndt_yy_scan_buffer_ALREADY_DEFINED
35
+ #else
36
+ #define yy_scan_buffer ndt_yy_scan_buffer
37
+ #endif
38
+
39
+ #ifdef yy_scan_string
40
+ #define ndt_yy_scan_string_ALREADY_DEFINED
41
+ #else
42
+ #define yy_scan_string ndt_yy_scan_string
43
+ #endif
44
+
45
+ #ifdef yy_scan_bytes
46
+ #define ndt_yy_scan_bytes_ALREADY_DEFINED
47
+ #else
48
+ #define yy_scan_bytes ndt_yy_scan_bytes
49
+ #endif
50
+
51
+ #ifdef yy_init_buffer
52
+ #define ndt_yy_init_buffer_ALREADY_DEFINED
53
+ #else
54
+ #define yy_init_buffer ndt_yy_init_buffer
55
+ #endif
56
+
57
+ #ifdef yy_flush_buffer
58
+ #define ndt_yy_flush_buffer_ALREADY_DEFINED
59
+ #else
60
+ #define yy_flush_buffer ndt_yy_flush_buffer
61
+ #endif
62
+
63
+ #ifdef yy_load_buffer_state
64
+ #define ndt_yy_load_buffer_state_ALREADY_DEFINED
65
+ #else
66
+ #define yy_load_buffer_state ndt_yy_load_buffer_state
67
+ #endif
68
+
69
+ #ifdef yy_switch_to_buffer
70
+ #define ndt_yy_switch_to_buffer_ALREADY_DEFINED
71
+ #else
72
+ #define yy_switch_to_buffer ndt_yy_switch_to_buffer
73
+ #endif
74
+
75
+ #ifdef yypush_buffer_state
76
+ #define ndt_yypush_buffer_state_ALREADY_DEFINED
77
+ #else
78
+ #define yypush_buffer_state ndt_yypush_buffer_state
79
+ #endif
80
+
81
+ #ifdef yypop_buffer_state
82
+ #define ndt_yypop_buffer_state_ALREADY_DEFINED
83
+ #else
84
+ #define yypop_buffer_state ndt_yypop_buffer_state
85
+ #endif
86
+
87
+ #ifdef yyensure_buffer_stack
88
+ #define ndt_yyensure_buffer_stack_ALREADY_DEFINED
89
+ #else
90
+ #define yyensure_buffer_stack ndt_yyensure_buffer_stack
91
+ #endif
92
+
93
+ #ifdef yylex
94
+ #define ndt_yylex_ALREADY_DEFINED
95
+ #else
96
+ #define yylex ndt_yylex
97
+ #endif
98
+
99
+ #ifdef yyrestart
100
+ #define ndt_yyrestart_ALREADY_DEFINED
101
+ #else
102
+ #define yyrestart ndt_yyrestart
103
+ #endif
104
+
105
+ #ifdef yylex_init
106
+ #define ndt_yylex_init_ALREADY_DEFINED
107
+ #else
108
+ #define yylex_init ndt_yylex_init
109
+ #endif
110
+
111
+ #ifdef yylex_init_extra
112
+ #define ndt_yylex_init_extra_ALREADY_DEFINED
113
+ #else
114
+ #define yylex_init_extra ndt_yylex_init_extra
115
+ #endif
116
+
117
+ #ifdef yylex_destroy
118
+ #define ndt_yylex_destroy_ALREADY_DEFINED
119
+ #else
120
+ #define yylex_destroy ndt_yylex_destroy
121
+ #endif
122
+
123
+ #ifdef yyget_debug
124
+ #define ndt_yyget_debug_ALREADY_DEFINED
125
+ #else
126
+ #define yyget_debug ndt_yyget_debug
127
+ #endif
128
+
129
+ #ifdef yyset_debug
130
+ #define ndt_yyset_debug_ALREADY_DEFINED
131
+ #else
132
+ #define yyset_debug ndt_yyset_debug
133
+ #endif
134
+
135
+ #ifdef yyget_extra
136
+ #define ndt_yyget_extra_ALREADY_DEFINED
137
+ #else
138
+ #define yyget_extra ndt_yyget_extra
139
+ #endif
140
+
141
+ #ifdef yyset_extra
142
+ #define ndt_yyset_extra_ALREADY_DEFINED
143
+ #else
144
+ #define yyset_extra ndt_yyset_extra
145
+ #endif
146
+
147
+ #ifdef yyget_in
148
+ #define ndt_yyget_in_ALREADY_DEFINED
149
+ #else
150
+ #define yyget_in ndt_yyget_in
151
+ #endif
152
+
153
+ #ifdef yyset_in
154
+ #define ndt_yyset_in_ALREADY_DEFINED
155
+ #else
156
+ #define yyset_in ndt_yyset_in
157
+ #endif
158
+
159
+ #ifdef yyget_out
160
+ #define ndt_yyget_out_ALREADY_DEFINED
161
+ #else
162
+ #define yyget_out ndt_yyget_out
163
+ #endif
164
+
165
+ #ifdef yyset_out
166
+ #define ndt_yyset_out_ALREADY_DEFINED
167
+ #else
168
+ #define yyset_out ndt_yyset_out
169
+ #endif
170
+
171
+ #ifdef yyget_leng
172
+ #define ndt_yyget_leng_ALREADY_DEFINED
173
+ #else
174
+ #define yyget_leng ndt_yyget_leng
175
+ #endif
176
+
177
+ #ifdef yyget_text
178
+ #define ndt_yyget_text_ALREADY_DEFINED
179
+ #else
180
+ #define yyget_text ndt_yyget_text
181
+ #endif
182
+
183
+ #ifdef yyget_lineno
184
+ #define ndt_yyget_lineno_ALREADY_DEFINED
185
+ #else
186
+ #define yyget_lineno ndt_yyget_lineno
187
+ #endif
188
+
189
+ #ifdef yyset_lineno
190
+ #define ndt_yyset_lineno_ALREADY_DEFINED
191
+ #else
192
+ #define yyset_lineno ndt_yyset_lineno
193
+ #endif
194
+
195
+ #ifdef yyget_column
196
+ #define ndt_yyget_column_ALREADY_DEFINED
197
+ #else
198
+ #define yyget_column ndt_yyget_column
199
+ #endif
200
+
201
+ #ifdef yyset_column
202
+ #define ndt_yyset_column_ALREADY_DEFINED
203
+ #else
204
+ #define yyset_column ndt_yyset_column
205
+ #endif
206
+
207
+ #ifdef yywrap
208
+ #define ndt_yywrap_ALREADY_DEFINED
209
+ #else
210
+ #define yywrap ndt_yywrap
211
+ #endif
212
+
213
+ #ifdef yyget_lval
214
+ #define ndt_yyget_lval_ALREADY_DEFINED
215
+ #else
216
+ #define yyget_lval ndt_yyget_lval
217
+ #endif
218
+
219
+ #ifdef yyset_lval
220
+ #define ndt_yyset_lval_ALREADY_DEFINED
221
+ #else
222
+ #define yyset_lval ndt_yyset_lval
223
+ #endif
224
+
225
+ #ifdef yyget_lloc
226
+ #define ndt_yyget_lloc_ALREADY_DEFINED
227
+ #else
228
+ #define yyget_lloc ndt_yyget_lloc
229
+ #endif
230
+
231
+ #ifdef yyset_lloc
232
+ #define ndt_yyset_lloc_ALREADY_DEFINED
233
+ #else
234
+ #define yyset_lloc ndt_yyset_lloc
235
+ #endif
236
+
237
+ #ifdef yyalloc
238
+ #define ndt_yyalloc_ALREADY_DEFINED
239
+ #else
240
+ #define yyalloc ndt_yyalloc
241
+ #endif
242
+
243
+ #ifdef yyrealloc
244
+ #define ndt_yyrealloc_ALREADY_DEFINED
245
+ #else
246
+ #define yyrealloc ndt_yyrealloc
247
+ #endif
248
+
249
+ #ifdef yyfree
250
+ #define ndt_yyfree_ALREADY_DEFINED
251
+ #else
252
+ #define yyfree ndt_yyfree
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_yywrap(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
+
461
+ #endif
462
+
463
+ #ifndef YY_NO_UNISTD_H
464
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
465
+ * down here because we want the user's section 1 to have been scanned first.
466
+ * The user has a chance to override it with an option.
467
+ */
468
+ #include <unistd.h>
469
+ #endif
470
+
471
+ #define YY_EXTRA_TYPE ndt_context_t *
472
+
473
+ int yylex_init (yyscan_t* scanner);
474
+
475
+ int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
476
+
477
+ /* Accessor methods to globals.
478
+ These are made visible to non-reentrant scanners for convenience. */
479
+
480
+ int yylex_destroy ( yyscan_t yyscanner );
481
+
482
+ int yyget_debug ( yyscan_t yyscanner );
483
+
484
+ void yyset_debug ( int debug_flag , yyscan_t yyscanner );
485
+
486
+ YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
487
+
488
+ void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
489
+
490
+ FILE *yyget_in ( yyscan_t yyscanner );
491
+
492
+ void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
493
+
494
+ FILE *yyget_out ( yyscan_t yyscanner );
495
+
496
+ void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
497
+
498
+ int yyget_leng ( yyscan_t yyscanner );
499
+
500
+ char *yyget_text ( yyscan_t yyscanner );
501
+
502
+ int yyget_lineno ( yyscan_t yyscanner );
503
+
504
+ void yyset_lineno ( int _line_number , yyscan_t yyscanner );
505
+
506
+ int yyget_column ( yyscan_t yyscanner );
507
+
508
+ void yyset_column ( int _column_no , yyscan_t yyscanner );
509
+
510
+ YYSTYPE * yyget_lval ( yyscan_t yyscanner );
511
+
512
+ void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
513
+
514
+ YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
515
+
516
+ void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
517
+
518
+ /* Macros after this point can all be overridden by user definitions in
519
+ * section 1.
520
+ */
521
+
522
+ #ifndef YY_SKIP_YYWRAP
523
+ #ifdef __cplusplus
524
+ extern "C" int yywrap ( yyscan_t yyscanner );
525
+ #else
526
+ extern int yywrap ( yyscan_t yyscanner );
527
+ #endif
528
+ #endif
529
+
530
+ #ifndef yytext_ptr
531
+ static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
532
+ #endif
533
+
534
+ #ifdef YY_NEED_STRLEN
535
+ static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
536
+ #endif
537
+
538
+ #ifndef YY_NO_INPUT
539
+
540
+ #endif
541
+
542
+ /* Amount of stuff to slurp up with each read. */
543
+ #ifndef YY_READ_BUF_SIZE
544
+ #ifdef __ia64__
545
+ /* On IA-64, the buffer size is 16k, not 8k */
546
+ #define YY_READ_BUF_SIZE 16384
547
+ #else
548
+ #define YY_READ_BUF_SIZE 8192
549
+ #endif /* __ia64__ */
550
+ #endif
551
+
552
+ /* Number of entries by which start-condition stack grows. */
553
+ #ifndef YY_START_STACK_INCR
554
+ #define YY_START_STACK_INCR 25
555
+ #endif
556
+
557
+ /* Default declaration of generated scanner - a define so the user can
558
+ * easily add parameters.
559
+ */
560
+ #ifndef YY_DECL
561
+ #define YY_DECL_IS_OURS 1
562
+
563
+ extern int yylex \
564
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
565
+
566
+ #define YY_DECL int yylex \
567
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
568
+ #endif /* !YY_DECL */
569
+
570
+ /* yy_get_previous_state - get the state just before the EOB char was reached */
571
+
572
+ #undef YY_NEW_FILE
573
+ #undef YY_FLUSH_BUFFER
574
+ #undef yy_set_bol
575
+ #undef yy_new_buffer
576
+ #undef yy_set_interactive
577
+ #undef YY_DO_BEFORE_ACTION
578
+
579
+ #ifdef YY_DECL_IS_OURS
580
+ #undef YY_DECL_IS_OURS
581
+ #undef YY_DECL
582
+ #endif
583
+
584
+ #ifndef ndt_yy_create_buffer_ALREADY_DEFINED
585
+ #undef yy_create_buffer
586
+ #endif
587
+ #ifndef ndt_yy_delete_buffer_ALREADY_DEFINED
588
+ #undef yy_delete_buffer
589
+ #endif
590
+ #ifndef ndt_yy_scan_buffer_ALREADY_DEFINED
591
+ #undef yy_scan_buffer
592
+ #endif
593
+ #ifndef ndt_yy_scan_string_ALREADY_DEFINED
594
+ #undef yy_scan_string
595
+ #endif
596
+ #ifndef ndt_yy_scan_bytes_ALREADY_DEFINED
597
+ #undef yy_scan_bytes
598
+ #endif
599
+ #ifndef ndt_yy_init_buffer_ALREADY_DEFINED
600
+ #undef yy_init_buffer
601
+ #endif
602
+ #ifndef ndt_yy_flush_buffer_ALREADY_DEFINED
603
+ #undef yy_flush_buffer
604
+ #endif
605
+ #ifndef ndt_yy_load_buffer_state_ALREADY_DEFINED
606
+ #undef yy_load_buffer_state
607
+ #endif
608
+ #ifndef ndt_yy_switch_to_buffer_ALREADY_DEFINED
609
+ #undef yy_switch_to_buffer
610
+ #endif
611
+ #ifndef ndt_yypush_buffer_state_ALREADY_DEFINED
612
+ #undef yypush_buffer_state
613
+ #endif
614
+ #ifndef ndt_yypop_buffer_state_ALREADY_DEFINED
615
+ #undef yypop_buffer_state
616
+ #endif
617
+ #ifndef ndt_yyensure_buffer_stack_ALREADY_DEFINED
618
+ #undef yyensure_buffer_stack
619
+ #endif
620
+ #ifndef ndt_yylex_ALREADY_DEFINED
621
+ #undef yylex
622
+ #endif
623
+ #ifndef ndt_yyrestart_ALREADY_DEFINED
624
+ #undef yyrestart
625
+ #endif
626
+ #ifndef ndt_yylex_init_ALREADY_DEFINED
627
+ #undef yylex_init
628
+ #endif
629
+ #ifndef ndt_yylex_init_extra_ALREADY_DEFINED
630
+ #undef yylex_init_extra
631
+ #endif
632
+ #ifndef ndt_yylex_destroy_ALREADY_DEFINED
633
+ #undef yylex_destroy
634
+ #endif
635
+ #ifndef ndt_yyget_debug_ALREADY_DEFINED
636
+ #undef yyget_debug
637
+ #endif
638
+ #ifndef ndt_yyset_debug_ALREADY_DEFINED
639
+ #undef yyset_debug
640
+ #endif
641
+ #ifndef ndt_yyget_extra_ALREADY_DEFINED
642
+ #undef yyget_extra
643
+ #endif
644
+ #ifndef ndt_yyset_extra_ALREADY_DEFINED
645
+ #undef yyset_extra
646
+ #endif
647
+ #ifndef ndt_yyget_in_ALREADY_DEFINED
648
+ #undef yyget_in
649
+ #endif
650
+ #ifndef ndt_yyset_in_ALREADY_DEFINED
651
+ #undef yyset_in
652
+ #endif
653
+ #ifndef ndt_yyget_out_ALREADY_DEFINED
654
+ #undef yyget_out
655
+ #endif
656
+ #ifndef ndt_yyset_out_ALREADY_DEFINED
657
+ #undef yyset_out
658
+ #endif
659
+ #ifndef ndt_yyget_leng_ALREADY_DEFINED
660
+ #undef yyget_leng
661
+ #endif
662
+ #ifndef ndt_yyget_text_ALREADY_DEFINED
663
+ #undef yyget_text
664
+ #endif
665
+ #ifndef ndt_yyget_lineno_ALREADY_DEFINED
666
+ #undef yyget_lineno
667
+ #endif
668
+ #ifndef ndt_yyset_lineno_ALREADY_DEFINED
669
+ #undef yyset_lineno
670
+ #endif
671
+ #ifndef ndt_yyget_column_ALREADY_DEFINED
672
+ #undef yyget_column
673
+ #endif
674
+ #ifndef ndt_yyset_column_ALREADY_DEFINED
675
+ #undef yyset_column
676
+ #endif
677
+ #ifndef ndt_yywrap_ALREADY_DEFINED
678
+ #undef yywrap
679
+ #endif
680
+ #ifndef ndt_yyget_lval_ALREADY_DEFINED
681
+ #undef yyget_lval
682
+ #endif
683
+ #ifndef ndt_yyset_lval_ALREADY_DEFINED
684
+ #undef yyset_lval
685
+ #endif
686
+ #ifndef ndt_yyget_lloc_ALREADY_DEFINED
687
+ #undef yyget_lloc
688
+ #endif
689
+ #ifndef ndt_yyset_lloc_ALREADY_DEFINED
690
+ #undef yyset_lloc
691
+ #endif
692
+ #ifndef ndt_yyalloc_ALREADY_DEFINED
693
+ #undef yyalloc
694
+ #endif
695
+ #ifndef ndt_yyrealloc_ALREADY_DEFINED
696
+ #undef yyrealloc
697
+ #endif
698
+ #ifndef ndt_yyfree_ALREADY_DEFINED
699
+ #undef yyfree
700
+ #endif
701
+ #ifndef ndt_yytext_ALREADY_DEFINED
702
+ #undef yytext
703
+ #endif
704
+ #ifndef ndt_yyleng_ALREADY_DEFINED
705
+ #undef yyleng
706
+ #endif
707
+ #ifndef ndt_yyin_ALREADY_DEFINED
708
+ #undef yyin
709
+ #endif
710
+ #ifndef ndt_yyout_ALREADY_DEFINED
711
+ #undef yyout
712
+ #endif
713
+ #ifndef ndt_yy_flex_debug_ALREADY_DEFINED
714
+ #undef yy_flex_debug
715
+ #endif
716
+ #ifndef ndt_yylineno_ALREADY_DEFINED
717
+ #undef yylineno
718
+ #endif
719
+ #ifndef ndt_yytables_fload_ALREADY_DEFINED
720
+ #undef yytables_fload
721
+ #endif
722
+ #ifndef ndt_yytables_destroy_ALREADY_DEFINED
723
+ #undef yytables_destroy
724
+ #endif
725
+ #ifndef ndt_yyTABLES_NAME_ALREADY_DEFINED
726
+ #undef yyTABLES_NAME
727
+ #endif
728
+
729
+ #line 222 "lexer.l"
730
+
731
+
732
+ #line 732 "lexer.h"
733
+ #undef ndt_yyIN_HEADER
734
+ #endif /* ndt_yyHEADER_H */