slow_blink 0.0.1 → 0.0.2

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