ndtypes 0.2.0dev4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CONTRIBUTING.md +50 -0
- data/Gemfile +2 -0
- data/History.md +0 -0
- data/README.md +19 -0
- data/Rakefile +125 -0
- data/ext/ruby_ndtypes/extconf.rb +55 -0
- data/ext/ruby_ndtypes/gc_guard.c +36 -0
- data/ext/ruby_ndtypes/gc_guard.h +12 -0
- data/ext/ruby_ndtypes/ndtypes/AUTHORS.txt +5 -0
- data/ext/ruby_ndtypes/ndtypes/INSTALL.txt +101 -0
- data/ext/ruby_ndtypes/ndtypes/LICENSE.txt +29 -0
- data/ext/ruby_ndtypes/ndtypes/MANIFEST.in +3 -0
- data/ext/ruby_ndtypes/ndtypes/Makefile.in +87 -0
- data/ext/ruby_ndtypes/ndtypes/README.rst +47 -0
- data/ext/ruby_ndtypes/ndtypes/config.guess +1530 -0
- data/ext/ruby_ndtypes/ndtypes/config.h.in +67 -0
- data/ext/ruby_ndtypes/ndtypes/config.sub +1782 -0
- data/ext/ruby_ndtypes/ndtypes/configure +5260 -0
- data/ext/ruby_ndtypes/ndtypes/configure.ac +161 -0
- data/ext/ruby_ndtypes/ndtypes/doc/Makefile +14 -0
- data/ext/ruby_ndtypes/ndtypes/doc/_static/copybutton.js +66 -0
- data/ext/ruby_ndtypes/ndtypes/doc/conf.py +26 -0
- data/ext/ruby_ndtypes/ndtypes/doc/grammar/grammar.rst +27 -0
- data/ext/ruby_ndtypes/ndtypes/doc/index.rst +56 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/context.rst +131 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/encodings.rst +68 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/fields-values.rst +175 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/functions.rst +72 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/index.rst +43 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/init.rst +48 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/io.rst +100 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/memory.rst +124 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/predicates.rst +110 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/typedef.rst +31 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/types.rst +594 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/util.rst +166 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/buffer-protocol.rst +27 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/index.rst +21 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/pattern-matching.rst +330 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/quickstart.rst +144 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/types.rst +544 -0
- data/ext/ruby_ndtypes/ndtypes/doc/releases/index.rst +35 -0
- data/ext/ruby_ndtypes/ndtypes/install-sh +527 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.in +271 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.vc +269 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/alloc.c +230 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.c +268 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.h +109 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile.in +73 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile.vc +70 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/README.txt +16 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.c +2179 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.h +134 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.y +428 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.c +2543 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.h +735 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.l +176 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.c +543 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.c +110 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/context.c +228 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/copy.c +634 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/encodings.c +116 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/equal.c +288 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.c +3067 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.h +180 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.y +417 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/io.c +1658 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.c +2773 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.h +734 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.l +222 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/match.c +1132 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.c +2323 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h.in +893 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/overflow.h +161 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.c +473 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.h +92 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parser.c +246 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.c +269 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.h +197 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile.in +48 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile.vc +46 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.c +1007 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.c +442 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/slice.h +42 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.c +238 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.h +50 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.c +371 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.h +100 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.in +55 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.vc +45 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/alloc_fail.c +82 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/alloc_fail.h +49 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/runtest.c +1657 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test.h +85 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_array.c +115 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_buffer.c +137 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_indent.c +201 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_match.c +2397 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_numba.c +57 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse.c +349 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_error.c +27839 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_roundtrip.c +350 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_record.c +231 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typecheck.c +375 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typedef.c +65 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/valgrind.supp +30 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/bench.c +79 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/indent.c +94 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/print_ast.c +96 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/util.c +474 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/values.c +228 -0
- data/ext/ruby_ndtypes/ndtypes/python/bench.py +49 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndt_randtype.py +409 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndt_support.py +14 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/__init__.py +70 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/_ndtypes.c +1332 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/docstrings.h +319 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/pyndtypes.h +154 -0
- data/ext/ruby_ndtypes/ndtypes/python/test_ndtypes.py +1977 -0
- data/ext/ruby_ndtypes/ndtypes/setup.py +288 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/INSTALL.txt +41 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/runtest32.bat +15 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/runtest64.bat +13 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcbuild32.bat +38 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcbuild64.bat +38 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcclean.bat +13 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcdistclean.bat +14 -0
- data/ext/ruby_ndtypes/ruby_ndtypes.c +1003 -0
- data/ext/ruby_ndtypes/ruby_ndtypes.h +37 -0
- data/ext/ruby_ndtypes/ruby_ndtypes_internal.h +28 -0
- data/lib/ndtypes.rb +45 -0
- data/lib/ndtypes/errors.rb +2 -0
- data/lib/ndtypes/version.rb +6 -0
- data/ndtypes.gemspec +47 -0
- data/spec/gc_table_spec.rb +10 -0
- data/spec/ndtypes_spec.rb +289 -0
- data/spec/spec_helper.rb +241 -0
- metadata +242 -0
@@ -0,0 +1,2543 @@
|
|
1
|
+
#line 1 "bplexer.c"
|
2
|
+
|
3
|
+
#line 3 "bplexer.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_bp_create_buffer_ALREADY_DEFINED
|
19
|
+
#else
|
20
|
+
#define yy_create_buffer ndt_bp_create_buffer
|
21
|
+
#endif
|
22
|
+
|
23
|
+
#ifdef yy_delete_buffer
|
24
|
+
#define ndt_bp_delete_buffer_ALREADY_DEFINED
|
25
|
+
#else
|
26
|
+
#define yy_delete_buffer ndt_bp_delete_buffer
|
27
|
+
#endif
|
28
|
+
|
29
|
+
#ifdef yy_scan_buffer
|
30
|
+
#define ndt_bp_scan_buffer_ALREADY_DEFINED
|
31
|
+
#else
|
32
|
+
#define yy_scan_buffer ndt_bp_scan_buffer
|
33
|
+
#endif
|
34
|
+
|
35
|
+
#ifdef yy_scan_string
|
36
|
+
#define ndt_bp_scan_string_ALREADY_DEFINED
|
37
|
+
#else
|
38
|
+
#define yy_scan_string ndt_bp_scan_string
|
39
|
+
#endif
|
40
|
+
|
41
|
+
#ifdef yy_scan_bytes
|
42
|
+
#define ndt_bp_scan_bytes_ALREADY_DEFINED
|
43
|
+
#else
|
44
|
+
#define yy_scan_bytes ndt_bp_scan_bytes
|
45
|
+
#endif
|
46
|
+
|
47
|
+
#ifdef yy_init_buffer
|
48
|
+
#define ndt_bp_init_buffer_ALREADY_DEFINED
|
49
|
+
#else
|
50
|
+
#define yy_init_buffer ndt_bp_init_buffer
|
51
|
+
#endif
|
52
|
+
|
53
|
+
#ifdef yy_flush_buffer
|
54
|
+
#define ndt_bp_flush_buffer_ALREADY_DEFINED
|
55
|
+
#else
|
56
|
+
#define yy_flush_buffer ndt_bp_flush_buffer
|
57
|
+
#endif
|
58
|
+
|
59
|
+
#ifdef yy_load_buffer_state
|
60
|
+
#define ndt_bp_load_buffer_state_ALREADY_DEFINED
|
61
|
+
#else
|
62
|
+
#define yy_load_buffer_state ndt_bp_load_buffer_state
|
63
|
+
#endif
|
64
|
+
|
65
|
+
#ifdef yy_switch_to_buffer
|
66
|
+
#define ndt_bp_switch_to_buffer_ALREADY_DEFINED
|
67
|
+
#else
|
68
|
+
#define yy_switch_to_buffer ndt_bp_switch_to_buffer
|
69
|
+
#endif
|
70
|
+
|
71
|
+
#ifdef yypush_buffer_state
|
72
|
+
#define ndt_bppush_buffer_state_ALREADY_DEFINED
|
73
|
+
#else
|
74
|
+
#define yypush_buffer_state ndt_bppush_buffer_state
|
75
|
+
#endif
|
76
|
+
|
77
|
+
#ifdef yypop_buffer_state
|
78
|
+
#define ndt_bppop_buffer_state_ALREADY_DEFINED
|
79
|
+
#else
|
80
|
+
#define yypop_buffer_state ndt_bppop_buffer_state
|
81
|
+
#endif
|
82
|
+
|
83
|
+
#ifdef yyensure_buffer_stack
|
84
|
+
#define ndt_bpensure_buffer_stack_ALREADY_DEFINED
|
85
|
+
#else
|
86
|
+
#define yyensure_buffer_stack ndt_bpensure_buffer_stack
|
87
|
+
#endif
|
88
|
+
|
89
|
+
#ifdef yylex
|
90
|
+
#define ndt_bplex_ALREADY_DEFINED
|
91
|
+
#else
|
92
|
+
#define yylex ndt_bplex
|
93
|
+
#endif
|
94
|
+
|
95
|
+
#ifdef yyrestart
|
96
|
+
#define ndt_bprestart_ALREADY_DEFINED
|
97
|
+
#else
|
98
|
+
#define yyrestart ndt_bprestart
|
99
|
+
#endif
|
100
|
+
|
101
|
+
#ifdef yylex_init
|
102
|
+
#define ndt_bplex_init_ALREADY_DEFINED
|
103
|
+
#else
|
104
|
+
#define yylex_init ndt_bplex_init
|
105
|
+
#endif
|
106
|
+
|
107
|
+
#ifdef yylex_init_extra
|
108
|
+
#define ndt_bplex_init_extra_ALREADY_DEFINED
|
109
|
+
#else
|
110
|
+
#define yylex_init_extra ndt_bplex_init_extra
|
111
|
+
#endif
|
112
|
+
|
113
|
+
#ifdef yylex_destroy
|
114
|
+
#define ndt_bplex_destroy_ALREADY_DEFINED
|
115
|
+
#else
|
116
|
+
#define yylex_destroy ndt_bplex_destroy
|
117
|
+
#endif
|
118
|
+
|
119
|
+
#ifdef yyget_debug
|
120
|
+
#define ndt_bpget_debug_ALREADY_DEFINED
|
121
|
+
#else
|
122
|
+
#define yyget_debug ndt_bpget_debug
|
123
|
+
#endif
|
124
|
+
|
125
|
+
#ifdef yyset_debug
|
126
|
+
#define ndt_bpset_debug_ALREADY_DEFINED
|
127
|
+
#else
|
128
|
+
#define yyset_debug ndt_bpset_debug
|
129
|
+
#endif
|
130
|
+
|
131
|
+
#ifdef yyget_extra
|
132
|
+
#define ndt_bpget_extra_ALREADY_DEFINED
|
133
|
+
#else
|
134
|
+
#define yyget_extra ndt_bpget_extra
|
135
|
+
#endif
|
136
|
+
|
137
|
+
#ifdef yyset_extra
|
138
|
+
#define ndt_bpset_extra_ALREADY_DEFINED
|
139
|
+
#else
|
140
|
+
#define yyset_extra ndt_bpset_extra
|
141
|
+
#endif
|
142
|
+
|
143
|
+
#ifdef yyget_in
|
144
|
+
#define ndt_bpget_in_ALREADY_DEFINED
|
145
|
+
#else
|
146
|
+
#define yyget_in ndt_bpget_in
|
147
|
+
#endif
|
148
|
+
|
149
|
+
#ifdef yyset_in
|
150
|
+
#define ndt_bpset_in_ALREADY_DEFINED
|
151
|
+
#else
|
152
|
+
#define yyset_in ndt_bpset_in
|
153
|
+
#endif
|
154
|
+
|
155
|
+
#ifdef yyget_out
|
156
|
+
#define ndt_bpget_out_ALREADY_DEFINED
|
157
|
+
#else
|
158
|
+
#define yyget_out ndt_bpget_out
|
159
|
+
#endif
|
160
|
+
|
161
|
+
#ifdef yyset_out
|
162
|
+
#define ndt_bpset_out_ALREADY_DEFINED
|
163
|
+
#else
|
164
|
+
#define yyset_out ndt_bpset_out
|
165
|
+
#endif
|
166
|
+
|
167
|
+
#ifdef yyget_leng
|
168
|
+
#define ndt_bpget_leng_ALREADY_DEFINED
|
169
|
+
#else
|
170
|
+
#define yyget_leng ndt_bpget_leng
|
171
|
+
#endif
|
172
|
+
|
173
|
+
#ifdef yyget_text
|
174
|
+
#define ndt_bpget_text_ALREADY_DEFINED
|
175
|
+
#else
|
176
|
+
#define yyget_text ndt_bpget_text
|
177
|
+
#endif
|
178
|
+
|
179
|
+
#ifdef yyget_lineno
|
180
|
+
#define ndt_bpget_lineno_ALREADY_DEFINED
|
181
|
+
#else
|
182
|
+
#define yyget_lineno ndt_bpget_lineno
|
183
|
+
#endif
|
184
|
+
|
185
|
+
#ifdef yyset_lineno
|
186
|
+
#define ndt_bpset_lineno_ALREADY_DEFINED
|
187
|
+
#else
|
188
|
+
#define yyset_lineno ndt_bpset_lineno
|
189
|
+
#endif
|
190
|
+
|
191
|
+
#ifdef yyget_column
|
192
|
+
#define ndt_bpget_column_ALREADY_DEFINED
|
193
|
+
#else
|
194
|
+
#define yyget_column ndt_bpget_column
|
195
|
+
#endif
|
196
|
+
|
197
|
+
#ifdef yyset_column
|
198
|
+
#define ndt_bpset_column_ALREADY_DEFINED
|
199
|
+
#else
|
200
|
+
#define yyset_column ndt_bpset_column
|
201
|
+
#endif
|
202
|
+
|
203
|
+
#ifdef yywrap
|
204
|
+
#define ndt_bpwrap_ALREADY_DEFINED
|
205
|
+
#else
|
206
|
+
#define yywrap ndt_bpwrap
|
207
|
+
#endif
|
208
|
+
|
209
|
+
#ifdef yyget_lval
|
210
|
+
#define ndt_bpget_lval_ALREADY_DEFINED
|
211
|
+
#else
|
212
|
+
#define yyget_lval ndt_bpget_lval
|
213
|
+
#endif
|
214
|
+
|
215
|
+
#ifdef yyset_lval
|
216
|
+
#define ndt_bpset_lval_ALREADY_DEFINED
|
217
|
+
#else
|
218
|
+
#define yyset_lval ndt_bpset_lval
|
219
|
+
#endif
|
220
|
+
|
221
|
+
#ifdef yyget_lloc
|
222
|
+
#define ndt_bpget_lloc_ALREADY_DEFINED
|
223
|
+
#else
|
224
|
+
#define yyget_lloc ndt_bpget_lloc
|
225
|
+
#endif
|
226
|
+
|
227
|
+
#ifdef yyset_lloc
|
228
|
+
#define ndt_bpset_lloc_ALREADY_DEFINED
|
229
|
+
#else
|
230
|
+
#define yyset_lloc ndt_bpset_lloc
|
231
|
+
#endif
|
232
|
+
|
233
|
+
#ifdef yyalloc
|
234
|
+
#define ndt_bpalloc_ALREADY_DEFINED
|
235
|
+
#else
|
236
|
+
#define yyalloc ndt_bpalloc
|
237
|
+
#endif
|
238
|
+
|
239
|
+
#ifdef yyrealloc
|
240
|
+
#define ndt_bprealloc_ALREADY_DEFINED
|
241
|
+
#else
|
242
|
+
#define yyrealloc ndt_bprealloc
|
243
|
+
#endif
|
244
|
+
|
245
|
+
#ifdef yyfree
|
246
|
+
#define ndt_bpfree_ALREADY_DEFINED
|
247
|
+
#else
|
248
|
+
#define yyfree ndt_bpfree
|
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_bpwrap(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 44
|
596
|
+
#define YY_END_OF_BUFFER 45
|
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[62] =
|
605
|
+
{ 0,
|
606
|
+
0, 0, 0, 0, 45, 43, 41, 40, 40, 30,
|
607
|
+
42, 43, 33, 34, 31, 43, 37, 37, 32, 28,
|
608
|
+
27, 29, 2, 26, 5, 21, 19, 20, 7, 9,
|
609
|
+
11, 15, 13, 23, 4, 3, 18, 16, 17, 6,
|
610
|
+
8, 10, 14, 12, 24, 22, 35, 36, 38, 39,
|
611
|
+
42, 0, 37, 37, 25, 37, 39, 0, 0, 1,
|
612
|
+
0
|
613
|
+
} ;
|
614
|
+
|
615
|
+
static const YY_CHAR yy_ec[256] =
|
616
|
+
{ 0,
|
617
|
+
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
618
|
+
1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
|
619
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
620
|
+
1, 2, 5, 1, 6, 1, 7, 1, 1, 8,
|
621
|
+
9, 1, 1, 10, 11, 1, 1, 12, 13, 13,
|
622
|
+
13, 13, 13, 13, 13, 13, 13, 14, 1, 15,
|
623
|
+
16, 17, 18, 19, 20, 21, 20, 22, 23, 24,
|
624
|
+
20, 25, 26, 20, 20, 27, 20, 28, 20, 20,
|
625
|
+
29, 20, 20, 30, 20, 20, 20, 20, 20, 20,
|
626
|
+
1, 1, 1, 1, 31, 1, 20, 32, 33, 34,
|
627
|
+
|
628
|
+
35, 36, 20, 37, 38, 20, 20, 39, 20, 40,
|
629
|
+
41, 20, 42, 20, 43, 20, 20, 20, 20, 44,
|
630
|
+
20, 20, 45, 1, 46, 1, 1, 1, 1, 1,
|
631
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
632
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
633
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
634
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
635
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
636
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
637
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
638
|
+
|
639
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
640
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
641
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
642
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
643
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
644
|
+
1, 1, 1, 1, 1
|
645
|
+
} ;
|
646
|
+
|
647
|
+
static const YY_CHAR yy_meta[47] =
|
648
|
+
{ 0,
|
649
|
+
1, 1, 2, 2, 1, 1, 1, 1, 1, 1,
|
650
|
+
1, 3, 3, 1, 1, 1, 1, 1, 1, 3,
|
651
|
+
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
652
|
+
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
653
|
+
3, 3, 3, 3, 1, 1
|
654
|
+
} ;
|
655
|
+
|
656
|
+
static const flex_int16_t yy_base[64] =
|
657
|
+
{ 0,
|
658
|
+
0, 0, 46, 0, 111, 112, 112, 112, 112, 112,
|
659
|
+
0, 77, 112, 112, 112, 81, 97, 83, 112, 112,
|
660
|
+
112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
|
661
|
+
112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
|
662
|
+
112, 112, 112, 112, 112, 112, 112, 112, 112, 0,
|
663
|
+
0, 67, 95, 87, 112, 89, 0, 72, 69, 112,
|
664
|
+
112, 102, 94
|
665
|
+
} ;
|
666
|
+
|
667
|
+
static const flex_int16_t yy_def[64] =
|
668
|
+
{ 0,
|
669
|
+
61, 1, 61, 3, 61, 61, 61, 61, 61, 61,
|
670
|
+
62, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
671
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
672
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
673
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 63,
|
674
|
+
62, 61, 61, 61, 61, 61, 63, 61, 61, 61,
|
675
|
+
0, 61, 61
|
676
|
+
} ;
|
677
|
+
|
678
|
+
static const flex_int16_t yy_nxt[159] =
|
679
|
+
{ 0,
|
680
|
+
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
681
|
+
16, 17, 18, 19, 20, 21, 22, 23, 24, 6,
|
682
|
+
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
683
|
+
6, 35, 36, 37, 38, 39, 40, 41, 42, 43,
|
684
|
+
6, 44, 45, 46, 47, 48, 6, 7, 8, 9,
|
685
|
+
6, 11, 6, 6, 6, 6, 6, 6, 6, 49,
|
686
|
+
6, 6, 6, 6, 6, 50, 50, 50, 50, 50,
|
687
|
+
50, 50, 50, 50, 50, 50, 6, 50, 50, 50,
|
688
|
+
50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
|
689
|
+
6, 6, 53, 54, 56, 56, 57, 55, 56, 56,
|
690
|
+
|
691
|
+
56, 56, 51, 60, 51, 59, 53, 58, 53, 52,
|
692
|
+
61, 5, 61, 61, 61, 61, 61, 61, 61, 61,
|
693
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
694
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
695
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
696
|
+
61, 61, 61, 61, 61, 61, 61, 61
|
697
|
+
} ;
|
698
|
+
|
699
|
+
static const flex_int16_t yy_chk[159] =
|
700
|
+
{ 0,
|
701
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
702
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
703
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
704
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
705
|
+
1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
|
706
|
+
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
707
|
+
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
708
|
+
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
709
|
+
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
710
|
+
3, 3, 16, 16, 18, 18, 63, 16, 54, 54,
|
711
|
+
|
712
|
+
56, 56, 62, 59, 62, 58, 53, 52, 17, 12,
|
713
|
+
5, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
714
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
715
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
716
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
717
|
+
61, 61, 61, 61, 61, 61, 61, 61
|
718
|
+
} ;
|
719
|
+
|
720
|
+
/* Table of booleans, true if rule could match eol. */
|
721
|
+
static const flex_int32_t yy_rule_can_match_eol[45] =
|
722
|
+
{ 0,
|
723
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
724
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
725
|
+
1, 0, 0, 0, 0, };
|
726
|
+
|
727
|
+
/* The intent behind this definition is that it'll catch
|
728
|
+
* any uses of REJECT which flex missed.
|
729
|
+
*/
|
730
|
+
#define REJECT reject_used_but_not_detected
|
731
|
+
#define yymore() yymore_used_but_not_detected
|
732
|
+
#define YY_MORE_ADJ 0
|
733
|
+
#define YY_RESTORE_YY_MORE_OFFSET
|
734
|
+
#line 1 "bplexer.l"
|
735
|
+
#line 2 "bplexer.l"
|
736
|
+
/*
|
737
|
+
* BSD 3-Clause License
|
738
|
+
*
|
739
|
+
* Copyright (c) 2017-2018, plures
|
740
|
+
* All rights reserved.
|
741
|
+
*
|
742
|
+
* Redistribution and use in source and binary forms, with or without
|
743
|
+
* modification, are permitted provided that the following conditions are met:
|
744
|
+
*
|
745
|
+
* 1. Redistributions of source code must retain the above copyright notice,
|
746
|
+
* this list of conditions and the following disclaimer.
|
747
|
+
*
|
748
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
749
|
+
* this list of conditions and the following disclaimer in the documentation
|
750
|
+
* and/or other materials provided with the distribution.
|
751
|
+
*
|
752
|
+
* 3. Neither the name of the copyright holder nor the names of its
|
753
|
+
* contributors may be used to endorse or promote products derived from
|
754
|
+
* this software without specific prior written permission.
|
755
|
+
*
|
756
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
757
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
758
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
759
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
760
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
761
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
762
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
763
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
764
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
765
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
766
|
+
*/
|
767
|
+
|
768
|
+
|
769
|
+
#include <stdio.h>
|
770
|
+
#include <string.h>
|
771
|
+
#include <stdint.h>
|
772
|
+
#include <setjmp.h>
|
773
|
+
#include "ndtypes.h"
|
774
|
+
#include "bpgrammar.h"
|
775
|
+
|
776
|
+
|
777
|
+
/* From PostgreSQL: avoid exit() on fatal scanner errors. */
|
778
|
+
#undef fprintf
|
779
|
+
#define fprintf(file, fmt, msg) fprintf_to_longjmp(fmt, msg, yyscanner)
|
780
|
+
|
781
|
+
extern jmp_buf ndt_bp_lexerror;
|
782
|
+
static void
|
783
|
+
fprintf_to_longjmp(const char *fmt, const char *msg, yyscan_t yyscanner)
|
784
|
+
{
|
785
|
+
(void)fmt; (void)msg; (void)yyscanner;
|
786
|
+
|
787
|
+
/* We don't have access to the parse context here: discard the error
|
788
|
+
message, which is always either an allocation failure or an internal
|
789
|
+
flex error. */
|
790
|
+
longjmp(ndt_bp_lexerror, 1);
|
791
|
+
}
|
792
|
+
|
793
|
+
void *
|
794
|
+
yyalloc(size_t size, yyscan_t yyscanner)
|
795
|
+
{
|
796
|
+
(void)yyscanner;
|
797
|
+
|
798
|
+
return ndt_alloc(1, size);
|
799
|
+
}
|
800
|
+
|
801
|
+
void *
|
802
|
+
yyrealloc(void *ptr, size_t size, yyscan_t yyscanner)
|
803
|
+
{
|
804
|
+
(void)yyscanner;
|
805
|
+
|
806
|
+
return ndt_realloc(ptr, 1, size);
|
807
|
+
}
|
808
|
+
|
809
|
+
void
|
810
|
+
yyfree(void *ptr, yyscan_t yyscanner)
|
811
|
+
{
|
812
|
+
(void)yyscanner;
|
813
|
+
|
814
|
+
ndt_free(ptr);
|
815
|
+
}
|
816
|
+
|
817
|
+
#line 817 "bplexer.c"
|
818
|
+
#define YY_NO_INPUT 1
|
819
|
+
|
820
|
+
#line 820 "bplexer.c"
|
821
|
+
|
822
|
+
#define INITIAL 0
|
823
|
+
#define FIELDNAME 1
|
824
|
+
|
825
|
+
#ifndef YY_NO_UNISTD_H
|
826
|
+
/* Special case for "unistd.h", since it is non-ANSI. We include it way
|
827
|
+
* down here because we want the user's section 1 to have been scanned first.
|
828
|
+
* The user has a chance to override it with an option.
|
829
|
+
*/
|
830
|
+
#include <unistd.h>
|
831
|
+
#endif
|
832
|
+
|
833
|
+
#define YY_EXTRA_TYPE ndt_context_t *
|
834
|
+
|
835
|
+
/* Holds the entire state of the reentrant scanner. */
|
836
|
+
struct yyguts_t
|
837
|
+
{
|
838
|
+
|
839
|
+
/* User-defined. Not touched by flex. */
|
840
|
+
YY_EXTRA_TYPE yyextra_r;
|
841
|
+
|
842
|
+
/* The rest are the same as the globals declared in the non-reentrant scanner. */
|
843
|
+
FILE *yyin_r, *yyout_r;
|
844
|
+
size_t yy_buffer_stack_top; /**< index of top of stack. */
|
845
|
+
size_t yy_buffer_stack_max; /**< capacity of stack. */
|
846
|
+
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
|
847
|
+
char yy_hold_char;
|
848
|
+
int yy_n_chars;
|
849
|
+
int yyleng_r;
|
850
|
+
char *yy_c_buf_p;
|
851
|
+
int yy_init;
|
852
|
+
int yy_start;
|
853
|
+
int yy_did_buffer_switch_on_eof;
|
854
|
+
int yy_start_stack_ptr;
|
855
|
+
int yy_start_stack_depth;
|
856
|
+
int *yy_start_stack;
|
857
|
+
yy_state_type yy_last_accepting_state;
|
858
|
+
char* yy_last_accepting_cpos;
|
859
|
+
|
860
|
+
int yylineno_r;
|
861
|
+
int yy_flex_debug_r;
|
862
|
+
|
863
|
+
char *yytext_r;
|
864
|
+
int yy_more_flag;
|
865
|
+
int yy_more_len;
|
866
|
+
|
867
|
+
YYSTYPE * yylval_r;
|
868
|
+
|
869
|
+
YYLTYPE * yylloc_r;
|
870
|
+
|
871
|
+
}; /* end struct yyguts_t */
|
872
|
+
|
873
|
+
static int yy_init_globals ( yyscan_t yyscanner );
|
874
|
+
|
875
|
+
/* This must go here because YYSTYPE and YYLTYPE are included
|
876
|
+
* from bison output in section 1.*/
|
877
|
+
# define yylval yyg->yylval_r
|
878
|
+
|
879
|
+
# define yylloc yyg->yylloc_r
|
880
|
+
|
881
|
+
int yylex_init (yyscan_t* scanner);
|
882
|
+
|
883
|
+
int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
|
884
|
+
|
885
|
+
/* Accessor methods to globals.
|
886
|
+
These are made visible to non-reentrant scanners for convenience. */
|
887
|
+
|
888
|
+
int yylex_destroy ( yyscan_t yyscanner );
|
889
|
+
|
890
|
+
int yyget_debug ( yyscan_t yyscanner );
|
891
|
+
|
892
|
+
void yyset_debug ( int debug_flag , yyscan_t yyscanner );
|
893
|
+
|
894
|
+
YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
|
895
|
+
|
896
|
+
void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
|
897
|
+
|
898
|
+
FILE *yyget_in ( yyscan_t yyscanner );
|
899
|
+
|
900
|
+
void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
|
901
|
+
|
902
|
+
FILE *yyget_out ( yyscan_t yyscanner );
|
903
|
+
|
904
|
+
void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
|
905
|
+
|
906
|
+
int yyget_leng ( yyscan_t yyscanner );
|
907
|
+
|
908
|
+
char *yyget_text ( yyscan_t yyscanner );
|
909
|
+
|
910
|
+
int yyget_lineno ( yyscan_t yyscanner );
|
911
|
+
|
912
|
+
void yyset_lineno ( int _line_number , yyscan_t yyscanner );
|
913
|
+
|
914
|
+
int yyget_column ( yyscan_t yyscanner );
|
915
|
+
|
916
|
+
void yyset_column ( int _column_no , yyscan_t yyscanner );
|
917
|
+
|
918
|
+
YYSTYPE * yyget_lval ( yyscan_t yyscanner );
|
919
|
+
|
920
|
+
void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
|
921
|
+
|
922
|
+
YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
|
923
|
+
|
924
|
+
void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
|
925
|
+
|
926
|
+
/* Macros after this point can all be overridden by user definitions in
|
927
|
+
* section 1.
|
928
|
+
*/
|
929
|
+
|
930
|
+
#ifndef YY_SKIP_YYWRAP
|
931
|
+
#ifdef __cplusplus
|
932
|
+
extern "C" int yywrap ( yyscan_t yyscanner );
|
933
|
+
#else
|
934
|
+
extern int yywrap ( yyscan_t yyscanner );
|
935
|
+
#endif
|
936
|
+
#endif
|
937
|
+
|
938
|
+
#ifndef YY_NO_UNPUT
|
939
|
+
|
940
|
+
#endif
|
941
|
+
|
942
|
+
#ifndef yytext_ptr
|
943
|
+
static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
|
944
|
+
#endif
|
945
|
+
|
946
|
+
#ifdef YY_NEED_STRLEN
|
947
|
+
static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
|
948
|
+
#endif
|
949
|
+
|
950
|
+
#ifndef YY_NO_INPUT
|
951
|
+
#ifdef __cplusplus
|
952
|
+
static int yyinput ( yyscan_t yyscanner );
|
953
|
+
#else
|
954
|
+
static int input ( yyscan_t yyscanner );
|
955
|
+
#endif
|
956
|
+
|
957
|
+
#endif
|
958
|
+
|
959
|
+
/* Amount of stuff to slurp up with each read. */
|
960
|
+
#ifndef YY_READ_BUF_SIZE
|
961
|
+
#ifdef __ia64__
|
962
|
+
/* On IA-64, the buffer size is 16k, not 8k */
|
963
|
+
#define YY_READ_BUF_SIZE 16384
|
964
|
+
#else
|
965
|
+
#define YY_READ_BUF_SIZE 8192
|
966
|
+
#endif /* __ia64__ */
|
967
|
+
#endif
|
968
|
+
|
969
|
+
/* Copy whatever the last rule matched to the standard output. */
|
970
|
+
#ifndef ECHO
|
971
|
+
/* This used to be an fputs(), but since the string might contain NUL's,
|
972
|
+
* we now use fwrite().
|
973
|
+
*/
|
974
|
+
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
|
975
|
+
#endif
|
976
|
+
|
977
|
+
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
978
|
+
* is returned in "result".
|
979
|
+
*/
|
980
|
+
#ifndef YY_INPUT
|
981
|
+
#define YY_INPUT(buf,result,max_size) \
|
982
|
+
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
983
|
+
{ \
|
984
|
+
int c = '*'; \
|
985
|
+
int n; \
|
986
|
+
for ( n = 0; n < max_size && \
|
987
|
+
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
988
|
+
buf[n] = (char) c; \
|
989
|
+
if ( c == '\n' ) \
|
990
|
+
buf[n++] = (char) c; \
|
991
|
+
if ( c == EOF && ferror( yyin ) ) \
|
992
|
+
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
993
|
+
result = n; \
|
994
|
+
} \
|
995
|
+
else \
|
996
|
+
{ \
|
997
|
+
errno=0; \
|
998
|
+
while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
|
999
|
+
{ \
|
1000
|
+
if( errno != EINTR) \
|
1001
|
+
{ \
|
1002
|
+
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
1003
|
+
break; \
|
1004
|
+
} \
|
1005
|
+
errno=0; \
|
1006
|
+
clearerr(yyin); \
|
1007
|
+
} \
|
1008
|
+
}\
|
1009
|
+
\
|
1010
|
+
|
1011
|
+
#endif
|
1012
|
+
|
1013
|
+
/* No semi-colon after return; correct usage is to write "yyterminate();" -
|
1014
|
+
* we don't want an extra ';' after the "return" because that will cause
|
1015
|
+
* some compilers to complain about unreachable statements.
|
1016
|
+
*/
|
1017
|
+
#ifndef yyterminate
|
1018
|
+
#define yyterminate() return YY_NULL
|
1019
|
+
#endif
|
1020
|
+
|
1021
|
+
/* Number of entries by which start-condition stack grows. */
|
1022
|
+
#ifndef YY_START_STACK_INCR
|
1023
|
+
#define YY_START_STACK_INCR 25
|
1024
|
+
#endif
|
1025
|
+
|
1026
|
+
/* Report a fatal error. */
|
1027
|
+
#ifndef YY_FATAL_ERROR
|
1028
|
+
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
|
1029
|
+
#endif
|
1030
|
+
|
1031
|
+
/* end tables serialization structures and prototypes */
|
1032
|
+
|
1033
|
+
/* Default declaration of generated scanner - a define so the user can
|
1034
|
+
* easily add parameters.
|
1035
|
+
*/
|
1036
|
+
#ifndef YY_DECL
|
1037
|
+
#define YY_DECL_IS_OURS 1
|
1038
|
+
|
1039
|
+
extern int yylex \
|
1040
|
+
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
|
1041
|
+
|
1042
|
+
#define YY_DECL int yylex \
|
1043
|
+
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
|
1044
|
+
#endif /* !YY_DECL */
|
1045
|
+
|
1046
|
+
/* Code executed at the beginning of each rule, after yytext and yyleng
|
1047
|
+
* have been set up.
|
1048
|
+
*/
|
1049
|
+
#ifndef YY_USER_ACTION
|
1050
|
+
#define YY_USER_ACTION
|
1051
|
+
#endif
|
1052
|
+
|
1053
|
+
/* Code executed at the end of each rule. */
|
1054
|
+
#ifndef YY_BREAK
|
1055
|
+
#define YY_BREAK /*LINTED*/break;
|
1056
|
+
#endif
|
1057
|
+
|
1058
|
+
#define YY_RULE_SETUP \
|
1059
|
+
YY_USER_ACTION
|
1060
|
+
|
1061
|
+
/** The main scanner function which does all the work.
|
1062
|
+
*/
|
1063
|
+
YY_DECL
|
1064
|
+
{
|
1065
|
+
yy_state_type yy_current_state;
|
1066
|
+
char *yy_cp, *yy_bp;
|
1067
|
+
int yy_act;
|
1068
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
1069
|
+
|
1070
|
+
yylval = yylval_param;
|
1071
|
+
|
1072
|
+
yylloc = yylloc_param;
|
1073
|
+
|
1074
|
+
if ( !yyg->yy_init )
|
1075
|
+
{
|
1076
|
+
yyg->yy_init = 1;
|
1077
|
+
|
1078
|
+
#ifdef YY_USER_INIT
|
1079
|
+
YY_USER_INIT;
|
1080
|
+
#endif
|
1081
|
+
|
1082
|
+
if ( ! yyg->yy_start )
|
1083
|
+
yyg->yy_start = 1; /* first start state */
|
1084
|
+
|
1085
|
+
if ( ! yyin )
|
1086
|
+
yyin = stdin;
|
1087
|
+
|
1088
|
+
if ( ! yyout )
|
1089
|
+
yyout = stdout;
|
1090
|
+
|
1091
|
+
if ( ! YY_CURRENT_BUFFER ) {
|
1092
|
+
yyensure_buffer_stack (yyscanner);
|
1093
|
+
YY_CURRENT_BUFFER_LVALUE =
|
1094
|
+
yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
|
1095
|
+
}
|
1096
|
+
|
1097
|
+
yy_load_buffer_state( yyscanner );
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
{
|
1101
|
+
#line 107 "bplexer.l"
|
1102
|
+
|
1103
|
+
|
1104
|
+
#line 1104 "bplexer.c"
|
1105
|
+
|
1106
|
+
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
|
1107
|
+
{
|
1108
|
+
yy_cp = yyg->yy_c_buf_p;
|
1109
|
+
|
1110
|
+
/* Support of yytext. */
|
1111
|
+
*yy_cp = yyg->yy_hold_char;
|
1112
|
+
|
1113
|
+
/* yy_bp points to the position in yy_ch_buf of the start of
|
1114
|
+
* the current run.
|
1115
|
+
*/
|
1116
|
+
yy_bp = yy_cp;
|
1117
|
+
|
1118
|
+
yy_current_state = yyg->yy_start;
|
1119
|
+
yy_match:
|
1120
|
+
do
|
1121
|
+
{
|
1122
|
+
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
|
1123
|
+
if ( yy_accept[yy_current_state] )
|
1124
|
+
{
|
1125
|
+
yyg->yy_last_accepting_state = yy_current_state;
|
1126
|
+
yyg->yy_last_accepting_cpos = yy_cp;
|
1127
|
+
}
|
1128
|
+
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
1129
|
+
{
|
1130
|
+
yy_current_state = (int) yy_def[yy_current_state];
|
1131
|
+
if ( yy_current_state >= 62 )
|
1132
|
+
yy_c = yy_meta[yy_c];
|
1133
|
+
}
|
1134
|
+
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
1135
|
+
++yy_cp;
|
1136
|
+
}
|
1137
|
+
while ( yy_current_state != 61 );
|
1138
|
+
yy_cp = yyg->yy_last_accepting_cpos;
|
1139
|
+
yy_current_state = yyg->yy_last_accepting_state;
|
1140
|
+
|
1141
|
+
yy_find_action:
|
1142
|
+
yy_act = yy_accept[yy_current_state];
|
1143
|
+
|
1144
|
+
YY_DO_BEFORE_ACTION;
|
1145
|
+
|
1146
|
+
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
|
1147
|
+
{
|
1148
|
+
int yyl;
|
1149
|
+
for ( yyl = 0; yyl < yyleng; ++yyl )
|
1150
|
+
if ( yytext[yyl] == '\n' )
|
1151
|
+
|
1152
|
+
do{ yylineno++;
|
1153
|
+
yycolumn=0;
|
1154
|
+
}while(0)
|
1155
|
+
;
|
1156
|
+
}
|
1157
|
+
|
1158
|
+
do_action: /* This label is used only to access EOF actions. */
|
1159
|
+
|
1160
|
+
switch ( yy_act )
|
1161
|
+
{ /* beginning of action switch */
|
1162
|
+
case 0: /* must back up */
|
1163
|
+
/* undo the effects of YY_DO_BEFORE_ACTION */
|
1164
|
+
*yy_cp = yyg->yy_hold_char;
|
1165
|
+
yy_cp = yyg->yy_last_accepting_cpos;
|
1166
|
+
yy_current_state = yyg->yy_last_accepting_state;
|
1167
|
+
goto yy_find_action;
|
1168
|
+
|
1169
|
+
case 1:
|
1170
|
+
YY_RULE_SETUP
|
1171
|
+
#line 109 "bplexer.l"
|
1172
|
+
{
|
1173
|
+
yycolumn = 1;
|
1174
|
+
|
1175
|
+
#undef YY_USER_ACTION
|
1176
|
+
#define YY_USER_ACTION \
|
1177
|
+
yylloc->first_line = yylloc->last_line = yylineno; \
|
1178
|
+
yylloc->first_column = yycolumn; \
|
1179
|
+
yylloc->last_column = yycolumn+yyleng-1; \
|
1180
|
+
yycolumn += yyleng;
|
1181
|
+
|
1182
|
+
}
|
1183
|
+
YY_BREAK
|
1184
|
+
|
1185
|
+
case 2:
|
1186
|
+
YY_RULE_SETUP
|
1187
|
+
#line 122 "bplexer.l"
|
1188
|
+
{ yylval->uchar = '?'; return DTYPE; }
|
1189
|
+
YY_BREAK
|
1190
|
+
case 3:
|
1191
|
+
YY_RULE_SETUP
|
1192
|
+
#line 123 "bplexer.l"
|
1193
|
+
{ yylval->uchar = 'c'; return DTYPE; }
|
1194
|
+
YY_BREAK
|
1195
|
+
case 4:
|
1196
|
+
YY_RULE_SETUP
|
1197
|
+
#line 124 "bplexer.l"
|
1198
|
+
{ yylval->uchar = 'b'; return DTYPE; }
|
1199
|
+
YY_BREAK
|
1200
|
+
case 5:
|
1201
|
+
YY_RULE_SETUP
|
1202
|
+
#line 125 "bplexer.l"
|
1203
|
+
{ yylval->uchar = 'B'; return DTYPE; }
|
1204
|
+
YY_BREAK
|
1205
|
+
case 6:
|
1206
|
+
YY_RULE_SETUP
|
1207
|
+
#line 126 "bplexer.l"
|
1208
|
+
{ yylval->uchar = 'h'; return DTYPE; }
|
1209
|
+
YY_BREAK
|
1210
|
+
case 7:
|
1211
|
+
YY_RULE_SETUP
|
1212
|
+
#line 127 "bplexer.l"
|
1213
|
+
{ yylval->uchar = 'H'; return DTYPE; }
|
1214
|
+
YY_BREAK
|
1215
|
+
case 8:
|
1216
|
+
YY_RULE_SETUP
|
1217
|
+
#line 128 "bplexer.l"
|
1218
|
+
{ yylval->uchar = 'i'; return DTYPE; }
|
1219
|
+
YY_BREAK
|
1220
|
+
case 9:
|
1221
|
+
YY_RULE_SETUP
|
1222
|
+
#line 129 "bplexer.l"
|
1223
|
+
{ yylval->uchar = 'I'; return DTYPE; }
|
1224
|
+
YY_BREAK
|
1225
|
+
case 10:
|
1226
|
+
YY_RULE_SETUP
|
1227
|
+
#line 130 "bplexer.l"
|
1228
|
+
{ yylval->uchar = 'l'; return DTYPE; }
|
1229
|
+
YY_BREAK
|
1230
|
+
case 11:
|
1231
|
+
YY_RULE_SETUP
|
1232
|
+
#line 131 "bplexer.l"
|
1233
|
+
{ yylval->uchar = 'L'; return DTYPE; }
|
1234
|
+
YY_BREAK
|
1235
|
+
case 12:
|
1236
|
+
YY_RULE_SETUP
|
1237
|
+
#line 132 "bplexer.l"
|
1238
|
+
{ yylval->uchar = 'q'; return DTYPE; }
|
1239
|
+
YY_BREAK
|
1240
|
+
case 13:
|
1241
|
+
YY_RULE_SETUP
|
1242
|
+
#line 133 "bplexer.l"
|
1243
|
+
{ yylval->uchar = 'Q'; return DTYPE; }
|
1244
|
+
YY_BREAK
|
1245
|
+
case 14:
|
1246
|
+
YY_RULE_SETUP
|
1247
|
+
#line 134 "bplexer.l"
|
1248
|
+
{ yylval->uchar = 'n'; return DTYPE; }
|
1249
|
+
YY_BREAK
|
1250
|
+
case 15:
|
1251
|
+
YY_RULE_SETUP
|
1252
|
+
#line 135 "bplexer.l"
|
1253
|
+
{ yylval->uchar = 'N'; return DTYPE; }
|
1254
|
+
YY_BREAK
|
1255
|
+
case 16:
|
1256
|
+
YY_RULE_SETUP
|
1257
|
+
#line 136 "bplexer.l"
|
1258
|
+
{ yylval->uchar = 'e'; return DTYPE; }
|
1259
|
+
YY_BREAK
|
1260
|
+
case 17:
|
1261
|
+
YY_RULE_SETUP
|
1262
|
+
#line 137 "bplexer.l"
|
1263
|
+
{ yylval->uchar = 'f'; return DTYPE; }
|
1264
|
+
YY_BREAK
|
1265
|
+
case 18:
|
1266
|
+
YY_RULE_SETUP
|
1267
|
+
#line 138 "bplexer.l"
|
1268
|
+
{ yylval->uchar = 'd'; return DTYPE; }
|
1269
|
+
YY_BREAK
|
1270
|
+
case 19:
|
1271
|
+
YY_RULE_SETUP
|
1272
|
+
#line 139 "bplexer.l"
|
1273
|
+
{ yylval->uchar = 'E'; return DTYPE; }
|
1274
|
+
YY_BREAK
|
1275
|
+
case 20:
|
1276
|
+
YY_RULE_SETUP
|
1277
|
+
#line 140 "bplexer.l"
|
1278
|
+
{ yylval->uchar = 'F'; return DTYPE; }
|
1279
|
+
YY_BREAK
|
1280
|
+
case 21:
|
1281
|
+
YY_RULE_SETUP
|
1282
|
+
#line 141 "bplexer.l"
|
1283
|
+
{ yylval->uchar = 'D'; return DTYPE; }
|
1284
|
+
YY_BREAK
|
1285
|
+
case 22:
|
1286
|
+
YY_RULE_SETUP
|
1287
|
+
#line 143 "bplexer.l"
|
1288
|
+
{ return PAD; }
|
1289
|
+
YY_BREAK
|
1290
|
+
case 23:
|
1291
|
+
YY_RULE_SETUP
|
1292
|
+
#line 144 "bplexer.l"
|
1293
|
+
{ return RECORD; }
|
1294
|
+
YY_BREAK
|
1295
|
+
case 24:
|
1296
|
+
YY_RULE_SETUP
|
1297
|
+
#line 145 "bplexer.l"
|
1298
|
+
{ return BYTES; }
|
1299
|
+
YY_BREAK
|
1300
|
+
case 25:
|
1301
|
+
YY_RULE_SETUP
|
1302
|
+
#line 147 "bplexer.l"
|
1303
|
+
{ return RARROW; }
|
1304
|
+
YY_BREAK
|
1305
|
+
case 26:
|
1306
|
+
YY_RULE_SETUP
|
1307
|
+
#line 148 "bplexer.l"
|
1308
|
+
{ return AT; }
|
1309
|
+
YY_BREAK
|
1310
|
+
case 27:
|
1311
|
+
YY_RULE_SETUP
|
1312
|
+
#line 149 "bplexer.l"
|
1313
|
+
{ return EQUAL; }
|
1314
|
+
YY_BREAK
|
1315
|
+
case 28:
|
1316
|
+
YY_RULE_SETUP
|
1317
|
+
#line 150 "bplexer.l"
|
1318
|
+
{ return LESS; }
|
1319
|
+
YY_BREAK
|
1320
|
+
case 29:
|
1321
|
+
YY_RULE_SETUP
|
1322
|
+
#line 151 "bplexer.l"
|
1323
|
+
{ return GREATER; }
|
1324
|
+
YY_BREAK
|
1325
|
+
case 30:
|
1326
|
+
YY_RULE_SETUP
|
1327
|
+
#line 152 "bplexer.l"
|
1328
|
+
{ return BANG; }
|
1329
|
+
YY_BREAK
|
1330
|
+
case 31:
|
1331
|
+
YY_RULE_SETUP
|
1332
|
+
#line 153 "bplexer.l"
|
1333
|
+
{ return COMMA; }
|
1334
|
+
YY_BREAK
|
1335
|
+
case 32:
|
1336
|
+
YY_RULE_SETUP
|
1337
|
+
#line 154 "bplexer.l"
|
1338
|
+
{ BEGIN(FIELDNAME); return COLON; }
|
1339
|
+
YY_BREAK
|
1340
|
+
case 33:
|
1341
|
+
YY_RULE_SETUP
|
1342
|
+
#line 155 "bplexer.l"
|
1343
|
+
{ return LPAREN; }
|
1344
|
+
YY_BREAK
|
1345
|
+
case 34:
|
1346
|
+
YY_RULE_SETUP
|
1347
|
+
#line 156 "bplexer.l"
|
1348
|
+
{ return RPAREN; }
|
1349
|
+
YY_BREAK
|
1350
|
+
case 35:
|
1351
|
+
YY_RULE_SETUP
|
1352
|
+
#line 157 "bplexer.l"
|
1353
|
+
{ return LBRACE; }
|
1354
|
+
YY_BREAK
|
1355
|
+
case 36:
|
1356
|
+
YY_RULE_SETUP
|
1357
|
+
#line 158 "bplexer.l"
|
1358
|
+
{ return RBRACE; }
|
1359
|
+
YY_BREAK
|
1360
|
+
case 37:
|
1361
|
+
YY_RULE_SETUP
|
1362
|
+
#line 160 "bplexer.l"
|
1363
|
+
{ yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return INTEGER; }
|
1364
|
+
YY_BREAK
|
1365
|
+
|
1366
|
+
|
1367
|
+
case 38:
|
1368
|
+
YY_RULE_SETUP
|
1369
|
+
#line 164 "bplexer.l"
|
1370
|
+
{ BEGIN(INITIAL); return COLON; }
|
1371
|
+
YY_BREAK
|
1372
|
+
case 39:
|
1373
|
+
YY_RULE_SETUP
|
1374
|
+
#line 165 "bplexer.l"
|
1375
|
+
{ yylval->string = ndt_strdup(yytext, ctx); if (yylval->string == NULL) return ERRTOKEN; return NAME; }
|
1376
|
+
YY_BREAK
|
1377
|
+
|
1378
|
+
|
1379
|
+
case 40:
|
1380
|
+
/* rule 40 can match eol */
|
1381
|
+
YY_RULE_SETUP
|
1382
|
+
#line 169 "bplexer.l"
|
1383
|
+
{ yycolumn = 1; }
|
1384
|
+
YY_BREAK
|
1385
|
+
case 41:
|
1386
|
+
YY_RULE_SETUP
|
1387
|
+
#line 170 "bplexer.l"
|
1388
|
+
{} /* ignore */
|
1389
|
+
YY_BREAK
|
1390
|
+
case 42:
|
1391
|
+
YY_RULE_SETUP
|
1392
|
+
#line 171 "bplexer.l"
|
1393
|
+
{} /* ignore */
|
1394
|
+
YY_BREAK
|
1395
|
+
case 43:
|
1396
|
+
YY_RULE_SETUP
|
1397
|
+
#line 172 "bplexer.l"
|
1398
|
+
{ return ERRTOKEN; }
|
1399
|
+
YY_BREAK
|
1400
|
+
|
1401
|
+
case 44:
|
1402
|
+
YY_RULE_SETUP
|
1403
|
+
#line 176 "bplexer.l"
|
1404
|
+
YY_FATAL_ERROR( "flex scanner jammed" );
|
1405
|
+
YY_BREAK
|
1406
|
+
#line 1406 "bplexer.c"
|
1407
|
+
case YY_STATE_EOF(INITIAL):
|
1408
|
+
case YY_STATE_EOF(FIELDNAME):
|
1409
|
+
yyterminate();
|
1410
|
+
|
1411
|
+
case YY_END_OF_BUFFER:
|
1412
|
+
{
|
1413
|
+
/* Amount of text matched not including the EOB char. */
|
1414
|
+
int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
|
1415
|
+
|
1416
|
+
/* Undo the effects of YY_DO_BEFORE_ACTION. */
|
1417
|
+
*yy_cp = yyg->yy_hold_char;
|
1418
|
+
YY_RESTORE_YY_MORE_OFFSET
|
1419
|
+
|
1420
|
+
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
|
1421
|
+
{
|
1422
|
+
/* We're scanning a new file or input source. It's
|
1423
|
+
* possible that this happened because the user
|
1424
|
+
* just pointed yyin at a new source and called
|
1425
|
+
* yylex(). If so, then we have to assure
|
1426
|
+
* consistency between YY_CURRENT_BUFFER and our
|
1427
|
+
* globals. Here is the right place to do so, because
|
1428
|
+
* this is the first action (other than possibly a
|
1429
|
+
* back-up) that will match for the new input source.
|
1430
|
+
*/
|
1431
|
+
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
|
1432
|
+
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
|
1433
|
+
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
|
1434
|
+
}
|
1435
|
+
|
1436
|
+
/* Note that here we test for yy_c_buf_p "<=" to the position
|
1437
|
+
* of the first EOB in the buffer, since yy_c_buf_p will
|
1438
|
+
* already have been incremented past the NUL character
|
1439
|
+
* (since all states make transitions on EOB to the
|
1440
|
+
* end-of-buffer state). Contrast this with the test
|
1441
|
+
* in input().
|
1442
|
+
*/
|
1443
|
+
if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
|
1444
|
+
{ /* This was really a NUL. */
|
1445
|
+
yy_state_type yy_next_state;
|
1446
|
+
|
1447
|
+
yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
|
1448
|
+
|
1449
|
+
yy_current_state = yy_get_previous_state( yyscanner );
|
1450
|
+
|
1451
|
+
/* Okay, we're now positioned to make the NUL
|
1452
|
+
* transition. We couldn't have
|
1453
|
+
* yy_get_previous_state() go ahead and do it
|
1454
|
+
* for us because it doesn't know how to deal
|
1455
|
+
* with the possibility of jamming (and we don't
|
1456
|
+
* want to build jamming into it because then it
|
1457
|
+
* will run more slowly).
|
1458
|
+
*/
|
1459
|
+
|
1460
|
+
yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
|
1461
|
+
|
1462
|
+
yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
|
1463
|
+
|
1464
|
+
if ( yy_next_state )
|
1465
|
+
{
|
1466
|
+
/* Consume the NUL. */
|
1467
|
+
yy_cp = ++yyg->yy_c_buf_p;
|
1468
|
+
yy_current_state = yy_next_state;
|
1469
|
+
goto yy_match;
|
1470
|
+
}
|
1471
|
+
|
1472
|
+
else
|
1473
|
+
{
|
1474
|
+
yy_cp = yyg->yy_last_accepting_cpos;
|
1475
|
+
yy_current_state = yyg->yy_last_accepting_state;
|
1476
|
+
goto yy_find_action;
|
1477
|
+
}
|
1478
|
+
}
|
1479
|
+
|
1480
|
+
else switch ( yy_get_next_buffer( yyscanner ) )
|
1481
|
+
{
|
1482
|
+
case EOB_ACT_END_OF_FILE:
|
1483
|
+
{
|
1484
|
+
yyg->yy_did_buffer_switch_on_eof = 0;
|
1485
|
+
|
1486
|
+
if ( yywrap( yyscanner ) )
|
1487
|
+
{
|
1488
|
+
/* Note: because we've taken care in
|
1489
|
+
* yy_get_next_buffer() to have set up
|
1490
|
+
* yytext, we can now set up
|
1491
|
+
* yy_c_buf_p so that if some total
|
1492
|
+
* hoser (like flex itself) wants to
|
1493
|
+
* call the scanner after we return the
|
1494
|
+
* YY_NULL, it'll still work - another
|
1495
|
+
* YY_NULL will get returned.
|
1496
|
+
*/
|
1497
|
+
yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
|
1498
|
+
|
1499
|
+
yy_act = YY_STATE_EOF(YY_START);
|
1500
|
+
goto do_action;
|
1501
|
+
}
|
1502
|
+
|
1503
|
+
else
|
1504
|
+
{
|
1505
|
+
if ( ! yyg->yy_did_buffer_switch_on_eof )
|
1506
|
+
YY_NEW_FILE;
|
1507
|
+
}
|
1508
|
+
break;
|
1509
|
+
}
|
1510
|
+
|
1511
|
+
case EOB_ACT_CONTINUE_SCAN:
|
1512
|
+
yyg->yy_c_buf_p =
|
1513
|
+
yyg->yytext_ptr + yy_amount_of_matched_text;
|
1514
|
+
|
1515
|
+
yy_current_state = yy_get_previous_state( yyscanner );
|
1516
|
+
|
1517
|
+
yy_cp = yyg->yy_c_buf_p;
|
1518
|
+
yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
|
1519
|
+
goto yy_match;
|
1520
|
+
|
1521
|
+
case EOB_ACT_LAST_MATCH:
|
1522
|
+
yyg->yy_c_buf_p =
|
1523
|
+
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
|
1524
|
+
|
1525
|
+
yy_current_state = yy_get_previous_state( yyscanner );
|
1526
|
+
|
1527
|
+
yy_cp = yyg->yy_c_buf_p;
|
1528
|
+
yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
|
1529
|
+
goto yy_find_action;
|
1530
|
+
}
|
1531
|
+
break;
|
1532
|
+
}
|
1533
|
+
|
1534
|
+
default:
|
1535
|
+
YY_FATAL_ERROR(
|
1536
|
+
"fatal flex scanner internal error--no action found" );
|
1537
|
+
} /* end of action switch */
|
1538
|
+
} /* end of scanning one token */
|
1539
|
+
} /* end of user's declarations */
|
1540
|
+
} /* end of yylex */
|
1541
|
+
|
1542
|
+
/* yy_get_next_buffer - try to read in a new buffer
|
1543
|
+
*
|
1544
|
+
* Returns a code representing an action:
|
1545
|
+
* EOB_ACT_LAST_MATCH -
|
1546
|
+
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
|
1547
|
+
* EOB_ACT_END_OF_FILE - end of file
|
1548
|
+
*/
|
1549
|
+
static int yy_get_next_buffer (yyscan_t yyscanner)
|
1550
|
+
{
|
1551
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
1552
|
+
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
1553
|
+
char *source = yyg->yytext_ptr;
|
1554
|
+
int number_to_move, i;
|
1555
|
+
int ret_val;
|
1556
|
+
|
1557
|
+
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
|
1558
|
+
YY_FATAL_ERROR(
|
1559
|
+
"fatal flex scanner internal error--end of buffer missed" );
|
1560
|
+
|
1561
|
+
if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
|
1562
|
+
{ /* Don't try to fill the buffer, so this is an EOF. */
|
1563
|
+
if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
|
1564
|
+
{
|
1565
|
+
/* We matched a single character, the EOB, so
|
1566
|
+
* treat this as a final EOF.
|
1567
|
+
*/
|
1568
|
+
return EOB_ACT_END_OF_FILE;
|
1569
|
+
}
|
1570
|
+
|
1571
|
+
else
|
1572
|
+
{
|
1573
|
+
/* We matched some text prior to the EOB, first
|
1574
|
+
* process it.
|
1575
|
+
*/
|
1576
|
+
return EOB_ACT_LAST_MATCH;
|
1577
|
+
}
|
1578
|
+
}
|
1579
|
+
|
1580
|
+
/* Try to read more data. */
|
1581
|
+
|
1582
|
+
/* First move last chars to start of buffer. */
|
1583
|
+
number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
|
1584
|
+
|
1585
|
+
for ( i = 0; i < number_to_move; ++i )
|
1586
|
+
*(dest++) = *(source++);
|
1587
|
+
|
1588
|
+
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
1589
|
+
/* don't do the read, it's not guaranteed to return an EOF,
|
1590
|
+
* just force an EOF
|
1591
|
+
*/
|
1592
|
+
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
|
1593
|
+
|
1594
|
+
else
|
1595
|
+
{
|
1596
|
+
int num_to_read =
|
1597
|
+
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
1598
|
+
|
1599
|
+
while ( num_to_read <= 0 )
|
1600
|
+
{ /* Not enough room in the buffer - grow it. */
|
1601
|
+
|
1602
|
+
/* just a shorter name for the current buffer */
|
1603
|
+
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
|
1604
|
+
|
1605
|
+
int yy_c_buf_p_offset =
|
1606
|
+
(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
|
1607
|
+
|
1608
|
+
if ( b->yy_is_our_buffer )
|
1609
|
+
{
|
1610
|
+
int new_size = b->yy_buf_size * 2;
|
1611
|
+
|
1612
|
+
if ( new_size <= 0 )
|
1613
|
+
b->yy_buf_size += b->yy_buf_size / 8;
|
1614
|
+
else
|
1615
|
+
b->yy_buf_size *= 2;
|
1616
|
+
|
1617
|
+
b->yy_ch_buf = (char *)
|
1618
|
+
/* Include room in for 2 EOB chars. */
|
1619
|
+
yyrealloc( (void *) b->yy_ch_buf,
|
1620
|
+
(yy_size_t) (b->yy_buf_size + 2) , yyscanner );
|
1621
|
+
}
|
1622
|
+
else
|
1623
|
+
/* Can't grow it, we don't own it. */
|
1624
|
+
b->yy_ch_buf = NULL;
|
1625
|
+
|
1626
|
+
if ( ! b->yy_ch_buf )
|
1627
|
+
YY_FATAL_ERROR(
|
1628
|
+
"fatal error - scanner input buffer overflow" );
|
1629
|
+
|
1630
|
+
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
|
1631
|
+
|
1632
|
+
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
|
1633
|
+
number_to_move - 1;
|
1634
|
+
|
1635
|
+
}
|
1636
|
+
|
1637
|
+
if ( num_to_read > YY_READ_BUF_SIZE )
|
1638
|
+
num_to_read = YY_READ_BUF_SIZE;
|
1639
|
+
|
1640
|
+
/* Read in more data. */
|
1641
|
+
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
|
1642
|
+
yyg->yy_n_chars, num_to_read );
|
1643
|
+
|
1644
|
+
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
|
1645
|
+
}
|
1646
|
+
|
1647
|
+
if ( yyg->yy_n_chars == 0 )
|
1648
|
+
{
|
1649
|
+
if ( number_to_move == YY_MORE_ADJ )
|
1650
|
+
{
|
1651
|
+
ret_val = EOB_ACT_END_OF_FILE;
|
1652
|
+
yyrestart( yyin , yyscanner);
|
1653
|
+
}
|
1654
|
+
|
1655
|
+
else
|
1656
|
+
{
|
1657
|
+
ret_val = EOB_ACT_LAST_MATCH;
|
1658
|
+
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
|
1659
|
+
YY_BUFFER_EOF_PENDING;
|
1660
|
+
}
|
1661
|
+
}
|
1662
|
+
|
1663
|
+
else
|
1664
|
+
ret_val = EOB_ACT_CONTINUE_SCAN;
|
1665
|
+
|
1666
|
+
if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
1667
|
+
/* Extend the array by 50%, plus the number we really need. */
|
1668
|
+
int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
|
1669
|
+
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
|
1670
|
+
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
|
1671
|
+
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
1672
|
+
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
1673
|
+
/* "- 2" to take care of EOB's */
|
1674
|
+
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
|
1675
|
+
}
|
1676
|
+
|
1677
|
+
yyg->yy_n_chars += number_to_move;
|
1678
|
+
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
|
1679
|
+
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
|
1680
|
+
|
1681
|
+
yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
|
1682
|
+
|
1683
|
+
return ret_val;
|
1684
|
+
}
|
1685
|
+
|
1686
|
+
/* yy_get_previous_state - get the state just before the EOB char was reached */
|
1687
|
+
|
1688
|
+
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
|
1689
|
+
{
|
1690
|
+
yy_state_type yy_current_state;
|
1691
|
+
char *yy_cp;
|
1692
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
1693
|
+
|
1694
|
+
yy_current_state = yyg->yy_start;
|
1695
|
+
|
1696
|
+
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
|
1697
|
+
{
|
1698
|
+
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
1699
|
+
if ( yy_accept[yy_current_state] )
|
1700
|
+
{
|
1701
|
+
yyg->yy_last_accepting_state = yy_current_state;
|
1702
|
+
yyg->yy_last_accepting_cpos = yy_cp;
|
1703
|
+
}
|
1704
|
+
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
1705
|
+
{
|
1706
|
+
yy_current_state = (int) yy_def[yy_current_state];
|
1707
|
+
if ( yy_current_state >= 62 )
|
1708
|
+
yy_c = yy_meta[yy_c];
|
1709
|
+
}
|
1710
|
+
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
1711
|
+
}
|
1712
|
+
|
1713
|
+
return yy_current_state;
|
1714
|
+
}
|
1715
|
+
|
1716
|
+
/* yy_try_NUL_trans - try to make a transition on the NUL character
|
1717
|
+
*
|
1718
|
+
* synopsis
|
1719
|
+
* next_state = yy_try_NUL_trans( current_state );
|
1720
|
+
*/
|
1721
|
+
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
|
1722
|
+
{
|
1723
|
+
int yy_is_jam;
|
1724
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
|
1725
|
+
char *yy_cp = yyg->yy_c_buf_p;
|
1726
|
+
|
1727
|
+
YY_CHAR yy_c = 1;
|
1728
|
+
if ( yy_accept[yy_current_state] )
|
1729
|
+
{
|
1730
|
+
yyg->yy_last_accepting_state = yy_current_state;
|
1731
|
+
yyg->yy_last_accepting_cpos = yy_cp;
|
1732
|
+
}
|
1733
|
+
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
1734
|
+
{
|
1735
|
+
yy_current_state = (int) yy_def[yy_current_state];
|
1736
|
+
if ( yy_current_state >= 62 )
|
1737
|
+
yy_c = yy_meta[yy_c];
|
1738
|
+
}
|
1739
|
+
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
1740
|
+
yy_is_jam = (yy_current_state == 61);
|
1741
|
+
|
1742
|
+
(void)yyg;
|
1743
|
+
return yy_is_jam ? 0 : yy_current_state;
|
1744
|
+
}
|
1745
|
+
|
1746
|
+
#ifndef YY_NO_UNPUT
|
1747
|
+
|
1748
|
+
#endif
|
1749
|
+
|
1750
|
+
#ifndef YY_NO_INPUT
|
1751
|
+
#ifdef __cplusplus
|
1752
|
+
static int yyinput (yyscan_t yyscanner)
|
1753
|
+
#else
|
1754
|
+
static int input (yyscan_t yyscanner)
|
1755
|
+
#endif
|
1756
|
+
|
1757
|
+
{
|
1758
|
+
int c;
|
1759
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
1760
|
+
|
1761
|
+
*yyg->yy_c_buf_p = yyg->yy_hold_char;
|
1762
|
+
|
1763
|
+
if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
|
1764
|
+
{
|
1765
|
+
/* yy_c_buf_p now points to the character we want to return.
|
1766
|
+
* If this occurs *before* the EOB characters, then it's a
|
1767
|
+
* valid NUL; if not, then we've hit the end of the buffer.
|
1768
|
+
*/
|
1769
|
+
if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
|
1770
|
+
/* This was really a NUL. */
|
1771
|
+
*yyg->yy_c_buf_p = '\0';
|
1772
|
+
|
1773
|
+
else
|
1774
|
+
{ /* need more input */
|
1775
|
+
int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
|
1776
|
+
++yyg->yy_c_buf_p;
|
1777
|
+
|
1778
|
+
switch ( yy_get_next_buffer( yyscanner ) )
|
1779
|
+
{
|
1780
|
+
case EOB_ACT_LAST_MATCH:
|
1781
|
+
/* This happens because yy_g_n_b()
|
1782
|
+
* sees that we've accumulated a
|
1783
|
+
* token and flags that we need to
|
1784
|
+
* try matching the token before
|
1785
|
+
* proceeding. But for input(),
|
1786
|
+
* there's no matching to consider.
|
1787
|
+
* So convert the EOB_ACT_LAST_MATCH
|
1788
|
+
* to EOB_ACT_END_OF_FILE.
|
1789
|
+
*/
|
1790
|
+
|
1791
|
+
/* Reset buffer status. */
|
1792
|
+
yyrestart( yyin , yyscanner);
|
1793
|
+
|
1794
|
+
/*FALLTHROUGH*/
|
1795
|
+
|
1796
|
+
case EOB_ACT_END_OF_FILE:
|
1797
|
+
{
|
1798
|
+
if ( yywrap( yyscanner ) )
|
1799
|
+
return 0;
|
1800
|
+
|
1801
|
+
if ( ! yyg->yy_did_buffer_switch_on_eof )
|
1802
|
+
YY_NEW_FILE;
|
1803
|
+
#ifdef __cplusplus
|
1804
|
+
return yyinput(yyscanner);
|
1805
|
+
#else
|
1806
|
+
return input(yyscanner);
|
1807
|
+
#endif
|
1808
|
+
}
|
1809
|
+
|
1810
|
+
case EOB_ACT_CONTINUE_SCAN:
|
1811
|
+
yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
|
1812
|
+
break;
|
1813
|
+
}
|
1814
|
+
}
|
1815
|
+
}
|
1816
|
+
|
1817
|
+
c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
|
1818
|
+
*yyg->yy_c_buf_p = '\0'; /* preserve yytext */
|
1819
|
+
yyg->yy_hold_char = *++yyg->yy_c_buf_p;
|
1820
|
+
|
1821
|
+
if ( c == '\n' )
|
1822
|
+
|
1823
|
+
do{ yylineno++;
|
1824
|
+
yycolumn=0;
|
1825
|
+
}while(0)
|
1826
|
+
;
|
1827
|
+
|
1828
|
+
return c;
|
1829
|
+
}
|
1830
|
+
#endif /* ifndef YY_NO_INPUT */
|
1831
|
+
|
1832
|
+
/** Immediately switch to a different input stream.
|
1833
|
+
* @param input_file A readable stream.
|
1834
|
+
* @param yyscanner The scanner object.
|
1835
|
+
* @note This function does not reset the start condition to @c INITIAL .
|
1836
|
+
*/
|
1837
|
+
void yyrestart (FILE * input_file , yyscan_t yyscanner)
|
1838
|
+
{
|
1839
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
1840
|
+
|
1841
|
+
if ( ! YY_CURRENT_BUFFER ){
|
1842
|
+
yyensure_buffer_stack (yyscanner);
|
1843
|
+
YY_CURRENT_BUFFER_LVALUE =
|
1844
|
+
yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
|
1845
|
+
}
|
1846
|
+
|
1847
|
+
yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
|
1848
|
+
yy_load_buffer_state( yyscanner );
|
1849
|
+
}
|
1850
|
+
|
1851
|
+
/** Switch to a different input buffer.
|
1852
|
+
* @param new_buffer The new input buffer.
|
1853
|
+
* @param yyscanner The scanner object.
|
1854
|
+
*/
|
1855
|
+
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
|
1856
|
+
{
|
1857
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
1858
|
+
|
1859
|
+
/* TODO. We should be able to replace this entire function body
|
1860
|
+
* with
|
1861
|
+
* yypop_buffer_state();
|
1862
|
+
* yypush_buffer_state(new_buffer);
|
1863
|
+
*/
|
1864
|
+
yyensure_buffer_stack (yyscanner);
|
1865
|
+
if ( YY_CURRENT_BUFFER == new_buffer )
|
1866
|
+
return;
|
1867
|
+
|
1868
|
+
if ( YY_CURRENT_BUFFER )
|
1869
|
+
{
|
1870
|
+
/* Flush out information for old buffer. */
|
1871
|
+
*yyg->yy_c_buf_p = yyg->yy_hold_char;
|
1872
|
+
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
|
1873
|
+
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
|
1874
|
+
}
|
1875
|
+
|
1876
|
+
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
1877
|
+
yy_load_buffer_state( yyscanner );
|
1878
|
+
|
1879
|
+
/* We don't actually know whether we did this switch during
|
1880
|
+
* EOF (yywrap()) processing, but the only time this flag
|
1881
|
+
* is looked at is after yywrap() is called, so it's safe
|
1882
|
+
* to go ahead and always set it.
|
1883
|
+
*/
|
1884
|
+
yyg->yy_did_buffer_switch_on_eof = 1;
|
1885
|
+
}
|
1886
|
+
|
1887
|
+
static void yy_load_buffer_state (yyscan_t yyscanner)
|
1888
|
+
{
|
1889
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
1890
|
+
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
|
1891
|
+
yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
|
1892
|
+
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
|
1893
|
+
yyg->yy_hold_char = *yyg->yy_c_buf_p;
|
1894
|
+
}
|
1895
|
+
|
1896
|
+
/** Allocate and initialize an input buffer state.
|
1897
|
+
* @param file A readable stream.
|
1898
|
+
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
|
1899
|
+
* @param yyscanner The scanner object.
|
1900
|
+
* @return the allocated buffer state.
|
1901
|
+
*/
|
1902
|
+
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
|
1903
|
+
{
|
1904
|
+
YY_BUFFER_STATE b;
|
1905
|
+
|
1906
|
+
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
|
1907
|
+
if ( ! b )
|
1908
|
+
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
1909
|
+
|
1910
|
+
b->yy_buf_size = size;
|
1911
|
+
|
1912
|
+
/* yy_ch_buf has to be 2 characters longer than the size given because
|
1913
|
+
* we need to put in 2 end-of-buffer characters.
|
1914
|
+
*/
|
1915
|
+
b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
|
1916
|
+
if ( ! b->yy_ch_buf )
|
1917
|
+
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
1918
|
+
|
1919
|
+
b->yy_is_our_buffer = 1;
|
1920
|
+
|
1921
|
+
yy_init_buffer( b, file , yyscanner);
|
1922
|
+
|
1923
|
+
return b;
|
1924
|
+
}
|
1925
|
+
|
1926
|
+
/** Destroy the buffer.
|
1927
|
+
* @param b a buffer created with yy_create_buffer()
|
1928
|
+
* @param yyscanner The scanner object.
|
1929
|
+
*/
|
1930
|
+
void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
|
1931
|
+
{
|
1932
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
1933
|
+
|
1934
|
+
if ( ! b )
|
1935
|
+
return;
|
1936
|
+
|
1937
|
+
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
|
1938
|
+
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
1939
|
+
|
1940
|
+
if ( b->yy_is_our_buffer )
|
1941
|
+
yyfree( (void *) b->yy_ch_buf , yyscanner );
|
1942
|
+
|
1943
|
+
yyfree( (void *) b , yyscanner );
|
1944
|
+
}
|
1945
|
+
|
1946
|
+
/* Initializes or reinitializes a buffer.
|
1947
|
+
* This function is sometimes called more than once on the same buffer,
|
1948
|
+
* such as during a yyrestart() or at EOF.
|
1949
|
+
*/
|
1950
|
+
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
|
1951
|
+
|
1952
|
+
{
|
1953
|
+
int oerrno = errno;
|
1954
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
1955
|
+
|
1956
|
+
yy_flush_buffer( b , yyscanner);
|
1957
|
+
|
1958
|
+
b->yy_input_file = file;
|
1959
|
+
b->yy_fill_buffer = 1;
|
1960
|
+
|
1961
|
+
/* If b is the current buffer, then yy_init_buffer was _probably_
|
1962
|
+
* called from yyrestart() or through yy_get_next_buffer.
|
1963
|
+
* In that case, we don't want to reset the lineno or column.
|
1964
|
+
*/
|
1965
|
+
if (b != YY_CURRENT_BUFFER){
|
1966
|
+
b->yy_bs_lineno = 1;
|
1967
|
+
b->yy_bs_column = 0;
|
1968
|
+
}
|
1969
|
+
|
1970
|
+
b->yy_is_interactive = 0;
|
1971
|
+
|
1972
|
+
errno = oerrno;
|
1973
|
+
}
|
1974
|
+
|
1975
|
+
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
|
1976
|
+
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
|
1977
|
+
* @param yyscanner The scanner object.
|
1978
|
+
*/
|
1979
|
+
void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
|
1980
|
+
{
|
1981
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
1982
|
+
if ( ! b )
|
1983
|
+
return;
|
1984
|
+
|
1985
|
+
b->yy_n_chars = 0;
|
1986
|
+
|
1987
|
+
/* We always need two end-of-buffer characters. The first causes
|
1988
|
+
* a transition to the end-of-buffer state. The second causes
|
1989
|
+
* a jam in that state.
|
1990
|
+
*/
|
1991
|
+
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
|
1992
|
+
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
|
1993
|
+
|
1994
|
+
b->yy_buf_pos = &b->yy_ch_buf[0];
|
1995
|
+
|
1996
|
+
b->yy_at_bol = 1;
|
1997
|
+
b->yy_buffer_status = YY_BUFFER_NEW;
|
1998
|
+
|
1999
|
+
if ( b == YY_CURRENT_BUFFER )
|
2000
|
+
yy_load_buffer_state( yyscanner );
|
2001
|
+
}
|
2002
|
+
|
2003
|
+
/** Pushes the new state onto the stack. The new state becomes
|
2004
|
+
* the current state. This function will allocate the stack
|
2005
|
+
* if necessary.
|
2006
|
+
* @param new_buffer The new state.
|
2007
|
+
* @param yyscanner The scanner object.
|
2008
|
+
*/
|
2009
|
+
void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
|
2010
|
+
{
|
2011
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2012
|
+
if (new_buffer == NULL)
|
2013
|
+
return;
|
2014
|
+
|
2015
|
+
yyensure_buffer_stack(yyscanner);
|
2016
|
+
|
2017
|
+
/* This block is copied from yy_switch_to_buffer. */
|
2018
|
+
if ( YY_CURRENT_BUFFER )
|
2019
|
+
{
|
2020
|
+
/* Flush out information for old buffer. */
|
2021
|
+
*yyg->yy_c_buf_p = yyg->yy_hold_char;
|
2022
|
+
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
|
2023
|
+
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
|
2024
|
+
}
|
2025
|
+
|
2026
|
+
/* Only push if top exists. Otherwise, replace top. */
|
2027
|
+
if (YY_CURRENT_BUFFER)
|
2028
|
+
yyg->yy_buffer_stack_top++;
|
2029
|
+
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
2030
|
+
|
2031
|
+
/* copied from yy_switch_to_buffer. */
|
2032
|
+
yy_load_buffer_state( yyscanner );
|
2033
|
+
yyg->yy_did_buffer_switch_on_eof = 1;
|
2034
|
+
}
|
2035
|
+
|
2036
|
+
/** Removes and deletes the top of the stack, if present.
|
2037
|
+
* The next element becomes the new top.
|
2038
|
+
* @param yyscanner The scanner object.
|
2039
|
+
*/
|
2040
|
+
void yypop_buffer_state (yyscan_t yyscanner)
|
2041
|
+
{
|
2042
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2043
|
+
if (!YY_CURRENT_BUFFER)
|
2044
|
+
return;
|
2045
|
+
|
2046
|
+
yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
|
2047
|
+
YY_CURRENT_BUFFER_LVALUE = NULL;
|
2048
|
+
if (yyg->yy_buffer_stack_top > 0)
|
2049
|
+
--yyg->yy_buffer_stack_top;
|
2050
|
+
|
2051
|
+
if (YY_CURRENT_BUFFER) {
|
2052
|
+
yy_load_buffer_state( yyscanner );
|
2053
|
+
yyg->yy_did_buffer_switch_on_eof = 1;
|
2054
|
+
}
|
2055
|
+
}
|
2056
|
+
|
2057
|
+
/* Allocates the stack if it does not exist.
|
2058
|
+
* Guarantees space for at least one push.
|
2059
|
+
*/
|
2060
|
+
static void yyensure_buffer_stack (yyscan_t yyscanner)
|
2061
|
+
{
|
2062
|
+
yy_size_t num_to_alloc;
|
2063
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2064
|
+
|
2065
|
+
if (!yyg->yy_buffer_stack) {
|
2066
|
+
|
2067
|
+
/* First allocation is just for 2 elements, since we don't know if this
|
2068
|
+
* scanner will even need a stack. We use 2 instead of 1 to avoid an
|
2069
|
+
* immediate realloc on the next call.
|
2070
|
+
*/
|
2071
|
+
num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
|
2072
|
+
yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
|
2073
|
+
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
2074
|
+
, yyscanner);
|
2075
|
+
if ( ! yyg->yy_buffer_stack )
|
2076
|
+
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
2077
|
+
|
2078
|
+
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
2079
|
+
|
2080
|
+
yyg->yy_buffer_stack_max = num_to_alloc;
|
2081
|
+
yyg->yy_buffer_stack_top = 0;
|
2082
|
+
return;
|
2083
|
+
}
|
2084
|
+
|
2085
|
+
if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
|
2086
|
+
|
2087
|
+
/* Increase the buffer to prepare for a possible push. */
|
2088
|
+
yy_size_t grow_size = 8 /* arbitrary grow size */;
|
2089
|
+
|
2090
|
+
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
|
2091
|
+
yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
|
2092
|
+
(yyg->yy_buffer_stack,
|
2093
|
+
num_to_alloc * sizeof(struct yy_buffer_state*)
|
2094
|
+
, yyscanner);
|
2095
|
+
if ( ! yyg->yy_buffer_stack )
|
2096
|
+
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
2097
|
+
|
2098
|
+
/* zero only the new slots.*/
|
2099
|
+
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
|
2100
|
+
yyg->yy_buffer_stack_max = num_to_alloc;
|
2101
|
+
}
|
2102
|
+
}
|
2103
|
+
|
2104
|
+
/** Setup the input buffer state to scan directly from a user-specified character buffer.
|
2105
|
+
* @param base the character buffer
|
2106
|
+
* @param size the size in bytes of the character buffer
|
2107
|
+
* @param yyscanner The scanner object.
|
2108
|
+
* @return the newly allocated buffer state object.
|
2109
|
+
*/
|
2110
|
+
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
|
2111
|
+
{
|
2112
|
+
YY_BUFFER_STATE b;
|
2113
|
+
|
2114
|
+
if ( size < 2 ||
|
2115
|
+
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
2116
|
+
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
2117
|
+
/* They forgot to leave room for the EOB's. */
|
2118
|
+
return NULL;
|
2119
|
+
|
2120
|
+
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
|
2121
|
+
if ( ! b )
|
2122
|
+
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
|
2123
|
+
|
2124
|
+
b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
|
2125
|
+
b->yy_buf_pos = b->yy_ch_buf = base;
|
2126
|
+
b->yy_is_our_buffer = 0;
|
2127
|
+
b->yy_input_file = NULL;
|
2128
|
+
b->yy_n_chars = b->yy_buf_size;
|
2129
|
+
b->yy_is_interactive = 0;
|
2130
|
+
b->yy_at_bol = 1;
|
2131
|
+
b->yy_fill_buffer = 0;
|
2132
|
+
b->yy_buffer_status = YY_BUFFER_NEW;
|
2133
|
+
|
2134
|
+
yy_switch_to_buffer( b , yyscanner );
|
2135
|
+
|
2136
|
+
return b;
|
2137
|
+
}
|
2138
|
+
|
2139
|
+
/** Setup the input buffer state to scan a string. The next call to yylex() will
|
2140
|
+
* scan from a @e copy of @a str.
|
2141
|
+
* @param yystr a NUL-terminated string to scan
|
2142
|
+
* @param yyscanner The scanner object.
|
2143
|
+
* @return the newly allocated buffer state object.
|
2144
|
+
* @note If you want to scan bytes that may contain NUL values, then use
|
2145
|
+
* yy_scan_bytes() instead.
|
2146
|
+
*/
|
2147
|
+
YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
|
2148
|
+
{
|
2149
|
+
|
2150
|
+
return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
|
2151
|
+
}
|
2152
|
+
|
2153
|
+
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
|
2154
|
+
* scan from a @e copy of @a bytes.
|
2155
|
+
* @param yybytes the byte buffer to scan
|
2156
|
+
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
2157
|
+
* @param yyscanner The scanner object.
|
2158
|
+
* @return the newly allocated buffer state object.
|
2159
|
+
*/
|
2160
|
+
YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
|
2161
|
+
{
|
2162
|
+
YY_BUFFER_STATE b;
|
2163
|
+
char *buf;
|
2164
|
+
yy_size_t n;
|
2165
|
+
int i;
|
2166
|
+
|
2167
|
+
/* Get memory for full buffer, including space for trailing EOB's. */
|
2168
|
+
n = (yy_size_t) (_yybytes_len + 2);
|
2169
|
+
buf = (char *) yyalloc( n , yyscanner );
|
2170
|
+
if ( ! buf )
|
2171
|
+
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
|
2172
|
+
|
2173
|
+
for ( i = 0; i < _yybytes_len; ++i )
|
2174
|
+
buf[i] = yybytes[i];
|
2175
|
+
|
2176
|
+
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
|
2177
|
+
|
2178
|
+
b = yy_scan_buffer( buf, n , yyscanner);
|
2179
|
+
if ( ! b )
|
2180
|
+
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
|
2181
|
+
|
2182
|
+
/* It's okay to grow etc. this buffer, and we should throw it
|
2183
|
+
* away when we're done.
|
2184
|
+
*/
|
2185
|
+
b->yy_is_our_buffer = 1;
|
2186
|
+
|
2187
|
+
return b;
|
2188
|
+
}
|
2189
|
+
|
2190
|
+
#ifndef YY_EXIT_FAILURE
|
2191
|
+
#define YY_EXIT_FAILURE 2
|
2192
|
+
#endif
|
2193
|
+
|
2194
|
+
static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
|
2195
|
+
{
|
2196
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2197
|
+
(void)yyg;
|
2198
|
+
fprintf( stderr, "%s\n", msg );
|
2199
|
+
exit( YY_EXIT_FAILURE );
|
2200
|
+
}
|
2201
|
+
|
2202
|
+
/* Redefine yyless() so it works in section 3 code. */
|
2203
|
+
|
2204
|
+
#undef yyless
|
2205
|
+
#define yyless(n) \
|
2206
|
+
do \
|
2207
|
+
{ \
|
2208
|
+
/* Undo effects of setting up yytext. */ \
|
2209
|
+
int yyless_macro_arg = (n); \
|
2210
|
+
YY_LESS_LINENO(yyless_macro_arg);\
|
2211
|
+
yytext[yyleng] = yyg->yy_hold_char; \
|
2212
|
+
yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
|
2213
|
+
yyg->yy_hold_char = *yyg->yy_c_buf_p; \
|
2214
|
+
*yyg->yy_c_buf_p = '\0'; \
|
2215
|
+
yyleng = yyless_macro_arg; \
|
2216
|
+
} \
|
2217
|
+
while ( 0 )
|
2218
|
+
|
2219
|
+
/* Accessor methods (get/set functions) to struct members. */
|
2220
|
+
|
2221
|
+
/** Get the user-defined data for this scanner.
|
2222
|
+
* @param yyscanner The scanner object.
|
2223
|
+
*/
|
2224
|
+
YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
|
2225
|
+
{
|
2226
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2227
|
+
return yyextra;
|
2228
|
+
}
|
2229
|
+
|
2230
|
+
/** Get the current line number.
|
2231
|
+
* @param yyscanner The scanner object.
|
2232
|
+
*/
|
2233
|
+
int yyget_lineno (yyscan_t yyscanner)
|
2234
|
+
{
|
2235
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2236
|
+
|
2237
|
+
if (! YY_CURRENT_BUFFER)
|
2238
|
+
return 0;
|
2239
|
+
|
2240
|
+
return yylineno;
|
2241
|
+
}
|
2242
|
+
|
2243
|
+
/** Get the current column number.
|
2244
|
+
* @param yyscanner The scanner object.
|
2245
|
+
*/
|
2246
|
+
int yyget_column (yyscan_t yyscanner)
|
2247
|
+
{
|
2248
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2249
|
+
|
2250
|
+
if (! YY_CURRENT_BUFFER)
|
2251
|
+
return 0;
|
2252
|
+
|
2253
|
+
return yycolumn;
|
2254
|
+
}
|
2255
|
+
|
2256
|
+
/** Get the input stream.
|
2257
|
+
* @param yyscanner The scanner object.
|
2258
|
+
*/
|
2259
|
+
FILE *yyget_in (yyscan_t yyscanner)
|
2260
|
+
{
|
2261
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2262
|
+
return yyin;
|
2263
|
+
}
|
2264
|
+
|
2265
|
+
/** Get the output stream.
|
2266
|
+
* @param yyscanner The scanner object.
|
2267
|
+
*/
|
2268
|
+
FILE *yyget_out (yyscan_t yyscanner)
|
2269
|
+
{
|
2270
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2271
|
+
return yyout;
|
2272
|
+
}
|
2273
|
+
|
2274
|
+
/** Get the length of the current token.
|
2275
|
+
* @param yyscanner The scanner object.
|
2276
|
+
*/
|
2277
|
+
int yyget_leng (yyscan_t yyscanner)
|
2278
|
+
{
|
2279
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2280
|
+
return yyleng;
|
2281
|
+
}
|
2282
|
+
|
2283
|
+
/** Get the current token.
|
2284
|
+
* @param yyscanner The scanner object.
|
2285
|
+
*/
|
2286
|
+
|
2287
|
+
char *yyget_text (yyscan_t yyscanner)
|
2288
|
+
{
|
2289
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2290
|
+
return yytext;
|
2291
|
+
}
|
2292
|
+
|
2293
|
+
/** Set the user-defined data. This data is never touched by the scanner.
|
2294
|
+
* @param user_defined The data to be associated with this scanner.
|
2295
|
+
* @param yyscanner The scanner object.
|
2296
|
+
*/
|
2297
|
+
void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
|
2298
|
+
{
|
2299
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2300
|
+
yyextra = user_defined ;
|
2301
|
+
}
|
2302
|
+
|
2303
|
+
/** Set the current line number.
|
2304
|
+
* @param _line_number line number
|
2305
|
+
* @param yyscanner The scanner object.
|
2306
|
+
*/
|
2307
|
+
void yyset_lineno (int _line_number , yyscan_t yyscanner)
|
2308
|
+
{
|
2309
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2310
|
+
|
2311
|
+
/* lineno is only valid if an input buffer exists. */
|
2312
|
+
if (! YY_CURRENT_BUFFER )
|
2313
|
+
YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
|
2314
|
+
|
2315
|
+
yylineno = _line_number;
|
2316
|
+
}
|
2317
|
+
|
2318
|
+
/** Set the current column.
|
2319
|
+
* @param _column_no column number
|
2320
|
+
* @param yyscanner The scanner object.
|
2321
|
+
*/
|
2322
|
+
void yyset_column (int _column_no , yyscan_t yyscanner)
|
2323
|
+
{
|
2324
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2325
|
+
|
2326
|
+
/* column is only valid if an input buffer exists. */
|
2327
|
+
if (! YY_CURRENT_BUFFER )
|
2328
|
+
YY_FATAL_ERROR( "yyset_column called with no buffer" );
|
2329
|
+
|
2330
|
+
yycolumn = _column_no;
|
2331
|
+
}
|
2332
|
+
|
2333
|
+
/** Set the input stream. This does not discard the current
|
2334
|
+
* input buffer.
|
2335
|
+
* @param _in_str A readable stream.
|
2336
|
+
* @param yyscanner The scanner object.
|
2337
|
+
* @see yy_switch_to_buffer
|
2338
|
+
*/
|
2339
|
+
void yyset_in (FILE * _in_str , yyscan_t yyscanner)
|
2340
|
+
{
|
2341
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2342
|
+
yyin = _in_str ;
|
2343
|
+
}
|
2344
|
+
|
2345
|
+
void yyset_out (FILE * _out_str , yyscan_t yyscanner)
|
2346
|
+
{
|
2347
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2348
|
+
yyout = _out_str ;
|
2349
|
+
}
|
2350
|
+
|
2351
|
+
int yyget_debug (yyscan_t yyscanner)
|
2352
|
+
{
|
2353
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2354
|
+
return yy_flex_debug;
|
2355
|
+
}
|
2356
|
+
|
2357
|
+
void yyset_debug (int _bdebug , yyscan_t yyscanner)
|
2358
|
+
{
|
2359
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2360
|
+
yy_flex_debug = _bdebug ;
|
2361
|
+
}
|
2362
|
+
|
2363
|
+
/* Accessor methods for yylval and yylloc */
|
2364
|
+
|
2365
|
+
YYSTYPE * yyget_lval (yyscan_t yyscanner)
|
2366
|
+
{
|
2367
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2368
|
+
return yylval;
|
2369
|
+
}
|
2370
|
+
|
2371
|
+
void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
|
2372
|
+
{
|
2373
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2374
|
+
yylval = yylval_param;
|
2375
|
+
}
|
2376
|
+
|
2377
|
+
YYLTYPE *yyget_lloc (yyscan_t yyscanner)
|
2378
|
+
{
|
2379
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2380
|
+
return yylloc;
|
2381
|
+
}
|
2382
|
+
|
2383
|
+
void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
|
2384
|
+
{
|
2385
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2386
|
+
yylloc = yylloc_param;
|
2387
|
+
}
|
2388
|
+
|
2389
|
+
/* User-visible API */
|
2390
|
+
|
2391
|
+
/* yylex_init is special because it creates the scanner itself, so it is
|
2392
|
+
* the ONLY reentrant function that doesn't take the scanner as the last argument.
|
2393
|
+
* That's why we explicitly handle the declaration, instead of using our macros.
|
2394
|
+
*/
|
2395
|
+
int yylex_init(yyscan_t* ptr_yy_globals)
|
2396
|
+
{
|
2397
|
+
if (ptr_yy_globals == NULL){
|
2398
|
+
errno = EINVAL;
|
2399
|
+
return 1;
|
2400
|
+
}
|
2401
|
+
|
2402
|
+
*ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
|
2403
|
+
|
2404
|
+
if (*ptr_yy_globals == NULL){
|
2405
|
+
errno = ENOMEM;
|
2406
|
+
return 1;
|
2407
|
+
}
|
2408
|
+
|
2409
|
+
/* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
|
2410
|
+
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
|
2411
|
+
|
2412
|
+
return yy_init_globals ( *ptr_yy_globals );
|
2413
|
+
}
|
2414
|
+
|
2415
|
+
/* yylex_init_extra has the same functionality as yylex_init, but follows the
|
2416
|
+
* convention of taking the scanner as the last argument. Note however, that
|
2417
|
+
* this is a *pointer* to a scanner, as it will be allocated by this call (and
|
2418
|
+
* is the reason, too, why this function also must handle its own declaration).
|
2419
|
+
* The user defined value in the first argument will be available to yyalloc in
|
2420
|
+
* the yyextra field.
|
2421
|
+
*/
|
2422
|
+
int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
|
2423
|
+
{
|
2424
|
+
struct yyguts_t dummy_yyguts;
|
2425
|
+
|
2426
|
+
yyset_extra (yy_user_defined, &dummy_yyguts);
|
2427
|
+
|
2428
|
+
if (ptr_yy_globals == NULL){
|
2429
|
+
errno = EINVAL;
|
2430
|
+
return 1;
|
2431
|
+
}
|
2432
|
+
|
2433
|
+
*ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
|
2434
|
+
|
2435
|
+
if (*ptr_yy_globals == NULL){
|
2436
|
+
errno = ENOMEM;
|
2437
|
+
return 1;
|
2438
|
+
}
|
2439
|
+
|
2440
|
+
/* By setting to 0xAA, we expose bugs in
|
2441
|
+
yy_init_globals. Leave at 0x00 for releases. */
|
2442
|
+
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
|
2443
|
+
|
2444
|
+
yyset_extra (yy_user_defined, *ptr_yy_globals);
|
2445
|
+
|
2446
|
+
return yy_init_globals ( *ptr_yy_globals );
|
2447
|
+
}
|
2448
|
+
|
2449
|
+
static int yy_init_globals (yyscan_t yyscanner)
|
2450
|
+
{
|
2451
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2452
|
+
/* Initialization is the same as for the non-reentrant scanner.
|
2453
|
+
* This function is called from yylex_destroy(), so don't allocate here.
|
2454
|
+
*/
|
2455
|
+
|
2456
|
+
yyg->yy_buffer_stack = NULL;
|
2457
|
+
yyg->yy_buffer_stack_top = 0;
|
2458
|
+
yyg->yy_buffer_stack_max = 0;
|
2459
|
+
yyg->yy_c_buf_p = NULL;
|
2460
|
+
yyg->yy_init = 0;
|
2461
|
+
yyg->yy_start = 0;
|
2462
|
+
|
2463
|
+
yyg->yy_start_stack_ptr = 0;
|
2464
|
+
yyg->yy_start_stack_depth = 0;
|
2465
|
+
yyg->yy_start_stack = NULL;
|
2466
|
+
|
2467
|
+
/* Defined in main.c */
|
2468
|
+
#ifdef YY_STDINIT
|
2469
|
+
yyin = stdin;
|
2470
|
+
yyout = stdout;
|
2471
|
+
#else
|
2472
|
+
yyin = NULL;
|
2473
|
+
yyout = NULL;
|
2474
|
+
#endif
|
2475
|
+
|
2476
|
+
/* For future reference: Set errno on error, since we are called by
|
2477
|
+
* yylex_init()
|
2478
|
+
*/
|
2479
|
+
return 0;
|
2480
|
+
}
|
2481
|
+
|
2482
|
+
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
|
2483
|
+
int yylex_destroy (yyscan_t yyscanner)
|
2484
|
+
{
|
2485
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2486
|
+
|
2487
|
+
/* Pop the buffer stack, destroying each element. */
|
2488
|
+
while(YY_CURRENT_BUFFER){
|
2489
|
+
yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
|
2490
|
+
YY_CURRENT_BUFFER_LVALUE = NULL;
|
2491
|
+
yypop_buffer_state(yyscanner);
|
2492
|
+
}
|
2493
|
+
|
2494
|
+
/* Destroy the stack itself. */
|
2495
|
+
yyfree(yyg->yy_buffer_stack , yyscanner);
|
2496
|
+
yyg->yy_buffer_stack = NULL;
|
2497
|
+
|
2498
|
+
/* Destroy the start condition stack. */
|
2499
|
+
yyfree( yyg->yy_start_stack , yyscanner );
|
2500
|
+
yyg->yy_start_stack = NULL;
|
2501
|
+
|
2502
|
+
/* Reset the globals. This is important in a non-reentrant scanner so the next time
|
2503
|
+
* yylex() is called, initialization will occur. */
|
2504
|
+
yy_init_globals( yyscanner);
|
2505
|
+
|
2506
|
+
/* Destroy the main struct (reentrant only). */
|
2507
|
+
yyfree ( yyscanner , yyscanner );
|
2508
|
+
yyscanner = NULL;
|
2509
|
+
return 0;
|
2510
|
+
}
|
2511
|
+
|
2512
|
+
/*
|
2513
|
+
* Internal utility routines.
|
2514
|
+
*/
|
2515
|
+
|
2516
|
+
#ifndef yytext_ptr
|
2517
|
+
static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
|
2518
|
+
{
|
2519
|
+
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
2520
|
+
(void)yyg;
|
2521
|
+
|
2522
|
+
int i;
|
2523
|
+
for ( i = 0; i < n; ++i )
|
2524
|
+
s1[i] = s2[i];
|
2525
|
+
}
|
2526
|
+
#endif
|
2527
|
+
|
2528
|
+
#ifdef YY_NEED_STRLEN
|
2529
|
+
static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
|
2530
|
+
{
|
2531
|
+
int n;
|
2532
|
+
for ( n = 0; s[n]; ++n )
|
2533
|
+
;
|
2534
|
+
|
2535
|
+
return n;
|
2536
|
+
}
|
2537
|
+
#endif
|
2538
|
+
|
2539
|
+
#define YYTABLES_NAME "yytables"
|
2540
|
+
|
2541
|
+
#line 176 "bplexer.l"
|
2542
|
+
|
2543
|
+
|