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