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,2773 @@
1
+ #line 1 "lexer.c"
2
+
3
+ #line 3 "lexer.c"
4
+
5
+ #define YY_INT_ALIGNED short int
6
+
7
+ /* A lexical scanner generated by flex */
8
+
9
+ #define FLEX_SCANNER
10
+ #define YY_FLEX_MAJOR_VERSION 2
11
+ #define YY_FLEX_MINOR_VERSION 6
12
+ #define YY_FLEX_SUBMINOR_VERSION 4
13
+ #if YY_FLEX_SUBMINOR_VERSION > 0
14
+ #define FLEX_BETA
15
+ #endif
16
+
17
+ #ifdef yy_create_buffer
18
+ #define ndt_yy_create_buffer_ALREADY_DEFINED
19
+ #else
20
+ #define yy_create_buffer ndt_yy_create_buffer
21
+ #endif
22
+
23
+ #ifdef yy_delete_buffer
24
+ #define ndt_yy_delete_buffer_ALREADY_DEFINED
25
+ #else
26
+ #define yy_delete_buffer ndt_yy_delete_buffer
27
+ #endif
28
+
29
+ #ifdef yy_scan_buffer
30
+ #define ndt_yy_scan_buffer_ALREADY_DEFINED
31
+ #else
32
+ #define yy_scan_buffer ndt_yy_scan_buffer
33
+ #endif
34
+
35
+ #ifdef yy_scan_string
36
+ #define ndt_yy_scan_string_ALREADY_DEFINED
37
+ #else
38
+ #define yy_scan_string ndt_yy_scan_string
39
+ #endif
40
+
41
+ #ifdef yy_scan_bytes
42
+ #define ndt_yy_scan_bytes_ALREADY_DEFINED
43
+ #else
44
+ #define yy_scan_bytes ndt_yy_scan_bytes
45
+ #endif
46
+
47
+ #ifdef yy_init_buffer
48
+ #define ndt_yy_init_buffer_ALREADY_DEFINED
49
+ #else
50
+ #define yy_init_buffer ndt_yy_init_buffer
51
+ #endif
52
+
53
+ #ifdef yy_flush_buffer
54
+ #define ndt_yy_flush_buffer_ALREADY_DEFINED
55
+ #else
56
+ #define yy_flush_buffer ndt_yy_flush_buffer
57
+ #endif
58
+
59
+ #ifdef yy_load_buffer_state
60
+ #define ndt_yy_load_buffer_state_ALREADY_DEFINED
61
+ #else
62
+ #define yy_load_buffer_state ndt_yy_load_buffer_state
63
+ #endif
64
+
65
+ #ifdef yy_switch_to_buffer
66
+ #define ndt_yy_switch_to_buffer_ALREADY_DEFINED
67
+ #else
68
+ #define yy_switch_to_buffer ndt_yy_switch_to_buffer
69
+ #endif
70
+
71
+ #ifdef yypush_buffer_state
72
+ #define ndt_yypush_buffer_state_ALREADY_DEFINED
73
+ #else
74
+ #define yypush_buffer_state ndt_yypush_buffer_state
75
+ #endif
76
+
77
+ #ifdef yypop_buffer_state
78
+ #define ndt_yypop_buffer_state_ALREADY_DEFINED
79
+ #else
80
+ #define yypop_buffer_state ndt_yypop_buffer_state
81
+ #endif
82
+
83
+ #ifdef yyensure_buffer_stack
84
+ #define ndt_yyensure_buffer_stack_ALREADY_DEFINED
85
+ #else
86
+ #define yyensure_buffer_stack ndt_yyensure_buffer_stack
87
+ #endif
88
+
89
+ #ifdef yylex
90
+ #define ndt_yylex_ALREADY_DEFINED
91
+ #else
92
+ #define yylex ndt_yylex
93
+ #endif
94
+
95
+ #ifdef yyrestart
96
+ #define ndt_yyrestart_ALREADY_DEFINED
97
+ #else
98
+ #define yyrestart ndt_yyrestart
99
+ #endif
100
+
101
+ #ifdef yylex_init
102
+ #define ndt_yylex_init_ALREADY_DEFINED
103
+ #else
104
+ #define yylex_init ndt_yylex_init
105
+ #endif
106
+
107
+ #ifdef yylex_init_extra
108
+ #define ndt_yylex_init_extra_ALREADY_DEFINED
109
+ #else
110
+ #define yylex_init_extra ndt_yylex_init_extra
111
+ #endif
112
+
113
+ #ifdef yylex_destroy
114
+ #define ndt_yylex_destroy_ALREADY_DEFINED
115
+ #else
116
+ #define yylex_destroy ndt_yylex_destroy
117
+ #endif
118
+
119
+ #ifdef yyget_debug
120
+ #define ndt_yyget_debug_ALREADY_DEFINED
121
+ #else
122
+ #define yyget_debug ndt_yyget_debug
123
+ #endif
124
+
125
+ #ifdef yyset_debug
126
+ #define ndt_yyset_debug_ALREADY_DEFINED
127
+ #else
128
+ #define yyset_debug ndt_yyset_debug
129
+ #endif
130
+
131
+ #ifdef yyget_extra
132
+ #define ndt_yyget_extra_ALREADY_DEFINED
133
+ #else
134
+ #define yyget_extra ndt_yyget_extra
135
+ #endif
136
+
137
+ #ifdef yyset_extra
138
+ #define ndt_yyset_extra_ALREADY_DEFINED
139
+ #else
140
+ #define yyset_extra ndt_yyset_extra
141
+ #endif
142
+
143
+ #ifdef yyget_in
144
+ #define ndt_yyget_in_ALREADY_DEFINED
145
+ #else
146
+ #define yyget_in ndt_yyget_in
147
+ #endif
148
+
149
+ #ifdef yyset_in
150
+ #define ndt_yyset_in_ALREADY_DEFINED
151
+ #else
152
+ #define yyset_in ndt_yyset_in
153
+ #endif
154
+
155
+ #ifdef yyget_out
156
+ #define ndt_yyget_out_ALREADY_DEFINED
157
+ #else
158
+ #define yyget_out ndt_yyget_out
159
+ #endif
160
+
161
+ #ifdef yyset_out
162
+ #define ndt_yyset_out_ALREADY_DEFINED
163
+ #else
164
+ #define yyset_out ndt_yyset_out
165
+ #endif
166
+
167
+ #ifdef yyget_leng
168
+ #define ndt_yyget_leng_ALREADY_DEFINED
169
+ #else
170
+ #define yyget_leng ndt_yyget_leng
171
+ #endif
172
+
173
+ #ifdef yyget_text
174
+ #define ndt_yyget_text_ALREADY_DEFINED
175
+ #else
176
+ #define yyget_text ndt_yyget_text
177
+ #endif
178
+
179
+ #ifdef yyget_lineno
180
+ #define ndt_yyget_lineno_ALREADY_DEFINED
181
+ #else
182
+ #define yyget_lineno ndt_yyget_lineno
183
+ #endif
184
+
185
+ #ifdef yyset_lineno
186
+ #define ndt_yyset_lineno_ALREADY_DEFINED
187
+ #else
188
+ #define yyset_lineno ndt_yyset_lineno
189
+ #endif
190
+
191
+ #ifdef yyget_column
192
+ #define ndt_yyget_column_ALREADY_DEFINED
193
+ #else
194
+ #define yyget_column ndt_yyget_column
195
+ #endif
196
+
197
+ #ifdef yyset_column
198
+ #define ndt_yyset_column_ALREADY_DEFINED
199
+ #else
200
+ #define yyset_column ndt_yyset_column
201
+ #endif
202
+
203
+ #ifdef yywrap
204
+ #define ndt_yywrap_ALREADY_DEFINED
205
+ #else
206
+ #define yywrap ndt_yywrap
207
+ #endif
208
+
209
+ #ifdef yyget_lval
210
+ #define ndt_yyget_lval_ALREADY_DEFINED
211
+ #else
212
+ #define yyget_lval ndt_yyget_lval
213
+ #endif
214
+
215
+ #ifdef yyset_lval
216
+ #define ndt_yyset_lval_ALREADY_DEFINED
217
+ #else
218
+ #define yyset_lval ndt_yyset_lval
219
+ #endif
220
+
221
+ #ifdef yyget_lloc
222
+ #define ndt_yyget_lloc_ALREADY_DEFINED
223
+ #else
224
+ #define yyget_lloc ndt_yyget_lloc
225
+ #endif
226
+
227
+ #ifdef yyset_lloc
228
+ #define ndt_yyset_lloc_ALREADY_DEFINED
229
+ #else
230
+ #define yyset_lloc ndt_yyset_lloc
231
+ #endif
232
+
233
+ #ifdef yyalloc
234
+ #define ndt_yyalloc_ALREADY_DEFINED
235
+ #else
236
+ #define yyalloc ndt_yyalloc
237
+ #endif
238
+
239
+ #ifdef yyrealloc
240
+ #define ndt_yyrealloc_ALREADY_DEFINED
241
+ #else
242
+ #define yyrealloc ndt_yyrealloc
243
+ #endif
244
+
245
+ #ifdef yyfree
246
+ #define ndt_yyfree_ALREADY_DEFINED
247
+ #else
248
+ #define yyfree ndt_yyfree
249
+ #endif
250
+
251
+ /* First, we deal with platform-specific or compiler-specific issues. */
252
+
253
+ /* begin standard C headers. */
254
+ #include <stdio.h>
255
+ #include <string.h>
256
+ #include <errno.h>
257
+ #include <stdlib.h>
258
+
259
+ /* end standard C headers. */
260
+
261
+ /* flex integer type definitions */
262
+
263
+ #ifndef FLEXINT_H
264
+ #define FLEXINT_H
265
+
266
+ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
267
+
268
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
269
+
270
+ /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
271
+ * if you want the limit (max/min) macros for int types.
272
+ */
273
+ #ifndef __STDC_LIMIT_MACROS
274
+ #define __STDC_LIMIT_MACROS 1
275
+ #endif
276
+
277
+ #include <inttypes.h>
278
+ typedef int8_t flex_int8_t;
279
+ typedef uint8_t flex_uint8_t;
280
+ typedef int16_t flex_int16_t;
281
+ typedef uint16_t flex_uint16_t;
282
+ typedef int32_t flex_int32_t;
283
+ typedef uint32_t flex_uint32_t;
284
+ #else
285
+ typedef signed char flex_int8_t;
286
+ typedef short int flex_int16_t;
287
+ typedef int flex_int32_t;
288
+ typedef unsigned char flex_uint8_t;
289
+ typedef unsigned short int flex_uint16_t;
290
+ typedef unsigned int flex_uint32_t;
291
+
292
+ /* Limits of integral types. */
293
+ #ifndef INT8_MIN
294
+ #define INT8_MIN (-128)
295
+ #endif
296
+ #ifndef INT16_MIN
297
+ #define INT16_MIN (-32767-1)
298
+ #endif
299
+ #ifndef INT32_MIN
300
+ #define INT32_MIN (-2147483647-1)
301
+ #endif
302
+ #ifndef INT8_MAX
303
+ #define INT8_MAX (127)
304
+ #endif
305
+ #ifndef INT16_MAX
306
+ #define INT16_MAX (32767)
307
+ #endif
308
+ #ifndef INT32_MAX
309
+ #define INT32_MAX (2147483647)
310
+ #endif
311
+ #ifndef UINT8_MAX
312
+ #define UINT8_MAX (255U)
313
+ #endif
314
+ #ifndef UINT16_MAX
315
+ #define UINT16_MAX (65535U)
316
+ #endif
317
+ #ifndef UINT32_MAX
318
+ #define UINT32_MAX (4294967295U)
319
+ #endif
320
+
321
+ #ifndef SIZE_MAX
322
+ #define SIZE_MAX (~(size_t)0)
323
+ #endif
324
+
325
+ #endif /* ! C99 */
326
+
327
+ #endif /* ! FLEXINT_H */
328
+
329
+ /* begin standard C++ headers. */
330
+
331
+ /* TODO: this is always defined, so inline it */
332
+ #define yyconst const
333
+
334
+ #if defined(__GNUC__) && __GNUC__ >= 3
335
+ #define yynoreturn __attribute__((__noreturn__))
336
+ #else
337
+ #define yynoreturn
338
+ #endif
339
+
340
+ /* Returned upon end-of-file. */
341
+ #define YY_NULL 0
342
+
343
+ /* Promotes a possibly negative, possibly signed char to an
344
+ * integer in range [0..255] for use as an array index.
345
+ */
346
+ #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
347
+
348
+ /* An opaque pointer. */
349
+ #ifndef YY_TYPEDEF_YY_SCANNER_T
350
+ #define YY_TYPEDEF_YY_SCANNER_T
351
+ typedef void* yyscan_t;
352
+ #endif
353
+
354
+ /* For convenience, these vars (plus the bison vars far below)
355
+ are macros in the reentrant scanner. */
356
+ #define yyin yyg->yyin_r
357
+ #define yyout yyg->yyout_r
358
+ #define yyextra yyg->yyextra_r
359
+ #define yyleng yyg->yyleng_r
360
+ #define yytext yyg->yytext_r
361
+ #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
362
+ #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
363
+ #define yy_flex_debug yyg->yy_flex_debug_r
364
+
365
+ /* Enter a start condition. This macro really ought to take a parameter,
366
+ * but we do it the disgusting crufty way forced on us by the ()-less
367
+ * definition of BEGIN.
368
+ */
369
+ #define BEGIN yyg->yy_start = 1 + 2 *
370
+ /* Translate the current start state into a value that can be later handed
371
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
372
+ * compatibility.
373
+ */
374
+ #define YY_START ((yyg->yy_start - 1) / 2)
375
+ #define YYSTATE YY_START
376
+ /* Action number for EOF rule of a given start state. */
377
+ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
378
+ /* Special action meaning "start processing a new file". */
379
+ #define YY_NEW_FILE yyrestart( yyin , yyscanner )
380
+ #define YY_END_OF_BUFFER_CHAR 0
381
+
382
+ /* Size of default input buffer. */
383
+ #ifndef YY_BUF_SIZE
384
+ #ifdef __ia64__
385
+ /* On IA-64, the buffer size is 16k, not 8k.
386
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
387
+ * Ditto for the __ia64__ case accordingly.
388
+ */
389
+ #define YY_BUF_SIZE 32768
390
+ #else
391
+ #define YY_BUF_SIZE 16384
392
+ #endif /* __ia64__ */
393
+ #endif
394
+
395
+ /* The state buf must be large enough to hold one state per character in the main buffer.
396
+ */
397
+ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
398
+
399
+ #ifndef YY_TYPEDEF_YY_BUFFER_STATE
400
+ #define YY_TYPEDEF_YY_BUFFER_STATE
401
+ typedef struct yy_buffer_state *YY_BUFFER_STATE;
402
+ #endif
403
+
404
+ #ifndef YY_TYPEDEF_YY_SIZE_T
405
+ #define YY_TYPEDEF_YY_SIZE_T
406
+ typedef size_t yy_size_t;
407
+ #endif
408
+
409
+ #define EOB_ACT_CONTINUE_SCAN 0
410
+ #define EOB_ACT_END_OF_FILE 1
411
+ #define EOB_ACT_LAST_MATCH 2
412
+
413
+ /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
414
+ * access to the local variable yy_act. Since yyless() is a macro, it would break
415
+ * existing scanners that call yyless() from OUTSIDE yylex.
416
+ * One obvious solution it to make yy_act a global. I tried that, and saw
417
+ * a 5% performance hit in a non-yylineno scanner, because yy_act is
418
+ * normally declared as a register variable-- so it is not worth it.
419
+ */
420
+ #define YY_LESS_LINENO(n) \
421
+ do { \
422
+ int yyl;\
423
+ for ( yyl = n; yyl < yyleng; ++yyl )\
424
+ if ( yytext[yyl] == '\n' )\
425
+ --yylineno;\
426
+ }while(0)
427
+ #define YY_LINENO_REWIND_TO(dst) \
428
+ do {\
429
+ const char *p;\
430
+ for ( p = yy_cp-1; p >= (dst); --p)\
431
+ if ( *p == '\n' )\
432
+ --yylineno;\
433
+ }while(0)
434
+
435
+ /* Return all but the first "n" matched characters back to the input stream. */
436
+ #define yyless(n) \
437
+ do \
438
+ { \
439
+ /* Undo effects of setting up yytext. */ \
440
+ int yyless_macro_arg = (n); \
441
+ YY_LESS_LINENO(yyless_macro_arg);\
442
+ *yy_cp = yyg->yy_hold_char; \
443
+ YY_RESTORE_YY_MORE_OFFSET \
444
+ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
445
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
446
+ } \
447
+ while ( 0 )
448
+ #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
449
+
450
+ #ifndef YY_STRUCT_YY_BUFFER_STATE
451
+ #define YY_STRUCT_YY_BUFFER_STATE
452
+ struct yy_buffer_state
453
+ {
454
+ FILE *yy_input_file;
455
+
456
+ char *yy_ch_buf; /* input buffer */
457
+ char *yy_buf_pos; /* current position in input buffer */
458
+
459
+ /* Size of input buffer in bytes, not including room for EOB
460
+ * characters.
461
+ */
462
+ int yy_buf_size;
463
+
464
+ /* Number of characters read into yy_ch_buf, not including EOB
465
+ * characters.
466
+ */
467
+ int yy_n_chars;
468
+
469
+ /* Whether we "own" the buffer - i.e., we know we created it,
470
+ * and can realloc() it to grow it, and should free() it to
471
+ * delete it.
472
+ */
473
+ int yy_is_our_buffer;
474
+
475
+ /* Whether this is an "interactive" input source; if so, and
476
+ * if we're using stdio for input, then we want to use getc()
477
+ * instead of fread(), to make sure we stop fetching input after
478
+ * each newline.
479
+ */
480
+ int yy_is_interactive;
481
+
482
+ /* Whether we're considered to be at the beginning of a line.
483
+ * If so, '^' rules will be active on the next match, otherwise
484
+ * not.
485
+ */
486
+ int yy_at_bol;
487
+
488
+ int yy_bs_lineno; /**< The line count. */
489
+ int yy_bs_column; /**< The column count. */
490
+
491
+ /* Whether to try to fill the input buffer when we reach the
492
+ * end of it.
493
+ */
494
+ int yy_fill_buffer;
495
+
496
+ int yy_buffer_status;
497
+
498
+ #define YY_BUFFER_NEW 0
499
+ #define YY_BUFFER_NORMAL 1
500
+ /* When an EOF's been seen but there's still some text to process
501
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
502
+ * shouldn't try reading from the input source any more. We might
503
+ * still have a bunch of tokens to match, though, because of
504
+ * possible backing-up.
505
+ *
506
+ * When we actually see the EOF, we change the status to "new"
507
+ * (via yyrestart()), so that the user can continue scanning by
508
+ * just pointing yyin at a new input file.
509
+ */
510
+ #define YY_BUFFER_EOF_PENDING 2
511
+
512
+ };
513
+ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
514
+
515
+ /* We provide macros for accessing buffer states in case in the
516
+ * future we want to put the buffer states in a more general
517
+ * "scanner state".
518
+ *
519
+ * Returns the top of the stack, or NULL.
520
+ */
521
+ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
522
+ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
523
+ : NULL)
524
+ /* Same as previous macro, but useful when we know that the buffer stack is not
525
+ * NULL or when we need an lvalue. For internal use only.
526
+ */
527
+ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
528
+
529
+ void yyrestart ( FILE *input_file , yyscan_t yyscanner );
530
+ void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
531
+ YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
532
+ void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
533
+ void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
534
+ void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
535
+ void yypop_buffer_state ( yyscan_t yyscanner );
536
+
537
+ static void yyensure_buffer_stack ( yyscan_t yyscanner );
538
+ static void yy_load_buffer_state ( yyscan_t yyscanner );
539
+ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
540
+ #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
541
+
542
+ YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
543
+ YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
544
+ YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
545
+
546
+ void *yyalloc ( yy_size_t , yyscan_t yyscanner );
547
+ void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
548
+ void yyfree ( void * , yyscan_t yyscanner );
549
+
550
+ #define yy_new_buffer yy_create_buffer
551
+ #define yy_set_interactive(is_interactive) \
552
+ { \
553
+ if ( ! YY_CURRENT_BUFFER ){ \
554
+ yyensure_buffer_stack (yyscanner); \
555
+ YY_CURRENT_BUFFER_LVALUE = \
556
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
557
+ } \
558
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
559
+ }
560
+ #define yy_set_bol(at_bol) \
561
+ { \
562
+ if ( ! YY_CURRENT_BUFFER ){\
563
+ yyensure_buffer_stack (yyscanner); \
564
+ YY_CURRENT_BUFFER_LVALUE = \
565
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
566
+ } \
567
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
568
+ }
569
+ #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
570
+
571
+ /* Begin user sect3 */
572
+
573
+ #define ndt_yywrap(yyscanner) (/*CONSTCOND*/1)
574
+ #define YY_SKIP_YYWRAP
575
+ typedef flex_uint8_t YY_CHAR;
576
+
577
+ typedef int yy_state_type;
578
+
579
+ #define yytext_ptr yytext_r
580
+
581
+ static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
582
+ static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
583
+ static int yy_get_next_buffer ( yyscan_t yyscanner );
584
+ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
585
+
586
+ /* Done after the current pattern has been matched and before the
587
+ * corresponding action - sets up yytext.
588
+ */
589
+ #define YY_DO_BEFORE_ACTION \
590
+ yyg->yytext_ptr = yy_bp; \
591
+ yyleng = (int) (yy_cp - yy_bp); \
592
+ yyg->yy_hold_char = *yy_cp; \
593
+ *yy_cp = '\0'; \
594
+ yyg->yy_c_buf_p = yy_cp;
595
+ #define YY_NUM_RULES 67
596
+ #define YY_END_OF_BUFFER 68
597
+ /* This struct is not used in this scanner,
598
+ but its presence is necessary. */
599
+ struct yy_trans_info
600
+ {
601
+ flex_int32_t yy_verify;
602
+ flex_int32_t yy_nxt;
603
+ };
604
+ static const flex_int16_t yy_accept[227] =
605
+ { 0,
606
+ 0, 0, 68, 66, 64, 63, 63, 52, 66, 65,
607
+ 66, 53, 66, 43, 44, 49, 41, 66, 66, 61,
608
+ 61, 42, 55, 50, 56, 51, 58, 58, 58, 58,
609
+ 58, 58, 58, 47, 48, 59, 57, 57, 57, 57,
610
+ 57, 57, 57, 57, 57, 45, 54, 46, 0, 60,
611
+ 0, 65, 0, 0, 0, 0, 61, 61, 40, 0,
612
+ 62, 62, 61, 0, 0, 0, 0, 61, 58, 58,
613
+ 58, 58, 58, 35, 58, 58, 58, 59, 57, 57,
614
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
615
+ 57, 57, 57, 0, 39, 0, 62, 61, 61, 2,
616
+
617
+ 58, 58, 58, 58, 58, 58, 57, 57, 57, 57,
618
+ 57, 57, 57, 57, 36, 57, 57, 57, 38, 57,
619
+ 0, 58, 58, 58, 58, 58, 58, 5, 57, 57,
620
+ 27, 57, 57, 57, 57, 57, 57, 7, 57, 57,
621
+ 57, 57, 4, 1, 58, 58, 16, 58, 58, 58,
622
+ 29, 57, 57, 37, 57, 8, 9, 10, 57, 57,
623
+ 57, 57, 57, 57, 12, 57, 58, 58, 58, 3,
624
+ 6, 58, 57, 57, 57, 57, 57, 57, 24, 26,
625
+ 28, 13, 14, 15, 57, 20, 58, 58, 58, 57,
626
+ 57, 57, 57, 17, 18, 19, 25, 58, 58, 11,
627
+
628
+ 57, 57, 57, 57, 57, 57, 58, 58, 57, 57,
629
+ 21, 22, 57, 57, 32, 58, 57, 23, 57, 57,
630
+ 30, 34, 33, 57, 31, 0
631
+ } ;
632
+
633
+ static const YY_CHAR yy_ec[256] =
634
+ { 0,
635
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
636
+ 1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
637
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
638
+ 1, 2, 5, 6, 7, 1, 8, 9, 10, 11,
639
+ 12, 13, 14, 15, 16, 17, 1, 18, 19, 20,
640
+ 21, 22, 23, 24, 23, 25, 26, 27, 1, 28,
641
+ 29, 30, 31, 1, 32, 33, 34, 35, 36, 37,
642
+ 38, 38, 38, 38, 38, 38, 38, 39, 40, 38,
643
+ 38, 38, 41, 38, 42, 38, 38, 43, 38, 38,
644
+ 44, 45, 46, 1, 47, 1, 48, 49, 50, 51,
645
+
646
+ 52, 53, 54, 55, 56, 57, 57, 58, 59, 60,
647
+ 61, 62, 57, 63, 64, 65, 66, 67, 57, 68,
648
+ 69, 70, 71, 72, 73, 1, 1, 1, 1, 1,
649
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
650
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
651
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
652
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
653
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
654
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
655
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
656
+
657
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
658
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
659
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
660
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
661
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
662
+ 1, 1, 1, 1, 1
663
+ } ;
664
+
665
+ static const YY_CHAR yy_meta[74] =
666
+ { 0,
667
+ 1, 1, 2, 3, 1, 1, 1, 1, 1, 1,
668
+ 1, 1, 1, 4, 1, 4, 5, 6, 6, 6,
669
+ 6, 6, 6, 6, 6, 6, 1, 1, 1, 7,
670
+ 1, 8, 8, 8, 8, 9, 8, 10, 10, 10,
671
+ 10, 10, 10, 1, 1, 1, 10, 8, 8, 8,
672
+ 8, 9, 8, 10, 10, 10, 10, 10, 10, 10,
673
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
674
+ 1, 1, 1
675
+ } ;
676
+
677
+ static const flex_int16_t yy_base[238] =
678
+ { 0,
679
+ 0, 0, 371, 372, 372, 372, 372, 372, 68, 0,
680
+ 320, 372, 65, 372, 372, 372, 372, 59, 61, 97,
681
+ 73, 372, 372, 372, 372, 372, 309, 0, 307, 35,
682
+ 335, 38, 306, 372, 372, 0, 0, 31, 47, 40,
683
+ 305, 312, 41, 307, 51, 372, 372, 372, 97, 372,
684
+ 0, 0, 301, 91, 0, 148, 0, 94, 372, 344,
685
+ 91, 92, 86, 342, 91, 157, 0, 0, 0, 290,
686
+ 299, 289, 295, 0, 307, 300, 289, 0, 0, 291,
687
+ 286, 285, 301, 289, 279, 285, 280, 291, 273, 279,
688
+ 281, 277, 283, 287, 372, 164, 173, 182, 0, 0,
689
+
690
+ 275, 284, 287, 276, 273, 276, 273, 278, 277, 265,
691
+ 265, 274, 277, 188, 0, 272, 267, 257, 0, 268,
692
+ 264, 255, 261, 242, 254, 245, 240, 0, 229, 225,
693
+ 0, 212, 218, 194, 232, 235, 232, 0, 188, 205,
694
+ 191, 195, 0, 372, 197, 91, 0, 185, 196, 186,
695
+ 0, 184, 192, 196, 129, 0, 0, 0, 179, 176,
696
+ 186, 215, 218, 215, 0, 171, 167, 165, 168, 0,
697
+ 0, 180, 168, 162, 92, 205, 208, 205, 0, 0,
698
+ 0, 0, 0, 0, 163, 0, 160, 161, 172, 166,
699
+ 136, 152, 153, 0, 0, 0, 0, 165, 159, 0,
700
+
701
+ 161, 190, 188, 142, 98, 99, 97, 99, 104, 126,
702
+ 0, 0, 93, 83, 0, 84, 77, 0, 70, 71,
703
+ 0, 0, 0, 50, 0, 372, 257, 267, 277, 283,
704
+ 286, 290, 295, 300, 305, 311, 312
705
+ } ;
706
+
707
+ static const flex_int16_t yy_def[238] =
708
+ { 0,
709
+ 226, 1, 226, 226, 226, 226, 226, 226, 227, 228,
710
+ 226, 226, 229, 226, 226, 226, 226, 230, 226, 226,
711
+ 231, 226, 226, 226, 226, 226, 232, 232, 232, 232,
712
+ 232, 232, 232, 226, 226, 233, 234, 234, 234, 234,
713
+ 234, 234, 234, 234, 234, 226, 226, 226, 227, 226,
714
+ 227, 228, 226, 229, 229, 226, 20, 231, 226, 226,
715
+ 235, 235, 20, 63, 236, 226, 237, 58, 232, 232,
716
+ 232, 232, 232, 232, 232, 232, 232, 233, 234, 234,
717
+ 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
718
+ 234, 234, 234, 226, 226, 226, 226, 226, 237, 232,
719
+
720
+ 232, 232, 232, 232, 232, 232, 234, 234, 234, 234,
721
+ 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
722
+ 226, 232, 232, 232, 232, 232, 232, 234, 234, 234,
723
+ 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
724
+ 234, 234, 234, 226, 232, 232, 232, 232, 232, 232,
725
+ 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
726
+ 234, 234, 234, 234, 234, 234, 232, 232, 232, 232,
727
+ 232, 232, 234, 234, 234, 234, 234, 234, 234, 234,
728
+ 234, 234, 234, 234, 234, 232, 232, 232, 232, 234,
729
+ 234, 234, 234, 234, 234, 234, 234, 232, 232, 232,
730
+
731
+ 234, 234, 234, 234, 234, 234, 232, 232, 234, 234,
732
+ 234, 234, 234, 234, 232, 232, 234, 234, 234, 234,
733
+ 232, 234, 234, 234, 234, 0, 226, 226, 226, 226,
734
+ 226, 226, 226, 226, 226, 226, 226
735
+ } ;
736
+
737
+ static const flex_int16_t yy_nxt[446] =
738
+ { 0,
739
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
740
+ 14, 15, 16, 4, 17, 18, 19, 20, 21, 21,
741
+ 21, 21, 21, 21, 21, 21, 22, 23, 24, 25,
742
+ 26, 27, 28, 29, 28, 28, 30, 28, 31, 28,
743
+ 32, 33, 28, 34, 4, 35, 36, 37, 38, 39,
744
+ 37, 37, 40, 37, 37, 41, 37, 37, 37, 37,
745
+ 37, 37, 42, 43, 37, 44, 45, 37, 37, 37,
746
+ 46, 47, 48, 50, 50, 56, 57, 60, 61, 61,
747
+ 61, 61, 61, 61, 61, 61, 61, 75, 59, 62,
748
+ 72, 80, 73, 76, 82, 85, 89, 86, 92, 81,
749
+
750
+ 50, 83, 50, 225, 96, 90, 96, 84, 65, 55,
751
+ 62, 93, 51, 62, 63, 64, 64, 64, 64, 64,
752
+ 64, 64, 64, 168, 65, 226, 65, 65, 226, 65,
753
+ 224, 169, 65, 223, 222, 55, 66, 221, 220, 67,
754
+ 192, 51, 65, 65, 219, 65, 226, 176, 65, 177,
755
+ 218, 217, 178, 226, 202, 193, 203, 66, 216, 204,
756
+ 215, 214, 213, 212, 67, 61, 61, 61, 61, 61,
757
+ 61, 61, 61, 61, 98, 98, 98, 98, 98, 98,
758
+ 98, 97, 97, 97, 97, 97, 97, 97, 97, 97,
759
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 98,
760
+
761
+ 98, 98, 98, 98, 98, 98, 135, 211, 136, 210,
762
+ 209, 137, 138, 162, 208, 163, 207, 206, 164, 165,
763
+ 205, 201, 200, 199, 198, 197, 196, 195, 194, 191,
764
+ 190, 189, 188, 187, 186, 185, 184, 183, 182, 181,
765
+ 180, 179, 175, 174, 173, 172, 171, 170, 167, 139,
766
+ 161, 160, 159, 158, 157, 156, 166, 49, 155, 49,
767
+ 49, 49, 49, 49, 49, 49, 49, 52, 154, 153,
768
+ 52, 52, 52, 52, 52, 52, 52, 54, 152, 54,
769
+ 54, 54, 54, 54, 54, 54, 54, 58, 58, 58,
770
+ 68, 68, 151, 150, 68, 69, 149, 69, 69, 69,
771
+
772
+ 78, 148, 78, 78, 78, 79, 147, 79, 79, 79,
773
+ 61, 146, 145, 61, 97, 144, 97, 99, 143, 99,
774
+ 99, 142, 141, 140, 134, 133, 132, 131, 130, 129,
775
+ 128, 127, 126, 125, 124, 123, 122, 121, 120, 119,
776
+ 118, 117, 116, 115, 114, 113, 112, 111, 110, 109,
777
+ 108, 107, 106, 105, 104, 103, 102, 101, 100, 64,
778
+ 95, 94, 91, 88, 87, 77, 74, 71, 70, 53,
779
+ 226, 3, 226, 226, 226, 226, 226, 226, 226, 226,
780
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
781
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
782
+
783
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
784
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
785
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
786
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
787
+ 226, 226, 226, 226, 226
788
+ } ;
789
+
790
+ static const flex_int16_t yy_chk[446] =
791
+ { 0,
792
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
793
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
794
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
795
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
796
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
797
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
798
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
799
+ 1, 1, 1, 9, 13, 18, 18, 19, 19, 19,
800
+ 19, 19, 19, 19, 19, 19, 19, 32, 18, 21,
801
+ 30, 38, 30, 32, 39, 40, 43, 40, 45, 38,
802
+
803
+ 54, 39, 49, 224, 65, 43, 65, 39, 21, 13,
804
+ 58, 45, 9, 20, 20, 20, 20, 20, 20, 20,
805
+ 20, 20, 20, 146, 21, 63, 61, 62, 63, 58,
806
+ 220, 146, 20, 219, 217, 54, 20, 216, 214, 20,
807
+ 175, 49, 61, 62, 213, 58, 63, 155, 20, 155,
808
+ 210, 209, 155, 63, 191, 175, 191, 20, 208, 191,
809
+ 207, 206, 205, 204, 20, 56, 56, 56, 56, 56,
810
+ 56, 56, 56, 56, 66, 66, 66, 66, 66, 66,
811
+ 66, 96, 96, 96, 96, 96, 96, 96, 96, 96,
812
+ 97, 97, 97, 97, 97, 97, 97, 97, 97, 98,
813
+
814
+ 98, 98, 98, 98, 98, 98, 114, 203, 114, 202,
815
+ 201, 114, 114, 142, 199, 142, 198, 193, 142, 142,
816
+ 192, 190, 189, 188, 187, 185, 178, 177, 176, 174,
817
+ 173, 172, 169, 168, 167, 166, 164, 163, 162, 161,
818
+ 160, 159, 154, 153, 152, 150, 149, 148, 145, 114,
819
+ 141, 140, 139, 137, 136, 135, 142, 227, 134, 227,
820
+ 227, 227, 227, 227, 227, 227, 227, 228, 133, 132,
821
+ 228, 228, 228, 228, 228, 228, 228, 229, 130, 229,
822
+ 229, 229, 229, 229, 229, 229, 229, 230, 230, 230,
823
+ 231, 231, 129, 127, 231, 232, 126, 232, 232, 232,
824
+
825
+ 233, 125, 233, 233, 233, 234, 124, 234, 234, 234,
826
+ 235, 123, 122, 235, 236, 121, 236, 237, 120, 237,
827
+ 237, 118, 117, 116, 113, 112, 111, 110, 109, 108,
828
+ 107, 106, 105, 104, 103, 102, 101, 94, 93, 92,
829
+ 91, 90, 89, 88, 87, 86, 85, 84, 83, 82,
830
+ 81, 80, 77, 76, 75, 73, 72, 71, 70, 64,
831
+ 60, 53, 44, 42, 41, 33, 31, 29, 27, 11,
832
+ 3, 226, 226, 226, 226, 226, 226, 226, 226, 226,
833
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
834
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
835
+
836
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
837
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
838
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
839
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
840
+ 226, 226, 226, 226, 226
841
+ } ;
842
+
843
+ /* Table of booleans, true if rule could match eol. */
844
+ static const flex_int32_t yy_rule_can_match_eol[68] =
845
+ { 0,
846
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
847
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
848
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
849
+ 0, 0, 0, 1, 0, 0, 0, 0, };
850
+
851
+ /* The intent behind this definition is that it'll catch
852
+ * any uses of REJECT which flex missed.
853
+ */
854
+ #define REJECT reject_used_but_not_detected
855
+ #define yymore() yymore_used_but_not_detected
856
+ #define YY_MORE_ADJ 0
857
+ #define YY_RESTORE_YY_MORE_OFFSET
858
+ #line 1 "lexer.l"
859
+ #line 2 "lexer.l"
860
+ /*
861
+ * BSD 3-Clause License
862
+ *
863
+ * Copyright (c) 2017-2018, plures
864
+ * All rights reserved.
865
+ *
866
+ * Redistribution and use in source and binary forms, with or without
867
+ * modification, are permitted provided that the following conditions are met:
868
+ *
869
+ * 1. Redistributions of source code must retain the above copyright notice,
870
+ * this list of conditions and the following disclaimer.
871
+ *
872
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
873
+ * this list of conditions and the following disclaimer in the documentation
874
+ * and/or other materials provided with the distribution.
875
+ *
876
+ * 3. Neither the name of the copyright holder nor the names of its
877
+ * contributors may be used to endorse or promote products derived from
878
+ * this software without specific prior written permission.
879
+ *
880
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
881
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
882
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
883
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
884
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
885
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
886
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
887
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
888
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
889
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
890
+ */
891
+
892
+
893
+ #include <stdio.h>
894
+ #include <string.h>
895
+ #include <stdint.h>
896
+ #include <setjmp.h>
897
+ #include "ndtypes.h"
898
+ #include "parsefuncs.h"
899
+ #include "grammar.h"
900
+
901
+ /* From PostgreSQL: avoid exit() on fatal scanner errors. */
902
+ #undef fprintf
903
+ #define fprintf(file, fmt, msg) fprintf_to_longjmp(fmt, msg, yyscanner)
904
+
905
+ extern jmp_buf ndt_lexerror;
906
+ static void
907
+ fprintf_to_longjmp(const char *fmt, const char *msg, yyscan_t yyscanner)
908
+ {
909
+ (void)fmt; (void)msg; (void)yyscanner;
910
+
911
+ /* We don't have access to the parse context here: discard the error
912
+ message, which is always either an allocation failure or an internal
913
+ flex error. */
914
+ longjmp(ndt_lexerror, 1);
915
+ }
916
+
917
+ void *
918
+ yyalloc(size_t size, yyscan_t yyscanner)
919
+ {
920
+ (void)yyscanner;
921
+
922
+ return ndt_alloc(1, size);
923
+ }
924
+
925
+ void *
926
+ yyrealloc(void *ptr, size_t size, yyscan_t yyscanner)
927
+ {
928
+ (void)yyscanner;
929
+
930
+ return ndt_realloc(ptr, 1, size);
931
+ }
932
+
933
+ void
934
+ yyfree(void *ptr, yyscan_t yyscanner)
935
+ {
936
+ (void)yyscanner;
937
+
938
+ ndt_free(ptr);
939
+ }
940
+
941
+ #line 941 "lexer.c"
942
+ #define YY_NO_INPUT 1
943
+ #line 943 "lexer.c"
944
+
945
+ #define INITIAL 0
946
+
947
+ #ifndef YY_NO_UNISTD_H
948
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
949
+ * down here because we want the user's section 1 to have been scanned first.
950
+ * The user has a chance to override it with an option.
951
+ */
952
+ #include <unistd.h>
953
+ #endif
954
+
955
+ #define YY_EXTRA_TYPE ndt_context_t *
956
+
957
+ /* Holds the entire state of the reentrant scanner. */
958
+ struct yyguts_t
959
+ {
960
+
961
+ /* User-defined. Not touched by flex. */
962
+ YY_EXTRA_TYPE yyextra_r;
963
+
964
+ /* The rest are the same as the globals declared in the non-reentrant scanner. */
965
+ FILE *yyin_r, *yyout_r;
966
+ size_t yy_buffer_stack_top; /**< index of top of stack. */
967
+ size_t yy_buffer_stack_max; /**< capacity of stack. */
968
+ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
969
+ char yy_hold_char;
970
+ int yy_n_chars;
971
+ int yyleng_r;
972
+ char *yy_c_buf_p;
973
+ int yy_init;
974
+ int yy_start;
975
+ int yy_did_buffer_switch_on_eof;
976
+ int yy_start_stack_ptr;
977
+ int yy_start_stack_depth;
978
+ int *yy_start_stack;
979
+ yy_state_type yy_last_accepting_state;
980
+ char* yy_last_accepting_cpos;
981
+
982
+ int yylineno_r;
983
+ int yy_flex_debug_r;
984
+
985
+ char *yytext_r;
986
+ int yy_more_flag;
987
+ int yy_more_len;
988
+
989
+ YYSTYPE * yylval_r;
990
+
991
+ YYLTYPE * yylloc_r;
992
+
993
+ }; /* end struct yyguts_t */
994
+
995
+ static int yy_init_globals ( yyscan_t yyscanner );
996
+
997
+ /* This must go here because YYSTYPE and YYLTYPE are included
998
+ * from bison output in section 1.*/
999
+ # define yylval yyg->yylval_r
1000
+
1001
+ # define yylloc yyg->yylloc_r
1002
+
1003
+ int yylex_init (yyscan_t* scanner);
1004
+
1005
+ int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
1006
+
1007
+ /* Accessor methods to globals.
1008
+ These are made visible to non-reentrant scanners for convenience. */
1009
+
1010
+ int yylex_destroy ( yyscan_t yyscanner );
1011
+
1012
+ int yyget_debug ( yyscan_t yyscanner );
1013
+
1014
+ void yyset_debug ( int debug_flag , yyscan_t yyscanner );
1015
+
1016
+ YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
1017
+
1018
+ void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
1019
+
1020
+ FILE *yyget_in ( yyscan_t yyscanner );
1021
+
1022
+ void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
1023
+
1024
+ FILE *yyget_out ( yyscan_t yyscanner );
1025
+
1026
+ void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
1027
+
1028
+ int yyget_leng ( yyscan_t yyscanner );
1029
+
1030
+ char *yyget_text ( yyscan_t yyscanner );
1031
+
1032
+ int yyget_lineno ( yyscan_t yyscanner );
1033
+
1034
+ void yyset_lineno ( int _line_number , yyscan_t yyscanner );
1035
+
1036
+ int yyget_column ( yyscan_t yyscanner );
1037
+
1038
+ void yyset_column ( int _column_no , yyscan_t yyscanner );
1039
+
1040
+ YYSTYPE * yyget_lval ( yyscan_t yyscanner );
1041
+
1042
+ void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
1043
+
1044
+ YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
1045
+
1046
+ void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
1047
+
1048
+ /* Macros after this point can all be overridden by user definitions in
1049
+ * section 1.
1050
+ */
1051
+
1052
+ #ifndef YY_SKIP_YYWRAP
1053
+ #ifdef __cplusplus
1054
+ extern "C" int yywrap ( yyscan_t yyscanner );
1055
+ #else
1056
+ extern int yywrap ( yyscan_t yyscanner );
1057
+ #endif
1058
+ #endif
1059
+
1060
+ #ifndef YY_NO_UNPUT
1061
+
1062
+ #endif
1063
+
1064
+ #ifndef yytext_ptr
1065
+ static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
1066
+ #endif
1067
+
1068
+ #ifdef YY_NEED_STRLEN
1069
+ static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
1070
+ #endif
1071
+
1072
+ #ifndef YY_NO_INPUT
1073
+ #ifdef __cplusplus
1074
+ static int yyinput ( yyscan_t yyscanner );
1075
+ #else
1076
+ static int input ( yyscan_t yyscanner );
1077
+ #endif
1078
+
1079
+ #endif
1080
+
1081
+ /* Amount of stuff to slurp up with each read. */
1082
+ #ifndef YY_READ_BUF_SIZE
1083
+ #ifdef __ia64__
1084
+ /* On IA-64, the buffer size is 16k, not 8k */
1085
+ #define YY_READ_BUF_SIZE 16384
1086
+ #else
1087
+ #define YY_READ_BUF_SIZE 8192
1088
+ #endif /* __ia64__ */
1089
+ #endif
1090
+
1091
+ /* Copy whatever the last rule matched to the standard output. */
1092
+ #ifndef ECHO
1093
+ /* This used to be an fputs(), but since the string might contain NUL's,
1094
+ * we now use fwrite().
1095
+ */
1096
+ #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1097
+ #endif
1098
+
1099
+ /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1100
+ * is returned in "result".
1101
+ */
1102
+ #ifndef YY_INPUT
1103
+ #define YY_INPUT(buf,result,max_size) \
1104
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1105
+ { \
1106
+ int c = '*'; \
1107
+ int n; \
1108
+ for ( n = 0; n < max_size && \
1109
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1110
+ buf[n] = (char) c; \
1111
+ if ( c == '\n' ) \
1112
+ buf[n++] = (char) c; \
1113
+ if ( c == EOF && ferror( yyin ) ) \
1114
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
1115
+ result = n; \
1116
+ } \
1117
+ else \
1118
+ { \
1119
+ errno=0; \
1120
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1121
+ { \
1122
+ if( errno != EINTR) \
1123
+ { \
1124
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
1125
+ break; \
1126
+ } \
1127
+ errno=0; \
1128
+ clearerr(yyin); \
1129
+ } \
1130
+ }\
1131
+ \
1132
+
1133
+ #endif
1134
+
1135
+ /* No semi-colon after return; correct usage is to write "yyterminate();" -
1136
+ * we don't want an extra ';' after the "return" because that will cause
1137
+ * some compilers to complain about unreachable statements.
1138
+ */
1139
+ #ifndef yyterminate
1140
+ #define yyterminate() return YY_NULL
1141
+ #endif
1142
+
1143
+ /* Number of entries by which start-condition stack grows. */
1144
+ #ifndef YY_START_STACK_INCR
1145
+ #define YY_START_STACK_INCR 25
1146
+ #endif
1147
+
1148
+ /* Report a fatal error. */
1149
+ #ifndef YY_FATAL_ERROR
1150
+ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1151
+ #endif
1152
+
1153
+ /* end tables serialization structures and prototypes */
1154
+
1155
+ /* Default declaration of generated scanner - a define so the user can
1156
+ * easily add parameters.
1157
+ */
1158
+ #ifndef YY_DECL
1159
+ #define YY_DECL_IS_OURS 1
1160
+
1161
+ extern int yylex \
1162
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
1163
+
1164
+ #define YY_DECL int yylex \
1165
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1166
+ #endif /* !YY_DECL */
1167
+
1168
+ /* Code executed at the beginning of each rule, after yytext and yyleng
1169
+ * have been set up.
1170
+ */
1171
+ #ifndef YY_USER_ACTION
1172
+ #define YY_USER_ACTION
1173
+ #endif
1174
+
1175
+ /* Code executed at the end of each rule. */
1176
+ #ifndef YY_BREAK
1177
+ #define YY_BREAK /*LINTED*/break;
1178
+ #endif
1179
+
1180
+ #define YY_RULE_SETUP \
1181
+ YY_USER_ACTION
1182
+
1183
+ /** The main scanner function which does all the work.
1184
+ */
1185
+ YY_DECL
1186
+ {
1187
+ yy_state_type yy_current_state;
1188
+ char *yy_cp, *yy_bp;
1189
+ int yy_act;
1190
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1191
+
1192
+ yylval = yylval_param;
1193
+
1194
+ yylloc = yylloc_param;
1195
+
1196
+ if ( !yyg->yy_init )
1197
+ {
1198
+ yyg->yy_init = 1;
1199
+
1200
+ #ifdef YY_USER_INIT
1201
+ YY_USER_INIT;
1202
+ #endif
1203
+
1204
+ if ( ! yyg->yy_start )
1205
+ yyg->yy_start = 1; /* first start state */
1206
+
1207
+ if ( ! yyin )
1208
+ yyin = stdin;
1209
+
1210
+ if ( ! yyout )
1211
+ yyout = stdout;
1212
+
1213
+ if ( ! YY_CURRENT_BUFFER ) {
1214
+ yyensure_buffer_stack (yyscanner);
1215
+ YY_CURRENT_BUFFER_LVALUE =
1216
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1217
+ }
1218
+
1219
+ yy_load_buffer_state( yyscanner );
1220
+ }
1221
+
1222
+ {
1223
+ #line 127 "lexer.l"
1224
+
1225
+
1226
+ #line 1226 "lexer.c"
1227
+
1228
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1229
+ {
1230
+ yy_cp = yyg->yy_c_buf_p;
1231
+
1232
+ /* Support of yytext. */
1233
+ *yy_cp = yyg->yy_hold_char;
1234
+
1235
+ /* yy_bp points to the position in yy_ch_buf of the start of
1236
+ * the current run.
1237
+ */
1238
+ yy_bp = yy_cp;
1239
+
1240
+ yy_current_state = yyg->yy_start;
1241
+ yy_match:
1242
+ do
1243
+ {
1244
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1245
+ if ( yy_accept[yy_current_state] )
1246
+ {
1247
+ yyg->yy_last_accepting_state = yy_current_state;
1248
+ yyg->yy_last_accepting_cpos = yy_cp;
1249
+ }
1250
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1251
+ {
1252
+ yy_current_state = (int) yy_def[yy_current_state];
1253
+ if ( yy_current_state >= 227 )
1254
+ yy_c = yy_meta[yy_c];
1255
+ }
1256
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1257
+ ++yy_cp;
1258
+ }
1259
+ while ( yy_current_state != 226 );
1260
+ yy_cp = yyg->yy_last_accepting_cpos;
1261
+ yy_current_state = yyg->yy_last_accepting_state;
1262
+
1263
+ yy_find_action:
1264
+ yy_act = yy_accept[yy_current_state];
1265
+
1266
+ YY_DO_BEFORE_ACTION;
1267
+
1268
+ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1269
+ {
1270
+ int yyl;
1271
+ for ( yyl = 0; yyl < yyleng; ++yyl )
1272
+ if ( yytext[yyl] == '\n' )
1273
+
1274
+ do{ yylineno++;
1275
+ yycolumn=0;
1276
+ }while(0)
1277
+ ;
1278
+ }
1279
+
1280
+ do_action: /* This label is used only to access EOF actions. */
1281
+
1282
+ switch ( yy_act )
1283
+ { /* beginning of action switch */
1284
+ case 0: /* must back up */
1285
+ /* undo the effects of YY_DO_BEFORE_ACTION */
1286
+ *yy_cp = yyg->yy_hold_char;
1287
+ yy_cp = yyg->yy_last_accepting_cpos;
1288
+ yy_current_state = yyg->yy_last_accepting_state;
1289
+ goto yy_find_action;
1290
+
1291
+ case 1:
1292
+ YY_RULE_SETUP
1293
+ #line 129 "lexer.l"
1294
+ {
1295
+ yycolumn = 1;
1296
+
1297
+ #undef YY_USER_ACTION
1298
+ #define YY_USER_ACTION \
1299
+ yylloc->first_line = yylloc->last_line = yylineno; \
1300
+ yylloc->first_column = yycolumn; \
1301
+ yylloc->last_column = yycolumn+yyleng-1; \
1302
+ yycolumn += yyleng;
1303
+
1304
+ }
1305
+ YY_BREAK
1306
+ case 2:
1307
+ YY_RULE_SETUP
1308
+ #line 141 "lexer.l"
1309
+ { return ANY_KIND; }
1310
+ YY_BREAK
1311
+ case 3:
1312
+ YY_RULE_SETUP
1313
+ #line 142 "lexer.l"
1314
+ { return SCALAR_KIND; }
1315
+ YY_BREAK
1316
+ case 4:
1317
+ YY_RULE_SETUP
1318
+ #line 144 "lexer.l"
1319
+ { return VOID; }
1320
+ YY_BREAK
1321
+ case 5:
1322
+ YY_RULE_SETUP
1323
+ #line 145 "lexer.l"
1324
+ { return BOOL; }
1325
+ YY_BREAK
1326
+ case 6:
1327
+ YY_RULE_SETUP
1328
+ #line 147 "lexer.l"
1329
+ { return SIGNED_KIND; }
1330
+ YY_BREAK
1331
+ case 7:
1332
+ YY_RULE_SETUP
1333
+ #line 148 "lexer.l"
1334
+ { return INT8; }
1335
+ YY_BREAK
1336
+ case 8:
1337
+ YY_RULE_SETUP
1338
+ #line 149 "lexer.l"
1339
+ { return INT16; }
1340
+ YY_BREAK
1341
+ case 9:
1342
+ YY_RULE_SETUP
1343
+ #line 150 "lexer.l"
1344
+ { return INT32; }
1345
+ YY_BREAK
1346
+ case 10:
1347
+ YY_RULE_SETUP
1348
+ #line 151 "lexer.l"
1349
+ { return INT64; }
1350
+ YY_BREAK
1351
+ case 11:
1352
+ YY_RULE_SETUP
1353
+ #line 153 "lexer.l"
1354
+ { return UNSIGNED_KIND; }
1355
+ YY_BREAK
1356
+ case 12:
1357
+ YY_RULE_SETUP
1358
+ #line 154 "lexer.l"
1359
+ { return UINT8; }
1360
+ YY_BREAK
1361
+ case 13:
1362
+ YY_RULE_SETUP
1363
+ #line 155 "lexer.l"
1364
+ { return UINT16; }
1365
+ YY_BREAK
1366
+ case 14:
1367
+ YY_RULE_SETUP
1368
+ #line 156 "lexer.l"
1369
+ { return UINT32; }
1370
+ YY_BREAK
1371
+ case 15:
1372
+ YY_RULE_SETUP
1373
+ #line 157 "lexer.l"
1374
+ { return UINT64; }
1375
+ YY_BREAK
1376
+ case 16:
1377
+ YY_RULE_SETUP
1378
+ #line 159 "lexer.l"
1379
+ { return FLOAT_KIND; }
1380
+ YY_BREAK
1381
+ case 17:
1382
+ YY_RULE_SETUP
1383
+ #line 160 "lexer.l"
1384
+ { return FLOAT16; }
1385
+ YY_BREAK
1386
+ case 18:
1387
+ YY_RULE_SETUP
1388
+ #line 161 "lexer.l"
1389
+ { return FLOAT32; }
1390
+ YY_BREAK
1391
+ case 19:
1392
+ YY_RULE_SETUP
1393
+ #line 162 "lexer.l"
1394
+ { return FLOAT64; }
1395
+ YY_BREAK
1396
+ case 20:
1397
+ YY_RULE_SETUP
1398
+ #line 164 "lexer.l"
1399
+ { return COMPLEX_KIND; }
1400
+ YY_BREAK
1401
+ case 21:
1402
+ YY_RULE_SETUP
1403
+ #line 165 "lexer.l"
1404
+ { return COMPLEX32; }
1405
+ YY_BREAK
1406
+ case 22:
1407
+ YY_RULE_SETUP
1408
+ #line 166 "lexer.l"
1409
+ { return COMPLEX64; }
1410
+ YY_BREAK
1411
+ case 23:
1412
+ YY_RULE_SETUP
1413
+ #line 167 "lexer.l"
1414
+ { return COMPLEX128; }
1415
+ YY_BREAK
1416
+ case 24:
1417
+ YY_RULE_SETUP
1418
+ #line 169 "lexer.l"
1419
+ { return INTPTR; }
1420
+ YY_BREAK
1421
+ case 25:
1422
+ YY_RULE_SETUP
1423
+ #line 170 "lexer.l"
1424
+ { return UINTPTR; }
1425
+ YY_BREAK
1426
+ case 26:
1427
+ YY_RULE_SETUP
1428
+ #line 171 "lexer.l"
1429
+ { return SIZE; }
1430
+ YY_BREAK
1431
+ case 27:
1432
+ YY_RULE_SETUP
1433
+ #line 172 "lexer.l"
1434
+ { return CHAR; }
1435
+ YY_BREAK
1436
+ case 28:
1437
+ YY_RULE_SETUP
1438
+ #line 173 "lexer.l"
1439
+ { return STRING; }
1440
+ YY_BREAK
1441
+ case 29:
1442
+ YY_RULE_SETUP
1443
+ #line 174 "lexer.l"
1444
+ { return BYTES; }
1445
+ YY_BREAK
1446
+ case 30:
1447
+ YY_RULE_SETUP
1448
+ #line 176 "lexer.l"
1449
+ { return FIXED_STRING_KIND; }
1450
+ YY_BREAK
1451
+ case 31:
1452
+ YY_RULE_SETUP
1453
+ #line 177 "lexer.l"
1454
+ { return FIXED_STRING; }
1455
+ YY_BREAK
1456
+ case 32:
1457
+ YY_RULE_SETUP
1458
+ #line 179 "lexer.l"
1459
+ { return FIXED_BYTES_KIND; }
1460
+ YY_BREAK
1461
+ case 33:
1462
+ YY_RULE_SETUP
1463
+ #line 180 "lexer.l"
1464
+ { return FIXED_BYTES; }
1465
+ YY_BREAK
1466
+ case 34:
1467
+ YY_RULE_SETUP
1468
+ #line 182 "lexer.l"
1469
+ { return CATEGORICAL; }
1470
+ YY_BREAK
1471
+ case 35:
1472
+ YY_RULE_SETUP
1473
+ #line 183 "lexer.l"
1474
+ { return NA; }
1475
+ YY_BREAK
1476
+ case 36:
1477
+ YY_RULE_SETUP
1478
+ #line 185 "lexer.l"
1479
+ { return REF; }
1480
+ YY_BREAK
1481
+ case 37:
1482
+ YY_RULE_SETUP
1483
+ #line 187 "lexer.l"
1484
+ { return FIXED; }
1485
+ YY_BREAK
1486
+ case 38:
1487
+ YY_RULE_SETUP
1488
+ #line 188 "lexer.l"
1489
+ { return VAR; }
1490
+ YY_BREAK
1491
+ case 39:
1492
+ YY_RULE_SETUP
1493
+ #line 190 "lexer.l"
1494
+ { return ELLIPSIS; }
1495
+ YY_BREAK
1496
+ case 40:
1497
+ YY_RULE_SETUP
1498
+ #line 191 "lexer.l"
1499
+ { return RARROW; }
1500
+ YY_BREAK
1501
+ case 41:
1502
+ YY_RULE_SETUP
1503
+ #line 192 "lexer.l"
1504
+ { return COMMA; }
1505
+ YY_BREAK
1506
+ case 42:
1507
+ YY_RULE_SETUP
1508
+ #line 193 "lexer.l"
1509
+ { return COLON; }
1510
+ YY_BREAK
1511
+ case 43:
1512
+ YY_RULE_SETUP
1513
+ #line 194 "lexer.l"
1514
+ { return LPAREN; }
1515
+ YY_BREAK
1516
+ case 44:
1517
+ YY_RULE_SETUP
1518
+ #line 195 "lexer.l"
1519
+ { return RPAREN; }
1520
+ YY_BREAK
1521
+ case 45:
1522
+ YY_RULE_SETUP
1523
+ #line 196 "lexer.l"
1524
+ { return LBRACE; }
1525
+ YY_BREAK
1526
+ case 46:
1527
+ YY_RULE_SETUP
1528
+ #line 197 "lexer.l"
1529
+ { return RBRACE; }
1530
+ YY_BREAK
1531
+ case 47:
1532
+ YY_RULE_SETUP
1533
+ #line 198 "lexer.l"
1534
+ { return LBRACK; }
1535
+ YY_BREAK
1536
+ case 48:
1537
+ YY_RULE_SETUP
1538
+ #line 199 "lexer.l"
1539
+ { return RBRACK; }
1540
+ YY_BREAK
1541
+ case 49:
1542
+ YY_RULE_SETUP
1543
+ #line 200 "lexer.l"
1544
+ { return STAR; }
1545
+ YY_BREAK
1546
+ case 50:
1547
+ YY_RULE_SETUP
1548
+ #line 201 "lexer.l"
1549
+ { return EQUAL; }
1550
+ YY_BREAK
1551
+ case 51:
1552
+ YY_RULE_SETUP
1553
+ #line 202 "lexer.l"
1554
+ { return QUESTIONMARK; }
1555
+ YY_BREAK
1556
+ case 52:
1557
+ YY_RULE_SETUP
1558
+ #line 203 "lexer.l"
1559
+ { return BANG; }
1560
+ YY_BREAK
1561
+ case 53:
1562
+ YY_RULE_SETUP
1563
+ #line 204 "lexer.l"
1564
+ { return AMPERSAND; }
1565
+ YY_BREAK
1566
+ case 54:
1567
+ YY_RULE_SETUP
1568
+ #line 205 "lexer.l"
1569
+ { return BAR; }
1570
+ YY_BREAK
1571
+ case 55:
1572
+ YY_RULE_SETUP
1573
+ #line 206 "lexer.l"
1574
+ { return LESS; }
1575
+ YY_BREAK
1576
+ case 56:
1577
+ YY_RULE_SETUP
1578
+ #line 207 "lexer.l"
1579
+ { return GREATER; }
1580
+ YY_BREAK
1581
+ case 57:
1582
+ YY_RULE_SETUP
1583
+ #line 209 "lexer.l"
1584
+ { yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return NAME_LOWER; }
1585
+ YY_BREAK
1586
+ case 58:
1587
+ YY_RULE_SETUP
1588
+ #line 210 "lexer.l"
1589
+ { yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return NAME_UPPER; }
1590
+ YY_BREAK
1591
+ case 59:
1592
+ YY_RULE_SETUP
1593
+ #line 211 "lexer.l"
1594
+ { yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return NAME_OTHER; }
1595
+ YY_BREAK
1596
+ case 60:
1597
+ YY_RULE_SETUP
1598
+ #line 213 "lexer.l"
1599
+ { yylval->string = mk_stringlit(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return STRINGLIT; }
1600
+ YY_BREAK
1601
+ case 61:
1602
+ YY_RULE_SETUP
1603
+ #line 214 "lexer.l"
1604
+ { yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return INTEGER; }
1605
+ YY_BREAK
1606
+ case 62:
1607
+ YY_RULE_SETUP
1608
+ #line 215 "lexer.l"
1609
+ { yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return FLOATNUMBER; }
1610
+ YY_BREAK
1611
+ case 63:
1612
+ /* rule 63 can match eol */
1613
+ YY_RULE_SETUP
1614
+ #line 217 "lexer.l"
1615
+ { yycolumn = 1; }
1616
+ YY_BREAK
1617
+ case 64:
1618
+ YY_RULE_SETUP
1619
+ #line 218 "lexer.l"
1620
+ {} /* ignore */
1621
+ YY_BREAK
1622
+ case 65:
1623
+ YY_RULE_SETUP
1624
+ #line 219 "lexer.l"
1625
+ {} /* ignore */
1626
+ YY_BREAK
1627
+ case 66:
1628
+ YY_RULE_SETUP
1629
+ #line 220 "lexer.l"
1630
+ { return ERRTOKEN; }
1631
+ YY_BREAK
1632
+ case 67:
1633
+ YY_RULE_SETUP
1634
+ #line 222 "lexer.l"
1635
+ YY_FATAL_ERROR( "flex scanner jammed" );
1636
+ YY_BREAK
1637
+ #line 1637 "lexer.c"
1638
+ case YY_STATE_EOF(INITIAL):
1639
+ yyterminate();
1640
+
1641
+ case YY_END_OF_BUFFER:
1642
+ {
1643
+ /* Amount of text matched not including the EOB char. */
1644
+ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1645
+
1646
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
1647
+ *yy_cp = yyg->yy_hold_char;
1648
+ YY_RESTORE_YY_MORE_OFFSET
1649
+
1650
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1651
+ {
1652
+ /* We're scanning a new file or input source. It's
1653
+ * possible that this happened because the user
1654
+ * just pointed yyin at a new source and called
1655
+ * yylex(). If so, then we have to assure
1656
+ * consistency between YY_CURRENT_BUFFER and our
1657
+ * globals. Here is the right place to do so, because
1658
+ * this is the first action (other than possibly a
1659
+ * back-up) that will match for the new input source.
1660
+ */
1661
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1662
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1663
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1664
+ }
1665
+
1666
+ /* Note that here we test for yy_c_buf_p "<=" to the position
1667
+ * of the first EOB in the buffer, since yy_c_buf_p will
1668
+ * already have been incremented past the NUL character
1669
+ * (since all states make transitions on EOB to the
1670
+ * end-of-buffer state). Contrast this with the test
1671
+ * in input().
1672
+ */
1673
+ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1674
+ { /* This was really a NUL. */
1675
+ yy_state_type yy_next_state;
1676
+
1677
+ yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1678
+
1679
+ yy_current_state = yy_get_previous_state( yyscanner );
1680
+
1681
+ /* Okay, we're now positioned to make the NUL
1682
+ * transition. We couldn't have
1683
+ * yy_get_previous_state() go ahead and do it
1684
+ * for us because it doesn't know how to deal
1685
+ * with the possibility of jamming (and we don't
1686
+ * want to build jamming into it because then it
1687
+ * will run more slowly).
1688
+ */
1689
+
1690
+ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1691
+
1692
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1693
+
1694
+ if ( yy_next_state )
1695
+ {
1696
+ /* Consume the NUL. */
1697
+ yy_cp = ++yyg->yy_c_buf_p;
1698
+ yy_current_state = yy_next_state;
1699
+ goto yy_match;
1700
+ }
1701
+
1702
+ else
1703
+ {
1704
+ yy_cp = yyg->yy_last_accepting_cpos;
1705
+ yy_current_state = yyg->yy_last_accepting_state;
1706
+ goto yy_find_action;
1707
+ }
1708
+ }
1709
+
1710
+ else switch ( yy_get_next_buffer( yyscanner ) )
1711
+ {
1712
+ case EOB_ACT_END_OF_FILE:
1713
+ {
1714
+ yyg->yy_did_buffer_switch_on_eof = 0;
1715
+
1716
+ if ( yywrap( yyscanner ) )
1717
+ {
1718
+ /* Note: because we've taken care in
1719
+ * yy_get_next_buffer() to have set up
1720
+ * yytext, we can now set up
1721
+ * yy_c_buf_p so that if some total
1722
+ * hoser (like flex itself) wants to
1723
+ * call the scanner after we return the
1724
+ * YY_NULL, it'll still work - another
1725
+ * YY_NULL will get returned.
1726
+ */
1727
+ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1728
+
1729
+ yy_act = YY_STATE_EOF(YY_START);
1730
+ goto do_action;
1731
+ }
1732
+
1733
+ else
1734
+ {
1735
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
1736
+ YY_NEW_FILE;
1737
+ }
1738
+ break;
1739
+ }
1740
+
1741
+ case EOB_ACT_CONTINUE_SCAN:
1742
+ yyg->yy_c_buf_p =
1743
+ yyg->yytext_ptr + yy_amount_of_matched_text;
1744
+
1745
+ yy_current_state = yy_get_previous_state( yyscanner );
1746
+
1747
+ yy_cp = yyg->yy_c_buf_p;
1748
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1749
+ goto yy_match;
1750
+
1751
+ case EOB_ACT_LAST_MATCH:
1752
+ yyg->yy_c_buf_p =
1753
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1754
+
1755
+ yy_current_state = yy_get_previous_state( yyscanner );
1756
+
1757
+ yy_cp = yyg->yy_c_buf_p;
1758
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1759
+ goto yy_find_action;
1760
+ }
1761
+ break;
1762
+ }
1763
+
1764
+ default:
1765
+ YY_FATAL_ERROR(
1766
+ "fatal flex scanner internal error--no action found" );
1767
+ } /* end of action switch */
1768
+ } /* end of scanning one token */
1769
+ } /* end of user's declarations */
1770
+ } /* end of yylex */
1771
+
1772
+ /* yy_get_next_buffer - try to read in a new buffer
1773
+ *
1774
+ * Returns a code representing an action:
1775
+ * EOB_ACT_LAST_MATCH -
1776
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1777
+ * EOB_ACT_END_OF_FILE - end of file
1778
+ */
1779
+ static int yy_get_next_buffer (yyscan_t yyscanner)
1780
+ {
1781
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1782
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1783
+ char *source = yyg->yytext_ptr;
1784
+ int number_to_move, i;
1785
+ int ret_val;
1786
+
1787
+ if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1788
+ YY_FATAL_ERROR(
1789
+ "fatal flex scanner internal error--end of buffer missed" );
1790
+
1791
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1792
+ { /* Don't try to fill the buffer, so this is an EOF. */
1793
+ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1794
+ {
1795
+ /* We matched a single character, the EOB, so
1796
+ * treat this as a final EOF.
1797
+ */
1798
+ return EOB_ACT_END_OF_FILE;
1799
+ }
1800
+
1801
+ else
1802
+ {
1803
+ /* We matched some text prior to the EOB, first
1804
+ * process it.
1805
+ */
1806
+ return EOB_ACT_LAST_MATCH;
1807
+ }
1808
+ }
1809
+
1810
+ /* Try to read more data. */
1811
+
1812
+ /* First move last chars to start of buffer. */
1813
+ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
1814
+
1815
+ for ( i = 0; i < number_to_move; ++i )
1816
+ *(dest++) = *(source++);
1817
+
1818
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1819
+ /* don't do the read, it's not guaranteed to return an EOF,
1820
+ * just force an EOF
1821
+ */
1822
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1823
+
1824
+ else
1825
+ {
1826
+ int num_to_read =
1827
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1828
+
1829
+ while ( num_to_read <= 0 )
1830
+ { /* Not enough room in the buffer - grow it. */
1831
+
1832
+ /* just a shorter name for the current buffer */
1833
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1834
+
1835
+ int yy_c_buf_p_offset =
1836
+ (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1837
+
1838
+ if ( b->yy_is_our_buffer )
1839
+ {
1840
+ int new_size = b->yy_buf_size * 2;
1841
+
1842
+ if ( new_size <= 0 )
1843
+ b->yy_buf_size += b->yy_buf_size / 8;
1844
+ else
1845
+ b->yy_buf_size *= 2;
1846
+
1847
+ b->yy_ch_buf = (char *)
1848
+ /* Include room in for 2 EOB chars. */
1849
+ yyrealloc( (void *) b->yy_ch_buf,
1850
+ (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1851
+ }
1852
+ else
1853
+ /* Can't grow it, we don't own it. */
1854
+ b->yy_ch_buf = NULL;
1855
+
1856
+ if ( ! b->yy_ch_buf )
1857
+ YY_FATAL_ERROR(
1858
+ "fatal error - scanner input buffer overflow" );
1859
+
1860
+ yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1861
+
1862
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1863
+ number_to_move - 1;
1864
+
1865
+ }
1866
+
1867
+ if ( num_to_read > YY_READ_BUF_SIZE )
1868
+ num_to_read = YY_READ_BUF_SIZE;
1869
+
1870
+ /* Read in more data. */
1871
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1872
+ yyg->yy_n_chars, num_to_read );
1873
+
1874
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1875
+ }
1876
+
1877
+ if ( yyg->yy_n_chars == 0 )
1878
+ {
1879
+ if ( number_to_move == YY_MORE_ADJ )
1880
+ {
1881
+ ret_val = EOB_ACT_END_OF_FILE;
1882
+ yyrestart( yyin , yyscanner);
1883
+ }
1884
+
1885
+ else
1886
+ {
1887
+ ret_val = EOB_ACT_LAST_MATCH;
1888
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1889
+ YY_BUFFER_EOF_PENDING;
1890
+ }
1891
+ }
1892
+
1893
+ else
1894
+ ret_val = EOB_ACT_CONTINUE_SCAN;
1895
+
1896
+ if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1897
+ /* Extend the array by 50%, plus the number we really need. */
1898
+ int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1899
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1900
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
1901
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1902
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1903
+ /* "- 2" to take care of EOB's */
1904
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1905
+ }
1906
+
1907
+ yyg->yy_n_chars += number_to_move;
1908
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1909
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1910
+
1911
+ yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1912
+
1913
+ return ret_val;
1914
+ }
1915
+
1916
+ /* yy_get_previous_state - get the state just before the EOB char was reached */
1917
+
1918
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1919
+ {
1920
+ yy_state_type yy_current_state;
1921
+ char *yy_cp;
1922
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1923
+
1924
+ yy_current_state = yyg->yy_start;
1925
+
1926
+ for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1927
+ {
1928
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1929
+ if ( yy_accept[yy_current_state] )
1930
+ {
1931
+ yyg->yy_last_accepting_state = yy_current_state;
1932
+ yyg->yy_last_accepting_cpos = yy_cp;
1933
+ }
1934
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1935
+ {
1936
+ yy_current_state = (int) yy_def[yy_current_state];
1937
+ if ( yy_current_state >= 227 )
1938
+ yy_c = yy_meta[yy_c];
1939
+ }
1940
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1941
+ }
1942
+
1943
+ return yy_current_state;
1944
+ }
1945
+
1946
+ /* yy_try_NUL_trans - try to make a transition on the NUL character
1947
+ *
1948
+ * synopsis
1949
+ * next_state = yy_try_NUL_trans( current_state );
1950
+ */
1951
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1952
+ {
1953
+ int yy_is_jam;
1954
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1955
+ char *yy_cp = yyg->yy_c_buf_p;
1956
+
1957
+ YY_CHAR yy_c = 1;
1958
+ if ( yy_accept[yy_current_state] )
1959
+ {
1960
+ yyg->yy_last_accepting_state = yy_current_state;
1961
+ yyg->yy_last_accepting_cpos = yy_cp;
1962
+ }
1963
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1964
+ {
1965
+ yy_current_state = (int) yy_def[yy_current_state];
1966
+ if ( yy_current_state >= 227 )
1967
+ yy_c = yy_meta[yy_c];
1968
+ }
1969
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1970
+ yy_is_jam = (yy_current_state == 226);
1971
+
1972
+ (void)yyg;
1973
+ return yy_is_jam ? 0 : yy_current_state;
1974
+ }
1975
+
1976
+ #ifndef YY_NO_UNPUT
1977
+
1978
+ #endif
1979
+
1980
+ #ifndef YY_NO_INPUT
1981
+ #ifdef __cplusplus
1982
+ static int yyinput (yyscan_t yyscanner)
1983
+ #else
1984
+ static int input (yyscan_t yyscanner)
1985
+ #endif
1986
+
1987
+ {
1988
+ int c;
1989
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1990
+
1991
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
1992
+
1993
+ if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1994
+ {
1995
+ /* yy_c_buf_p now points to the character we want to return.
1996
+ * If this occurs *before* the EOB characters, then it's a
1997
+ * valid NUL; if not, then we've hit the end of the buffer.
1998
+ */
1999
+ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2000
+ /* This was really a NUL. */
2001
+ *yyg->yy_c_buf_p = '\0';
2002
+
2003
+ else
2004
+ { /* need more input */
2005
+ int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
2006
+ ++yyg->yy_c_buf_p;
2007
+
2008
+ switch ( yy_get_next_buffer( yyscanner ) )
2009
+ {
2010
+ case EOB_ACT_LAST_MATCH:
2011
+ /* This happens because yy_g_n_b()
2012
+ * sees that we've accumulated a
2013
+ * token and flags that we need to
2014
+ * try matching the token before
2015
+ * proceeding. But for input(),
2016
+ * there's no matching to consider.
2017
+ * So convert the EOB_ACT_LAST_MATCH
2018
+ * to EOB_ACT_END_OF_FILE.
2019
+ */
2020
+
2021
+ /* Reset buffer status. */
2022
+ yyrestart( yyin , yyscanner);
2023
+
2024
+ /*FALLTHROUGH*/
2025
+
2026
+ case EOB_ACT_END_OF_FILE:
2027
+ {
2028
+ if ( yywrap( yyscanner ) )
2029
+ return 0;
2030
+
2031
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
2032
+ YY_NEW_FILE;
2033
+ #ifdef __cplusplus
2034
+ return yyinput(yyscanner);
2035
+ #else
2036
+ return input(yyscanner);
2037
+ #endif
2038
+ }
2039
+
2040
+ case EOB_ACT_CONTINUE_SCAN:
2041
+ yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2042
+ break;
2043
+ }
2044
+ }
2045
+ }
2046
+
2047
+ c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2048
+ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2049
+ yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2050
+
2051
+ if ( c == '\n' )
2052
+
2053
+ do{ yylineno++;
2054
+ yycolumn=0;
2055
+ }while(0)
2056
+ ;
2057
+
2058
+ return c;
2059
+ }
2060
+ #endif /* ifndef YY_NO_INPUT */
2061
+
2062
+ /** Immediately switch to a different input stream.
2063
+ * @param input_file A readable stream.
2064
+ * @param yyscanner The scanner object.
2065
+ * @note This function does not reset the start condition to @c INITIAL .
2066
+ */
2067
+ void yyrestart (FILE * input_file , yyscan_t yyscanner)
2068
+ {
2069
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2070
+
2071
+ if ( ! YY_CURRENT_BUFFER ){
2072
+ yyensure_buffer_stack (yyscanner);
2073
+ YY_CURRENT_BUFFER_LVALUE =
2074
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
2075
+ }
2076
+
2077
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2078
+ yy_load_buffer_state( yyscanner );
2079
+ }
2080
+
2081
+ /** Switch to a different input buffer.
2082
+ * @param new_buffer The new input buffer.
2083
+ * @param yyscanner The scanner object.
2084
+ */
2085
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2086
+ {
2087
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2088
+
2089
+ /* TODO. We should be able to replace this entire function body
2090
+ * with
2091
+ * yypop_buffer_state();
2092
+ * yypush_buffer_state(new_buffer);
2093
+ */
2094
+ yyensure_buffer_stack (yyscanner);
2095
+ if ( YY_CURRENT_BUFFER == new_buffer )
2096
+ return;
2097
+
2098
+ if ( YY_CURRENT_BUFFER )
2099
+ {
2100
+ /* Flush out information for old buffer. */
2101
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
2102
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2103
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2104
+ }
2105
+
2106
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
2107
+ yy_load_buffer_state( yyscanner );
2108
+
2109
+ /* We don't actually know whether we did this switch during
2110
+ * EOF (yywrap()) processing, but the only time this flag
2111
+ * is looked at is after yywrap() is called, so it's safe
2112
+ * to go ahead and always set it.
2113
+ */
2114
+ yyg->yy_did_buffer_switch_on_eof = 1;
2115
+ }
2116
+
2117
+ static void yy_load_buffer_state (yyscan_t yyscanner)
2118
+ {
2119
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2120
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2121
+ yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2122
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2123
+ yyg->yy_hold_char = *yyg->yy_c_buf_p;
2124
+ }
2125
+
2126
+ /** Allocate and initialize an input buffer state.
2127
+ * @param file A readable stream.
2128
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2129
+ * @param yyscanner The scanner object.
2130
+ * @return the allocated buffer state.
2131
+ */
2132
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2133
+ {
2134
+ YY_BUFFER_STATE b;
2135
+
2136
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2137
+ if ( ! b )
2138
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2139
+
2140
+ b->yy_buf_size = size;
2141
+
2142
+ /* yy_ch_buf has to be 2 characters longer than the size given because
2143
+ * we need to put in 2 end-of-buffer characters.
2144
+ */
2145
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2146
+ if ( ! b->yy_ch_buf )
2147
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2148
+
2149
+ b->yy_is_our_buffer = 1;
2150
+
2151
+ yy_init_buffer( b, file , yyscanner);
2152
+
2153
+ return b;
2154
+ }
2155
+
2156
+ /** Destroy the buffer.
2157
+ * @param b a buffer created with yy_create_buffer()
2158
+ * @param yyscanner The scanner object.
2159
+ */
2160
+ void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2161
+ {
2162
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2163
+
2164
+ if ( ! b )
2165
+ return;
2166
+
2167
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2168
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2169
+
2170
+ if ( b->yy_is_our_buffer )
2171
+ yyfree( (void *) b->yy_ch_buf , yyscanner );
2172
+
2173
+ yyfree( (void *) b , yyscanner );
2174
+ }
2175
+
2176
+ /* Initializes or reinitializes a buffer.
2177
+ * This function is sometimes called more than once on the same buffer,
2178
+ * such as during a yyrestart() or at EOF.
2179
+ */
2180
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2181
+
2182
+ {
2183
+ int oerrno = errno;
2184
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2185
+
2186
+ yy_flush_buffer( b , yyscanner);
2187
+
2188
+ b->yy_input_file = file;
2189
+ b->yy_fill_buffer = 1;
2190
+
2191
+ /* If b is the current buffer, then yy_init_buffer was _probably_
2192
+ * called from yyrestart() or through yy_get_next_buffer.
2193
+ * In that case, we don't want to reset the lineno or column.
2194
+ */
2195
+ if (b != YY_CURRENT_BUFFER){
2196
+ b->yy_bs_lineno = 1;
2197
+ b->yy_bs_column = 0;
2198
+ }
2199
+
2200
+ b->yy_is_interactive = 0;
2201
+
2202
+ errno = oerrno;
2203
+ }
2204
+
2205
+ /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2206
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2207
+ * @param yyscanner The scanner object.
2208
+ */
2209
+ void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2210
+ {
2211
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2212
+ if ( ! b )
2213
+ return;
2214
+
2215
+ b->yy_n_chars = 0;
2216
+
2217
+ /* We always need two end-of-buffer characters. The first causes
2218
+ * a transition to the end-of-buffer state. The second causes
2219
+ * a jam in that state.
2220
+ */
2221
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2222
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2223
+
2224
+ b->yy_buf_pos = &b->yy_ch_buf[0];
2225
+
2226
+ b->yy_at_bol = 1;
2227
+ b->yy_buffer_status = YY_BUFFER_NEW;
2228
+
2229
+ if ( b == YY_CURRENT_BUFFER )
2230
+ yy_load_buffer_state( yyscanner );
2231
+ }
2232
+
2233
+ /** Pushes the new state onto the stack. The new state becomes
2234
+ * the current state. This function will allocate the stack
2235
+ * if necessary.
2236
+ * @param new_buffer The new state.
2237
+ * @param yyscanner The scanner object.
2238
+ */
2239
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2240
+ {
2241
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2242
+ if (new_buffer == NULL)
2243
+ return;
2244
+
2245
+ yyensure_buffer_stack(yyscanner);
2246
+
2247
+ /* This block is copied from yy_switch_to_buffer. */
2248
+ if ( YY_CURRENT_BUFFER )
2249
+ {
2250
+ /* Flush out information for old buffer. */
2251
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
2252
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2253
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2254
+ }
2255
+
2256
+ /* Only push if top exists. Otherwise, replace top. */
2257
+ if (YY_CURRENT_BUFFER)
2258
+ yyg->yy_buffer_stack_top++;
2259
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
2260
+
2261
+ /* copied from yy_switch_to_buffer. */
2262
+ yy_load_buffer_state( yyscanner );
2263
+ yyg->yy_did_buffer_switch_on_eof = 1;
2264
+ }
2265
+
2266
+ /** Removes and deletes the top of the stack, if present.
2267
+ * The next element becomes the new top.
2268
+ * @param yyscanner The scanner object.
2269
+ */
2270
+ void yypop_buffer_state (yyscan_t yyscanner)
2271
+ {
2272
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2273
+ if (!YY_CURRENT_BUFFER)
2274
+ return;
2275
+
2276
+ yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
2277
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2278
+ if (yyg->yy_buffer_stack_top > 0)
2279
+ --yyg->yy_buffer_stack_top;
2280
+
2281
+ if (YY_CURRENT_BUFFER) {
2282
+ yy_load_buffer_state( yyscanner );
2283
+ yyg->yy_did_buffer_switch_on_eof = 1;
2284
+ }
2285
+ }
2286
+
2287
+ /* Allocates the stack if it does not exist.
2288
+ * Guarantees space for at least one push.
2289
+ */
2290
+ static void yyensure_buffer_stack (yyscan_t yyscanner)
2291
+ {
2292
+ yy_size_t num_to_alloc;
2293
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2294
+
2295
+ if (!yyg->yy_buffer_stack) {
2296
+
2297
+ /* First allocation is just for 2 elements, since we don't know if this
2298
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
2299
+ * immediate realloc on the next call.
2300
+ */
2301
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2302
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
2303
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
2304
+ , yyscanner);
2305
+ if ( ! yyg->yy_buffer_stack )
2306
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2307
+
2308
+ memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2309
+
2310
+ yyg->yy_buffer_stack_max = num_to_alloc;
2311
+ yyg->yy_buffer_stack_top = 0;
2312
+ return;
2313
+ }
2314
+
2315
+ if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2316
+
2317
+ /* Increase the buffer to prepare for a possible push. */
2318
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
2319
+
2320
+ num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2321
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
2322
+ (yyg->yy_buffer_stack,
2323
+ num_to_alloc * sizeof(struct yy_buffer_state*)
2324
+ , yyscanner);
2325
+ if ( ! yyg->yy_buffer_stack )
2326
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2327
+
2328
+ /* zero only the new slots.*/
2329
+ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2330
+ yyg->yy_buffer_stack_max = num_to_alloc;
2331
+ }
2332
+ }
2333
+
2334
+ /** Setup the input buffer state to scan directly from a user-specified character buffer.
2335
+ * @param base the character buffer
2336
+ * @param size the size in bytes of the character buffer
2337
+ * @param yyscanner The scanner object.
2338
+ * @return the newly allocated buffer state object.
2339
+ */
2340
+ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2341
+ {
2342
+ YY_BUFFER_STATE b;
2343
+
2344
+ if ( size < 2 ||
2345
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
2346
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
2347
+ /* They forgot to leave room for the EOB's. */
2348
+ return NULL;
2349
+
2350
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2351
+ if ( ! b )
2352
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2353
+
2354
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2355
+ b->yy_buf_pos = b->yy_ch_buf = base;
2356
+ b->yy_is_our_buffer = 0;
2357
+ b->yy_input_file = NULL;
2358
+ b->yy_n_chars = b->yy_buf_size;
2359
+ b->yy_is_interactive = 0;
2360
+ b->yy_at_bol = 1;
2361
+ b->yy_fill_buffer = 0;
2362
+ b->yy_buffer_status = YY_BUFFER_NEW;
2363
+
2364
+ yy_switch_to_buffer( b , yyscanner );
2365
+
2366
+ return b;
2367
+ }
2368
+
2369
+ /** Setup the input buffer state to scan a string. The next call to yylex() will
2370
+ * scan from a @e copy of @a str.
2371
+ * @param yystr a NUL-terminated string to scan
2372
+ * @param yyscanner The scanner object.
2373
+ * @return the newly allocated buffer state object.
2374
+ * @note If you want to scan bytes that may contain NUL values, then use
2375
+ * yy_scan_bytes() instead.
2376
+ */
2377
+ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
2378
+ {
2379
+
2380
+ return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
2381
+ }
2382
+
2383
+ /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2384
+ * scan from a @e copy of @a bytes.
2385
+ * @param yybytes the byte buffer to scan
2386
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2387
+ * @param yyscanner The scanner object.
2388
+ * @return the newly allocated buffer state object.
2389
+ */
2390
+ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2391
+ {
2392
+ YY_BUFFER_STATE b;
2393
+ char *buf;
2394
+ yy_size_t n;
2395
+ int i;
2396
+
2397
+ /* Get memory for full buffer, including space for trailing EOB's. */
2398
+ n = (yy_size_t) (_yybytes_len + 2);
2399
+ buf = (char *) yyalloc( n , yyscanner );
2400
+ if ( ! buf )
2401
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2402
+
2403
+ for ( i = 0; i < _yybytes_len; ++i )
2404
+ buf[i] = yybytes[i];
2405
+
2406
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2407
+
2408
+ b = yy_scan_buffer( buf, n , yyscanner);
2409
+ if ( ! b )
2410
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2411
+
2412
+ /* It's okay to grow etc. this buffer, and we should throw it
2413
+ * away when we're done.
2414
+ */
2415
+ b->yy_is_our_buffer = 1;
2416
+
2417
+ return b;
2418
+ }
2419
+
2420
+ #ifndef YY_EXIT_FAILURE
2421
+ #define YY_EXIT_FAILURE 2
2422
+ #endif
2423
+
2424
+ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
2425
+ {
2426
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2427
+ (void)yyg;
2428
+ fprintf( stderr, "%s\n", msg );
2429
+ exit( YY_EXIT_FAILURE );
2430
+ }
2431
+
2432
+ /* Redefine yyless() so it works in section 3 code. */
2433
+
2434
+ #undef yyless
2435
+ #define yyless(n) \
2436
+ do \
2437
+ { \
2438
+ /* Undo effects of setting up yytext. */ \
2439
+ int yyless_macro_arg = (n); \
2440
+ YY_LESS_LINENO(yyless_macro_arg);\
2441
+ yytext[yyleng] = yyg->yy_hold_char; \
2442
+ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2443
+ yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2444
+ *yyg->yy_c_buf_p = '\0'; \
2445
+ yyleng = yyless_macro_arg; \
2446
+ } \
2447
+ while ( 0 )
2448
+
2449
+ /* Accessor methods (get/set functions) to struct members. */
2450
+
2451
+ /** Get the user-defined data for this scanner.
2452
+ * @param yyscanner The scanner object.
2453
+ */
2454
+ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
2455
+ {
2456
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2457
+ return yyextra;
2458
+ }
2459
+
2460
+ /** Get the current line number.
2461
+ * @param yyscanner The scanner object.
2462
+ */
2463
+ int yyget_lineno (yyscan_t yyscanner)
2464
+ {
2465
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2466
+
2467
+ if (! YY_CURRENT_BUFFER)
2468
+ return 0;
2469
+
2470
+ return yylineno;
2471
+ }
2472
+
2473
+ /** Get the current column number.
2474
+ * @param yyscanner The scanner object.
2475
+ */
2476
+ int yyget_column (yyscan_t yyscanner)
2477
+ {
2478
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2479
+
2480
+ if (! YY_CURRENT_BUFFER)
2481
+ return 0;
2482
+
2483
+ return yycolumn;
2484
+ }
2485
+
2486
+ /** Get the input stream.
2487
+ * @param yyscanner The scanner object.
2488
+ */
2489
+ FILE *yyget_in (yyscan_t yyscanner)
2490
+ {
2491
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2492
+ return yyin;
2493
+ }
2494
+
2495
+ /** Get the output stream.
2496
+ * @param yyscanner The scanner object.
2497
+ */
2498
+ FILE *yyget_out (yyscan_t yyscanner)
2499
+ {
2500
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2501
+ return yyout;
2502
+ }
2503
+
2504
+ /** Get the length of the current token.
2505
+ * @param yyscanner The scanner object.
2506
+ */
2507
+ int yyget_leng (yyscan_t yyscanner)
2508
+ {
2509
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2510
+ return yyleng;
2511
+ }
2512
+
2513
+ /** Get the current token.
2514
+ * @param yyscanner The scanner object.
2515
+ */
2516
+
2517
+ char *yyget_text (yyscan_t yyscanner)
2518
+ {
2519
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2520
+ return yytext;
2521
+ }
2522
+
2523
+ /** Set the user-defined data. This data is never touched by the scanner.
2524
+ * @param user_defined The data to be associated with this scanner.
2525
+ * @param yyscanner The scanner object.
2526
+ */
2527
+ void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2528
+ {
2529
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2530
+ yyextra = user_defined ;
2531
+ }
2532
+
2533
+ /** Set the current line number.
2534
+ * @param _line_number line number
2535
+ * @param yyscanner The scanner object.
2536
+ */
2537
+ void yyset_lineno (int _line_number , yyscan_t yyscanner)
2538
+ {
2539
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2540
+
2541
+ /* lineno is only valid if an input buffer exists. */
2542
+ if (! YY_CURRENT_BUFFER )
2543
+ YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
2544
+
2545
+ yylineno = _line_number;
2546
+ }
2547
+
2548
+ /** Set the current column.
2549
+ * @param _column_no column number
2550
+ * @param yyscanner The scanner object.
2551
+ */
2552
+ void yyset_column (int _column_no , yyscan_t yyscanner)
2553
+ {
2554
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2555
+
2556
+ /* column is only valid if an input buffer exists. */
2557
+ if (! YY_CURRENT_BUFFER )
2558
+ YY_FATAL_ERROR( "yyset_column called with no buffer" );
2559
+
2560
+ yycolumn = _column_no;
2561
+ }
2562
+
2563
+ /** Set the input stream. This does not discard the current
2564
+ * input buffer.
2565
+ * @param _in_str A readable stream.
2566
+ * @param yyscanner The scanner object.
2567
+ * @see yy_switch_to_buffer
2568
+ */
2569
+ void yyset_in (FILE * _in_str , yyscan_t yyscanner)
2570
+ {
2571
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2572
+ yyin = _in_str ;
2573
+ }
2574
+
2575
+ void yyset_out (FILE * _out_str , yyscan_t yyscanner)
2576
+ {
2577
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2578
+ yyout = _out_str ;
2579
+ }
2580
+
2581
+ int yyget_debug (yyscan_t yyscanner)
2582
+ {
2583
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2584
+ return yy_flex_debug;
2585
+ }
2586
+
2587
+ void yyset_debug (int _bdebug , yyscan_t yyscanner)
2588
+ {
2589
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2590
+ yy_flex_debug = _bdebug ;
2591
+ }
2592
+
2593
+ /* Accessor methods for yylval and yylloc */
2594
+
2595
+ YYSTYPE * yyget_lval (yyscan_t yyscanner)
2596
+ {
2597
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2598
+ return yylval;
2599
+ }
2600
+
2601
+ void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
2602
+ {
2603
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2604
+ yylval = yylval_param;
2605
+ }
2606
+
2607
+ YYLTYPE *yyget_lloc (yyscan_t yyscanner)
2608
+ {
2609
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2610
+ return yylloc;
2611
+ }
2612
+
2613
+ void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
2614
+ {
2615
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2616
+ yylloc = yylloc_param;
2617
+ }
2618
+
2619
+ /* User-visible API */
2620
+
2621
+ /* yylex_init is special because it creates the scanner itself, so it is
2622
+ * the ONLY reentrant function that doesn't take the scanner as the last argument.
2623
+ * That's why we explicitly handle the declaration, instead of using our macros.
2624
+ */
2625
+ int yylex_init(yyscan_t* ptr_yy_globals)
2626
+ {
2627
+ if (ptr_yy_globals == NULL){
2628
+ errno = EINVAL;
2629
+ return 1;
2630
+ }
2631
+
2632
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2633
+
2634
+ if (*ptr_yy_globals == NULL){
2635
+ errno = ENOMEM;
2636
+ return 1;
2637
+ }
2638
+
2639
+ /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2640
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2641
+
2642
+ return yy_init_globals ( *ptr_yy_globals );
2643
+ }
2644
+
2645
+ /* yylex_init_extra has the same functionality as yylex_init, but follows the
2646
+ * convention of taking the scanner as the last argument. Note however, that
2647
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
2648
+ * is the reason, too, why this function also must handle its own declaration).
2649
+ * The user defined value in the first argument will be available to yyalloc in
2650
+ * the yyextra field.
2651
+ */
2652
+ int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
2653
+ {
2654
+ struct yyguts_t dummy_yyguts;
2655
+
2656
+ yyset_extra (yy_user_defined, &dummy_yyguts);
2657
+
2658
+ if (ptr_yy_globals == NULL){
2659
+ errno = EINVAL;
2660
+ return 1;
2661
+ }
2662
+
2663
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2664
+
2665
+ if (*ptr_yy_globals == NULL){
2666
+ errno = ENOMEM;
2667
+ return 1;
2668
+ }
2669
+
2670
+ /* By setting to 0xAA, we expose bugs in
2671
+ yy_init_globals. Leave at 0x00 for releases. */
2672
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2673
+
2674
+ yyset_extra (yy_user_defined, *ptr_yy_globals);
2675
+
2676
+ return yy_init_globals ( *ptr_yy_globals );
2677
+ }
2678
+
2679
+ static int yy_init_globals (yyscan_t yyscanner)
2680
+ {
2681
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2682
+ /* Initialization is the same as for the non-reentrant scanner.
2683
+ * This function is called from yylex_destroy(), so don't allocate here.
2684
+ */
2685
+
2686
+ yyg->yy_buffer_stack = NULL;
2687
+ yyg->yy_buffer_stack_top = 0;
2688
+ yyg->yy_buffer_stack_max = 0;
2689
+ yyg->yy_c_buf_p = NULL;
2690
+ yyg->yy_init = 0;
2691
+ yyg->yy_start = 0;
2692
+
2693
+ yyg->yy_start_stack_ptr = 0;
2694
+ yyg->yy_start_stack_depth = 0;
2695
+ yyg->yy_start_stack = NULL;
2696
+
2697
+ /* Defined in main.c */
2698
+ #ifdef YY_STDINIT
2699
+ yyin = stdin;
2700
+ yyout = stdout;
2701
+ #else
2702
+ yyin = NULL;
2703
+ yyout = NULL;
2704
+ #endif
2705
+
2706
+ /* For future reference: Set errno on error, since we are called by
2707
+ * yylex_init()
2708
+ */
2709
+ return 0;
2710
+ }
2711
+
2712
+ /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2713
+ int yylex_destroy (yyscan_t yyscanner)
2714
+ {
2715
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2716
+
2717
+ /* Pop the buffer stack, destroying each element. */
2718
+ while(YY_CURRENT_BUFFER){
2719
+ yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
2720
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2721
+ yypop_buffer_state(yyscanner);
2722
+ }
2723
+
2724
+ /* Destroy the stack itself. */
2725
+ yyfree(yyg->yy_buffer_stack , yyscanner);
2726
+ yyg->yy_buffer_stack = NULL;
2727
+
2728
+ /* Destroy the start condition stack. */
2729
+ yyfree( yyg->yy_start_stack , yyscanner );
2730
+ yyg->yy_start_stack = NULL;
2731
+
2732
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
2733
+ * yylex() is called, initialization will occur. */
2734
+ yy_init_globals( yyscanner);
2735
+
2736
+ /* Destroy the main struct (reentrant only). */
2737
+ yyfree ( yyscanner , yyscanner );
2738
+ yyscanner = NULL;
2739
+ return 0;
2740
+ }
2741
+
2742
+ /*
2743
+ * Internal utility routines.
2744
+ */
2745
+
2746
+ #ifndef yytext_ptr
2747
+ static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
2748
+ {
2749
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2750
+ (void)yyg;
2751
+
2752
+ int i;
2753
+ for ( i = 0; i < n; ++i )
2754
+ s1[i] = s2[i];
2755
+ }
2756
+ #endif
2757
+
2758
+ #ifdef YY_NEED_STRLEN
2759
+ static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
2760
+ {
2761
+ int n;
2762
+ for ( n = 0; s[n]; ++n )
2763
+ ;
2764
+
2765
+ return n;
2766
+ }
2767
+ #endif
2768
+
2769
+ #define YYTABLES_NAME "yytables"
2770
+
2771
+ #line 222 "lexer.l"
2772
+
2773
+