contrived_json 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2184 @@
1
+ #line 2 "ext/contrived_json/ext_parser/lexer.c"
2
+
3
+ #line 4 "ext/contrived_json/ext_parser/lexer.c"
4
+
5
+ #define YY_INT_ALIGNED short int
6
+
7
+ /* A lexical scanner generated by flex */
8
+
9
+ #define FLEX_SCANNER
10
+ #define YY_FLEX_MAJOR_VERSION 2
11
+ #define YY_FLEX_MINOR_VERSION 6
12
+ #define YY_FLEX_SUBMINOR_VERSION 0
13
+ #if YY_FLEX_SUBMINOR_VERSION > 0
14
+ #define FLEX_BETA
15
+ #endif
16
+
17
+ /* First, we deal with platform-specific or compiler-specific issues. */
18
+
19
+ /* begin standard C headers. */
20
+ #include <stdio.h>
21
+ #include <string.h>
22
+ #include <errno.h>
23
+ #include <stdlib.h>
24
+
25
+ /* end standard C headers. */
26
+
27
+ /* flex integer type definitions */
28
+
29
+ #ifndef FLEXINT_H
30
+ #define FLEXINT_H
31
+
32
+ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
+
34
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35
+
36
+ /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37
+ * if you want the limit (max/min) macros for int types.
38
+ */
39
+ #ifndef __STDC_LIMIT_MACROS
40
+ #define __STDC_LIMIT_MACROS 1
41
+ #endif
42
+
43
+ #include <inttypes.h>
44
+ typedef int8_t flex_int8_t;
45
+ typedef uint8_t flex_uint8_t;
46
+ typedef int16_t flex_int16_t;
47
+ typedef uint16_t flex_uint16_t;
48
+ typedef int32_t flex_int32_t;
49
+ typedef uint32_t flex_uint32_t;
50
+ #else
51
+ typedef signed char flex_int8_t;
52
+ typedef short int flex_int16_t;
53
+ typedef int flex_int32_t;
54
+ typedef unsigned char flex_uint8_t;
55
+ typedef unsigned short int flex_uint16_t;
56
+ typedef unsigned int flex_uint32_t;
57
+
58
+ /* Limits of integral types. */
59
+ #ifndef INT8_MIN
60
+ #define INT8_MIN (-128)
61
+ #endif
62
+ #ifndef INT16_MIN
63
+ #define INT16_MIN (-32767-1)
64
+ #endif
65
+ #ifndef INT32_MIN
66
+ #define INT32_MIN (-2147483647-1)
67
+ #endif
68
+ #ifndef INT8_MAX
69
+ #define INT8_MAX (127)
70
+ #endif
71
+ #ifndef INT16_MAX
72
+ #define INT16_MAX (32767)
73
+ #endif
74
+ #ifndef INT32_MAX
75
+ #define INT32_MAX (2147483647)
76
+ #endif
77
+ #ifndef UINT8_MAX
78
+ #define UINT8_MAX (255U)
79
+ #endif
80
+ #ifndef UINT16_MAX
81
+ #define UINT16_MAX (65535U)
82
+ #endif
83
+ #ifndef UINT32_MAX
84
+ #define UINT32_MAX (4294967295U)
85
+ #endif
86
+
87
+ #endif /* ! C99 */
88
+
89
+ #endif /* ! FLEXINT_H */
90
+
91
+ #ifdef __cplusplus
92
+
93
+ /* The "const" storage-class-modifier is valid. */
94
+ #define YY_USE_CONST
95
+
96
+ #else /* ! __cplusplus */
97
+
98
+ /* C99 requires __STDC__ to be defined as 1. */
99
+ #if defined (__STDC__)
100
+
101
+ #define YY_USE_CONST
102
+
103
+ #endif /* defined (__STDC__) */
104
+ #endif /* ! __cplusplus */
105
+
106
+ #ifdef YY_USE_CONST
107
+ #define yyconst const
108
+ #else
109
+ #define yyconst
110
+ #endif
111
+
112
+ /* Returned upon end-of-file. */
113
+ #define YY_NULL 0
114
+
115
+ /* Promotes a possibly negative, possibly signed char to an unsigned
116
+ * integer for use as an array index. If the signed char is negative,
117
+ * we want to instead treat it as an 8-bit unsigned char, hence the
118
+ * double cast.
119
+ */
120
+ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121
+
122
+ /* An opaque pointer. */
123
+ #ifndef YY_TYPEDEF_YY_SCANNER_T
124
+ #define YY_TYPEDEF_YY_SCANNER_T
125
+ typedef void* yyscan_t;
126
+ #endif
127
+
128
+ /* For convenience, these vars (plus the bison vars far below)
129
+ are macros in the reentrant scanner. */
130
+ #define yyin yyg->yyin_r
131
+ #define yyout yyg->yyout_r
132
+ #define yyextra yyg->yyextra_r
133
+ #define yyleng yyg->yyleng_r
134
+ #define yytext yyg->yytext_r
135
+ #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
136
+ #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
137
+ #define yy_flex_debug yyg->yy_flex_debug_r
138
+
139
+ /* Enter a start condition. This macro really ought to take a parameter,
140
+ * but we do it the disgusting crufty way forced on us by the ()-less
141
+ * definition of BEGIN.
142
+ */
143
+ #define BEGIN yyg->yy_start = 1 + 2 *
144
+
145
+ /* Translate the current start state into a value that can be later handed
146
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
147
+ * compatibility.
148
+ */
149
+ #define YY_START ((yyg->yy_start - 1) / 2)
150
+ #define YYSTATE YY_START
151
+
152
+ /* Action number for EOF rule of a given start state. */
153
+ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
154
+
155
+ /* Special action meaning "start processing a new file". */
156
+ #define YY_NEW_FILE yyrestart(yyin ,yyscanner )
157
+
158
+ #define YY_END_OF_BUFFER_CHAR 0
159
+
160
+ /* Size of default input buffer. */
161
+ #ifndef YY_BUF_SIZE
162
+ #ifdef __ia64__
163
+ /* On IA-64, the buffer size is 16k, not 8k.
164
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
165
+ * Ditto for the __ia64__ case accordingly.
166
+ */
167
+ #define YY_BUF_SIZE 32768
168
+ #else
169
+ #define YY_BUF_SIZE 16384
170
+ #endif /* __ia64__ */
171
+ #endif
172
+
173
+ /* The state buf must be large enough to hold one state per character in the main buffer.
174
+ */
175
+ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
176
+
177
+ #ifndef YY_TYPEDEF_YY_BUFFER_STATE
178
+ #define YY_TYPEDEF_YY_BUFFER_STATE
179
+ typedef struct yy_buffer_state *YY_BUFFER_STATE;
180
+ #endif
181
+
182
+ #ifndef YY_TYPEDEF_YY_SIZE_T
183
+ #define YY_TYPEDEF_YY_SIZE_T
184
+ typedef size_t yy_size_t;
185
+ #endif
186
+
187
+ #define EOB_ACT_CONTINUE_SCAN 0
188
+ #define EOB_ACT_END_OF_FILE 1
189
+ #define EOB_ACT_LAST_MATCH 2
190
+
191
+ #define YY_LESS_LINENO(n)
192
+ #define YY_LINENO_REWIND_TO(ptr)
193
+
194
+ /* Return all but the first "n" matched characters back to the input stream. */
195
+ #define yyless(n) \
196
+ do \
197
+ { \
198
+ /* Undo effects of setting up yytext. */ \
199
+ int yyless_macro_arg = (n); \
200
+ YY_LESS_LINENO(yyless_macro_arg);\
201
+ *yy_cp = yyg->yy_hold_char; \
202
+ YY_RESTORE_YY_MORE_OFFSET \
203
+ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
204
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
205
+ } \
206
+ while ( 0 )
207
+
208
+ #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
209
+
210
+ #ifndef YY_STRUCT_YY_BUFFER_STATE
211
+ #define YY_STRUCT_YY_BUFFER_STATE
212
+ struct yy_buffer_state
213
+ {
214
+ FILE *yy_input_file;
215
+
216
+ char *yy_ch_buf; /* input buffer */
217
+ char *yy_buf_pos; /* current position in input buffer */
218
+
219
+ /* Size of input buffer in bytes, not including room for EOB
220
+ * characters.
221
+ */
222
+ yy_size_t yy_buf_size;
223
+
224
+ /* Number of characters read into yy_ch_buf, not including EOB
225
+ * characters.
226
+ */
227
+ int yy_n_chars;
228
+
229
+ /* Whether we "own" the buffer - i.e., we know we created it,
230
+ * and can realloc() it to grow it, and should free() it to
231
+ * delete it.
232
+ */
233
+ int yy_is_our_buffer;
234
+
235
+ /* Whether this is an "interactive" input source; if so, and
236
+ * if we're using stdio for input, then we want to use getc()
237
+ * instead of fread(), to make sure we stop fetching input after
238
+ * each newline.
239
+ */
240
+ int yy_is_interactive;
241
+
242
+ /* Whether we're considered to be at the beginning of a line.
243
+ * If so, '^' rules will be active on the next match, otherwise
244
+ * not.
245
+ */
246
+ int yy_at_bol;
247
+
248
+ int yy_bs_lineno; /**< The line count. */
249
+ int yy_bs_column; /**< The column count. */
250
+
251
+ /* Whether to try to fill the input buffer when we reach the
252
+ * end of it.
253
+ */
254
+ int yy_fill_buffer;
255
+
256
+ int yy_buffer_status;
257
+
258
+ #define YY_BUFFER_NEW 0
259
+ #define YY_BUFFER_NORMAL 1
260
+ /* When an EOF's been seen but there's still some text to process
261
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
262
+ * shouldn't try reading from the input source any more. We might
263
+ * still have a bunch of tokens to match, though, because of
264
+ * possible backing-up.
265
+ *
266
+ * When we actually see the EOF, we change the status to "new"
267
+ * (via yyrestart()), so that the user can continue scanning by
268
+ * just pointing yyin at a new input file.
269
+ */
270
+ #define YY_BUFFER_EOF_PENDING 2
271
+
272
+ };
273
+ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
274
+
275
+ /* We provide macros for accessing buffer states in case in the
276
+ * future we want to put the buffer states in a more general
277
+ * "scanner state".
278
+ *
279
+ * Returns the top of the stack, or NULL.
280
+ */
281
+ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
282
+ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
283
+ : NULL)
284
+
285
+ /* Same as previous macro, but useful when we know that the buffer stack is not
286
+ * NULL or when we need an lvalue. For internal use only.
287
+ */
288
+ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
289
+
290
+ void yyrestart (FILE *input_file ,yyscan_t yyscanner );
291
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
292
+ YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
293
+ void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
294
+ void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
295
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
296
+ void yypop_buffer_state (yyscan_t yyscanner );
297
+
298
+ static void yyensure_buffer_stack (yyscan_t yyscanner );
299
+ static void yy_load_buffer_state (yyscan_t yyscanner );
300
+ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
301
+
302
+ #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
303
+
304
+ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
305
+ YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
306
+ YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
307
+
308
+ void *yyalloc (yy_size_t ,yyscan_t yyscanner );
309
+ void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
310
+ void yyfree (void * ,yyscan_t yyscanner );
311
+
312
+ #define yy_new_buffer yy_create_buffer
313
+
314
+ #define yy_set_interactive(is_interactive) \
315
+ { \
316
+ if ( ! YY_CURRENT_BUFFER ){ \
317
+ yyensure_buffer_stack (yyscanner); \
318
+ YY_CURRENT_BUFFER_LVALUE = \
319
+ yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
320
+ } \
321
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
322
+ }
323
+
324
+ #define yy_set_bol(at_bol) \
325
+ { \
326
+ if ( ! YY_CURRENT_BUFFER ){\
327
+ yyensure_buffer_stack (yyscanner); \
328
+ YY_CURRENT_BUFFER_LVALUE = \
329
+ yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
330
+ } \
331
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
332
+ }
333
+
334
+ #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
335
+
336
+ /* Begin user sect3 */
337
+
338
+ #define yywrap(yyscanner) (/*CONSTCOND*/1)
339
+ #define YY_SKIP_YYWRAP
340
+
341
+ typedef char YY_CHAR;
342
+
343
+ typedef yyconst struct yy_trans_info *yy_state_type;
344
+
345
+ #define yytext_ptr yytext_r
346
+
347
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
348
+ static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
349
+ static int yy_get_next_buffer (yyscan_t yyscanner );
350
+ #if defined(__GNUC__) && __GNUC__ >= 3
351
+ __attribute__((__noreturn__))
352
+ #endif
353
+ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
354
+
355
+ /* Done after the current pattern has been matched and before the
356
+ * corresponding action - sets up yytext.
357
+ */
358
+ #define YY_DO_BEFORE_ACTION \
359
+ yyg->yytext_ptr = yy_bp; \
360
+ yyleng = (size_t) (yy_cp - yy_bp); \
361
+ yyg->yy_hold_char = *yy_cp; \
362
+ *yy_cp = '\0'; \
363
+ yyg->yy_c_buf_p = yy_cp;
364
+
365
+ #define YY_NUM_RULES 18
366
+ #define YY_END_OF_BUFFER 19
367
+ struct yy_trans_info
368
+ {
369
+ flex_int16_t yy_verify;
370
+ flex_int16_t yy_nxt;
371
+ };
372
+ static yyconst struct yy_trans_info yy_transition[1198] =
373
+ {
374
+ { 0, 0 }, { 0,1070 }, { 0, 0 }, { 0,1068 }, { 1, 260 },
375
+ { 2, 260 }, { 3, 260 }, { 4, 260 }, { 5, 260 }, { 6, 260 },
376
+ { 7, 260 }, { 8, 260 }, { 9, 262 }, { 10, 264 }, { 11, 260 },
377
+ { 12, 260 }, { 13, 260 }, { 14, 260 }, { 15, 260 }, { 16, 260 },
378
+ { 17, 260 }, { 18, 260 }, { 19, 260 }, { 20, 260 }, { 21, 260 },
379
+ { 22, 260 }, { 23, 260 }, { 24, 260 }, { 25, 260 }, { 26, 260 },
380
+ { 27, 260 }, { 28, 260 }, { 29, 260 }, { 30, 260 }, { 31, 260 },
381
+ { 32, 262 }, { 33, 260 }, { 34, 266 }, { 35, 260 }, { 36, 260 },
382
+ { 37, 260 }, { 38, 260 }, { 39, 260 }, { 40, 260 }, { 41, 260 },
383
+ { 42, 260 }, { 43, 260 }, { 44, 268 }, { 45, 394 }, { 46, 260 },
384
+
385
+ { 47, 260 }, { 48, 406 }, { 49, 406 }, { 50, 406 }, { 51, 406 },
386
+ { 52, 406 }, { 53, 406 }, { 54, 406 }, { 55, 406 }, { 56, 406 },
387
+ { 57, 406 }, { 58, 270 }, { 59, 260 }, { 60, 260 }, { 61, 260 },
388
+ { 62, 260 }, { 63, 260 }, { 64, 260 }, { 65, 260 }, { 66, 260 },
389
+ { 67, 260 }, { 68, 260 }, { 69, 260 }, { 70, 260 }, { 71, 260 },
390
+ { 72, 260 }, { 73, 260 }, { 74, 260 }, { 75, 260 }, { 76, 260 },
391
+ { 77, 260 }, { 78, 260 }, { 79, 260 }, { 80, 260 }, { 81, 260 },
392
+ { 82, 260 }, { 83, 260 }, { 84, 260 }, { 85, 260 }, { 86, 260 },
393
+ { 87, 260 }, { 88, 260 }, { 89, 260 }, { 90, 260 }, { 91, 273 },
394
+ { 92, 260 }, { 93, 276 }, { 94, 260 }, { 95, 260 }, { 96, 260 },
395
+
396
+ { 97, 260 }, { 98, 260 }, { 99, 260 }, { 100, 260 }, { 101, 260 },
397
+ { 102, 396 }, { 103, 260 }, { 104, 260 }, { 105, 260 }, { 106, 260 },
398
+ { 107, 260 }, { 108, 260 }, { 109, 260 }, { 110, 398 }, { 111, 260 },
399
+ { 112, 260 }, { 113, 260 }, { 114, 260 }, { 115, 260 }, { 116, 400 },
400
+ { 117, 260 }, { 118, 260 }, { 119, 260 }, { 120, 260 }, { 121, 260 },
401
+ { 122, 260 }, { 123, 402 }, { 124, 260 }, { 125, 404 }, { 126, 260 },
402
+ { 127, 260 }, { 128, 260 }, { 0, 0 }, { 0, 938 }, { 1, 130 },
403
+ { 2, 130 }, { 3, 130 }, { 4, 130 }, { 5, 130 }, { 6, 130 },
404
+ { 7, 130 }, { 8, 130 }, { 9, 132 }, { 10, 134 }, { 11, 130 },
405
+ { 12, 130 }, { 13, 130 }, { 14, 130 }, { 15, 130 }, { 16, 130 },
406
+
407
+ { 17, 130 }, { 18, 130 }, { 19, 130 }, { 20, 130 }, { 21, 130 },
408
+ { 22, 130 }, { 23, 130 }, { 24, 130 }, { 25, 130 }, { 26, 130 },
409
+ { 27, 130 }, { 28, 130 }, { 29, 130 }, { 30, 130 }, { 31, 130 },
410
+ { 32, 132 }, { 33, 130 }, { 34, 136 }, { 35, 130 }, { 36, 130 },
411
+ { 37, 130 }, { 38, 130 }, { 39, 130 }, { 40, 130 }, { 41, 130 },
412
+ { 42, 130 }, { 43, 130 }, { 44, 138 }, { 45, 264 }, { 46, 130 },
413
+ { 47, 130 }, { 48, 276 }, { 49, 276 }, { 50, 276 }, { 51, 276 },
414
+ { 52, 276 }, { 53, 276 }, { 54, 276 }, { 55, 276 }, { 56, 276 },
415
+ { 57, 276 }, { 58, 140 }, { 59, 130 }, { 60, 130 }, { 61, 130 },
416
+ { 62, 130 }, { 63, 130 }, { 64, 130 }, { 65, 130 }, { 66, 130 },
417
+
418
+ { 67, 130 }, { 68, 130 }, { 69, 130 }, { 70, 130 }, { 71, 130 },
419
+ { 72, 130 }, { 73, 130 }, { 74, 130 }, { 75, 130 }, { 76, 130 },
420
+ { 77, 130 }, { 78, 130 }, { 79, 130 }, { 80, 130 }, { 81, 130 },
421
+ { 82, 130 }, { 83, 130 }, { 84, 130 }, { 85, 130 }, { 86, 130 },
422
+ { 87, 130 }, { 88, 130 }, { 89, 130 }, { 90, 130 }, { 91, 143 },
423
+ { 92, 130 }, { 93, 146 }, { 94, 130 }, { 95, 130 }, { 96, 130 },
424
+ { 97, 130 }, { 98, 130 }, { 99, 130 }, { 100, 130 }, { 101, 130 },
425
+ { 102, 266 }, { 103, 130 }, { 104, 130 }, { 105, 130 }, { 106, 130 },
426
+ { 107, 130 }, { 108, 130 }, { 109, 130 }, { 110, 268 }, { 111, 130 },
427
+ { 112, 130 }, { 113, 130 }, { 114, 130 }, { 115, 130 }, { 116, 270 },
428
+
429
+ { 117, 130 }, { 118, 130 }, { 119, 130 }, { 120, 130 }, { 121, 130 },
430
+ { 122, 130 }, { 123, 272 }, { 124, 130 }, { 125, 274 }, { 126, 130 },
431
+ { 127, 130 }, { 128, 130 }, { 0, 17 }, { 0, 808 }, { 0, 1 },
432
+ { 0, 806 }, { 0, 2 }, { 0, 804 }, { 0, 17 }, { 0, 802 },
433
+ { 0, 3 }, { 0, 800 }, { 0, 8 }, { 0, 798 }, { 9, 146 },
434
+ { 0, 6 }, { 0, 795 }, { 10, 146 }, { 0, 7 }, { 0, 792 },
435
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
436
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
437
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
438
+ { 0, 0 }, { 0, 0 }, { 32, 146 }, { 0, 0 }, { 0, 0 },
439
+
440
+ { 0, 0 }, { 32, 233 }, { 33, 233 }, { 34, 146 }, { 35, 233 },
441
+ { 36, 233 }, { 37, 233 }, { 38, 233 }, { 39, 233 }, { 40, 233 },
442
+ { 41, 233 }, { 42, 233 }, { 43, 233 }, { 44, 233 }, { 45, 233 },
443
+ { 46, 233 }, { 47, 233 }, { 48, 233 }, { 49, 233 }, { 50, 233 },
444
+ { 51, 233 }, { 52, 233 }, { 53, 233 }, { 54, 233 }, { 55, 233 },
445
+ { 56, 233 }, { 57, 233 }, { 58, 233 }, { 59, 233 }, { 60, 233 },
446
+ { 61, 233 }, { 62, 233 }, { 63, 233 }, { 64, 233 }, { 65, 233 },
447
+ { 66, 233 }, { 67, 233 }, { 68, 233 }, { 69, 233 }, { 70, 233 },
448
+ { 71, 233 }, { 72, 233 }, { 73, 233 }, { 74, 233 }, { 75, 233 },
449
+ { 76, 233 }, { 77, 233 }, { 78, 233 }, { 79, 233 }, { 80, 233 },
450
+
451
+ { 81, 233 }, { 82, 233 }, { 83, 233 }, { 84, 233 }, { 85, 233 },
452
+ { 86, 233 }, { 87, 233 }, { 88, 233 }, { 89, 233 }, { 90, 233 },
453
+ { 91, 233 }, { 92, 361 }, { 93, 233 }, { 94, 233 }, { 95, 233 },
454
+ { 96, 233 }, { 97, 233 }, { 98, 233 }, { 99, 233 }, { 100, 233 },
455
+ { 101, 233 }, { 102, 233 }, { 103, 233 }, { 104, 233 }, { 105, 233 },
456
+ { 106, 233 }, { 107, 233 }, { 108, 233 }, { 109, 233 }, { 110, 233 },
457
+ { 111, 233 }, { 112, 233 }, { 113, 233 }, { 114, 233 }, { 115, 233 },
458
+ { 116, 233 }, { 117, 233 }, { 118, 233 }, { 119, 233 }, { 120, 233 },
459
+ { 121, 233 }, { 122, 233 }, { 123, 233 }, { 124, 233 }, { 125, 233 },
460
+ { 126, 233 }, { 0, 17 }, { 0, 674 }, { 0, 17 }, { 0, 672 },
461
+
462
+ { 0, 17 }, { 0, 670 }, { 0, 17 }, { 0, 668 }, { 0, 4 },
463
+ { 0, 666 }, { 0, 5 }, { 0, 664 }, { 0, 16 }, { 0, 662 },
464
+ { 0, 1 }, { 0, 660 }, { 0, 2 }, { 0, 658 }, { 0, 12 },
465
+ { 0, 656 }, { 0, 0 }, { 0, 654 }, { 0, 0 }, { 0, 652 },
466
+ { 9, 0 }, { 0, 0 }, { 0, 0 }, { 10, 0 }, { 0, 0 },
467
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
468
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
469
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
470
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 32, 0 }, { 0, 0 },
471
+ { 48, 235 }, { 49, 235 }, { 50, 235 }, { 51, 235 }, { 52, 235 },
472
+
473
+ { 53, 235 }, { 54, 235 }, { 55, 235 }, { 56, 235 }, { 57, 235 },
474
+ { 46, 233 }, { 0, 0 }, { 48, 223 }, { 49, 223 }, { 50, 223 },
475
+ { 51, 223 }, { 52, 223 }, { 53, 223 }, { 54, 223 }, { 55, 223 },
476
+ { 56, 223 }, { 57, 223 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
477
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
478
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 69, 248 }, { 0, 0 },
479
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
480
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
481
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
482
+ { 0, 0 }, { 97, 18 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
483
+
484
+ { 0, 0 }, { 0, 0 }, { 0, 569 }, { 0, 0 }, { 0, 0 },
485
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
486
+ { 101, 248 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
487
+ { 0, 0 }, { 0, 555 }, { 114, 113 }, { 117, 18 }, { 0, 0 },
488
+ { 0, 551 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
489
+ { 108, 103 }, { 0, 0 }, { 108, 110 }, { 0, 0 }, { 0, 542 },
490
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 124, 248 }, { 32, 0 },
491
+ { 33, 0 }, { 34, -87 }, { 35, 0 }, { 36, 0 }, { 37, 0 },
492
+ { 38, 0 }, { 39, 0 }, { 40, 0 }, { 41, 0 }, { 42, 0 },
493
+ { 43, 0 }, { 44, 0 }, { 45, 0 }, { 46, 0 }, { 47, 0 },
494
+
495
+ { 48, 0 }, { 49, 0 }, { 50, 0 }, { 51, 0 }, { 52, 0 },
496
+ { 53, 0 }, { 54, 0 }, { 55, 0 }, { 56, 0 }, { 57, 0 },
497
+ { 58, 0 }, { 59, 0 }, { 60, 0 }, { 61, 0 }, { 62, 0 },
498
+ { 63, 0 }, { 64, 0 }, { 65, 0 }, { 66, 0 }, { 67, 0 },
499
+ { 68, 0 }, { 69, 0 }, { 70, 0 }, { 71, 0 }, { 72, 0 },
500
+ { 73, 0 }, { 74, 0 }, { 75, 0 }, { 76, 0 }, { 77, 0 },
501
+ { 78, 0 }, { 79, 0 }, { 80, 0 }, { 81, 0 }, { 82, 0 },
502
+ { 83, 0 }, { 84, 0 }, { 85, 0 }, { 86, 0 }, { 87, 0 },
503
+ { 88, 0 }, { 89, 0 }, { 90, 0 }, { 91, 0 }, { 92, 128 },
504
+ { 93, 0 }, { 94, 0 }, { 95, 0 }, { 96, 0 }, { 97, 0 },
505
+
506
+ { 98, 0 }, { 99, 0 }, { 100, 0 }, { 101, 0 }, { 102, 0 },
507
+ { 103, 0 }, { 104, 0 }, { 105, 0 }, { 106, 0 }, { 107, 0 },
508
+ { 108, 0 }, { 109, 0 }, { 110, 0 }, { 111, 0 }, { 112, 0 },
509
+ { 113, 0 }, { 114, 0 }, { 115, 0 }, { 116, 0 }, { 117, 0 },
510
+ { 118, 0 }, { 119, 0 }, { 120, 0 }, { 121, 0 }, { 122, 0 },
511
+ { 123, 0 }, { 124, 0 }, { 125, 0 }, { 126, 0 }, { 0, 0 },
512
+ { 0, 441 }, { 0, 16 }, { 0, 439 }, { 117, 128 }, { 0, 0 },
513
+ { 115, 127 }, { 0, 0 }, { 108, 120 }, { 0, 0 }, { 0, 0 },
514
+ { 0, 0 }, { 0, 0 }, { 0, 429 }, { 0, 0 }, { 0, 427 },
515
+ { 0, 0 }, { 0, 0 }, { 0, 424 }, { 0, 11 }, { 0, 422 },
516
+
517
+ { 0, 9 }, { 0, 420 }, { 0, 10 }, { 0, 418 }, { 0, 0 },
518
+ { 0, 0 }, { 0, 0 }, { 0, 414 }, { 0, 0 }, { 0, 0 },
519
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 34,-128 },
520
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
521
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
522
+ { 0, 0 }, { 0, 0 }, { 47,-128 }, { 46, 10 }, { 0, 0 },
523
+ { 48, 0 }, { 49, 0 }, { 50, 0 }, { 51, 0 }, { 52, 0 },
524
+ { 53, 0 }, { 54, 0 }, { 55, 0 }, { 56, 0 }, { 57, 0 },
525
+ { 48, 100 }, { 49, 100 }, { 50, 100 }, { 51, 100 }, { 52, 100 },
526
+ { 53, 100 }, { 54, 100 }, { 55, 100 }, { 56, 100 }, { 57, 100 },
527
+
528
+ { 43, 95 }, { 69, 25 }, { 45, 95 }, { 0, 0 }, { 0, 0 },
529
+ { 48, 119 }, { 49, 119 }, { 50, 119 }, { 51, 119 }, { 52, 119 },
530
+ { 53, 119 }, { 54, 119 }, { 55, 119 }, { 56, 119 }, { 57, 119 },
531
+ { 0, 0 }, { 0, 0 }, { 0, 354 }, { 0, 0 }, { 0, 0 },
532
+ { 0, 0 }, { 0, 0 }, { 92,-128 }, { 0, 0 }, { 0, 0 },
533
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 98,-128 }, { 0, 0 },
534
+ { 0, 0 }, { 0, 0 }, { 102,-128 }, { 101, 25 }, { 0, 0 },
535
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
536
+ { 110,-128 }, { 0, 14 }, { 0, 329 }, { 0, 0 }, { 114,-128 },
537
+ { 101, 7 }, { 116,-128 }, { 117, 87 }, { 101, 6 }, { 0, 0 },
538
+
539
+ { 0, 0 }, { 0, 0 }, { 0, 319 }, { 0, 0 }, { 0, 0 },
540
+ { 0, 0 }, { 124, 25 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
541
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
542
+ { 48, 104 }, { 49, 104 }, { 50, 104 }, { 51, 104 }, { 52, 104 },
543
+ { 53, 104 }, { 54, 104 }, { 55, 104 }, { 56, 104 }, { 57, 104 },
544
+ { 0, 15 }, { 0, 295 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
545
+ { 0, 0 }, { 124, 95 }, { 65, 104 }, { 66, 104 }, { 67, 104 },
546
+ { 68, 104 }, { 69, 104 }, { 70, 104 }, { 0, 0 }, { 0, 0 },
547
+ { 48, 0 }, { 49, 0 }, { 50, 0 }, { 51, 0 }, { 52, 0 },
548
+ { 53, 0 }, { 54, 0 }, { 55, 0 }, { 56, 0 }, { 57, 0 },
549
+
550
+ { 48, 24 }, { 49, 24 }, { 50, 24 }, { 51, 24 }, { 52, 24 },
551
+ { 53, 24 }, { 54, 24 }, { 55, 24 }, { 56, 24 }, { 57, 24 },
552
+ { 0, 0 }, { 69, 107 }, { 0, 0 }, { 0, 0 }, { 97, 104 },
553
+ { 98, 104 }, { 99, 104 }, { 100, 104 }, { 101, 104 }, { 102, 104 },
554
+ { 0, 0 }, { 0, 250 }, { 0, 0 }, { 0, 0 }, { 48, 0 },
555
+ { 49, 0 }, { 50, 0 }, { 51, 0 }, { 52, 0 }, { 53, 0 },
556
+ { 54, 0 }, { 55, 0 }, { 56, 0 }, { 57, 0 }, { 0, 0 },
557
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
558
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 101, 107 }, { 0, 0 },
559
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 222 },
560
+
561
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
562
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 212 },
563
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
564
+ { 0, 0 }, { 124, 107 }, { 0, 0 }, { 0, 0 }, { 48, 38 },
565
+ { 49, 38 }, { 50, 38 }, { 51, 38 }, { 52, 38 }, { 53, 38 },
566
+ { 54, 38 }, { 55, 38 }, { 56, 38 }, { 57, 38 }, { 0, 0 },
567
+ { 0, 0 }, { 0, 0 }, { 0, 189 }, { 0, 0 }, { 0, 0 },
568
+ { 0, 0 }, { 65, 38 }, { 66, 38 }, { 67, 38 }, { 68, 38 },
569
+ { 69, 38 }, { 70, 38 }, { 43, 33 }, { 0, 0 }, { 45, 33 },
570
+ { 0, 13 }, { 0, 175 }, { 48, 47 }, { 49, 47 }, { 50, 47 },
571
+
572
+ { 51, 47 }, { 52, 47 }, { 53, 47 }, { 54, 47 }, { 55, 47 },
573
+ { 56, 47 }, { 57, 47 }, { 48, 82 }, { 49, 82 }, { 50, 82 },
574
+ { 51, 82 }, { 52, 82 }, { 53, 82 }, { 54, 82 }, { 55, 82 },
575
+ { 56, 82 }, { 57, 82 }, { 0, 0 }, { 97, 38 }, { 98, 38 },
576
+ { 99, 38 }, { 100, 38 }, { 101, 38 }, { 102, 38 }, { 65, 82 },
577
+ { 66, 82 }, { 67, 82 }, { 68, 82 }, { 69, 82 }, { 70, 82 },
578
+ { 48, 14 }, { 49, 14 }, { 50, 14 }, { 51, 14 }, { 52, 14 },
579
+ { 53, 14 }, { 54, 14 }, { 55, 14 }, { 56, 14 }, { 57, 14 },
580
+ { 0, 0 }, { 0, 130 }, { 0, 0 }, { 0, 0 }, { 48, 0 },
581
+ { 49, 0 }, { 50, 0 }, { 51, 0 }, { 52, 0 }, { 53, 0 },
582
+
583
+ { 54, 0 }, { 55, 0 }, { 56, 0 }, { 57, 0 }, { 0, 0 },
584
+ { 0, 0 }, { 97, 82 }, { 98, 82 }, { 99, 82 }, { 100, 82 },
585
+ { 101, 82 }, { 102, 82 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
586
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
587
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 124, 33 }, { 0, 0 },
588
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
589
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
590
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 48,-439 },
591
+ { 49,-439 }, { 50,-439 }, { 51,-439 }, { 52,-439 }, { 53,-439 },
592
+ { 54,-439 }, { 55,-439 }, { 56,-439 }, { 57,-439 }, { 0, 0 },
593
+
594
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
595
+ { 0, 0 }, { 65,-439 }, { 66,-439 }, { 67,-439 }, { 68,-439 },
596
+ { 69,-439 }, { 70,-439 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
597
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
598
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
599
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
600
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
601
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 97,-439 }, { 98,-439 },
602
+ { 99,-439 }, { 100,-439 }, { 101,-439 }, { 102,-439 }, { 0, 0 },
603
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
604
+
605
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
606
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
607
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
608
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
609
+ { 129, 19 }, { 1, 0 }, };
610
+
611
+ static yyconst struct yy_trans_info *yy_start_state_list[3] =
612
+ {
613
+ &yy_transition[1],
614
+ &yy_transition[3],
615
+ &yy_transition[133],
616
+
617
+ } ;
618
+
619
+ /* The intent behind this definition is that it'll catch
620
+ * any uses of REJECT which flex missed.
621
+ */
622
+ #define REJECT reject_used_but_not_detected
623
+ #define yymore() yymore_used_but_not_detected
624
+ #define YY_MORE_ADJ 0
625
+ #define YY_RESTORE_YY_MORE_OFFSET
626
+ #line 1 "etc/contrived_json/ext_parser/parser.l"
627
+ /* Flex configuration */
628
+ #line 3 "etc/contrived_json/ext_parser/parser.l"
629
+
630
+ #include <ruby.h>
631
+ #include "parser.h"
632
+
633
+ #define YY_USER_ACTION do{\
634
+ yylloc->first_line = yylloc->last_line;\
635
+ yylloc->first_column = yylloc->last_column;\
636
+ yylloc->last_column += yyleng;\
637
+ }while(0);
638
+
639
+ #define YY_NO_INPUT 1
640
+ #line 641 "ext/contrived_json/ext_parser/lexer.c"
641
+
642
+ #define INITIAL 0
643
+
644
+ #ifndef YY_NO_UNISTD_H
645
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
646
+ * down here because we want the user's section 1 to have been scanned first.
647
+ * The user has a chance to override it with an option.
648
+ */
649
+ #include <unistd.h>
650
+ #endif
651
+
652
+ #ifndef YY_EXTRA_TYPE
653
+ #define YY_EXTRA_TYPE void *
654
+ #endif
655
+
656
+ /* Holds the entire state of the reentrant scanner. */
657
+ struct yyguts_t
658
+ {
659
+
660
+ /* User-defined. Not touched by flex. */
661
+ YY_EXTRA_TYPE yyextra_r;
662
+
663
+ /* The rest are the same as the globals declared in the non-reentrant scanner. */
664
+ FILE *yyin_r, *yyout_r;
665
+ size_t yy_buffer_stack_top; /**< index of top of stack. */
666
+ size_t yy_buffer_stack_max; /**< capacity of stack. */
667
+ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
668
+ char yy_hold_char;
669
+ int yy_n_chars;
670
+ yy_size_t yyleng_r;
671
+ char *yy_c_buf_p;
672
+ int yy_init;
673
+ int yy_start;
674
+ int yy_did_buffer_switch_on_eof;
675
+ int yy_start_stack_ptr;
676
+ int yy_start_stack_depth;
677
+ int *yy_start_stack;
678
+ yy_state_type yy_last_accepting_state;
679
+ char* yy_last_accepting_cpos;
680
+
681
+ int yylineno_r;
682
+ int yy_flex_debug_r;
683
+
684
+ char *yytext_r;
685
+ int yy_more_flag;
686
+ int yy_more_len;
687
+
688
+ YYSTYPE * yylval_r;
689
+
690
+ YYLTYPE * yylloc_r;
691
+
692
+ }; /* end struct yyguts_t */
693
+
694
+ static int yy_init_globals (yyscan_t yyscanner );
695
+
696
+ /* This must go here because YYSTYPE and YYLTYPE are included
697
+ * from bison output in section 1.*/
698
+ # define yylval yyg->yylval_r
699
+
700
+ # define yylloc yyg->yylloc_r
701
+
702
+ int yylex_init (yyscan_t* scanner);
703
+
704
+ int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
705
+
706
+ /* Accessor methods to globals.
707
+ These are made visible to non-reentrant scanners for convenience. */
708
+
709
+ int yylex_destroy (yyscan_t yyscanner );
710
+
711
+ int yyget_debug (yyscan_t yyscanner );
712
+
713
+ void yyset_debug (int debug_flag ,yyscan_t yyscanner );
714
+
715
+ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner );
716
+
717
+ void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
718
+
719
+ FILE *yyget_in (yyscan_t yyscanner );
720
+
721
+ void yyset_in (FILE * _in_str ,yyscan_t yyscanner );
722
+
723
+ FILE *yyget_out (yyscan_t yyscanner );
724
+
725
+ void yyset_out (FILE * _out_str ,yyscan_t yyscanner );
726
+
727
+ yy_size_t yyget_leng (yyscan_t yyscanner );
728
+
729
+ char *yyget_text (yyscan_t yyscanner );
730
+
731
+ int yyget_lineno (yyscan_t yyscanner );
732
+
733
+ void yyset_lineno (int _line_number ,yyscan_t yyscanner );
734
+
735
+ int yyget_column (yyscan_t yyscanner );
736
+
737
+ void yyset_column (int _column_no ,yyscan_t yyscanner );
738
+
739
+ YYSTYPE * yyget_lval (yyscan_t yyscanner );
740
+
741
+ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
742
+
743
+ YYLTYPE *yyget_lloc (yyscan_t yyscanner );
744
+
745
+ void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
746
+
747
+ /* Macros after this point can all be overridden by user definitions in
748
+ * section 1.
749
+ */
750
+
751
+ #ifndef YY_SKIP_YYWRAP
752
+ #ifdef __cplusplus
753
+ extern "C" int yywrap (yyscan_t yyscanner );
754
+ #else
755
+ extern int yywrap (yyscan_t yyscanner );
756
+ #endif
757
+ #endif
758
+
759
+ #ifndef YY_NO_UNPUT
760
+
761
+ #endif
762
+
763
+ #ifndef yytext_ptr
764
+ static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
765
+ #endif
766
+
767
+ #ifdef YY_NEED_STRLEN
768
+ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
769
+ #endif
770
+
771
+ #ifndef YY_NO_INPUT
772
+
773
+ #ifdef __cplusplus
774
+ static int yyinput (yyscan_t yyscanner );
775
+ #else
776
+ static int input (yyscan_t yyscanner );
777
+ #endif
778
+
779
+ #endif
780
+
781
+ /* Amount of stuff to slurp up with each read. */
782
+ #ifndef YY_READ_BUF_SIZE
783
+ #ifdef __ia64__
784
+ /* On IA-64, the buffer size is 16k, not 8k */
785
+ #define YY_READ_BUF_SIZE 16384
786
+ #else
787
+ #define YY_READ_BUF_SIZE 8192
788
+ #endif /* __ia64__ */
789
+ #endif
790
+
791
+ /* Copy whatever the last rule matched to the standard output. */
792
+ #ifndef ECHO
793
+ /* This used to be an fputs(), but since the string might contain NUL's,
794
+ * we now use fwrite().
795
+ */
796
+ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
797
+ #endif
798
+
799
+ /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
800
+ * is returned in "result".
801
+ */
802
+ #ifndef YY_INPUT
803
+ #define YY_INPUT(buf,result,max_size) \
804
+ errno=0; \
805
+ while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
806
+ { \
807
+ if( errno != EINTR) \
808
+ { \
809
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
810
+ break; \
811
+ } \
812
+ errno=0; \
813
+ clearerr(yyin); \
814
+ }\
815
+ \
816
+
817
+ #endif
818
+
819
+ /* No semi-colon after return; correct usage is to write "yyterminate();" -
820
+ * we don't want an extra ';' after the "return" because that will cause
821
+ * some compilers to complain about unreachable statements.
822
+ */
823
+ #ifndef yyterminate
824
+ #define yyterminate() return YY_NULL
825
+ #endif
826
+
827
+ /* Number of entries by which start-condition stack grows. */
828
+ #ifndef YY_START_STACK_INCR
829
+ #define YY_START_STACK_INCR 25
830
+ #endif
831
+
832
+ /* Report a fatal error. */
833
+ #ifndef YY_FATAL_ERROR
834
+ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
835
+ #endif
836
+
837
+ /* end tables serialization structures and prototypes */
838
+
839
+ /* Default declaration of generated scanner - a define so the user can
840
+ * easily add parameters.
841
+ */
842
+ #ifndef YY_DECL
843
+ #define YY_DECL_IS_OURS 1
844
+
845
+ extern int yylex \
846
+ (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
847
+
848
+ #define YY_DECL int yylex \
849
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
850
+ #endif /* !YY_DECL */
851
+
852
+ /* Code executed at the beginning of each rule, after yytext and yyleng
853
+ * have been set up.
854
+ */
855
+ #ifndef YY_USER_ACTION
856
+ #define YY_USER_ACTION
857
+ #endif
858
+
859
+ /* Code executed at the end of each rule. */
860
+ #ifndef YY_BREAK
861
+ #define YY_BREAK /*LINTED*/break;
862
+ #endif
863
+
864
+ #define YY_RULE_SETUP \
865
+ YY_USER_ACTION
866
+
867
+ /** The main scanner function which does all the work.
868
+ */
869
+ YY_DECL
870
+ {
871
+ yy_state_type yy_current_state;
872
+ char *yy_cp, *yy_bp;
873
+ int yy_act;
874
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
875
+
876
+ yylval = yylval_param;
877
+
878
+ yylloc = yylloc_param;
879
+
880
+ if ( !yyg->yy_init )
881
+ {
882
+ yyg->yy_init = 1;
883
+
884
+ #ifdef YY_USER_INIT
885
+ YY_USER_INIT;
886
+ #endif
887
+
888
+ if ( ! yyg->yy_start )
889
+ yyg->yy_start = 1; /* first start state */
890
+
891
+ if ( ! yyin )
892
+ yyin = stdin;
893
+
894
+ if ( ! yyout )
895
+ yyout = stdout;
896
+
897
+ if ( ! YY_CURRENT_BUFFER ) {
898
+ yyensure_buffer_stack (yyscanner);
899
+ YY_CURRENT_BUFFER_LVALUE =
900
+ yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
901
+ }
902
+
903
+ yy_load_buffer_state(yyscanner );
904
+ }
905
+
906
+ {
907
+ #line 29 "etc/contrived_json/ext_parser/parser.l"
908
+
909
+
910
+ #line 911 "ext/contrived_json/ext_parser/lexer.c"
911
+
912
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
913
+ {
914
+ yy_cp = yyg->yy_c_buf_p;
915
+
916
+ /* Support of yytext. */
917
+ *yy_cp = yyg->yy_hold_char;
918
+
919
+ /* yy_bp points to the position in yy_ch_buf of the start of
920
+ * the current run.
921
+ */
922
+ yy_bp = yy_cp;
923
+
924
+ yy_current_state = yy_start_state_list[yyg->yy_start];
925
+ yy_match:
926
+ {
927
+ yyconst struct yy_trans_info *yy_trans_info;
928
+
929
+ YY_CHAR yy_c;
930
+
931
+ for ( yy_c = YY_SC_TO_UI(*yy_cp);
932
+ (yy_trans_info = &yy_current_state[(unsigned int) yy_c])->
933
+ yy_verify == yy_c;
934
+ yy_c = YY_SC_TO_UI(*++yy_cp) )
935
+ {
936
+ yy_current_state += yy_trans_info->yy_nxt;
937
+
938
+ if ( yy_current_state[-1].yy_nxt )
939
+ {
940
+ yyg->yy_last_accepting_state = yy_current_state;
941
+ yyg->yy_last_accepting_cpos = yy_cp;
942
+ }
943
+ }
944
+ }
945
+
946
+ yy_find_action:
947
+ yy_act = yy_current_state[-1].yy_nxt;
948
+
949
+ YY_DO_BEFORE_ACTION;
950
+
951
+ do_action: /* This label is used only to access EOF actions. */
952
+
953
+ switch ( yy_act )
954
+ { /* beginning of action switch */
955
+ case 0: /* must back up */
956
+ /* undo the effects of YY_DO_BEFORE_ACTION */
957
+ *yy_cp = yyg->yy_hold_char;
958
+ yy_cp = yyg->yy_last_accepting_cpos + 1;
959
+ yy_current_state = yyg->yy_last_accepting_state;
960
+ goto yy_find_action;
961
+
962
+ case 1:
963
+ YY_RULE_SETUP
964
+ #line 31 "etc/contrived_json/ext_parser/parser.l"
965
+ { }
966
+ YY_BREAK
967
+ case 2:
968
+ /* rule 2 can match eol */
969
+ YY_RULE_SETUP
970
+ #line 32 "etc/contrived_json/ext_parser/parser.l"
971
+ { yylloc->last_column = 0; yylloc->last_line += yyleng; }
972
+ YY_BREAK
973
+ case 3:
974
+ #line 35 "etc/contrived_json/ext_parser/parser.l"
975
+ case 4:
976
+ #line 36 "etc/contrived_json/ext_parser/parser.l"
977
+ case 5:
978
+ #line 37 "etc/contrived_json/ext_parser/parser.l"
979
+ case 6:
980
+ #line 38 "etc/contrived_json/ext_parser/parser.l"
981
+ case 7:
982
+ #line 39 "etc/contrived_json/ext_parser/parser.l"
983
+ case 8:
984
+ YY_RULE_SETUP
985
+ #line 39 "etc/contrived_json/ext_parser/parser.l"
986
+ { return *yytext; }
987
+ YY_BREAK
988
+ case 9:
989
+ YY_RULE_SETUP
990
+ #line 41 "etc/contrived_json/ext_parser/parser.l"
991
+ { *yylval = Qtrue; return TOK_TRUE; }
992
+ YY_BREAK
993
+ case 10:
994
+ YY_RULE_SETUP
995
+ #line 42 "etc/contrived_json/ext_parser/parser.l"
996
+ { *yylval = Qfalse; return TOK_FALSE; }
997
+ YY_BREAK
998
+ case 11:
999
+ YY_RULE_SETUP
1000
+ #line 43 "etc/contrived_json/ext_parser/parser.l"
1001
+ { *yylval = Qnil; return TOK_NULL; }
1002
+ YY_BREAK
1003
+ case 12:
1004
+ YY_RULE_SETUP
1005
+ #line 45 "etc/contrived_json/ext_parser/parser.l"
1006
+ { *yylval = rb_str_new(&yytext[1], yyleng-2U); return TOK_STRING; }
1007
+ YY_BREAK
1008
+ case 13:
1009
+ #line 48 "etc/contrived_json/ext_parser/parser.l"
1010
+ case 14:
1011
+ #line 49 "etc/contrived_json/ext_parser/parser.l"
1012
+ case 15:
1013
+ YY_RULE_SETUP
1014
+ #line 49 "etc/contrived_json/ext_parser/parser.l"
1015
+ { *yylval = rb_funcall(rb_const_get(rb_cObject, rb_intern("BigDecimal")), rb_intern("new"), 1, rb_str_new(yytext, yyleng)); return TOK_NUMBER; }
1016
+ YY_BREAK
1017
+ case 16:
1018
+ YY_RULE_SETUP
1019
+ #line 51 "etc/contrived_json/ext_parser/parser.l"
1020
+ { *yylval = rb_funcall(rb_str_new(yytext, yyleng), rb_intern("to_i"), 0); return TOK_NUMBER; }
1021
+ YY_BREAK
1022
+ case 17:
1023
+ YY_RULE_SETUP
1024
+ #line 53 "etc/contrived_json/ext_parser/parser.l"
1025
+ { return TOK_UNKNOWN; }
1026
+ YY_BREAK
1027
+ case 18:
1028
+ YY_RULE_SETUP
1029
+ #line 55 "etc/contrived_json/ext_parser/parser.l"
1030
+ ECHO;
1031
+ YY_BREAK
1032
+ #line 1033 "ext/contrived_json/ext_parser/lexer.c"
1033
+ case YY_STATE_EOF(INITIAL):
1034
+ yyterminate();
1035
+
1036
+ case YY_END_OF_BUFFER:
1037
+ {
1038
+ /* Amount of text matched not including the EOB char. */
1039
+ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1040
+
1041
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
1042
+ *yy_cp = yyg->yy_hold_char;
1043
+ YY_RESTORE_YY_MORE_OFFSET
1044
+
1045
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1046
+ {
1047
+ /* We're scanning a new file or input source. It's
1048
+ * possible that this happened because the user
1049
+ * just pointed yyin at a new source and called
1050
+ * yylex(). If so, then we have to assure
1051
+ * consistency between YY_CURRENT_BUFFER and our
1052
+ * globals. Here is the right place to do so, because
1053
+ * this is the first action (other than possibly a
1054
+ * back-up) that will match for the new input source.
1055
+ */
1056
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1057
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1058
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1059
+ }
1060
+
1061
+ /* Note that here we test for yy_c_buf_p "<=" to the position
1062
+ * of the first EOB in the buffer, since yy_c_buf_p will
1063
+ * already have been incremented past the NUL character
1064
+ * (since all states make transitions on EOB to the
1065
+ * end-of-buffer state). Contrast this with the test
1066
+ * in input().
1067
+ */
1068
+ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1069
+ { /* This was really a NUL. */
1070
+ yy_state_type yy_next_state;
1071
+
1072
+ yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1073
+
1074
+ yy_current_state = yy_get_previous_state( yyscanner );
1075
+
1076
+ /* Okay, we're now positioned to make the NUL
1077
+ * transition. We couldn't have
1078
+ * yy_get_previous_state() go ahead and do it
1079
+ * for us because it doesn't know how to deal
1080
+ * with the possibility of jamming (and we don't
1081
+ * want to build jamming into it because then it
1082
+ * will run more slowly).
1083
+ */
1084
+
1085
+ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1086
+
1087
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1088
+
1089
+ if ( yy_next_state )
1090
+ {
1091
+ /* Consume the NUL. */
1092
+ yy_cp = ++yyg->yy_c_buf_p;
1093
+ yy_current_state = yy_next_state;
1094
+ goto yy_match;
1095
+ }
1096
+
1097
+ else
1098
+ {
1099
+ yy_cp = yyg->yy_c_buf_p;
1100
+ goto yy_find_action;
1101
+ }
1102
+ }
1103
+
1104
+ else switch ( yy_get_next_buffer( yyscanner ) )
1105
+ {
1106
+ case EOB_ACT_END_OF_FILE:
1107
+ {
1108
+ yyg->yy_did_buffer_switch_on_eof = 0;
1109
+
1110
+ if ( yywrap(yyscanner ) )
1111
+ {
1112
+ /* Note: because we've taken care in
1113
+ * yy_get_next_buffer() to have set up
1114
+ * yytext, we can now set up
1115
+ * yy_c_buf_p so that if some total
1116
+ * hoser (like flex itself) wants to
1117
+ * call the scanner after we return the
1118
+ * YY_NULL, it'll still work - another
1119
+ * YY_NULL will get returned.
1120
+ */
1121
+ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1122
+
1123
+ yy_act = YY_STATE_EOF(YY_START);
1124
+ goto do_action;
1125
+ }
1126
+
1127
+ else
1128
+ {
1129
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
1130
+ YY_NEW_FILE;
1131
+ }
1132
+ break;
1133
+ }
1134
+
1135
+ case EOB_ACT_CONTINUE_SCAN:
1136
+ yyg->yy_c_buf_p =
1137
+ yyg->yytext_ptr + yy_amount_of_matched_text;
1138
+
1139
+ yy_current_state = yy_get_previous_state( yyscanner );
1140
+
1141
+ yy_cp = yyg->yy_c_buf_p;
1142
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1143
+ goto yy_match;
1144
+
1145
+ case EOB_ACT_LAST_MATCH:
1146
+ yyg->yy_c_buf_p =
1147
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1148
+
1149
+ yy_current_state = yy_get_previous_state( yyscanner );
1150
+
1151
+ yy_cp = yyg->yy_c_buf_p;
1152
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1153
+ goto yy_find_action;
1154
+ }
1155
+ break;
1156
+ }
1157
+
1158
+ default:
1159
+ YY_FATAL_ERROR(
1160
+ "fatal flex scanner internal error--no action found" );
1161
+ } /* end of action switch */
1162
+ } /* end of scanning one token */
1163
+ } /* end of user's declarations */
1164
+ } /* end of yylex */
1165
+
1166
+ /* yy_get_next_buffer - try to read in a new buffer
1167
+ *
1168
+ * Returns a code representing an action:
1169
+ * EOB_ACT_LAST_MATCH -
1170
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1171
+ * EOB_ACT_END_OF_FILE - end of file
1172
+ */
1173
+ static int yy_get_next_buffer (yyscan_t yyscanner)
1174
+ {
1175
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1176
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1177
+ char *source = yyg->yytext_ptr;
1178
+ yy_size_t number_to_move, i;
1179
+ int ret_val;
1180
+
1181
+ if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1182
+ YY_FATAL_ERROR(
1183
+ "fatal flex scanner internal error--end of buffer missed" );
1184
+
1185
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1186
+ { /* Don't try to fill the buffer, so this is an EOF. */
1187
+ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1188
+ {
1189
+ /* We matched a single character, the EOB, so
1190
+ * treat this as a final EOF.
1191
+ */
1192
+ return EOB_ACT_END_OF_FILE;
1193
+ }
1194
+
1195
+ else
1196
+ {
1197
+ /* We matched some text prior to the EOB, first
1198
+ * process it.
1199
+ */
1200
+ return EOB_ACT_LAST_MATCH;
1201
+ }
1202
+ }
1203
+
1204
+ /* Try to read more data. */
1205
+
1206
+ /* First move last chars to start of buffer. */
1207
+ number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1208
+
1209
+ for ( i = 0; i < number_to_move; ++i )
1210
+ *(dest++) = *(source++);
1211
+
1212
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1213
+ /* don't do the read, it's not guaranteed to return an EOF,
1214
+ * just force an EOF
1215
+ */
1216
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1217
+
1218
+ else
1219
+ {
1220
+ yy_size_t num_to_read =
1221
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1222
+
1223
+ while ( num_to_read <= 0 )
1224
+ { /* Not enough room in the buffer - grow it. */
1225
+
1226
+ /* just a shorter name for the current buffer */
1227
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1228
+
1229
+ int yy_c_buf_p_offset =
1230
+ (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1231
+
1232
+ if ( b->yy_is_our_buffer )
1233
+ {
1234
+ yy_size_t new_size = b->yy_buf_size * 2;
1235
+
1236
+ if ( new_size <= 0 )
1237
+ b->yy_buf_size += b->yy_buf_size / 8;
1238
+ else
1239
+ b->yy_buf_size *= 2;
1240
+
1241
+ b->yy_ch_buf = (char *)
1242
+ /* Include room in for 2 EOB chars. */
1243
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1244
+ }
1245
+ else
1246
+ /* Can't grow it, we don't own it. */
1247
+ b->yy_ch_buf = 0;
1248
+
1249
+ if ( ! b->yy_ch_buf )
1250
+ YY_FATAL_ERROR(
1251
+ "fatal error - scanner input buffer overflow" );
1252
+
1253
+ yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1254
+
1255
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1256
+ number_to_move - 1;
1257
+
1258
+ }
1259
+
1260
+ if ( num_to_read > YY_READ_BUF_SIZE )
1261
+ num_to_read = YY_READ_BUF_SIZE;
1262
+
1263
+ /* Read in more data. */
1264
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1265
+ yyg->yy_n_chars, num_to_read );
1266
+
1267
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1268
+ }
1269
+
1270
+ if ( yyg->yy_n_chars == 0 )
1271
+ {
1272
+ if ( number_to_move == YY_MORE_ADJ )
1273
+ {
1274
+ ret_val = EOB_ACT_END_OF_FILE;
1275
+ yyrestart(yyin ,yyscanner);
1276
+ }
1277
+
1278
+ else
1279
+ {
1280
+ ret_val = EOB_ACT_LAST_MATCH;
1281
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1282
+ YY_BUFFER_EOF_PENDING;
1283
+ }
1284
+ }
1285
+
1286
+ else
1287
+ ret_val = EOB_ACT_CONTINUE_SCAN;
1288
+
1289
+ if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1290
+ /* Extend the array by 50%, plus the number we really need. */
1291
+ int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1292
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1293
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1294
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1295
+ }
1296
+
1297
+ yyg->yy_n_chars += number_to_move;
1298
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1299
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1300
+
1301
+ yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1302
+
1303
+ return ret_val;
1304
+ }
1305
+
1306
+ /* yy_get_previous_state - get the state just before the EOB char was reached */
1307
+
1308
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1309
+ {
1310
+ yy_state_type yy_current_state;
1311
+ char *yy_cp;
1312
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1313
+
1314
+ yy_current_state = yy_start_state_list[yyg->yy_start];
1315
+
1316
+ for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1317
+ {
1318
+ yy_current_state += yy_current_state[(*yy_cp ? YY_SC_TO_UI(*yy_cp) : 128)].yy_nxt;
1319
+ if ( yy_current_state[-1].yy_nxt )
1320
+ {
1321
+ yyg->yy_last_accepting_state = yy_current_state;
1322
+ yyg->yy_last_accepting_cpos = yy_cp;
1323
+ }
1324
+ }
1325
+
1326
+ return yy_current_state;
1327
+ }
1328
+
1329
+ /* yy_try_NUL_trans - try to make a transition on the NUL character
1330
+ *
1331
+ * synopsis
1332
+ * next_state = yy_try_NUL_trans( current_state );
1333
+ */
1334
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1335
+ {
1336
+ int yy_is_jam;
1337
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1338
+ char *yy_cp = yyg->yy_c_buf_p;
1339
+
1340
+ int yy_c = 128;
1341
+ yyconst struct yy_trans_info *yy_trans_info;
1342
+
1343
+ yy_trans_info = &yy_current_state[(unsigned int) yy_c];
1344
+ yy_current_state += yy_trans_info->yy_nxt;
1345
+ yy_is_jam = (yy_trans_info->yy_verify != yy_c);
1346
+
1347
+ if ( ! yy_is_jam )
1348
+ {
1349
+ if ( yy_current_state[-1].yy_nxt )
1350
+ {
1351
+ yyg->yy_last_accepting_state = yy_current_state;
1352
+ yyg->yy_last_accepting_cpos = yy_cp;
1353
+ }
1354
+ }
1355
+
1356
+ (void)yyg;
1357
+ return yy_is_jam ? 0 : yy_current_state;
1358
+ }
1359
+
1360
+ #ifndef YY_NO_UNPUT
1361
+
1362
+ #endif
1363
+
1364
+ #ifndef YY_NO_INPUT
1365
+ #ifdef __cplusplus
1366
+ static int yyinput (yyscan_t yyscanner)
1367
+ #else
1368
+ static int input (yyscan_t yyscanner)
1369
+ #endif
1370
+
1371
+ {
1372
+ int c;
1373
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1374
+
1375
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
1376
+
1377
+ if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1378
+ {
1379
+ /* yy_c_buf_p now points to the character we want to return.
1380
+ * If this occurs *before* the EOB characters, then it's a
1381
+ * valid NUL; if not, then we've hit the end of the buffer.
1382
+ */
1383
+ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1384
+ /* This was really a NUL. */
1385
+ *yyg->yy_c_buf_p = '\0';
1386
+
1387
+ else
1388
+ { /* need more input */
1389
+ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1390
+ ++yyg->yy_c_buf_p;
1391
+
1392
+ switch ( yy_get_next_buffer( yyscanner ) )
1393
+ {
1394
+ case EOB_ACT_LAST_MATCH:
1395
+ /* This happens because yy_g_n_b()
1396
+ * sees that we've accumulated a
1397
+ * token and flags that we need to
1398
+ * try matching the token before
1399
+ * proceeding. But for input(),
1400
+ * there's no matching to consider.
1401
+ * So convert the EOB_ACT_LAST_MATCH
1402
+ * to EOB_ACT_END_OF_FILE.
1403
+ */
1404
+
1405
+ /* Reset buffer status. */
1406
+ yyrestart(yyin ,yyscanner);
1407
+
1408
+ /*FALLTHROUGH*/
1409
+
1410
+ case EOB_ACT_END_OF_FILE:
1411
+ {
1412
+ if ( yywrap(yyscanner ) )
1413
+ return EOF;
1414
+
1415
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
1416
+ YY_NEW_FILE;
1417
+ #ifdef __cplusplus
1418
+ return yyinput(yyscanner);
1419
+ #else
1420
+ return input(yyscanner);
1421
+ #endif
1422
+ }
1423
+
1424
+ case EOB_ACT_CONTINUE_SCAN:
1425
+ yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1426
+ break;
1427
+ }
1428
+ }
1429
+ }
1430
+
1431
+ c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1432
+ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1433
+ yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1434
+
1435
+ return c;
1436
+ }
1437
+ #endif /* ifndef YY_NO_INPUT */
1438
+
1439
+ /** Immediately switch to a different input stream.
1440
+ * @param input_file A readable stream.
1441
+ * @param yyscanner The scanner object.
1442
+ * @note This function does not reset the start condition to @c INITIAL .
1443
+ */
1444
+ void yyrestart (FILE * input_file , yyscan_t yyscanner)
1445
+ {
1446
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1447
+
1448
+ if ( ! YY_CURRENT_BUFFER ){
1449
+ yyensure_buffer_stack (yyscanner);
1450
+ YY_CURRENT_BUFFER_LVALUE =
1451
+ yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1452
+ }
1453
+
1454
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1455
+ yy_load_buffer_state(yyscanner );
1456
+ }
1457
+
1458
+ /** Switch to a different input buffer.
1459
+ * @param new_buffer The new input buffer.
1460
+ * @param yyscanner The scanner object.
1461
+ */
1462
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1463
+ {
1464
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1465
+
1466
+ /* TODO. We should be able to replace this entire function body
1467
+ * with
1468
+ * yypop_buffer_state();
1469
+ * yypush_buffer_state(new_buffer);
1470
+ */
1471
+ yyensure_buffer_stack (yyscanner);
1472
+ if ( YY_CURRENT_BUFFER == new_buffer )
1473
+ return;
1474
+
1475
+ if ( YY_CURRENT_BUFFER )
1476
+ {
1477
+ /* Flush out information for old buffer. */
1478
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
1479
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1480
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1481
+ }
1482
+
1483
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
1484
+ yy_load_buffer_state(yyscanner );
1485
+
1486
+ /* We don't actually know whether we did this switch during
1487
+ * EOF (yywrap()) processing, but the only time this flag
1488
+ * is looked at is after yywrap() is called, so it's safe
1489
+ * to go ahead and always set it.
1490
+ */
1491
+ yyg->yy_did_buffer_switch_on_eof = 1;
1492
+ }
1493
+
1494
+ static void yy_load_buffer_state (yyscan_t yyscanner)
1495
+ {
1496
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1497
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1498
+ yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1499
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1500
+ yyg->yy_hold_char = *yyg->yy_c_buf_p;
1501
+ }
1502
+
1503
+ /** Allocate and initialize an input buffer state.
1504
+ * @param file A readable stream.
1505
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1506
+ * @param yyscanner The scanner object.
1507
+ * @return the allocated buffer state.
1508
+ */
1509
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1510
+ {
1511
+ YY_BUFFER_STATE b;
1512
+
1513
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1514
+ if ( ! b )
1515
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1516
+
1517
+ b->yy_buf_size = (yy_size_t)size;
1518
+
1519
+ /* yy_ch_buf has to be 2 characters longer than the size given because
1520
+ * we need to put in 2 end-of-buffer characters.
1521
+ */
1522
+ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner );
1523
+ if ( ! b->yy_ch_buf )
1524
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1525
+
1526
+ b->yy_is_our_buffer = 1;
1527
+
1528
+ yy_init_buffer(b,file ,yyscanner);
1529
+
1530
+ return b;
1531
+ }
1532
+
1533
+ /** Destroy the buffer.
1534
+ * @param b a buffer created with yy_create_buffer()
1535
+ * @param yyscanner The scanner object.
1536
+ */
1537
+ void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1538
+ {
1539
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1540
+
1541
+ if ( ! b )
1542
+ return;
1543
+
1544
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1545
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1546
+
1547
+ if ( b->yy_is_our_buffer )
1548
+ yyfree((void *) b->yy_ch_buf ,yyscanner );
1549
+
1550
+ yyfree((void *) b ,yyscanner );
1551
+ }
1552
+
1553
+ /* Initializes or reinitializes a buffer.
1554
+ * This function is sometimes called more than once on the same buffer,
1555
+ * such as during a yyrestart() or at EOF.
1556
+ */
1557
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1558
+
1559
+ {
1560
+ int oerrno = errno;
1561
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1562
+
1563
+ yy_flush_buffer(b ,yyscanner);
1564
+
1565
+ b->yy_input_file = file;
1566
+ b->yy_fill_buffer = 1;
1567
+
1568
+ /* If b is the current buffer, then yy_init_buffer was _probably_
1569
+ * called from yyrestart() or through yy_get_next_buffer.
1570
+ * In that case, we don't want to reset the lineno or column.
1571
+ */
1572
+ if (b != YY_CURRENT_BUFFER){
1573
+ b->yy_bs_lineno = 1;
1574
+ b->yy_bs_column = 0;
1575
+ }
1576
+
1577
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1578
+
1579
+ errno = oerrno;
1580
+ }
1581
+
1582
+ /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1583
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1584
+ * @param yyscanner The scanner object.
1585
+ */
1586
+ void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1587
+ {
1588
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1589
+ if ( ! b )
1590
+ return;
1591
+
1592
+ b->yy_n_chars = 0;
1593
+
1594
+ /* We always need two end-of-buffer characters. The first causes
1595
+ * a transition to the end-of-buffer state. The second causes
1596
+ * a jam in that state.
1597
+ */
1598
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1599
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1600
+
1601
+ b->yy_buf_pos = &b->yy_ch_buf[0];
1602
+
1603
+ b->yy_at_bol = 1;
1604
+ b->yy_buffer_status = YY_BUFFER_NEW;
1605
+
1606
+ if ( b == YY_CURRENT_BUFFER )
1607
+ yy_load_buffer_state(yyscanner );
1608
+ }
1609
+
1610
+ /** Pushes the new state onto the stack. The new state becomes
1611
+ * the current state. This function will allocate the stack
1612
+ * if necessary.
1613
+ * @param new_buffer The new state.
1614
+ * @param yyscanner The scanner object.
1615
+ */
1616
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1617
+ {
1618
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1619
+ if (new_buffer == NULL)
1620
+ return;
1621
+
1622
+ yyensure_buffer_stack(yyscanner);
1623
+
1624
+ /* This block is copied from yy_switch_to_buffer. */
1625
+ if ( YY_CURRENT_BUFFER )
1626
+ {
1627
+ /* Flush out information for old buffer. */
1628
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
1629
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1630
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1631
+ }
1632
+
1633
+ /* Only push if top exists. Otherwise, replace top. */
1634
+ if (YY_CURRENT_BUFFER)
1635
+ yyg->yy_buffer_stack_top++;
1636
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
1637
+
1638
+ /* copied from yy_switch_to_buffer. */
1639
+ yy_load_buffer_state(yyscanner );
1640
+ yyg->yy_did_buffer_switch_on_eof = 1;
1641
+ }
1642
+
1643
+ /** Removes and deletes the top of the stack, if present.
1644
+ * The next element becomes the new top.
1645
+ * @param yyscanner The scanner object.
1646
+ */
1647
+ void yypop_buffer_state (yyscan_t yyscanner)
1648
+ {
1649
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1650
+ if (!YY_CURRENT_BUFFER)
1651
+ return;
1652
+
1653
+ yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1654
+ YY_CURRENT_BUFFER_LVALUE = NULL;
1655
+ if (yyg->yy_buffer_stack_top > 0)
1656
+ --yyg->yy_buffer_stack_top;
1657
+
1658
+ if (YY_CURRENT_BUFFER) {
1659
+ yy_load_buffer_state(yyscanner );
1660
+ yyg->yy_did_buffer_switch_on_eof = 1;
1661
+ }
1662
+ }
1663
+
1664
+ /* Allocates the stack if it does not exist.
1665
+ * Guarantees space for at least one push.
1666
+ */
1667
+ static void yyensure_buffer_stack (yyscan_t yyscanner)
1668
+ {
1669
+ yy_size_t num_to_alloc;
1670
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1671
+
1672
+ if (!yyg->yy_buffer_stack) {
1673
+
1674
+ /* First allocation is just for 2 elements, since we don't know if this
1675
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
1676
+ * immediate realloc on the next call.
1677
+ */
1678
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1679
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
1680
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
1681
+ , yyscanner);
1682
+ if ( ! yyg->yy_buffer_stack )
1683
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1684
+
1685
+ memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1686
+
1687
+ yyg->yy_buffer_stack_max = num_to_alloc;
1688
+ yyg->yy_buffer_stack_top = 0;
1689
+ return;
1690
+ }
1691
+
1692
+ if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1693
+
1694
+ /* Increase the buffer to prepare for a possible push. */
1695
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
1696
+
1697
+ num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1698
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
1699
+ (yyg->yy_buffer_stack,
1700
+ num_to_alloc * sizeof(struct yy_buffer_state*)
1701
+ , yyscanner);
1702
+ if ( ! yyg->yy_buffer_stack )
1703
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1704
+
1705
+ /* zero only the new slots.*/
1706
+ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1707
+ yyg->yy_buffer_stack_max = num_to_alloc;
1708
+ }
1709
+ }
1710
+
1711
+ /** Setup the input buffer state to scan directly from a user-specified character buffer.
1712
+ * @param base the character buffer
1713
+ * @param size the size in bytes of the character buffer
1714
+ * @param yyscanner The scanner object.
1715
+ * @return the newly allocated buffer state object.
1716
+ */
1717
+ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1718
+ {
1719
+ YY_BUFFER_STATE b;
1720
+
1721
+ if ( size < 2 ||
1722
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
1723
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
1724
+ /* They forgot to leave room for the EOB's. */
1725
+ return 0;
1726
+
1727
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1728
+ if ( ! b )
1729
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1730
+
1731
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1732
+ b->yy_buf_pos = b->yy_ch_buf = base;
1733
+ b->yy_is_our_buffer = 0;
1734
+ b->yy_input_file = 0;
1735
+ b->yy_n_chars = b->yy_buf_size;
1736
+ b->yy_is_interactive = 0;
1737
+ b->yy_at_bol = 1;
1738
+ b->yy_fill_buffer = 0;
1739
+ b->yy_buffer_status = YY_BUFFER_NEW;
1740
+
1741
+ yy_switch_to_buffer(b ,yyscanner );
1742
+
1743
+ return b;
1744
+ }
1745
+
1746
+ /** Setup the input buffer state to scan a string. The next call to yylex() will
1747
+ * scan from a @e copy of @a str.
1748
+ * @param yystr a NUL-terminated string to scan
1749
+ * @param yyscanner The scanner object.
1750
+ * @return the newly allocated buffer state object.
1751
+ * @note If you want to scan bytes that may contain NUL values, then use
1752
+ * yy_scan_bytes() instead.
1753
+ */
1754
+ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
1755
+ {
1756
+
1757
+ return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
1758
+ }
1759
+
1760
+ /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1761
+ * scan from a @e copy of @a bytes.
1762
+ * @param yybytes the byte buffer to scan
1763
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1764
+ * @param yyscanner The scanner object.
1765
+ * @return the newly allocated buffer state object.
1766
+ */
1767
+ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
1768
+ {
1769
+ YY_BUFFER_STATE b;
1770
+ char *buf;
1771
+ yy_size_t n;
1772
+ yy_size_t i;
1773
+
1774
+ /* Get memory for full buffer, including space for trailing EOB's. */
1775
+ n = _yybytes_len + 2;
1776
+ buf = (char *) yyalloc(n ,yyscanner );
1777
+ if ( ! buf )
1778
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1779
+
1780
+ for ( i = 0; i < _yybytes_len; ++i )
1781
+ buf[i] = yybytes[i];
1782
+
1783
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1784
+
1785
+ b = yy_scan_buffer(buf,n ,yyscanner);
1786
+ if ( ! b )
1787
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1788
+
1789
+ /* It's okay to grow etc. this buffer, and we should throw it
1790
+ * away when we're done.
1791
+ */
1792
+ b->yy_is_our_buffer = 1;
1793
+
1794
+ return b;
1795
+ }
1796
+
1797
+ #ifndef YY_EXIT_FAILURE
1798
+ #define YY_EXIT_FAILURE 2
1799
+ #endif
1800
+
1801
+ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
1802
+ {
1803
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1804
+ (void)yyg;
1805
+ (void) fprintf( stderr, "%s\n", msg );
1806
+ exit( YY_EXIT_FAILURE );
1807
+ }
1808
+
1809
+ /* Redefine yyless() so it works in section 3 code. */
1810
+
1811
+ #undef yyless
1812
+ #define yyless(n) \
1813
+ do \
1814
+ { \
1815
+ /* Undo effects of setting up yytext. */ \
1816
+ int yyless_macro_arg = (n); \
1817
+ YY_LESS_LINENO(yyless_macro_arg);\
1818
+ yytext[yyleng] = yyg->yy_hold_char; \
1819
+ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1820
+ yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1821
+ *yyg->yy_c_buf_p = '\0'; \
1822
+ yyleng = yyless_macro_arg; \
1823
+ } \
1824
+ while ( 0 )
1825
+
1826
+ /* Accessor methods (get/set functions) to struct members. */
1827
+
1828
+ /** Get the user-defined data for this scanner.
1829
+ * @param yyscanner The scanner object.
1830
+ */
1831
+ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
1832
+ {
1833
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1834
+ return yyextra;
1835
+ }
1836
+
1837
+ /** Get the current line number.
1838
+ * @param yyscanner The scanner object.
1839
+ */
1840
+ int yyget_lineno (yyscan_t yyscanner)
1841
+ {
1842
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1843
+
1844
+ if (! YY_CURRENT_BUFFER)
1845
+ return 0;
1846
+
1847
+ return yylineno;
1848
+ }
1849
+
1850
+ /** Get the current column number.
1851
+ * @param yyscanner The scanner object.
1852
+ */
1853
+ int yyget_column (yyscan_t yyscanner)
1854
+ {
1855
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1856
+
1857
+ if (! YY_CURRENT_BUFFER)
1858
+ return 0;
1859
+
1860
+ return yycolumn;
1861
+ }
1862
+
1863
+ /** Get the input stream.
1864
+ * @param yyscanner The scanner object.
1865
+ */
1866
+ FILE *yyget_in (yyscan_t yyscanner)
1867
+ {
1868
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1869
+ return yyin;
1870
+ }
1871
+
1872
+ /** Get the output stream.
1873
+ * @param yyscanner The scanner object.
1874
+ */
1875
+ FILE *yyget_out (yyscan_t yyscanner)
1876
+ {
1877
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1878
+ return yyout;
1879
+ }
1880
+
1881
+ /** Get the length of the current token.
1882
+ * @param yyscanner The scanner object.
1883
+ */
1884
+ yy_size_t yyget_leng (yyscan_t yyscanner)
1885
+ {
1886
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1887
+ return yyleng;
1888
+ }
1889
+
1890
+ /** Get the current token.
1891
+ * @param yyscanner The scanner object.
1892
+ */
1893
+
1894
+ char *yyget_text (yyscan_t yyscanner)
1895
+ {
1896
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1897
+ return yytext;
1898
+ }
1899
+
1900
+ /** Set the user-defined data. This data is never touched by the scanner.
1901
+ * @param user_defined The data to be associated with this scanner.
1902
+ * @param yyscanner The scanner object.
1903
+ */
1904
+ void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
1905
+ {
1906
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1907
+ yyextra = user_defined ;
1908
+ }
1909
+
1910
+ /** Set the current line number.
1911
+ * @param _line_number line number
1912
+ * @param yyscanner The scanner object.
1913
+ */
1914
+ void yyset_lineno (int _line_number , yyscan_t yyscanner)
1915
+ {
1916
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1917
+
1918
+ /* lineno is only valid if an input buffer exists. */
1919
+ if (! YY_CURRENT_BUFFER )
1920
+ YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
1921
+
1922
+ yylineno = _line_number;
1923
+ }
1924
+
1925
+ /** Set the current column.
1926
+ * @param _column_no column number
1927
+ * @param yyscanner The scanner object.
1928
+ */
1929
+ void yyset_column (int _column_no , yyscan_t yyscanner)
1930
+ {
1931
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1932
+
1933
+ /* column is only valid if an input buffer exists. */
1934
+ if (! YY_CURRENT_BUFFER )
1935
+ YY_FATAL_ERROR( "yyset_column called with no buffer" );
1936
+
1937
+ yycolumn = _column_no;
1938
+ }
1939
+
1940
+ /** Set the input stream. This does not discard the current
1941
+ * input buffer.
1942
+ * @param _in_str A readable stream.
1943
+ * @param yyscanner The scanner object.
1944
+ * @see yy_switch_to_buffer
1945
+ */
1946
+ void yyset_in (FILE * _in_str , yyscan_t yyscanner)
1947
+ {
1948
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1949
+ yyin = _in_str ;
1950
+ }
1951
+
1952
+ void yyset_out (FILE * _out_str , yyscan_t yyscanner)
1953
+ {
1954
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1955
+ yyout = _out_str ;
1956
+ }
1957
+
1958
+ int yyget_debug (yyscan_t yyscanner)
1959
+ {
1960
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1961
+ return yy_flex_debug;
1962
+ }
1963
+
1964
+ void yyset_debug (int _bdebug , yyscan_t yyscanner)
1965
+ {
1966
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1967
+ yy_flex_debug = _bdebug ;
1968
+ }
1969
+
1970
+ /* Accessor methods for yylval and yylloc */
1971
+
1972
+ YYSTYPE * yyget_lval (yyscan_t yyscanner)
1973
+ {
1974
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1975
+ return yylval;
1976
+ }
1977
+
1978
+ void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
1979
+ {
1980
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1981
+ yylval = yylval_param;
1982
+ }
1983
+
1984
+ YYLTYPE *yyget_lloc (yyscan_t yyscanner)
1985
+ {
1986
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1987
+ return yylloc;
1988
+ }
1989
+
1990
+ void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
1991
+ {
1992
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1993
+ yylloc = yylloc_param;
1994
+ }
1995
+
1996
+ /* User-visible API */
1997
+
1998
+ /* yylex_init is special because it creates the scanner itself, so it is
1999
+ * the ONLY reentrant function that doesn't take the scanner as the last argument.
2000
+ * That's why we explicitly handle the declaration, instead of using our macros.
2001
+ */
2002
+
2003
+ int yylex_init(yyscan_t* ptr_yy_globals)
2004
+
2005
+ {
2006
+ if (ptr_yy_globals == NULL){
2007
+ errno = EINVAL;
2008
+ return 1;
2009
+ }
2010
+
2011
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2012
+
2013
+ if (*ptr_yy_globals == NULL){
2014
+ errno = ENOMEM;
2015
+ return 1;
2016
+ }
2017
+
2018
+ /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2019
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2020
+
2021
+ return yy_init_globals ( *ptr_yy_globals );
2022
+ }
2023
+
2024
+ /* yylex_init_extra has the same functionality as yylex_init, but follows the
2025
+ * convention of taking the scanner as the last argument. Note however, that
2026
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
2027
+ * is the reason, too, why this function also must handle its own declaration).
2028
+ * The user defined value in the first argument will be available to yyalloc in
2029
+ * the yyextra field.
2030
+ */
2031
+
2032
+ int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2033
+
2034
+ {
2035
+ struct yyguts_t dummy_yyguts;
2036
+
2037
+ yyset_extra (yy_user_defined, &dummy_yyguts);
2038
+
2039
+ if (ptr_yy_globals == NULL){
2040
+ errno = EINVAL;
2041
+ return 1;
2042
+ }
2043
+
2044
+ *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2045
+
2046
+ if (*ptr_yy_globals == NULL){
2047
+ errno = ENOMEM;
2048
+ return 1;
2049
+ }
2050
+
2051
+ /* By setting to 0xAA, we expose bugs in
2052
+ yy_init_globals. Leave at 0x00 for releases. */
2053
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2054
+
2055
+ yyset_extra (yy_user_defined, *ptr_yy_globals);
2056
+
2057
+ return yy_init_globals ( *ptr_yy_globals );
2058
+ }
2059
+
2060
+ static int yy_init_globals (yyscan_t yyscanner)
2061
+ {
2062
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2063
+ /* Initialization is the same as for the non-reentrant scanner.
2064
+ * This function is called from yylex_destroy(), so don't allocate here.
2065
+ */
2066
+
2067
+ yyg->yy_buffer_stack = 0;
2068
+ yyg->yy_buffer_stack_top = 0;
2069
+ yyg->yy_buffer_stack_max = 0;
2070
+ yyg->yy_c_buf_p = (char *) 0;
2071
+ yyg->yy_init = 0;
2072
+ yyg->yy_start = 0;
2073
+
2074
+ yyg->yy_start_stack_ptr = 0;
2075
+ yyg->yy_start_stack_depth = 0;
2076
+ yyg->yy_start_stack = NULL;
2077
+
2078
+ /* Defined in main.c */
2079
+ #ifdef YY_STDINIT
2080
+ yyin = stdin;
2081
+ yyout = stdout;
2082
+ #else
2083
+ yyin = (FILE *) 0;
2084
+ yyout = (FILE *) 0;
2085
+ #endif
2086
+
2087
+ /* For future reference: Set errno on error, since we are called by
2088
+ * yylex_init()
2089
+ */
2090
+ return 0;
2091
+ }
2092
+
2093
+ /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2094
+ int yylex_destroy (yyscan_t yyscanner)
2095
+ {
2096
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2097
+
2098
+ /* Pop the buffer stack, destroying each element. */
2099
+ while(YY_CURRENT_BUFFER){
2100
+ yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2101
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2102
+ yypop_buffer_state(yyscanner);
2103
+ }
2104
+
2105
+ /* Destroy the stack itself. */
2106
+ yyfree(yyg->yy_buffer_stack ,yyscanner);
2107
+ yyg->yy_buffer_stack = NULL;
2108
+
2109
+ /* Destroy the start condition stack. */
2110
+ yyfree(yyg->yy_start_stack ,yyscanner );
2111
+ yyg->yy_start_stack = NULL;
2112
+
2113
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
2114
+ * yylex() is called, initialization will occur. */
2115
+ yy_init_globals( yyscanner);
2116
+
2117
+ /* Destroy the main struct (reentrant only). */
2118
+ yyfree ( yyscanner , yyscanner );
2119
+ yyscanner = NULL;
2120
+ return 0;
2121
+ }
2122
+
2123
+ /*
2124
+ * Internal utility routines.
2125
+ */
2126
+
2127
+ #ifndef yytext_ptr
2128
+ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2129
+ {
2130
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2131
+ (void)yyg;
2132
+
2133
+ int i;
2134
+ for ( i = 0; i < n; ++i )
2135
+ s1[i] = s2[i];
2136
+ }
2137
+ #endif
2138
+
2139
+ #ifdef YY_NEED_STRLEN
2140
+ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2141
+ {
2142
+ int n;
2143
+ for ( n = 0; s[n]; ++n )
2144
+ ;
2145
+
2146
+ return n;
2147
+ }
2148
+ #endif
2149
+
2150
+ void *yyalloc (yy_size_t size , yyscan_t yyscanner)
2151
+ {
2152
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2153
+ (void)yyg;
2154
+ return (void *) malloc( size );
2155
+ }
2156
+
2157
+ void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2158
+ {
2159
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2160
+ (void)yyg;
2161
+
2162
+ /* The cast to (char *) in the following accommodates both
2163
+ * implementations that use char* generic pointers, and those
2164
+ * that use void* generic pointers. It works with the latter
2165
+ * because both ANSI C and C++ allow castless assignment from
2166
+ * any pointer type to void*, and deal with argument conversions
2167
+ * as though doing an assignment.
2168
+ */
2169
+ return (void *) realloc( (char *) ptr, size );
2170
+ }
2171
+
2172
+ void yyfree (void * ptr , yyscan_t yyscanner)
2173
+ {
2174
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2175
+ (void)yyg;
2176
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2177
+ }
2178
+
2179
+ #define YYTABLES_NAME "yytables"
2180
+
2181
+ #line 55 "etc/contrived_json/ext_parser/parser.l"
2182
+
2183
+
2184
+