1 #if defined (HAVE_CONFIG_H)
5 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
7 #pragma GCC diagnostic ignored "-Wunused-function"
12 #pragma GCC diagnostic push
13 #pragma GCC diagnostic ignored "-Wold-style-cast"
14 #pragma GCC diagnostic ignored "-Wsign-compare"
19 #if ! defined (register)
23 #line 24 "libinterp/parse-tree/lex.cc"
25 #define YY_INT_ALIGNED short int
30 #define YY_FLEX_MAJOR_VERSION 2
31 #define YY_FLEX_MINOR_VERSION 6
32 #define YY_FLEX_SUBMINOR_VERSION 1
33 #if YY_FLEX_SUBMINOR_VERSION > 0
54 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
59 #ifndef __STDC_LIMIT_MACROS
60 #define __STDC_LIMIT_MACROS 1
80 #define INT8_MIN (-128)
83 #define INT16_MIN (-32767-1)
86 #define INT32_MIN (-2147483647-1)
89 #define INT8_MAX (127)
92 #define INT16_MAX (32767)
95 #define INT32_MAX (2147483647)
98 #define UINT8_MAX (255U)
101 #define UINT16_MAX (65535U)
104 #define UINT32_MAX (4294967295U)
112 #define yyconst const
114 #if defined(__GNUC__) && __GNUC__ >= 3
115 #define yynoreturn __attribute__((__noreturn__))
128 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
131 #ifndef YY_TYPEDEF_YY_SCANNER_T
132 #define YY_TYPEDEF_YY_SCANNER_T
138 #define yyin yyg->yyin_r
139 #define yyout yyg->yyout_r
140 #define yyextra yyg->yyextra_r
141 #define yyleng yyg->yyleng_r
142 #define yytext yyg->yytext_r
143 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
144 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
145 #define yy_flex_debug yyg->yy_flex_debug_r
151 #define BEGIN yyg->yy_start = 1 + 2 *
157 #define YY_START ((yyg->yy_start - 1) / 2)
158 #define YYSTATE YY_START
161 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
164 #define YY_NEW_FILE octave_restart(yyin ,yyscanner )
166 #define YY_END_OF_BUFFER_CHAR 0
175 #define YY_BUF_SIZE 32768
177 #define YY_BUF_SIZE 16384
183 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
185 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
186 #define YY_TYPEDEF_YY_BUFFER_STATE
190 #ifndef YY_TYPEDEF_YY_SIZE_T
191 #define YY_TYPEDEF_YY_SIZE_T
195 #define EOB_ACT_CONTINUE_SCAN 0
196 #define EOB_ACT_END_OF_FILE 1
197 #define EOB_ACT_LAST_MATCH 2
199 #define YY_LESS_LINENO(n)
200 #define YY_LINENO_REWIND_TO(ptr)
207 int yyless_macro_arg = (n); \
208 YY_LESS_LINENO(yyless_macro_arg);\
209 *yy_cp = yyg->yy_hold_char; \
210 YY_RESTORE_YY_MORE_OFFSET \
211 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
212 YY_DO_BEFORE_ACTION; \
216 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
218 #ifndef YY_STRUCT_YY_BUFFER_STATE
219 #define YY_STRUCT_YY_BUFFER_STATE
266 #define YY_BUFFER_NEW 0
267 #define YY_BUFFER_NORMAL 1
278 #define YY_BUFFER_EOF_PENDING 2
289 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
290 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
296 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
310 #define YY_FLUSH_BUFFER octave__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
320 #define yy_new_buffer octave__create_buffer
322 #define yy_set_interactive(is_interactive) \
324 if ( ! YY_CURRENT_BUFFER ){ \
325 octave_ensure_buffer_stack (yyscanner); \
326 YY_CURRENT_BUFFER_LVALUE = \
327 octave__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
329 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
332 #define yy_set_bol(at_bol) \
334 if ( ! YY_CURRENT_BUFFER ){\
335 octave_ensure_buffer_stack (yyscanner); \
336 YY_CURRENT_BUFFER_LVALUE = \
337 octave__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
339 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
342 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
346 #define octave_wrap(yyscanner) (1)
347 #define YY_SKIP_YYWRAP
353 #define yytext_ptr yytext_r
363 #define YY_DO_BEFORE_ACTION \
364 yyg->yytext_ptr = yy_bp; \
365 yyleng = (int) (yy_cp - yy_bp); \
366 yyg->yy_hold_char = *yy_cp; \
368 yyg->yy_c_buf_p = yy_cp;
370 #define YY_NUM_RULES 119
371 #define YY_END_OF_BUFFER 120
381 0, 0, 5, 5, 10, 10, 0, 0, 0, 0,
382 0, 0, 0, 0, 0, 0, 0, 0, 120, 118,
383 51, 60, 60, 91, 62, 118, 56, 76, 61, 96,
384 97, 80, 88, 92, 89, 98, 81, 50, 50, 63,
385 87, 78, 99, 79, 118, 59, 14, 82, 15, 83,
386 56, 56, 116, 77, 117, 90, 51, 118, 9, 8,
387 3, 3, 7, 119, 5, 6, 4, 9, 10, 11,
388 11, 12, 13, 10, 1, 1, 119, 19, 19, 119,
389 119, 22, 22, 22, 22, 39, 40, 40, 24, 38,
390 119, 43, 44, 44, 42, 47, 46, 119, 45, 51,
392 0, 60, 74, 0, 20, 20, 56, 0, 85, 114,
393 84, 102, 94, 100, 95, 101, 93, 66, 64, 65,
394 0, 67, 50, 68, 69, 103, 50, 50, 0, 0,
395 48, 0, 71, 72, 75, 58, 0, 53, 53, 0,
396 104, 110, 56, 56, 115, 86, 73, 51, 0, 0,
397 9, 8, 3, 0, 3, 5, 6, 0, 10, 11,
398 10, 1, 0, 19, 19, 0, 0, 0, 0, 0,
399 0, 22, 0, 21, 21, 39, 40, 23, 0, 37,
400 37, 36, 36, 25, 27, 28, 29, 30, 31, 32,
401 33, 37, 43, 44, 41, 46, 45, 0, 57, 111,
403 70, 107, 105, 106, 0, 108, 50, 0, 109, 112,
404 49, 50, 50, 0, 50, 50, 58, 0, 0, 54,
405 54, 56, 0, 16, 16, 0, 0, 17, 17, 0,
406 18, 18, 0, 0, 35, 35, 25, 26, 45, 57,
407 0, 113, 0, 52, 52, 0, 50, 50, 50, 58,
408 0, 55, 0, 2, 2, 0, 34, 34, 25, 45,
414 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
415 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
417 1, 2, 5, 6, 7, 8, 7, 9, 10, 11,
418 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
419 21, 21, 21, 21, 21, 22, 22, 23, 24, 25,
420 26, 27, 28, 29, 30, 31, 30, 32, 32, 30,
421 8, 8, 33, 33, 8, 8, 8, 8, 8, 8,
422 8, 8, 8, 8, 8, 8, 8, 34, 8, 8,
423 35, 36, 37, 38, 39, 1, 40, 41, 30, 32,
425 42, 43, 44, 8, 33, 33, 8, 8, 8, 45,
426 8, 8, 8, 46, 47, 48, 8, 49, 8, 50,
427 8, 8, 51, 52, 53, 54, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 2, 3, 3, 1, 4, 2, 5, 1, 6,
447 2, 2, 1, 1, 2, 1, 7, 1, 8, 8,
448 8, 8, 1, 2, 1, 1, 1, 1, 9, 10,
449 10, 10, 11, 5, 2, 12, 2, 1, 11, 10,
450 10, 10, 10, 5, 5, 5, 5, 5, 5, 5,
456 0, 53, 59, 111, 54, 83, 619, 618, 64, 75,
457 91, 95, 102, 127, 137, 139, 163, 212, 618, 820,
458 57, 820, 614, 590, 820, 69, 586, 66, 820, 820,
459 820, 75, 90, 820, 108, 253, 583, 275, 119, 820,
460 820, 582, 483, 482, 0, 820, 820, 152, 820, 481,
461 103, 110, 820, 77, 820, 480, 82, 170, 0, 503,
462 820, 500, 820, 77, 116, 145, 820, 485, 168, 820,
463 498, 820, 820, 170, 820, 497, 176, 820, 496, 181,
464 183, 820, 174, 495, 186, 0, 820, 494, 490, 478,
465 324, 0, 820, 491, 478, 820, 485, 820, 469, 215,
467 188, 820, 820, 196, 820, 481, 453, 0, 820, 820,
468 455, 820, 820, 820, 820, 820, 820, 203, 454, 452,
469 460, 450, 279, 427, 408, 820, 365, 0, 199, 211,
470 820, 0, 820, 820, 820, 388, 274, 820, 397, 220,
471 820, 820, 199, 220, 820, 820, 820, 233, 279, 282,
472 0, 394, 820, 261, 391, 268, 276, 374, 303, 820,
473 313, 820, 319, 820, 386, 329, 337, 335, 344, 347,
474 331, 820, 347, 820, 373, 0, 820, 820, 354, 820,
475 353, 820, 363, 339, 820, 820, 820, 820, 820, 820,
476 820, 0, 0, 820, 820, 361, 325, 0, 307, 820,
478 278, 820, 820, 820, 349, 820, 360, 392, 820, 820,
479 820, 396, 400, 402, 421, 269, 276, 0, 358, 820,
480 287, 366, 423, 820, 284, 406, 428, 820, 277, 442,
481 820, 247, 445, 448, 820, 245, 436, 0, 224, 222,
482 0, 820, 433, 820, 234, 442, 446, 450, 193, 184,
483 98, 820, 455, 820, 165, 471, 820, 158, 820, 141,
484 120, 471, 108, 94, 820, 510, 522, 534, 546, 558,
485 570, 582, 594, 602, 609, 620, 632, 644, 656, 668,
486 679, 691, 699, 706, 710, 716, 727, 732, 738, 745,
487 756, 761, 768, 779, 787, 794, 801, 808
493 265, 1, 266, 266, 1, 1, 267, 267, 268, 268,
494 269, 269, 270, 270, 271, 271, 272, 272, 265, 265,
495 265, 265, 265, 265, 265, 273, 274, 265, 265, 265,
496 265, 265, 265, 265, 265, 265, 265, 265, 38, 265,
497 265, 265, 265, 265, 275, 265, 265, 265, 265, 265,
498 274, 274, 265, 265, 265, 265, 265, 273, 276, 265,
499 265, 265, 265, 277, 265, 265, 265, 265, 265, 265,
500 265, 265, 265, 265, 265, 265, 278, 265, 265, 278,
501 278, 265, 265, 265, 279, 280, 265, 265, 265, 265,
502 281, 282, 265, 265, 265, 265, 265, 265, 283, 265,
504 273, 265, 265, 273, 265, 265, 274, 284, 265, 265,
505 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
506 265, 265, 265, 265, 265, 265, 265, 39, 265, 265,
507 265, 285, 265, 265, 265, 286, 265, 265, 265, 287,
508 265, 265, 274, 274, 265, 265, 265, 265, 273, 273,
509 276, 265, 265, 277, 265, 265, 265, 265, 265, 265,
510 265, 265, 278, 265, 265, 278, 278, 278, 278, 265,
511 279, 265, 279, 265, 265, 280, 265, 265, 265, 265,
512 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
513 265, 288, 282, 265, 265, 265, 283, 289, 290, 265,
515 265, 265, 265, 265, 291, 265, 265, 265, 265, 265,
516 265, 265, 265, 265, 265, 292, 286, 293, 287, 265,
517 265, 274, 273, 265, 265, 294, 278, 265, 265, 278,
518 265, 265, 265, 265, 265, 265, 265, 288, 295, 290,
519 296, 265, 291, 265, 265, 265, 265, 265, 292, 297,
520 265, 265, 294, 265, 265, 265, 265, 265, 265, 295,
521 298, 265, 297, 298, 0, 265, 265, 265, 265, 265,
522 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
523 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
524 265, 265, 265, 265, 265, 265, 265, 265
530 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
531 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
532 39, 39, 40, 41, 42, 43, 44, 45, 46, 27,
533 27, 27, 27, 27, 47, 48, 49, 50, 27, 27,
534 27, 27, 27, 51, 27, 27, 52, 27, 27, 27,
535 53, 54, 55, 56, 57, 69, 70, 71, 100, 58,
536 60, 61, 62, 101, 63, 64, 78, 79, 63, 65,
537 66, 105, 106, 67, 109, 68, 80, 78, 79, 153,
538 155, 81, 67, 148, 74, 70, 71, 111, 149, 58,
539 72, 110, 83, 65, 84, 66, 83, 85, 84, 251,
541 112, 85, 145, 113, 87, 88, 73, 89, 252, 65,
542 241, 66, 60, 61, 62, 114, 63, 64, 90, 72,
543 63, 65, 66, 115, 218, 67, 156, 68, 146, 87,
544 88, 108, 89, 116, 67, 73, 241, 91, 108, 93,
545 94, 93, 94, 90, 143, 65, 95, 66, 95, 265,
546 156, 144, 265, 137, 138, 139, 157, 198, 140, 265,
547 257, 65, 91, 66, 97, 98, 156, 254, 265, 159,
548 99, 161, 105, 106, 101, 170, 149, 141, 164, 165,
549 171, 157, 166, 164, 165, 164, 165, 167, 174, 175,
550 105, 106, 99, 99, 99, 99, 99, 157, 105, 106,
552 218, 99, 99, 99, 99, 99, 99, 99, 99, 99,
553 99, 99, 99, 97, 98, 201, 100, 213, 213, 99,
554 150, 101, 220, 221, 214, 131, 214, 108, 202, 215,
555 215, 215, 215, 168, 148, 169, 244, 213, 241, 149,
556 198, 99, 99, 99, 99, 99, 222, 235, 108, 231,
557 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
558 99, 99, 117, 153, 155, 118, 119, 222, 120, 121,
559 122, 123, 123, 123, 123, 137, 138, 139, 156, 228,
560 140, 105, 106, 223, 224, 225, 224, 157, 124, 220,
561 125, 127, 218, 128, 128, 128, 128, 207, 207, 207,
563 207, 131, 156, 242, 159, 129, 130, 131, 132, 101,
564 208, 131, 157, 128, 161, 129, 130, 207, 156, 149,
565 208, 164, 165, 241, 132, 181, 182, 183, 157, 150,
566 166, 164, 165, 174, 175, 167, 227, 228, 229, 164,
567 165, 198, 184, 184, 184, 230, 231, 232, 170, 174,
568 175, 244, 245, 171, 234, 235, 236, 237, 237, 237,
569 220, 221, 196, 185, 186, 182, 187, 251, 188, 189,
570 233, 190, 191, 192, 211, 174, 252, 211, 207, 207,
571 207, 207, 211, 212, 212, 212, 212, 168, 164, 169,
572 226, 208, 131, 153, 108, 152, 130, 131, 207, 138,
574 211, 208, 211, 212, 218, 246, 130, 246, 254, 255,
575 247, 247, 247, 247, 212, 212, 212, 212, 213, 213,
576 215, 215, 215, 215, 223, 224, 225, 130, 131, 227,
577 228, 229, 131, 210, 212, 244, 245, 130, 213, 248,
578 248, 248, 248, 230, 231, 232, 256, 257, 258, 234,
579 235, 236, 209, 131, 259, 259, 259, 254, 255, 248,
580 247, 247, 247, 247, 262, 262, 262, 262, 248, 248,
581 248, 248, 256, 257, 258, 206, 205, 204, 131, 203,
582 200, 108, 131, 105, 262, 198, 196, 195, 248, 262,
583 262, 262, 262, 194, 179, 178, 177, 172, 164, 162,
585 160, 158, 153, 131, 152, 147, 142, 135, 134, 262,
586 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
587 59, 59, 75, 75, 75, 75, 75, 75, 75, 75,
588 75, 75, 75, 75, 77, 77, 77, 77, 77, 77,
589 77, 77, 77, 77, 77, 77, 82, 82, 82, 82,
590 82, 82, 82, 82, 82, 82, 82, 82, 86, 86,
591 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
592 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
593 92, 92, 96, 96, 96, 96, 96, 96, 96, 96,
594 96, 96, 96, 96, 104, 104, 104, 104, 104, 104,
596 104, 104, 104, 104, 104, 104, 107, 133, 126, 107,
597 107, 107, 107, 136, 108, 103, 102, 265, 136, 136,
598 151, 76, 76, 265, 151, 265, 265, 151, 151, 151,
599 151, 151, 154, 154, 154, 154, 154, 154, 154, 154,
600 154, 154, 154, 154, 163, 163, 163, 163, 163, 163,
601 163, 163, 163, 163, 163, 163, 173, 173, 173, 173,
602 173, 173, 173, 173, 173, 173, 173, 173, 176, 176,
603 265, 265, 176, 176, 265, 176, 176, 176, 176, 180,
604 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
605 180, 193, 193, 265, 193, 193, 265, 193, 193, 193,
607 193, 193, 193, 197, 265, 197, 197, 265, 197, 197,
608 199, 265, 265, 265, 265, 199, 199, 216, 265, 216,
609 217, 265, 217, 217, 265, 217, 217, 219, 219, 219,
610 219, 219, 219, 219, 219, 219, 219, 219, 219, 238,
611 265, 238, 239, 265, 265, 265, 265, 239, 239, 240,
612 265, 240, 240, 265, 240, 240, 243, 243, 243, 243,
613 243, 243, 243, 243, 243, 243, 243, 243, 249, 265,
614 249, 249, 250, 265, 265, 265, 265, 250, 250, 253,
615 253, 253, 253, 253, 253, 253, 253, 253, 253, 253,
616 253, 260, 265, 260, 260, 265, 260, 260, 261, 265,
618 265, 265, 265, 261, 261, 263, 265, 263, 263, 265,
619 263, 263, 264, 265, 264, 264, 265, 264, 264, 19,
620 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
621 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
622 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
623 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
624 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
630 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
631 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
632 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
633 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
634 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
635 1, 1, 1, 1, 2, 5, 5, 5, 21, 2,
636 3, 3, 3, 21, 3, 3, 9, 9, 3, 3,
637 3, 26, 26, 3, 28, 3, 10, 10, 10, 64,
638 64, 10, 3, 57, 6, 6, 6, 32, 57, 6,
639 5, 28, 11, 3, 11, 3, 12, 11, 12, 251,
641 32, 12, 54, 33, 13, 13, 5, 13, 251, 3,
642 264, 3, 4, 4, 4, 33, 4, 4, 13, 6,
643 4, 4, 4, 35, 263, 4, 65, 4, 54, 14,
644 14, 51, 14, 35, 4, 6, 261, 13, 52, 15,
645 15, 16, 16, 14, 51, 4, 15, 4, 16, 39,
646 65, 52, 39, 48, 48, 48, 66, 260, 48, 39,
647 258, 4, 14, 4, 17, 17, 65, 255, 39, 69,
648 17, 74, 58, 58, 69, 83, 74, 48, 77, 77,
649 83, 66, 80, 80, 80, 81, 81, 80, 85, 85,
650 101, 101, 17, 17, 17, 17, 17, 66, 104, 104,
652 250, 17, 17, 17, 17, 17, 17, 17, 17, 17,
653 17, 17, 17, 18, 18, 118, 100, 129, 129, 18,
654 58, 100, 140, 140, 130, 249, 130, 143, 118, 130,
655 130, 130, 130, 81, 148, 81, 245, 129, 240, 148,
656 239, 18, 18, 18, 18, 18, 143, 236, 144, 232,
657 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
658 18, 18, 36, 154, 154, 36, 36, 144, 36, 36,
659 36, 36, 36, 36, 36, 137, 137, 137, 156, 229,
660 137, 149, 149, 150, 150, 150, 225, 157, 36, 221,
661 36, 38, 217, 38, 38, 38, 38, 123, 123, 123,
663 123, 216, 156, 201, 159, 38, 38, 38, 38, 159,
664 123, 123, 157, 38, 161, 38, 38, 123, 156, 161,
665 123, 163, 163, 199, 38, 91, 91, 91, 157, 149,
666 166, 166, 166, 171, 171, 166, 168, 168, 168, 167,
667 167, 197, 91, 91, 91, 169, 169, 169, 170, 173,
668 173, 205, 205, 170, 181, 181, 181, 184, 184, 184,
669 219, 219, 196, 91, 91, 183, 91, 222, 91, 91,
670 179, 91, 91, 91, 127, 175, 222, 127, 207, 207,
671 207, 207, 127, 127, 127, 127, 127, 167, 165, 167,
672 158, 207, 207, 155, 222, 152, 127, 127, 207, 139,
674 127, 207, 127, 127, 136, 208, 127, 208, 226, 226,
675 208, 208, 208, 208, 212, 212, 212, 212, 213, 213,
676 214, 214, 214, 214, 223, 223, 223, 212, 212, 227,
677 227, 227, 213, 125, 212, 243, 243, 212, 213, 215,
678 215, 215, 215, 230, 230, 230, 233, 233, 233, 234,
679 234, 234, 124, 215, 237, 237, 237, 253, 253, 215,
680 246, 246, 246, 246, 247, 247, 247, 247, 248, 248,
681 248, 248, 256, 256, 256, 122, 121, 120, 247, 119,
682 111, 107, 248, 106, 247, 99, 97, 95, 248, 262,
683 262, 262, 262, 94, 90, 89, 88, 84, 79, 76,
685 71, 68, 62, 262, 60, 56, 50, 44, 43, 262,
686 266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
687 266, 266, 267, 267, 267, 267, 267, 267, 267, 267,
688 267, 267, 267, 267, 268, 268, 268, 268, 268, 268,
689 268, 268, 268, 268, 268, 268, 269, 269, 269, 269,
690 269, 269, 269, 269, 269, 269, 269, 269, 270, 270,
691 270, 270, 270, 270, 270, 270, 270, 270, 270, 270,
692 271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
693 271, 271, 272, 272, 272, 272, 272, 272, 272, 272,
694 272, 272, 272, 272, 273, 273, 273, 273, 273, 273,
696 273, 273, 273, 273, 273, 273, 274, 42, 37, 274,
697 274, 274, 274, 275, 27, 24, 23, 19, 275, 275,
698 276, 8, 7, 0, 276, 0, 0, 276, 276, 276,
699 276, 276, 277, 277, 277, 277, 277, 277, 277, 277,
700 277, 277, 277, 277, 278, 278, 278, 278, 278, 278,
701 278, 278, 278, 278, 278, 278, 279, 279, 279, 279,
702 279, 279, 279, 279, 279, 279, 279, 279, 280, 280,
703 0, 0, 280, 280, 0, 280, 280, 280, 280, 281,
704 281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
705 281, 282, 282, 0, 282, 282, 0, 282, 282, 282,
707 282, 282, 282, 283, 0, 283, 283, 0, 283, 283,
708 284, 0, 0, 0, 0, 284, 284, 285, 0, 285,
709 286, 0, 286, 286, 0, 286, 286, 287, 287, 287,
710 287, 287, 287, 287, 287, 287, 287, 287, 287, 288,
711 0, 288, 289, 0, 0, 0, 0, 289, 289, 290,
712 0, 290, 290, 0, 290, 290, 291, 291, 291, 291,
713 291, 291, 291, 291, 291, 291, 291, 291, 292, 0,
714 292, 292, 293, 0, 0, 0, 0, 293, 293, 294,
715 294, 294, 294, 294, 294, 294, 294, 294, 294, 294,
716 294, 295, 0, 295, 295, 0, 295, 295, 296, 0,
718 0, 0, 0, 296, 296, 297, 0, 297, 297, 0,
719 297, 297, 298, 0, 298, 298, 0, 298, 298, 265,
720 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
721 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
722 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
723 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
724 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
731 #define REJECT reject_used_but_not_detected
732 #define yymore() yymore_used_but_not_detected
733 #define YY_MORE_ADJ 0
734 #define YY_RESTORE_YY_MORE_OFFSET
735 #line 1 "../libinterp/parse-tree/lex.ll"
776 #line 82 "../libinterp/parse-tree/lex.ll"
824 #if defined (OCTAVE_STYPE_IS_DECLARED) && ! defined YYSTYPE
825 # define YYSTYPE OCTAVE_STYPE
828 #define YY_NO_UNISTD_H 1
829 #define isatty octave_isatty_wrapper
831 #if ! (defined (FLEX_SCANNER) \
832 && defined (YY_FLEX_MAJOR_VERSION) && YY_FLEX_MAJOR_VERSION >= 2 \
833 && defined (YY_FLEX_MINOR_VERSION) && YY_FLEX_MINOR_VERSION >= 5)
834 #error lex.l requires flex version 2.5.4 or later
837 #define YY_EXTRA_TYPE octave::base_lexer *
838 #define curr_lexer yyextra
842 #if defined (YY_INPUT)
845 #define YY_INPUT(buf, result, max_size) \
846 result = curr_lexer->fill_flex_buffer (buf, max_size)
850 #if defined (YY_FATAL_ERROR)
851 # undef YY_FATAL_ERROR
853 #define YY_FATAL_ERROR(msg) \
854 (octave_get_extra (yyscanner))->fatal_error (msg)
856 #define CMD_OR_OP(PATTERN, TOK, COMPAT) \
859 curr_lexer->lexer_debug (PATTERN); \
861 if (curr_lexer->looks_like_command_arg ()) \
864 curr_lexer->push_start_state (COMMAND_START); \
868 return curr_lexer->handle_op_internal (TOK, false, COMPAT); \
873 #define CMD_OR_COMPUTED_ASSIGN_OP(PATTERN, TOK) \
876 curr_lexer->lexer_debug (PATTERN); \
878 if (curr_lexer->previous_token_may_be_command () \
879 && curr_lexer->space_follows_previous_token ()) \
882 curr_lexer->push_start_state (COMMAND_START); \
886 return curr_lexer->handle_language_extension_op (PATTERN, TOK, \
892 #define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT) \
895 curr_lexer->lexer_debug (PATTERN); \
897 if (curr_lexer->previous_token_may_be_command ()) \
899 if (curr_lexer->looks_like_command_arg ()) \
902 curr_lexer->push_start_state (COMMAND_START); \
906 return curr_lexer->handle_op_internal (TOK, false, COMPAT); \
913 ? curr_lexer->handle_unary_op (TOK) \
914 : curr_lexer->handle_language_extension_unary_op (TOK)); \
919 curr_lexer->xunput (','); \
921 curr_lexer->current_input_column--; \
937 #define HANDLE_STRING_CONTINUATION \
940 curr_lexer->decrement_promptflag (); \
941 curr_lexer->input_line_number++; \
942 curr_lexer->current_input_column = 1; \
944 if (curr_lexer->is_push_lexer ()) \
946 if (curr_lexer->at_end_of_buffer ()) \
949 if (curr_lexer->at_end_of_file ()) \
950 return curr_lexer->handle_end_of_input (); \
959 #define COMMAND_ARG_FINISH \
962 if (curr_lexer->string_text.empty ()) \
965 int retval = curr_lexer->handle_token (curr_lexer->string_text, \
968 curr_lexer->string_text = ""; \
969 curr_lexer->command_arg_paren_count = 0; \
977 #define HANDLE_IDENTIFIER(pattern, get_set) \
980 curr_lexer->lexer_debug (pattern); \
982 int tok = curr_lexer->previous_token_value (); \
984 if (curr_lexer->whitespace_is_significant () \
985 && curr_lexer->space_follows_previous_token () \
986 && ! (tok == '[' || tok == '{' \
987 || curr_lexer->previous_token_is_binop ())) \
994 if (! curr_lexer->looking_at_decl_list \
995 && curr_lexer->previous_token_may_be_command ()) \
998 curr_lexer->push_start_state (COMMAND_START); \
1005 curr_lexer->maybe_classdef_get_set_method = false; \
1008 int id_tok = curr_lexer->handle_identifier (); \
1011 return curr_lexer->count_token_internal (id_tok); \
1024 #line 1025 "libinterp/parse-tree/lex.cc"
1027 #define COMMAND_START 1
1028 #define MATRIX_START 2
1029 #define INPUT_FILE_START 3
1030 #define BLOCK_COMMENT_START 4
1031 #define LINE_COMMENT_START 5
1032 #define DQ_STRING_START 6
1033 #define SQ_STRING_START 7
1034 #define FQ_IDENT_START 8
1036 #ifndef YY_NO_UNISTD_H
1044 #ifndef YY_EXTRA_TYPE
1045 #define YY_EXTRA_TYPE void *
1088 # define yylval yyg->yylval_r
1135 #ifndef YY_SKIP_YYWRAP
1150 static void yy_flex_strncpy (
char *,
yyconst char *,
int ,
yyscan_t yyscanner);
1153 #ifdef YY_NEED_STRLEN
1160 static int yyinput (
yyscan_t yyscanner );
1168 #ifndef YY_READ_BUF_SIZE
1171 #define YY_READ_BUF_SIZE 16384
1173 #define YY_READ_BUF_SIZE 8192
1182 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1189 #define YY_INPUT(buf,result,max_size) \
1190 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1194 for ( n = 0; n < max_size && \
1195 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1196 buf[n] = (char) c; \
1198 buf[n++] = (char) c; \
1199 if ( c == EOF && ferror( yyin ) ) \
1200 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1206 while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1208 if( errno != EINTR) \
1210 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1226 #define yyterminate() return YY_NULL
1230 #ifndef YY_START_STACK_INCR
1231 #define YY_START_STACK_INCR 25
1235 #ifndef YY_FATAL_ERROR
1236 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1245 #define YY_DECL_IS_OURS 1
1250 #define YY_DECL int octave_lex \
1251 (YYSTYPE * yylval_param , yyscan_t yyscanner)
1257 #ifndef YY_USER_ACTION
1258 #define YY_USER_ACTION
1263 #define YY_BREAK break;
1266 #define YY_RULE_SETUP \
1268 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1269 (yytext[yyleng - 1] == '\n'); \
1277 char *yy_cp, *yy_bp;
1310 #line 348 "../libinterp/parse-tree/lex.ll"
1318 #line 1319 "libinterp/parse-tree/lex.cc"
1343 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
1345 yy_current_state = (
int)
yy_def[yy_current_state];
1346 if ( yy_current_state >= 266 )
1352 while (
yy_base[yy_current_state] != 820 );
1374 goto yy_find_action;
1379 #line 355 "../libinterp/parse-tree/lex.ll"
1381 curr_lexer->lexer_debug (
"<INPUT_FILE_START>{ANY_INCLUDING_NL}");
1395 #line 369 "../libinterp/parse-tree/lex.ll"
1397 curr_lexer->lexer_debug (
"<INPUT_FILE_START><<EOF>>");
1418 #line 390 "../libinterp/parse-tree/lex.ll"
1420 curr_lexer->lexer_debug (
"<COMMAND_START>(\\.\\.\\.){ANY_EXCEPT_NL}*{NL}");
1436 #line 405 "../libinterp/parse-tree/lex.ll"
1438 curr_lexer->lexer_debug (
"<COMMAND_START>({CCHAR}{ANY_EXCEPT_NL}*)?{NL}");
1444 curr_lexer->looking_for_object_index =
false;
1445 curr_lexer->at_beginning_of_statement =
true;
1453 #line 419 "../libinterp/parse-tree/lex.ll"
1455 curr_lexer->lexer_debug (
"<COMMAND_START>[\\,\\;]");
1460 curr_lexer->looking_for_object_index =
false;
1461 curr_lexer->at_beginning_of_statement =
true;
1478 #line 442 "../libinterp/parse-tree/lex.ll"
1480 curr_lexer->lexer_debug (
"<COMMAND_START>[\\(\\[\\{]+");
1489 #line 450 "../libinterp/parse-tree/lex.ll"
1491 curr_lexer->lexer_debug (
"<COMMAND_START>[\\)\\]\\}]+");
1511 #line 470 "../libinterp/parse-tree/lex.ll"
1513 curr_lexer->lexer_debug (
"<COMMAND_START>[\\\"\\']");
1515 if (
curr_lexer->command_arg_paren_count == 0)
1531 #line 488 "../libinterp/parse-tree/lex.ll"
1533 curr_lexer->lexer_debug (
"<COMMAND_START>{S}*");
1535 if (
curr_lexer->command_arg_paren_count == 0)
1548 #line 503 "../libinterp/parse-tree/lex.ll"
1550 curr_lexer->lexer_debug (
"<COMMAND_START>([\\.]|[^#% \\t\\r\\n\\.\\,\\;\\\"\\'\\(\\[\\{\\}\\]\\)]*");
1558 #line 510 "../libinterp/parse-tree/lex.ll"
1560 curr_lexer->lexer_debug (
"<MATRIX_START>{S}*");
1562 curr_lexer->mark_previous_token_trailing_space ();
1568 #line 516 "../libinterp/parse-tree/lex.ll"
1570 curr_lexer->lexer_debug (
"<MATRIX_START>{NL}");
1576 curr_lexer->warn_language_extension (
"bare newline inside parentheses");
1579 int tok =
curr_lexer->previous_token_value ();
1581 if (! (tok ==
';' || tok ==
'[' || tok ==
'{'))
1605 #line 551 "../libinterp/parse-tree/lex.ll"
1607 curr_lexer->lexer_debug (
"<MATRIX_START>\\]");
1609 curr_lexer->looking_at_object_index.pop_front ();
1612 curr_lexer->at_beginning_of_statement =
false;
1624 #line 568 "../libinterp/parse-tree/lex.ll"
1626 curr_lexer->lexer_debug (
"<MATRIX_START>\\}*");
1628 curr_lexer->looking_at_object_index.pop_front ();
1631 curr_lexer->at_beginning_of_statement =
false;
1640 #line 581 "../libinterp/parse-tree/lex.ll"
1644 bool unput_comma =
false;
1647 &&
curr_lexer->space_follows_previous_token ())
1649 int tok =
curr_lexer->previous_token_value ();
1651 if (! (tok ==
'[' || tok ==
'{'
1667 curr_lexer->looking_at_object_index.push_front (
false);
1670 curr_lexer->looking_for_object_index =
false;
1671 curr_lexer->at_beginning_of_statement =
false;
1674 && !
curr_lexer->parsed_function_name.top ())
1677 curr_lexer->looking_at_matrix_or_assign_lhs =
true;
1691 #line 629 "../libinterp/parse-tree/lex.ll"
1697 curr_lexer->looking_at_object_index.pop_front ();
1700 curr_lexer->at_beginning_of_statement =
false;
1716 #line 652 "../libinterp/parse-tree/lex.ll"
1718 curr_lexer->lexer_debug (
"^{S}*{CCHAR}\\{{S}*{NL}");
1739 #line 671 "../libinterp/parse-tree/lex.ll"
1741 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>^{S}*{CCHAR}\\{{S}*{NL}");
1760 #line 689 "../libinterp/parse-tree/lex.ll"
1762 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>^{S}*{CCHAR}\\}{S}*{NL}");
1767 if (
curr_lexer->block_comment_nesting_level > 1)
1774 if (
curr_lexer->block_comment_nesting_level == 0)
1788 #line 714 "../libinterp/parse-tree/lex.ll"
1790 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>{ANY_EXCEPT_NL}*{NL}");
1803 #line 726 "../libinterp/parse-tree/lex.ll"
1805 curr_lexer->lexer_debug (
"{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
1814 #line 733 "../libinterp/parse-tree/lex.ll"
1816 curr_lexer->lexer_debug (
"<LINE_COMMENT_START>{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
1818 bool full_line_comment =
curr_lexer->current_input_column == 1;
1822 bool have_space =
false;
1828 if (c ==
' ' || c ==
'\t')
1837 size_t num_comment_chars = 0;
1842 if (c ==
'#' || c ==
'%')
1844 num_comment_chars++;
1853 if (full_line_comment)
1855 if (num_comment_chars == 1 &&
yytext[i++] ==
'{')
1857 bool looks_like_block_comment =
true;
1862 if (! (c ==
' ' || c ==
'\t' || c ==
'\n' || c ==
'\r'))
1864 looks_like_block_comment =
false;
1869 if (looks_like_block_comment)
1882 curr_lexer->mark_previous_token_trailing_space ();
1899 #line 815 "../libinterp/parse-tree/lex.ll"
1901 curr_lexer->lexer_debug (
"<LINE_COMMENT_START>{ANY_INCLUDING_NL}");
1914 #line 829 "../libinterp/parse-tree/lex.ll"
1916 curr_lexer->lexer_debug (
"<LINE_COMMENT_START><<EOF>>");
1928 #line 841 "../libinterp/parse-tree/lex.ll"
1930 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\"\\\"");
1938 #line 848 "../libinterp/parse-tree/lex.ll"
1940 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\"");
1949 curr_lexer->at_beginning_of_statement =
false;
1964 #line 871 "../libinterp/parse-tree/lex.ll"
1966 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\[0-7]{1,3}");
1971 sscanf (
yytext+1,
"%o", &result);
1977 "invalid octal escape sequence in character string",
1991 #line 895 "../libinterp/parse-tree/lex.ll"
1993 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\x[0-9a-fA-F]+");
1998 sscanf (
yytext+2,
"%x", &result);
2009 #line 910 "../libinterp/parse-tree/lex.ll"
2011 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\a\"");
2019 #line 917 "../libinterp/parse-tree/lex.ll"
2021 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\b\"");
2029 #line 924 "../libinterp/parse-tree/lex.ll"
2031 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\f\"");
2039 #line 931 "../libinterp/parse-tree/lex.ll"
2041 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\n\"");
2049 #line 938 "../libinterp/parse-tree/lex.ll"
2051 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\r\"");
2059 #line 945 "../libinterp/parse-tree/lex.ll"
2061 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\t\"");
2069 #line 952 "../libinterp/parse-tree/lex.ll"
2071 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\v\"");
2080 #line 959 "../libinterp/parse-tree/lex.ll"
2082 curr_lexer->lexer_debug (
"<DQ_STRING_START>(\\.\\.\\.){S}*{NL}");
2084 static const char *msg =
"'...' continuations in double-quoted character strings are obsolete and will not be allowed in a future version of Octave; please use '\\' instead";
2092 "%s; near line %d of file '%s'", msg,
2101 #line 976 "../libinterp/parse-tree/lex.ll"
2103 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\{S}+{NL}");
2105 static const char *msg =
"white space and comments after continuation markers in double-quoted character strings are obsolete and will not be allowed in a future version of Octave";
2113 "%s; near line %d of file '%s'", msg,
2122 #line 993 "../libinterp/parse-tree/lex.ll"
2124 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\{NL}");
2131 #line 999 "../libinterp/parse-tree/lex.ll"
2133 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\.");
2141 #line 1006 "../libinterp/parse-tree/lex.ll"
2143 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\.");
2151 #line 1013 "../libinterp/parse-tree/lex.ll"
2153 curr_lexer->lexer_debug (
"<DQ_STRING_START>[^\\.\\\\\\r\\n\\\"]+");
2162 #line 1020 "../libinterp/parse-tree/lex.ll"
2164 curr_lexer->lexer_debug (
"<DQ_STRING_START>{NL}");
2167 "unterminated character string constant",
2184 #line 1040 "../libinterp/parse-tree/lex.ll"
2186 curr_lexer->lexer_debug (
"<SQ_STRING_START>\\'\\'");
2194 #line 1047 "../libinterp/parse-tree/lex.ll"
2196 curr_lexer->lexer_debug (
"<SQ_STRING_START>\\'");
2205 curr_lexer->at_beginning_of_statement =
false;
2220 #line 1070 "../libinterp/parse-tree/lex.ll"
2222 curr_lexer->lexer_debug (
"<SQ_STRING_START>[^\\'\\n\\r]+");
2231 #line 1077 "../libinterp/parse-tree/lex.ll"
2233 curr_lexer->lexer_debug (
"<SQ_STRING_START>{NL}");
2236 "unterminated character string constant",
2253 #line 1097 "../libinterp/parse-tree/lex.ll"
2255 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{FQIDENT}");
2258 int id_tok =
curr_lexer->handle_fq_identifier ();
2264 return curr_lexer->count_token_internal (id_tok);
2270 #line 1111 "../libinterp/parse-tree/lex.ll"
2274 curr_lexer->mark_previous_token_trailing_space ();
2279 #line 1117 "../libinterp/parse-tree/lex.ll"
2290 #line 1126 "../libinterp/parse-tree/lex.ll"
2294 if (
curr_lexer->previous_token_may_be_command ()
2295 &&
curr_lexer->space_follows_previous_token ())
2302 int tok =
curr_lexer->previous_token_value ();
2305 &&
curr_lexer->space_follows_previous_token ()
2306 && ! (tok ==
'[' || tok ==
'{'
2328 #line 1161 "../libinterp/parse-tree/lex.ll"
2331 #line 1161 "../libinterp/parse-tree/lex.ll"
2333 curr_lexer->lexer_debug (
"{D}{D_}*/\\.[\\*/\\\\^\\']|{NUMBER}");
2335 if (
curr_lexer->previous_token_may_be_command ()
2336 &&
curr_lexer->space_follows_previous_token ())
2343 int tok =
curr_lexer->previous_token_value ();
2346 &&
curr_lexer->space_follows_previous_token ()
2347 && ! (tok ==
'[' || tok ==
'{'
2367 #line 1195 "../libinterp/parse-tree/lex.ll"
2371 curr_lexer->mark_previous_token_trailing_space ();
2380 #line 1205 "../libinterp/parse-tree/lex.ll"
2382 curr_lexer->lexer_debug (
"\\.\\.\\.{ANY_EXCEPT_NL}*{NL}");
2392 #line 1216 "../libinterp/parse-tree/lex.ll"
2396 #line 1216 "../libinterp/parse-tree/lex.ll"
2398 curr_lexer->lexer_debug (
"\\\\{S}*{NL}|\\\\{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
2400 static const char *msg =
"using continuation marker \\ outside of double quoted strings is deprecated and will be removed from a future version of Octave, use ... instead";
2408 "%s; near line %d of file '%s'", msg,
2424 #line 1237 "../libinterp/parse-tree/lex.ll"
2437 #line 1248 "../libinterp/parse-tree/lex.ll"
2444 #line 1252 "../libinterp/parse-tree/lex.ll"
2454 #line 1260 "../libinterp/parse-tree/lex.ll"
2456 curr_lexer->lexer_debug (
"{IDENT}@{FQIDENT}");
2458 if (
curr_lexer->previous_token_may_be_command ())
2465 int id_tok =
curr_lexer->handle_superclass_identifier ();
2471 return curr_lexer->count_token_internal (id_tok);
2481 #line 1285 "../libinterp/parse-tree/lex.ll"
2485 if (
curr_lexer->previous_token_may_be_command ()
2486 &&
curr_lexer->space_follows_previous_token ())
2493 int id_tok =
curr_lexer->handle_meta_identifier ();
2499 return curr_lexer->count_token_internal (id_tok);
2506 #line 1307 "../libinterp/parse-tree/lex.ll"
2510 if (
curr_lexer->previous_token_may_be_command ()
2511 &&
curr_lexer->space_follows_previous_token ())
2518 int tok =
curr_lexer->previous_token_value ();
2521 &&
curr_lexer->space_follows_previous_token ()
2522 && ! (tok ==
'[' || tok ==
'{'
2533 curr_lexer->looking_for_object_index =
false;
2534 curr_lexer->at_beginning_of_statement =
false;
2549 #line 1347 "../libinterp/parse-tree/lex.ll"
2558 curr_lexer->at_beginning_of_statement =
false;
2560 (
"bare newline inside parentheses");
2563 ||
curr_lexer->nesting_level.is_anon_fcn_body ())
2568 curr_lexer->at_beginning_of_statement =
true;
2572 else if (
curr_lexer->nesting_level.is_bracket_or_brace ())
2575 "unexpected internal lexer error",
2594 #line 1390 "../libinterp/parse-tree/lex.ll"
2598 if (
curr_lexer->previous_token_may_be_command ()
2599 &&
curr_lexer->space_follows_previous_token ())
2605 else if (
curr_lexer->at_beginning_of_statement)
2612 int tok =
curr_lexer->previous_token_value ();
2614 if (
curr_lexer->whitespace_is_significant ())
2616 if (
curr_lexer->space_follows_previous_token ())
2618 if (tok ==
'[' || tok ==
'{'
2634 if (tok ==
'[' || tok ==
'{'
2647 if (! tok || tok ==
'[' || tok ==
'{' || tok ==
'('
2665 #line 1459 "../libinterp/parse-tree/lex.ll"
2669 if (
curr_lexer->previous_token_may_be_command ()
2670 &&
curr_lexer->space_follows_previous_token ())
2678 int tok =
curr_lexer->previous_token_value ();
2680 if (
curr_lexer->whitespace_is_significant ())
2682 if (
curr_lexer->space_follows_previous_token ())
2684 if (tok ==
'[' || tok ==
'{'
2717 #line 1509 "../libinterp/parse-tree/lex.ll"
2722 #line 1510 "../libinterp/parse-tree/lex.ll"
2727 #line 1511 "../libinterp/parse-tree/lex.ll"
2732 #line 1512 "../libinterp/parse-tree/lex.ll"
2737 #line 1513 "../libinterp/parse-tree/lex.ll"
2742 #line 1514 "../libinterp/parse-tree/lex.ll"
2747 #line 1515 "../libinterp/parse-tree/lex.ll"
2752 #line 1516 "../libinterp/parse-tree/lex.ll"
2757 #line 1517 "../libinterp/parse-tree/lex.ll"
2762 #line 1518 "../libinterp/parse-tree/lex.ll"
2767 #line 1519 "../libinterp/parse-tree/lex.ll"
2772 #line 1520 "../libinterp/parse-tree/lex.ll"
2777 #line 1521 "../libinterp/parse-tree/lex.ll"
2782 #line 1522 "../libinterp/parse-tree/lex.ll"
2787 #line 1523 "../libinterp/parse-tree/lex.ll"
2792 #line 1524 "../libinterp/parse-tree/lex.ll"
2797 #line 1525 "../libinterp/parse-tree/lex.ll"
2802 #line 1526 "../libinterp/parse-tree/lex.ll"
2807 #line 1527 "../libinterp/parse-tree/lex.ll"
2815 #line 1533 "../libinterp/parse-tree/lex.ll"
2820 #line 1535 "../libinterp/parse-tree/lex.ll"
2825 #line 1536 "../libinterp/parse-tree/lex.ll"
2830 #line 1537 "../libinterp/parse-tree/lex.ll"
2835 #line 1538 "../libinterp/parse-tree/lex.ll"
2840 #line 1540 "../libinterp/parse-tree/lex.ll"
2842 bool at_beginning_of_statement
2843 = (! (
curr_lexer->whitespace_is_significant ()
2844 ||
curr_lexer->looking_at_object_index.front ()));
2846 return curr_lexer->handle_op (
";",
';', at_beginning_of_statement);
2851 #line 1548 "../libinterp/parse-tree/lex.ll"
2856 #line 1549 "../libinterp/parse-tree/lex.ll"
2861 #line 1551 "../libinterp/parse-tree/lex.ll"
2866 #line 1552 "../libinterp/parse-tree/lex.ll"
2871 #line 1554 "../libinterp/parse-tree/lex.ll"
2873 bool at_beginning_of_statement
2874 = (! (
curr_lexer->whitespace_is_significant ()
2875 ||
curr_lexer->looking_at_object_index.front ()));
2877 return curr_lexer->handle_op (
",",
',', at_beginning_of_statement);
2882 #line 1562 "../libinterp/parse-tree/lex.ll"
2889 #line 1566 "../libinterp/parse-tree/lex.ll"
2894 #line 1567 "../libinterp/parse-tree/lex.ll"
2899 #line 1569 "../libinterp/parse-tree/lex.ll"
2903 bool unput_comma =
false;
2906 &&
curr_lexer->space_follows_previous_token ())
2908 int tok =
curr_lexer->previous_token_value ();
2910 if (! (tok ==
'[' || tok ==
'{'
2929 curr_lexer->looking_at_object_index.push_front
2933 curr_lexer->looking_for_object_index =
false;
2934 curr_lexer->at_beginning_of_statement =
false;
2945 #line 1612 "../libinterp/parse-tree/lex.ll"
2952 curr_lexer->looking_at_object_index.pop_front ();
2955 curr_lexer->at_beginning_of_statement =
false;
2959 curr_lexer->looking_at_anon_fcn_args =
false;
2968 #line 1632 "../libinterp/parse-tree/lex.ll"
2972 if (
curr_lexer->previous_token_may_be_command ()
2973 &&
curr_lexer->space_follows_previous_token ())
2980 curr_lexer->looking_for_object_index =
false;
2981 curr_lexer->at_beginning_of_statement =
false;
2992 #line 1654 "../libinterp/parse-tree/lex.ll"
2994 curr_lexer->maybe_mark_previous_token_as_variable ();
3001 #line 1660 "../libinterp/parse-tree/lex.ll"
3006 #line 1661 "../libinterp/parse-tree/lex.ll"
3011 #line 1662 "../libinterp/parse-tree/lex.ll"
3016 #line 1663 "../libinterp/parse-tree/lex.ll"
3021 #line 1664 "../libinterp/parse-tree/lex.ll"
3026 #line 1665 "../libinterp/parse-tree/lex.ll"
3031 #line 1666 "../libinterp/parse-tree/lex.ll"
3036 #line 1667 "../libinterp/parse-tree/lex.ll"
3041 #line 1668 "../libinterp/parse-tree/lex.ll"
3046 #line 1669 "../libinterp/parse-tree/lex.ll"
3051 #line 1670 "../libinterp/parse-tree/lex.ll"
3056 #line 1671 "../libinterp/parse-tree/lex.ll"
3061 #line 1672 "../libinterp/parse-tree/lex.ll"
3066 #line 1673 "../libinterp/parse-tree/lex.ll"
3071 #line 1674 "../libinterp/parse-tree/lex.ll"
3076 #line 1675 "../libinterp/parse-tree/lex.ll"
3084 #line 1681 "../libinterp/parse-tree/lex.ll"
3088 bool unput_comma =
false;
3091 &&
curr_lexer->space_follows_previous_token ())
3093 int tok =
curr_lexer->previous_token_value ();
3095 if (! (tok ==
'[' || tok ==
'{'
3111 curr_lexer->looking_at_object_index.push_front
3115 curr_lexer->looking_for_object_index =
false;
3116 curr_lexer->at_beginning_of_statement =
false;
3130 #line 1724 "../libinterp/parse-tree/lex.ll"
3134 curr_lexer->looking_at_object_index.pop_front ();
3137 curr_lexer->at_beginning_of_statement =
false;
3149 #line 1741 "../libinterp/parse-tree/lex.ll"
3163 std::ostringstream buf;
3165 buf <<
"invalid character '"
3167 <<
"' (ASCII " << c <<
")";
3182 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
3184 #pragma GCC diagnostic push
3185 #pragma GCC diagnostic ignored "-Wold-style-cast"
3189 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
3192 #pragma GCC diagnostic ignored "-Wunused-parameter"
3197 #line 1788 "../libinterp/parse-tree/lex.ll"
3200 #line 3201 "libinterp/parse-tree/lex.cc"
3205 int yy_amount_of_matched_text = (
int) (yy_cp - yyg->yytext_ptr) - 1;
3238 yyg->
yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
3255 if ( yy_next_state )
3259 yy_current_state = yy_next_state;
3266 goto yy_find_action;
3303 yyg->yytext_ptr + yy_amount_of_matched_text;
3319 goto yy_find_action;
3326 "fatal flex scanner internal error--no action found" );
3343 char *source = yyg->yytext_ptr;
3349 "fatal flex scanner internal error--end of buffer missed" );
3375 for ( i = 0; i < number_to_move; ++
i )
3376 *(dest++) = *(source++);
3389 while ( num_to_read <= 0 )
3395 int yy_c_buf_p_offset =
3402 if ( new_size <= 0 )
3417 "fatal error - scanner input buffer overflow" );
3460 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
3491 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
3493 yy_current_state = (
int)
yy_def[yy_current_state];
3494 if ( yy_current_state >= 266 )
3500 return yy_current_state;
3520 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
3522 yy_current_state = (
int)
yy_def[yy_current_state];
3523 if ( yy_current_state >= 266 )
3527 yy_is_jam = (yy_current_state == 265);
3530 return yy_is_jam ? 0 : yy_current_state;
3545 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3555 *--dest = *--source;
3557 yy_cp += (
int) (dest - source);
3558 yy_bp += (
int) (dest - source);
3562 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3566 *--yy_cp = (char) c;
3568 yyg->yytext_ptr = yy_bp;
3577 static int yyinput (
yyscan_t yyscanner)
3600 int offset = yyg->
yy_c_buf_p - yyg->yytext_ptr;
3629 return yyinput(yyscanner);
3631 return input(yyscanner);
3728 YY_FATAL_ERROR(
"out of dynamic memory in octave__create_buffer()" );
3737 YY_FATAL_ERROR(
"out of dynamic memory in octave__create_buffer()" );
3832 if (new_buffer == NULL)
3896 YY_FATAL_ERROR(
"out of dynamic memory in octave_ensure_buffer_stack()" );
3916 YY_FATAL_ERROR(
"out of dynamic memory in octave_ensure_buffer_stack()" );
3942 YY_FATAL_ERROR(
"out of dynamic memory in octave__scan_buffer()" );
3991 YY_FATAL_ERROR(
"out of dynamic memory in octave__scan_bytes()" );
3993 for ( i = 0; i < _yybytes_len; ++
i )
3994 buf[i] = yybytes[i];
4010 #ifndef YY_EXIT_FAILURE
4011 #define YY_EXIT_FAILURE 2
4018 (void) fprintf( stderr,
"%s\n", msg );
4029 int yyless_macro_arg = (n); \
4030 YY_LESS_LINENO(yyless_macro_arg);\
4031 yytext[yyleng] = yyg->yy_hold_char; \
4032 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
4033 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
4034 *yyg->yy_c_buf_p = '\0'; \
4035 yyleng = yyless_macro_arg; \
4207 if (ptr_yy_globals == NULL){
4214 if (*ptr_yy_globals == NULL){
4220 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
4240 if (ptr_yy_globals == NULL){
4247 if (*ptr_yy_globals == NULL){
4254 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
4329 static void yy_flex_strncpy (
char* s1,
yyconst char *
s2,
int n ,
yyscan_t yyscanner)
4335 for ( i = 0; i < n; ++
i )
4340 #ifdef YY_NEED_STRLEN
4344 for ( n = 0; s[n]; ++n )
4351 #define YYTABLES_NAME "yytables"
4353 #line 1788 "../libinterp/parse-tree/lex.ll"
4357 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
4359 #pragma GCC diagnostic pop
4371 return std::realloc (ptr, size);
4517 std::cerr <<
"SPACE";
4540 && ! (s ==
"set" || s ==
"get"
4541 || s ==
"enumeration" || s ==
"events"
4542 || s ==
"methods" || s ==
"properties"));
4576 if (kword !=
"set" && kword !=
"get")
4617 DEFUN (__token_count__, , ,
4639 "__lexer_debug_flag__");
4746 return (tok ==
'+' || tok ==
'-' || tok ==
'@'
4747 || tok ==
',' || tok ==
';' || tok ==
'*' || tok ==
'/'
4787 for (std::list<std::string>::const_iterator
p = lst.begin ();
4788 p != lst.end ();
p++)
4798 bool retval =
false;
4802 size_t offset = s.find_first_not_of (
" \t");
4804 retval = (s.substr (offset, 9) ==
"Copyright" || s.substr (offset, 6) ==
"Author");
4824 static const char *
const eol =
"\n";
4826 size_t len = max_size > chars_left ? chars_left : max_size;
4829 memcpy (buf, pos, len);
4835 if (chars_left == 0 && buf[len-1] !=
'\n')
4879 #define OCTAVE_YYG \
4880 struct yyguts_t *yyg = static_cast<struct yyguts_t*> (scanner)
4896 if (octave::application::interactive ()
4932 warning (
"block comment open at end of input");
4936 warning (
"near line %d of file '%s.m'",
4960 if (lexer_debug_flag)
4964 std::cerr << std::endl;
4973 if (lexer_debug_flag)
4977 std::cerr << std::endl;
4995 if (lexer_debug_flag)
4999 std::cerr << std::endl;
5019 return (c ==
' ' || c ==
'\t');
5025 bool retval =
false;
5057 int len = s.length ();
5270 tok_val =
new token (kw->
tok,
true, l, c);
5290 p2 = s.find (
'.', p1);
5292 if (p2 != std::string::npos)
5294 s_part = s.substr (p1, p2 - p1);
5298 s_part = s.substr (p1);
5303 while (p2 != std::string::npos);
5320 return (len > 2 && s[0] ==
'0' && (s[1] ==
'b' || s[1] ==
'B'));
5326 return (len > 2 && s[0] ==
'0' && (s[1] ==
'x' || s[1] ==
'X'));
5340 char *tmptxt =
strsave (yytxt);
5341 char *rptr = tmptxt;
5342 char *wptr = tmptxt;
5346 wptr += (*wptr !=
'_');
5352 uintmax_t long_int_value;
5354 nread = sscanf (tmptxt,
"%jx", &long_int_value);
5356 value =
static_cast<double> (long_int_value);
5360 uintmax_t long_int_value = 0;
5362 for (
size_t i = 0; i <
strlen (tmptxt); i++)
5364 if (tmptxt[i] ==
'0')
5365 long_int_value <<= 1;
5366 else if (tmptxt[i] ==
'1')
5368 long_int_value <<= 1;
5369 long_int_value += 1;
5373 value =
static_cast<double> (long_int_value);
5379 char *idx = strpbrk (tmptxt,
"Dd");
5384 nread = sscanf (tmptxt,
"%lf", &value);
5391 assert (nread == 1);
5409 if (yytxt[0] ==
'\\')
5414 bool have_space =
false;
5415 while (offset < yylng)
5417 char c = yytxt[offset];
5418 if (c ==
' ' || c ==
'\t')
5430 bool have_comment =
false;
5431 while (offset < yylng)
5433 char c = yytxt[offset];
5434 if (c ==
'#' || c ==
'%')
5436 have_comment =
true;
5485 int retval = bracket_type;
5491 if (bracket_type ==
']')
5493 else if (bracket_type ==
'}')
5510 return (space_before && ! space_after
5519 size_t pos = meth.find (
"@");
5521 meth = meth.substr (0, pos);
5530 "method, class, and package names may not be keywords",
5554 "class and package names may not be keywords",
5578 "function, method, class, and package names may not be keywords",
5631 "function handles may not refer to keywords",
5684 || ident ==
"e" || ident ==
"pi"
5685 || ident ==
"I" || ident ==
"i"
5686 || ident ==
"J" || ident ==
"j"
5687 || ident ==
"Inf" || ident ==
"inf"
5688 || ident ==
"NaN" || ident ==
"nan")))
5712 "potential auto-insertion of '%c' near line %d",
5716 "potential auto-insertion of '%c' near line %d of file %s",
5727 "single quote delimited string near line %d",
5731 "single quote delimited string near line %d of file %s",
5742 "Octave language extension used: %s",
5746 "Octave language extension used: %s near line %d offile %s",
5767 int n = t.length ();
5777 lval->tok_val = tok;
5785 return lval->tok_val;
5793 case '=': std::cerr <<
"'='\n";
break;
5794 case ':': std::cerr <<
"':'\n";
break;
5795 case '-': std::cerr <<
"'-'\n";
break;
5796 case '+': std::cerr <<
"'+'\n";
break;
5797 case '*': std::cerr <<
"'*'\n";
break;
5798 case '/': std::cerr <<
"'/'\n";
break;
5799 case ADD_EQ: std::cerr <<
"ADD_EQ\n";
break;
5800 case SUB_EQ: std::cerr <<
"SUB_EQ\n";
break;
5801 case MUL_EQ: std::cerr <<
"MUL_EQ\n";
break;
5802 case DIV_EQ: std::cerr <<
"DIV_EQ\n";
break;
5803 case LEFTDIV_EQ: std::cerr <<
"LEFTDIV_EQ\n";
break;
5804 case POW_EQ: std::cerr <<
"POW_EQ\n";
break;
5805 case EMUL_EQ: std::cerr <<
"EMUL_EQ\n";
break;
5806 case EDIV_EQ: std::cerr <<
"EDIV_EQ\n";
break;
5807 case ELEFTDIV_EQ: std::cerr <<
"ELEFTDIV_EQ\n";
break;
5808 case EPOW_EQ: std::cerr <<
"EPOW_EQ\n";
break;
5809 case AND_EQ: std::cerr <<
"AND_EQ\n";
break;
5810 case OR_EQ: std::cerr <<
"OR_EQ\n";
break;
5811 case EXPR_AND_AND: std::cerr <<
"EXPR_AND_AND\n";
break;
5812 case EXPR_OR_OR: std::cerr <<
"EXPR_OR_OR\n";
break;
5813 case EXPR_AND: std::cerr <<
"EXPR_AND\n";
break;
5814 case EXPR_OR: std::cerr <<
"EXPR_OR\n";
break;
5815 case EXPR_NOT: std::cerr <<
"EXPR_NOT\n";
break;
5816 case EXPR_LT: std::cerr <<
"EXPR_LT\n";
break;
5817 case EXPR_LE: std::cerr <<
"EXPR_LE\n";
break;
5818 case EXPR_EQ: std::cerr <<
"EXPR_EQ\n";
break;
5819 case EXPR_NE: std::cerr <<
"EXPR_NE\n";
break;
5820 case EXPR_GE: std::cerr <<
"EXPR_GE\n";
break;
5821 case EXPR_GT: std::cerr <<
"EXPR_GT\n";
break;
5822 case LEFTDIV: std::cerr <<
"LEFTDIV\n";
break;
5823 case EMUL: std::cerr <<
"EMUL\n";
break;
5824 case EDIV: std::cerr <<
"EDIV\n";
break;
5825 case ELEFTDIV: std::cerr <<
"ELEFTDIV\n";
break;
5826 case EPLUS: std::cerr <<
"EPLUS\n";
break;
5827 case EMINUS: std::cerr <<
"EMINUS\n";
break;
5828 case HERMITIAN: std::cerr <<
"HERMITIAN\n";
break;
5829 case TRANSPOSE: std::cerr <<
"TRANSPOSE\n";
break;
5830 case PLUS_PLUS: std::cerr <<
"PLUS_PLUS\n";
break;
5831 case MINUS_MINUS: std::cerr <<
"MINUS_MINUS\n";
break;
5832 case POW: std::cerr <<
"POW\n";
break;
5833 case EPOW: std::cerr <<
"EPOW\n";
break;
5839 std::cerr << (tok ==
NUM ?
"NUM" :
"IMAG_NUM")
5840 <<
" [" << tok_val->
number () <<
"]\n";
5847 std::cerr <<
"STRUCT_ELT [" << tok_val->
text () <<
"]\n";
5855 std::cerr <<
"NAME";
5857 std::cerr <<
" [" << sr->
name () <<
"]";
5862 case END: std::cerr <<
"END\n";
break;
5869 std::cerr << (tok ==
DQ_STRING ?
"DQ_STRING" :
"SQ_STRING")
5870 <<
" [" << tok_val->
text () <<
"]\n";
5874 case FOR: std::cerr <<
"FOR\n";
break;
5875 case WHILE: std::cerr <<
"WHILE\n";
break;
5876 case DO: std::cerr <<
"DO\n";
break;
5877 case UNTIL: std::cerr <<
"UNTIL\n";
break;
5878 case IF: std::cerr <<
"IF\n";
break;
5879 case ELSEIF: std::cerr <<
"ELSEIF\n";
break;
5880 case ELSE: std::cerr <<
"ELSE\n";
break;
5881 case SWITCH: std::cerr <<
"SWITCH\n";
break;
5882 case CASE: std::cerr <<
"CASE\n";
break;
5883 case OTHERWISE: std::cerr <<
"OTHERWISE\n";
break;
5884 case BREAK: std::cerr <<
"BREAK\n";
break;
5885 case CONTINUE: std::cerr <<
"CONTINUE\n";
break;
5886 case FUNC_RET: std::cerr <<
"FUNC_RET\n";
break;
5887 case UNWIND: std::cerr <<
"UNWIND\n";
break;
5888 case CLEANUP: std::cerr <<
"CLEANUP\n";
break;
5889 case TRY: std::cerr <<
"TRY\n";
break;
5890 case CATCH: std::cerr <<
"CATCH\n";
break;
5891 case GLOBAL: std::cerr <<
"GLOBAL\n";
break;
5892 case PERSISTENT: std::cerr <<
"PERSISTENT\n";
break;
5893 case FCN_HANDLE: std::cerr <<
"FCN_HANDLE\n";
break;
5894 case END_OF_INPUT: std::cerr <<
"END_OF_INPUT\n\n";
break;
5895 case LEXICAL_ERROR: std::cerr <<
"LEXICAL_ERROR\n\n";
break;
5896 case FCN: std::cerr <<
"FCN\n";
break;
5897 case INPUT_FILE: std::cerr <<
"INPUT_FILE\n";
break;
5899 case METAQUERY: std::cerr <<
"METAQUERY\n";
break;
5900 case GET: std::cerr <<
"GET\n";
break;
5901 case SET: std::cerr <<
"SET\n";
break;
5902 case PROPERTIES: std::cerr <<
"PROPERTIES\n";
break;
5903 case METHODS: std::cerr <<
"METHODS\n";
break;
5904 case EVENTS: std::cerr <<
"EVENTS\n";
break;
5905 case CLASSDEF: std::cerr <<
"CLASSDEF\n";
break;
5906 case '\n': std::cerr <<
"\\n\n";
break;
5907 case '\r': std::cerr <<
"\\r\n";
break;
5908 case '\t': std::cerr <<
"TAB\n";
break;
5911 if (tok < 256 && tok > 31)
5912 std::cerr << static_cast<char> (tok) <<
"\n";
5914 std::cerr <<
"UNKNOWN(" << tok <<
")\n";
5923 error (
"fatal lexer error: %s", msg);
5929 if (lexer_debug_flag)
5931 std::cerr << std::endl;
5935 std::cerr <<
"P: " << pattern << std::endl;
5936 std::cerr <<
"T: " <<
flex_yytext () << std::endl;
5977 std::cerr <<
"INITIAL" << std::endl;
5981 std::cerr <<
"COMMAND_START" << std::endl;
5985 std::cerr <<
"MATRIX_START" << std::endl;
5989 std::cerr <<
"INPUT_FILE_BEGIN" << std::endl;
5993 std::cerr <<
"BLOCK_COMMENT_START" << std::endl;
5997 std::cerr <<
"LINE_COMMENT_START" << std::endl;
6001 std::cerr <<
"DQ_STRING_START" << std::endl;
6005 std::cerr <<
"SQ_STRING_START" << std::endl;
6009 std::cerr <<
"UNKNOWN START STATE!" << std::endl;
6036 bool unput_comma =
false;
6043 bool space_after = (c ==
' ' || c ==
'\t');
6045 if (! (prev_tok ==
'[' || prev_tok ==
'{'
6047 || ((tok ==
'+' || tok ==
'-') && space_after)))
6130 if (Vdisplay_tokens)
6133 if (lexer_debug_flag)
6137 std::cerr << std::endl;
void octave_set_debug(int debug_flag, yyscan_t yyscanner)
bool parsing_classdef_get_method
int is_keyword_token(const std::string &s)
void warning_with_id(const char *id, const char *fmt,...)
void fatal_error(const char *msg)
bool maybe_unput_comma_before_unary_op(int tok)
void octave__flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Discard all buffered characters.
void xunput(char c, char *buf)
unsigned short int flex_uint16_t
int handle_op_internal(int tok, bool bos, bool compat)
size_t yy_buffer_stack_top
index of top of stack.
Octave interface to the compression and uncompression libraries.
static void display_character(char c)
For example cd octave end example noindent changes the current working directory to file
bool token_value_is(int tv) const
static const flex_uint16_t yy_nxt[875]
int handle_end_of_input(void)
void display_token(int tok)
bool maybe_classdef_get_set_method
bool space_follows_token(void) const
void enable_fq_identifier(void)
int handle_identifier(void)
void octave_pop_buffer_state(yyscan_t yyscanner)
Removes and deletes the top of the stack, if present.
int looking_at_function_handle
bool looking_at_decl_list
static bool lexer_debug_flag
symbol_table::symbol_record * sym_rec(void)
void octave_free(void *, yyscan_t yyscanner)
#define YY_CURRENT_BUFFER
bool looking_at_anon_fcn_args
OCTINTERP_API void print_usage(void)
#define YY_CURRENT_BUFFER_LVALUE
char * octave_get_text(yyscan_t yyscanner)
Get the current token.
void warn_language_extension_operator(const std::string &op)
void lexer_debug(const char *pattern)
unsigned char flex_uint8_t
int octave_get_lineno(yyscan_t yyscanner)
Get the current line number.
void begin_string(int state)
octave::base_lexer * yyextra_r
bool fq_identifier_contains_keyword(const std::string &s)
int handle_meta_identifier(void)
bool may_be_command(void) const
bool inside_any_object_index(void)
void mark_may_be_command(void)
static char * strsave(const char *s)
int fill_flex_buffer(char *buf, unsigned int max_size)
static const struct octave_kw wordlist[]
void warn_language_extension_continuation(void)
std::string fcn_file_full_name
if(nargin > 1) print_usage()
octave::base_lexer * octave_get_extra(yyscan_t yyscanner)
Get the user-defined data for this scanner.
std::string text(void) const
int handle_unary_op(int tok, bool bos=false)
int handle_superclass_identifier(void)
YY_BUFFER_STATE octave__scan_string(const char *yy_str, yyscan_t yyscanner)
Setup the input buffer state to scan a string.
symbol_table::scope_id curr_scope(void) const
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
int yy_bs_lineno
The line count.
void maybe_warn_language_extension_comment(char c)
#define SET_INTERNAL_VARIABLE(NM)
int octave_lex_destroy(yyscan_t yyscanner)
#define CMD_OR_COMPUTED_ASSIGN_OP(PATTERN, TOK)
comment_buffer comment_buf
static const struct octave_kw * in_word_set(const char *str, unsigned int len)
#define BLOCK_COMMENT_START
int handle_fq_identifier(void)
YY_BUFFER_STATE octave__scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner)
Setup the input buffer state to scan directly from a user-specified character buffer.
double number(void) const
#define EOB_ACT_CONTINUE_SCAN
void clear_start_state(void)
int fill_flex_buffer(char *buf, unsigned int max_size)
static symbol_record & insert(const std::string &name, scope_id scope=xcurrent_scope)
size_t yy_buffer_stack_max
capacity of stack.
static const flex_int16_t yy_def[299]
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
bool previous_token_is_keyword(void) const
void octave_set_lval(OCTAVE_STYPE *yylval_param, yyscan_t yyscanner)
YY_BUFFER_STATE octave__scan_bytes(const char *bytes, int len, yyscan_t yyscanner)
Setup the input buffer state to scan the given bytes.
std::string symbol_name(void) const
#define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT)
#define HANDLE_STRING_CONTINUATION
bool looking_at_parameter_list
static int yy_get_next_buffer(yyscan_t yyscanner)
std::set< std::string > pending_local_variables
unsigned short int flex_uint16_t
static bool Vdisplay_tokens
void resize(octave_idx_type n, const std::string &rfv="")
void octave__delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Destroy the buffer.
static const YY_CHAR yy_ec[256]
FILE * octave_get_out(yyscan_t yyscanner)
Get the output stream.
OCTAVE_STYPE * octave_get_lval(yyscan_t yyscanner)
void octave_set_in(FILE *_in_str, yyscan_t yyscanner)
Set the input stream.
YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
bool looking_at_return_list
static const flex_uint16_t yy_base[299]
#define octave_wrap(yyscanner)
void handle_continuation(void)
int handle_language_extension_unary_op(int tok, bool bos=false)
#define YY_STATE_EOF(state)
int previous_token_value(void) const
static void octave_ensure_buffer_stack(yyscan_t yyscanner)
bool looks_like_command_arg(void)
int octave_get_leng(yyscan_t yyscanner)
Get the length of the current token.
bool at_beginning_of_statement
FILE * octave_get_in(yyscan_t yyscanner)
Get the input stream.
int yy_did_buffer_switch_on_eof
void octave_set_column(int _column_no, yyscan_t yyscanner)
Set the current column.
char * yy_last_accepting_cpos
int yy_bs_column
The column count.
OCTAVE_EXPORT octave_value_list isdir nd deftypefn *std::string nm
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
void display_start_state(void) const
void octave_push_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Pushes the new state onto the stack.
static bool looks_like_copyright(const std::string &s)
static yy_state_type yy_get_previous_state(yyscan_t yyscanner)
static void octave__load_buffer_state(yyscan_t yyscanner)
int octave_get_debug(yyscan_t yyscanner)
int octave_lex_init(yyscan_t *scanner)
bool parsing_class_method
#define YY_END_OF_BUFFER_CHAR
YY_BUFFER_STATE octave__create_buffer(FILE *file, int size, yyscan_t yyscanner)
Allocate and initialize an input buffer state.
bool looking_at_matrix_or_assign_lhs
struct yy_buffer_state * YY_BUFFER_STATE
static void yy_fatal_error(const char *msg, yyscan_t yyscanner)
static void octave__init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner)
static int input(yyscan_t yyscanner)
OCTINTERP_API octave_value set_internal_variable(bool &var, const octave_value_list &args, int nargout, const char *nm)
bool looking_at_space(void)
bool is_variable(const std::string &name, symbol_table::scope_id scope)
bool is_symbol(void) const
int block_comment_nesting_level
bool parsing_classdef_set_method
#define YY_INPUT(buf, result, max_size)
#define panic_impossible()
bool looking_at_indirect_ref
unsigned int flex_uint32_t
#define COMMAND_ARG_FINISH
bool looking_for_object_index
void * octave_realloc(void *, yy_size_t, yyscan_t yyscanner)
void octave__switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Switch to a different input buffer.
string_vector & sort(bool make_uniq=false)
int octave_lex_init_extra(octave::base_lexer *user_defined, yyscan_t *scanner)
int octave_lex(OCTAVE_STYPE *yylval_param, yyscan_t yyscanner)
The main scanner function which does all the work.
#define CMD_OR_OP(PATTERN, TOK, COMPAT)
void mark_previous_token_trailing_space(void)
bool is_keyword(void) const
void octave_restart(FILE *input_file, yyscan_t yyscanner)
Immediately switch to a different input stream.
bool is_keyword(const std::string &s)
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
int handle_close_bracket(int bracket_type)
#define LINE_COMMENT_START
bool looking_at_initializer_expression
yy_state_type yy_last_accepting_state
T::size_type strlen(const typename T::value_type *str)
#define YY_RESTORE_YY_MORE_OFFSET
void octave_set_lineno(int _line_number, yyscan_t yyscanner)
Set the current line number.
int octave_get_column(yyscan_t yyscanner)
Get the current column number.
With real return the complex result
void mark_as_variables(const std::list< std::string > &lst)
#define YY_DO_BEFORE_ACTION
static uint32_t state[624]
token * current_token(void)
static bool is_variable(const std::string &name, scope_id scope=xcurrent_scope)
bbp_nesting_level nesting_level
bool space_follows_previous_token(void) const
void warning(const char *fmt,...)
void maybe_mark_previous_token_as_variable(void)
static const YY_CHAR yy_meta[55]
int handle_language_extension_op(const char *pattern, int tok, bool bos=false)
void push_start_state(int state)
symbol_table_context symtab_context
bool previous_token_value_is(int tok_val) const
#define YY_BUFFER_EOF_PENDING
OCTINTERP_API const char * undo_string_escape(char c)
std::stack< bool > parsed_function_name
=val(i)}if ode{val(i)}occurs in table i
void mark_trailing_space(void)
static bool looks_like_hex(const char *s, int len)
virtual bool input_from_eval_string(void) const
is longer than or if then or only for unique occurrences of the complete pattern(false).The default is true.If a cell array of strings ar
bool previous_token_may_be_command(void) const
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol zero divided by nd tex zero divided by nd ifnottex and any operation involving another NaN value(5+NaN).Note that NaN always compares not equal to NaN(NaN!
std::string fcn_file_name
void pop_start_state(void)
static const flex_int16_t yy_chk[875]
bool reading_classdef_file
std::string current_input_line
octave_input_reader input_reader
virtual bool input_from_file(void) const
static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner)
int command_arg_paren_count
void maybe_warn_separator_insert(char sep)
#define YY_FATAL_ERROR(msg)
void warn_language_extension(const std::string &msg)
std::stack< int > start_state_stack
static int yy_init_globals(yyscan_t yyscanner)
int token_value(void) const
int handle_token(const std::string &name, int tok)
virtual ~base_lexer(void)
static unsigned int Vtoken_count
void finish_comment(octave_comment_elt::comment_type typ)
int count_token_internal(int tok)
std::list< bool > looking_at_object_index
void warn_single_quote_string(void)
#define HANDLE_IDENTIFIER(pattern, get_set)
void octave_set_out(FILE *_out_str, yyscan_t yyscanner)
int handle_op(const char *pattern, int tok, bool bos=false)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
static const flex_int16_t yy_accept[266]
int start_state(void) const
void * octave_alloc(yy_size_t, yyscan_t yyscanner)
void octave_set_extra(octave::base_lexer *user_defined, yyscan_t yyscanner)
Set the user-defined data.
virtual int promptflag(void) const =0
bool previous_token_is_binop(void) const
static void yyunput(int c, char *buf_ptr, yyscan_t yyscanner)
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
bool whitespace_is_significant(void)
static bool looks_like_bin(const char *s, int len)
virtual void decrement_promptflag(void)=0
#define EOB_ACT_LAST_MATCH
#define EOB_ACT_END_OF_FILE
const std::string & name(void) const