26 #if defined (HAVE_CONFIG_H)
30 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
32 # pragma GCC diagnostic ignored "-Wunused-function"
37 # pragma GCC diagnostic push
38 # pragma GCC diagnostic ignored "-Wold-style-cast"
39 # pragma GCC diagnostic ignored "-Wsign-compare"
40 # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
41 # if defined (HAVE_WARN_IMPLICIT_FALLTHROUGH)
42 # pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
48 #if ! defined (register)
52 #line 53 "libinterp/parse-tree/lex.cc"
54 #define YY_INT_ALIGNED short int
59 #define YY_FLEX_MAJOR_VERSION 2
60 #define YY_FLEX_MINOR_VERSION 6
61 #define YY_FLEX_SUBMINOR_VERSION 4
62 #if YY_FLEX_SUBMINOR_VERSION > 0
66 #ifdef yy_create_buffer
67 #define octave__create_buffer_ALREADY_DEFINED
69 #define yy_create_buffer octave__create_buffer
72 #ifdef yy_delete_buffer
73 #define octave__delete_buffer_ALREADY_DEFINED
75 #define yy_delete_buffer octave__delete_buffer
79 #define octave__scan_buffer_ALREADY_DEFINED
81 #define yy_scan_buffer octave__scan_buffer
85 #define octave__scan_string_ALREADY_DEFINED
87 #define yy_scan_string octave__scan_string
91 #define octave__scan_bytes_ALREADY_DEFINED
93 #define yy_scan_bytes octave__scan_bytes
97 #define octave__init_buffer_ALREADY_DEFINED
99 #define yy_init_buffer octave__init_buffer
102 #ifdef yy_flush_buffer
103 #define octave__flush_buffer_ALREADY_DEFINED
105 #define yy_flush_buffer octave__flush_buffer
108 #ifdef yy_load_buffer_state
109 #define octave__load_buffer_state_ALREADY_DEFINED
111 #define yy_load_buffer_state octave__load_buffer_state
114 #ifdef yy_switch_to_buffer
115 #define octave__switch_to_buffer_ALREADY_DEFINED
117 #define yy_switch_to_buffer octave__switch_to_buffer
120 #ifdef yypush_buffer_state
121 #define octave_push_buffer_state_ALREADY_DEFINED
123 #define yypush_buffer_state octave_push_buffer_state
126 #ifdef yypop_buffer_state
127 #define octave_pop_buffer_state_ALREADY_DEFINED
129 #define yypop_buffer_state octave_pop_buffer_state
132 #ifdef yyensure_buffer_stack
133 #define octave_ensure_buffer_stack_ALREADY_DEFINED
135 #define yyensure_buffer_stack octave_ensure_buffer_stack
139 #define octave_lex_ALREADY_DEFINED
141 #define yylex octave_lex
145 #define octave_restart_ALREADY_DEFINED
147 #define yyrestart octave_restart
151 #define octave_lex_init_ALREADY_DEFINED
153 #define yylex_init octave_lex_init
156 #ifdef yylex_init_extra
157 #define octave_lex_init_extra_ALREADY_DEFINED
159 #define yylex_init_extra octave_lex_init_extra
163 #define octave_lex_destroy_ALREADY_DEFINED
165 #define yylex_destroy octave_lex_destroy
169 #define octave_get_debug_ALREADY_DEFINED
171 #define yyget_debug octave_get_debug
175 #define octave_set_debug_ALREADY_DEFINED
177 #define yyset_debug octave_set_debug
181 #define octave_get_extra_ALREADY_DEFINED
183 #define yyget_extra octave_get_extra
187 #define octave_set_extra_ALREADY_DEFINED
189 #define yyset_extra octave_set_extra
193 #define octave_get_in_ALREADY_DEFINED
195 #define yyget_in octave_get_in
199 #define octave_set_in_ALREADY_DEFINED
201 #define yyset_in octave_set_in
205 #define octave_get_out_ALREADY_DEFINED
207 #define yyget_out octave_get_out
211 #define octave_set_out_ALREADY_DEFINED
213 #define yyset_out octave_set_out
217 #define octave_get_leng_ALREADY_DEFINED
219 #define yyget_leng octave_get_leng
223 #define octave_get_text_ALREADY_DEFINED
225 #define yyget_text octave_get_text
229 #define octave_get_lineno_ALREADY_DEFINED
231 #define yyget_lineno octave_get_lineno
235 #define octave_set_lineno_ALREADY_DEFINED
237 #define yyset_lineno octave_set_lineno
241 #define octave_get_column_ALREADY_DEFINED
243 #define yyget_column octave_get_column
247 #define octave_set_column_ALREADY_DEFINED
249 #define yyset_column octave_set_column
253 #define octave_wrap_ALREADY_DEFINED
255 #define yywrap octave_wrap
259 #define octave_get_lval_ALREADY_DEFINED
261 #define yyget_lval octave_get_lval
265 #define octave_set_lval_ALREADY_DEFINED
267 #define yyset_lval octave_set_lval
271 #define octave_alloc_ALREADY_DEFINED
273 #define yyalloc octave_alloc
277 #define octave_realloc_ALREADY_DEFINED
279 #define yyrealloc octave_realloc
283 #define octave_free_ALREADY_DEFINED
285 #define yyfree octave_free
305 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
310 #ifndef __STDC_LIMIT_MACROS
311 #define __STDC_LIMIT_MACROS 1
314 #include <inttypes.h>
331 #define INT8_MIN (-128)
334 #define INT16_MIN (-32767-1)
337 #define INT32_MIN (-2147483647-1)
340 #define INT8_MAX (127)
343 #define INT16_MAX (32767)
346 #define INT32_MAX (2147483647)
349 #define UINT8_MAX (255U)
352 #define UINT16_MAX (65535U)
355 #define UINT32_MAX (4294967295U)
359 #define SIZE_MAX (~(size_t)0)
369 #define yyconst const
371 #if defined(__GNUC__) && __GNUC__ >= 3
372 #define yynoreturn __attribute__((__noreturn__))
383 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
386 #ifndef YY_TYPEDEF_YY_SCANNER_T
387 #define YY_TYPEDEF_YY_SCANNER_T
393 #define yyin yyg->yyin_r
394 #define yyout yyg->yyout_r
395 #define yyextra yyg->yyextra_r
396 #define yyleng yyg->yyleng_r
397 #define yytext yyg->yytext_r
398 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
399 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
400 #define yy_flex_debug yyg->yy_flex_debug_r
406 #define BEGIN yyg->yy_start = 1 + 2 *
411 #define YY_START ((yyg->yy_start - 1) / 2)
412 #define YYSTATE YY_START
414 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
416 #define YY_NEW_FILE yyrestart( yyin , yyscanner )
417 #define YY_END_OF_BUFFER_CHAR 0
426 #define YY_BUF_SIZE 32768
428 #define YY_BUF_SIZE 16384
434 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
436 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
437 #define YY_TYPEDEF_YY_BUFFER_STATE
441 #ifndef YY_TYPEDEF_YY_SIZE_T
442 #define YY_TYPEDEF_YY_SIZE_T
446 #define EOB_ACT_CONTINUE_SCAN 0
447 #define EOB_ACT_END_OF_FILE 1
448 #define EOB_ACT_LAST_MATCH 2
450 #define YY_LESS_LINENO(n)
451 #define YY_LINENO_REWIND_TO(ptr)
458 int yyless_macro_arg = (n); \
459 YY_LESS_LINENO(yyless_macro_arg);\
460 *yy_cp = yyg->yy_hold_char; \
461 YY_RESTORE_YY_MORE_OFFSET \
462 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
463 YY_DO_BEFORE_ACTION; \
466 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
468 #ifndef YY_STRUCT_YY_BUFFER_STATE
469 #define YY_STRUCT_YY_BUFFER_STATE
470 struct yy_buffer_state
491 int yy_is_our_buffer;
498 int yy_is_interactive;
514 int yy_buffer_status;
516 #define YY_BUFFER_NEW 0
517 #define YY_BUFFER_NORMAL 1
528 #define YY_BUFFER_EOF_PENDING 2
539 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
540 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
545 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
558 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
568 #define yy_new_buffer yy_create_buffer
569 #define yy_set_interactive(is_interactive) \
571 if ( ! YY_CURRENT_BUFFER ){ \
572 yyensure_buffer_stack (yyscanner); \
573 YY_CURRENT_BUFFER_LVALUE = \
574 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
576 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
578 #define yy_set_bol(at_bol) \
580 if ( ! YY_CURRENT_BUFFER ){\
581 yyensure_buffer_stack (yyscanner); \
582 YY_CURRENT_BUFFER_LVALUE = \
583 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
585 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
587 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
591 #define octave_wrap(yyscanner) (1)
592 #define YY_SKIP_YYWRAP
597 #define yytext_ptr yytext_r
601 static int yy_get_next_buffer (
yyscan_t yyscanner );
607 #define YY_DO_BEFORE_ACTION \
608 yyg->yytext_ptr = yy_bp; \
609 yyleng = (int) (yy_cp - yy_bp); \
610 yyg->yy_hold_char = *yy_cp; \
612 yyg->yy_c_buf_p = yy_cp;
613 #define YY_NUM_RULES 112
614 #define YY_END_OF_BUFFER 113
624 0, 0, 5, 5, 10, 10, 0, 0, 0, 0,
625 0, 0, 0, 0, 0, 0, 0, 0, 113, 111,
626 53, 61, 61, 88, 63, 111, 74, 62, 93, 94,
627 78, 85, 89, 86, 95, 79, 51, 51, 64, 84,
628 76, 96, 77, 111, 59, 56, 15, 80, 16, 81,
629 56, 56, 109, 75, 110, 87, 53, 111, 9, 8,
630 3, 3, 7, 112, 5, 6, 4, 9, 10, 11,
631 11, 95, 13, 14, 10, 1, 1, 112, 20, 20,
632 112, 112, 24, 24, 24, 24, 24, 24, 39, 40,
633 40, 26, 38, 112, 43, 44, 44, 42, 48, 46,
635 48, 48, 45, 53, 0, 61, 71, 0, 21, 21,
636 82, 107, 99, 91, 97, 92, 98, 90, 65, 0,
637 66, 51, 67, 68, 100, 51, 51, 0, 0, 51,
638 0, 69, 70, 73, 0, 58, 0, 60, 0, 0,
639 56, 0, 101, 105, 56, 56, 108, 83, 72, 53,
640 0, 0, 9, 8, 3, 0, 3, 5, 6, 0,
641 10, 11, 0, 10, 1, 0, 20, 20, 0, 0,
642 0, 0, 0, 0, 24, 0, 23, 23, 0, 0,
643 0, 39, 40, 25, 37, 36, 36, 27, 29, 30,
644 31, 32, 33, 34, 35, 37, 43, 44, 41, 46,
646 48, 0, 0, 0, 45, 102, 0, 103, 51, 104,
647 106, 50, 49, 0, 51, 52, 0, 0, 58, 0,
648 0, 60, 0, 0, 0, 57, 56, 0, 17, 17,
649 0, 0, 0, 18, 18, 0, 19, 19, 0, 22,
650 22, 27, 28, 0, 0, 45, 0, 54, 54, 49,
651 0, 51, 52, 0, 0, 58, 0, 60, 0, 0,
652 0, 57, 0, 55, 0, 2, 2, 0, 12, 12,
653 27, 0, 47, 47, 45, 0, 0, 0, 49, 0,
654 0, 0, 52, 58, 60, 0, 57, 57, 0
657 static const YY_CHAR yy_ec[256] =
659 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
660 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
661 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
662 1, 2, 5, 6, 7, 1, 7, 8, 9, 10,
663 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
664 21, 22, 23, 24, 23, 25, 26, 27, 28, 29,
665 30, 31, 32, 33, 34, 35, 34, 36, 36, 34,
666 37, 37, 38, 38, 37, 37, 37, 37, 37, 37,
667 37, 37, 37, 37, 37, 37, 37, 39, 37, 37,
668 40, 41, 42, 43, 44, 1, 45, 46, 34, 36,
670 47, 48, 49, 37, 38, 38, 37, 37, 37, 50,
671 37, 37, 37, 51, 52, 53, 54, 55, 37, 56,
672 37, 37, 57, 58, 59, 60, 1, 1, 1, 1,
673 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
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, 1, 1, 1, 1, 1,
681 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
682 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
683 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
684 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
685 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
689 static const YY_CHAR yy_meta[61] =
691 1, 2, 3, 3, 1, 4, 5, 1, 6, 5,
692 5, 7, 8, 5, 8, 9, 7, 10, 10, 10,
693 10, 10, 10, 10, 10, 10, 1, 5, 1, 1,
694 1, 1, 11, 12, 12, 13, 14, 15, 14, 5,
695 16, 5, 7, 17, 12, 12, 13, 12, 14, 14,
696 14, 18, 14, 18, 14, 14, 5, 1, 5, 1
701 0, 59, 65, 123, 61, 81, 750, 749, 83, 87,
702 94, 102, 112, 132, 108, 110, 181, 236, 752, 1235,
703 71, 1235, 748, 720, 1235, 96, 62, 1235, 1235, 1235,
704 716, 128, 1235, 65, 133, 708, 277, 108, 1235, 1235,
705 707, 706, 705, 732, 731, 144, 1235, 699, 1235, 694,
706 153, 154, 1235, 52, 1235, 693, 150, 164, 0, 720,
707 1235, 718, 1235, 158, 149, 133, 1235, 704, 164, 1235,
708 716, 302, 1235, 1235, 177, 1235, 715, 187, 1235, 714,
709 191, 199, 1235, 197, 713, 204, 203, 208, 0, 1235,
710 709, 701, 1235, 343, 0, 1235, 703, 696, 1235, 702,
712 700, 686, 207, 237, 210, 1235, 1235, 238, 1235, 698,
713 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 670, 683,
714 666, 207, 665, 664, 1235, 391, 0, 228, 209, 1235,
715 0, 1235, 1235, 1235, 691, 246, 690, 247, 292, 687,
716 304, 539, 1235, 1235, 315, 320, 1235, 1235, 1235, 248,
717 273, 257, 0, 536, 1235, 263, 533, 269, 293, 519,
718 262, 1235, 518, 303, 1235, 324, 1235, 530, 337, 347,
719 352, 355, 327, 366, 1235, 368, 1235, 529, 372, 373,
720 378, 0, 1235, 1235, 1235, 1235, 528, 400, 1235, 1235,
721 1235, 1235, 1235, 1235, 1235, 0, 0, 1235, 1235, 528,
723 1235, 513, 376, 521, 381, 1235, 381, 1235, 390, 1235,
724 1235, 1235, 417, 238, 459, 353, 385, 400, 423, 429,
725 393, 431, 388, 439, 384, 438, 440, 449, 1235, 372,
726 440, 445, 455, 1235, 357, 460, 1235, 346, 463, 1235,
727 339, 456, 0, 478, 336, 444, 480, 1235, 329, 467,
728 468, 269, 416, 475, 276, 486, 266, 488, 489, 493,
729 255, 496, 504, 1235, 504, 1235, 193, 512, 1235, 185,
730 1235, 514, 1235, 178, 508, 154, 152, 109, 1235, 97,
731 88, 80, 1235, 511, 523, 60, 524, 526, 1235, 542,
732 560, 578, 596, 614, 632, 650, 668, 681, 696, 713,
734 730, 748, 766, 784, 802, 820, 838, 856, 873, 882,
735 493, 890, 902, 919, 936, 953, 962, 974, 992, 1001,
736 1009, 1026, 1043, 1060, 1077, 1095, 1113, 1131, 1148, 1165,
742 289, 1, 290, 290, 1, 1, 291, 291, 292, 292,
743 293, 293, 294, 294, 295, 295, 296, 296, 289, 289,
744 289, 289, 289, 289, 289, 297, 289, 289, 289, 289,
745 289, 289, 289, 289, 298, 289, 289, 37, 289, 289,
746 289, 289, 289, 299, 300, 301, 289, 289, 289, 289,
747 301, 301, 289, 289, 289, 289, 289, 297, 302, 289,
748 289, 289, 289, 303, 289, 289, 289, 289, 289, 289,
749 289, 298, 289, 289, 289, 289, 289, 304, 289, 289,
750 304, 304, 289, 289, 289, 305, 289, 305, 306, 289,
751 289, 289, 289, 307, 308, 289, 289, 289, 289, 289,
753 289, 289, 309, 289, 297, 289, 289, 297, 289, 289,
754 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
755 289, 310, 289, 289, 289, 289, 38, 289, 311, 289,
756 312, 289, 289, 289, 299, 313, 300, 314, 289, 315,
757 301, 316, 289, 289, 301, 301, 289, 289, 289, 289,
758 297, 297, 302, 289, 289, 303, 289, 289, 289, 289,
759 289, 289, 289, 289, 289, 304, 289, 289, 304, 304,
760 304, 304, 289, 305, 289, 305, 289, 289, 289, 305,
761 305, 306, 289, 289, 289, 289, 289, 289, 289, 289,
762 289, 289, 289, 289, 289, 317, 308, 289, 289, 289,
764 289, 289, 289, 318, 309, 289, 319, 289, 310, 289,
765 289, 289, 289, 311, 320, 321, 289, 322, 313, 289,
766 323, 314, 315, 324, 316, 325, 301, 297, 289, 289,
767 326, 327, 304, 289, 289, 304, 289, 289, 305, 289,
768 289, 289, 317, 328, 318, 329, 319, 289, 289, 289,
769 289, 320, 321, 289, 322, 330, 323, 331, 324, 289,
770 332, 325, 289, 289, 326, 289, 289, 327, 289, 289,
771 289, 328, 289, 289, 329, 289, 289, 289, 289, 289,
772 289, 289, 289, 330, 331, 332, 333, 333, 0, 289,
773 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
775 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
776 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
777 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
783 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
784 30, 31, 32, 33, 34, 35, 36, 37, 38, 38,
785 38, 38, 38, 38, 38, 38, 39, 40, 41, 42,
786 43, 44, 45, 46, 46, 46, 46, 46, 46, 47,
787 48, 49, 50, 46, 46, 46, 46, 46, 51, 46,
788 46, 52, 46, 46, 46, 46, 53, 54, 55, 56,
789 57, 286, 69, 70, 71, 58, 60, 61, 62, 111,
790 63, 64, 104, 63, 65, 66, 72, 105, 67, 116,
791 68, 147, 75, 70, 71, 79, 80, 58, 81, 79,
792 80, 112, 67, 82, 117, 84, 72, 85, 109, 110,
794 86, 283, 73, 87, 65, 85, 66, 283, 88, 148,
795 96, 97, 96, 97, 90, 91, 98, 92, 98, 74,
796 283, 65, 73, 66, 60, 61, 62, 93, 63, 64,
797 279, 63, 65, 66, 90, 91, 67, 92, 68, 74,
798 114, 118, 289, 159, 119, 139, 289, 93, 120, 121,
799 67, 150, 94, 289, 139, 139, 151, 115, 158, 140,
800 155, 157, 65, 289, 66, 161, 109, 110, 140, 140,
801 105, 279, 94, 123, 159, 124, 142, 279, 164, 65,
802 273, 66, 100, 151, 101, 142, 142, 269, 158, 167,
803 168, 159, 169, 167, 168, 266, 102, 170, 173, 145,
805 146, 167, 168, 174, 179, 158, 177, 178, 203, 180,
806 177, 178, 109, 110, 103, 103, 103, 103, 103, 103,
807 152, 214, 204, 214, 103, 103, 103, 103, 103, 103,
808 103, 103, 103, 103, 103, 103, 103, 100, 104, 101,
809 109, 110, 129, 105, 130, 213, 213, 217, 220, 150,
810 289, 102, 289, 129, 151, 171, 286, 172, 228, 229,
811 230, 218, 221, 161, 181, 155, 157, 257, 105, 103,
812 103, 103, 103, 103, 103, 109, 110, 255, 158, 103,
813 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
814 103, 103, 126, 139, 127, 127, 127, 127, 127, 127,
816 127, 127, 127, 159, 164, 139, 130, 140, 158, 151,
817 118, 128, 129, 119, 130, 131, 139, 163, 121, 140,
818 127, 139, 128, 129, 142, 158, 167, 168, 173, 152,
819 140, 248, 131, 174, 159, 140, 142, 245, 169, 167,
820 168, 240, 123, 170, 124, 186, 187, 142, 237, 167,
821 168, 159, 142, 233, 234, 235, 236, 237, 238, 234,
822 188, 188, 188, 188, 188, 188, 188, 227, 177, 178,
823 177, 178, 227, 179, 229, 177, 178, 203, 180, 239,
824 240, 241, 203, 248, 249, 225, 217, 189, 190, 223,
825 191, 204, 192, 193, 257, 194, 204, 195, 196, 212,
827 218, 255, 212, 171, 254, 172, 254, 212, 122, 122,
828 122, 122, 122, 122, 122, 122, 122, 242, 242, 242,
829 242, 242, 242, 242, 217, 129, 129, 130, 130, 181,
830 220, 212, 220, 212, 250, 250, 129, 129, 218, 260,
831 139, 263, 266, 267, 221, 203, 221, 269, 270, 264,
832 228, 229, 230, 261, 140, 140, 233, 234, 235, 204,
833 250, 236, 237, 238, 239, 240, 241, 254, 251, 254,
834 251, 142, 142, 271, 271, 271, 271, 271, 271, 271,
835 273, 274, 248, 249, 250, 250, 276, 217, 277, 220,
836 139, 278, 279, 280, 260, 281, 130, 260, 282, 283,
838 215, 218, 215, 221, 140, 263, 266, 267, 261, 203,
839 250, 261, 217, 264, 269, 270, 273, 274, 251, 140,
840 251, 142, 245, 204, 220, 260, 218, 260, 244, 200,
841 186, 177, 167, 232, 231, 155, 142, 154, 221, 261,
842 225, 261, 59, 59, 59, 59, 59, 59, 59, 59,
843 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
844 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
845 76, 76, 76, 76, 76, 76, 76, 76, 78, 78,
846 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
847 78, 78, 78, 78, 78, 78, 83, 83, 83, 83,
849 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
850 83, 83, 83, 83, 89, 89, 89, 89, 89, 89,
851 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
852 89, 89, 95, 95, 95, 95, 95, 95, 95, 95,
853 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
854 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
855 99, 99, 99, 99, 99, 99, 99, 99, 108, 108,
856 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
857 108, 108, 108, 108, 108, 108, 122, 122, 223, 122,
858 122, 137, 135, 211, 210, 208, 122, 136, 207, 206,
860 109, 202, 201, 200, 199, 198, 184, 136, 136, 136,
861 136, 183, 136, 136, 138, 175, 167, 165, 162, 160,
862 155, 154, 149, 144, 138, 138, 138, 138, 143, 138,
863 138, 141, 137, 135, 134, 133, 132, 125, 141, 141,
864 141, 141, 141, 141, 141, 113, 141, 141, 153, 107,
865 106, 289, 77, 77, 153, 153, 289, 153, 153, 153,
866 153, 153, 153, 153, 153, 153, 156, 156, 156, 156,
867 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
868 156, 156, 156, 156, 166, 166, 166, 166, 166, 166,
869 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
871 166, 166, 176, 176, 176, 176, 176, 176, 176, 176,
872 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
873 182, 182, 289, 289, 182, 182, 182, 182, 289, 182,
874 182, 182, 182, 182, 182, 289, 182, 182, 185, 185,
875 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
876 185, 185, 185, 185, 185, 185, 197, 197, 289, 197,
877 197, 289, 197, 197, 197, 197, 197, 197, 197, 197,
878 197, 197, 197, 197, 205, 289, 289, 289, 289, 289,
879 289, 205, 205, 289, 205, 205, 205, 205, 289, 205,
880 205, 209, 289, 289, 209, 289, 209, 289, 209, 216,
882 289, 216, 216, 219, 289, 289, 289, 289, 289, 289,
883 219, 219, 289, 219, 219, 219, 219, 289, 219, 219,
884 222, 289, 289, 289, 289, 289, 289, 222, 222, 289,
885 222, 222, 222, 222, 289, 222, 222, 224, 289, 289,
886 289, 289, 289, 289, 289, 289, 289, 224, 224, 224,
887 224, 289, 224, 224, 226, 289, 289, 289, 289, 289,
888 289, 289, 289, 289, 226, 226, 226, 226, 289, 226,
889 226, 243, 289, 243, 243, 246, 289, 289, 289, 289,
890 289, 289, 289, 289, 289, 246, 246, 246, 246, 289,
891 246, 246, 247, 247, 247, 247, 247, 247, 247, 247,
893 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
894 252, 289, 289, 289, 289, 252, 289, 252, 253, 289,
895 253, 253, 289, 289, 289, 253, 253, 256, 289, 289,
896 289, 289, 289, 289, 289, 289, 289, 256, 256, 256,
897 256, 289, 256, 256, 258, 289, 289, 289, 289, 289,
898 289, 289, 289, 289, 258, 258, 258, 258, 289, 258,
899 258, 259, 289, 289, 289, 289, 289, 289, 259, 259,
900 259, 259, 259, 259, 259, 289, 259, 259, 262, 289,
901 289, 289, 289, 289, 289, 262, 262, 289, 262, 262,
902 262, 262, 289, 262, 262, 265, 265, 265, 265, 265,
904 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
905 265, 265, 265, 268, 268, 268, 268, 268, 268, 268,
906 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
907 268, 272, 272, 272, 272, 272, 272, 272, 272, 272,
908 272, 272, 272, 272, 272, 272, 272, 272, 272, 275,
909 289, 289, 289, 289, 289, 289, 275, 275, 289, 275,
910 275, 275, 275, 289, 275, 275, 284, 289, 289, 289,
911 289, 289, 289, 284, 284, 289, 284, 284, 284, 284,
912 289, 284, 284, 285, 289, 289, 289, 289, 289, 289,
913 285, 285, 289, 285, 285, 285, 285, 289, 285, 285,
915 287, 289, 289, 289, 289, 289, 289, 289, 289, 289,
916 287, 287, 287, 287, 289, 287, 287, 288, 289, 289,
917 289, 289, 289, 289, 288, 288, 289, 288, 288, 288,
918 288, 289, 288, 288, 19, 289, 289, 289, 289, 289,
919 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
920 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
921 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
922 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
923 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
924 289, 289, 289, 289, 289
930 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
931 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
932 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
933 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
934 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
935 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
936 2, 286, 5, 5, 5, 2, 3, 3, 3, 27,
937 3, 3, 21, 3, 3, 3, 5, 21, 3, 34,
938 3, 54, 6, 6, 6, 9, 9, 6, 10, 10,
939 10, 27, 3, 10, 34, 11, 6, 11, 26, 26,
941 11, 282, 5, 12, 3, 12, 3, 281, 12, 54,
942 15, 15, 16, 16, 13, 13, 15, 13, 16, 5,
943 280, 3, 6, 3, 4, 4, 4, 13, 4, 4,
944 278, 4, 4, 4, 14, 14, 4, 14, 4, 6,
945 32, 35, 38, 66, 35, 46, 38, 14, 35, 35,
946 4, 57, 13, 38, 51, 52, 57, 32, 65, 46,
947 64, 64, 4, 38, 4, 69, 58, 58, 51, 52,
948 69, 277, 14, 35, 66, 35, 46, 276, 75, 4,
949 274, 4, 17, 75, 17, 51, 52, 270, 65, 78,
950 78, 66, 81, 81, 81, 267, 17, 81, 84, 51,
952 52, 82, 82, 84, 87, 65, 86, 86, 103, 87,
953 88, 88, 105, 105, 17, 17, 17, 17, 17, 17,
954 58, 129, 103, 129, 17, 17, 17, 17, 17, 17,
955 17, 17, 17, 17, 17, 17, 17, 18, 104, 18,
956 108, 108, 122, 104, 122, 128, 128, 136, 138, 150,
957 214, 18, 214, 122, 150, 82, 261, 82, 152, 152,
958 152, 136, 138, 161, 88, 156, 156, 257, 161, 18,
959 18, 18, 18, 18, 18, 151, 151, 255, 158, 18,
960 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
961 18, 18, 37, 139, 37, 37, 37, 37, 37, 37,
963 37, 37, 37, 159, 164, 141, 252, 139, 158, 164,
964 72, 37, 37, 72, 37, 37, 145, 72, 72, 141,
965 37, 146, 37, 37, 139, 158, 166, 166, 173, 151,
966 145, 249, 37, 173, 159, 146, 141, 245, 169, 169,
967 169, 241, 72, 169, 72, 94, 94, 145, 238, 170,
968 170, 159, 146, 171, 171, 171, 172, 172, 172, 235,
969 94, 94, 94, 94, 94, 94, 94, 145, 174, 174,
970 176, 176, 146, 179, 230, 180, 180, 203, 179, 181,
971 181, 181, 205, 207, 207, 225, 217, 94, 94, 223,
972 94, 203, 94, 94, 221, 94, 205, 94, 94, 126,
974 217, 218, 126, 170, 216, 170, 216, 126, 126, 126,
975 126, 126, 126, 126, 126, 126, 126, 188, 188, 188,
976 188, 188, 188, 188, 219, 209, 126, 209, 126, 180,
977 220, 126, 222, 126, 213, 213, 209, 126, 219, 226,
978 224, 227, 231, 231, 220, 246, 222, 232, 232, 227,
979 228, 228, 228, 226, 224, 227, 233, 233, 233, 246,
980 213, 236, 236, 236, 239, 239, 239, 253, 213, 253,
981 213, 224, 227, 242, 242, 242, 242, 242, 242, 242,
982 244, 244, 247, 247, 250, 250, 251, 256, 251, 258,
983 259, 251, 251, 254, 260, 254, 215, 262, 254, 254,
985 311, 256, 311, 258, 259, 263, 265, 265, 260, 275,
986 250, 262, 284, 263, 268, 268, 272, 272, 250, 263,
987 250, 259, 204, 275, 285, 287, 284, 288, 202, 200,
988 187, 178, 168, 163, 160, 157, 263, 154, 285, 287,
989 142, 288, 290, 290, 290, 290, 290, 290, 290, 290,
990 290, 290, 290, 290, 290, 290, 290, 290, 290, 290,
991 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
992 291, 291, 291, 291, 291, 291, 291, 291, 292, 292,
993 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
994 292, 292, 292, 292, 292, 292, 293, 293, 293, 293,
996 293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
997 293, 293, 293, 293, 294, 294, 294, 294, 294, 294,
998 294, 294, 294, 294, 294, 294, 294, 294, 294, 294,
999 294, 294, 295, 295, 295, 295, 295, 295, 295, 295,
1000 295, 295, 295, 295, 295, 295, 295, 295, 295, 295,
1001 296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
1002 296, 296, 296, 296, 296, 296, 296, 296, 297, 297,
1003 297, 297, 297, 297, 297, 297, 297, 297, 297, 297,
1004 297, 297, 297, 297, 297, 297, 298, 298, 140, 298,
1005 298, 137, 135, 124, 123, 121, 298, 299, 120, 119,
1007 110, 102, 101, 100, 98, 97, 92, 299, 299, 299,
1008 299, 91, 299, 299, 300, 85, 80, 77, 71, 68,
1009 62, 60, 56, 50, 300, 300, 300, 300, 48, 300,
1010 300, 301, 45, 44, 43, 42, 41, 36, 301, 301,
1011 301, 301, 301, 301, 301, 31, 301, 301, 302, 24,
1012 23, 19, 8, 7, 302, 302, 0, 302, 302, 302,
1013 302, 302, 302, 302, 302, 302, 303, 303, 303, 303,
1014 303, 303, 303, 303, 303, 303, 303, 303, 303, 303,
1015 303, 303, 303, 303, 304, 304, 304, 304, 304, 304,
1016 304, 304, 304, 304, 304, 304, 304, 304, 304, 304,
1018 304, 304, 305, 305, 305, 305, 305, 305, 305, 305,
1019 305, 305, 305, 305, 305, 305, 305, 305, 305, 305,
1020 306, 306, 0, 0, 306, 306, 306, 306, 0, 306,
1021 306, 306, 306, 306, 306, 0, 306, 306, 307, 307,
1022 307, 307, 307, 307, 307, 307, 307, 307, 307, 307,
1023 307, 307, 307, 307, 307, 307, 308, 308, 0, 308,
1024 308, 0, 308, 308, 308, 308, 308, 308, 308, 308,
1025 308, 308, 308, 308, 309, 0, 0, 0, 0, 0,
1026 0, 309, 309, 0, 309, 309, 309, 309, 0, 309,
1027 309, 310, 0, 0, 310, 0, 310, 0, 310, 312,
1029 0, 312, 312, 313, 0, 0, 0, 0, 0, 0,
1030 313, 313, 0, 313, 313, 313, 313, 0, 313, 313,
1031 314, 0, 0, 0, 0, 0, 0, 314, 314, 0,
1032 314, 314, 314, 314, 0, 314, 314, 315, 0, 0,
1033 0, 0, 0, 0, 0, 0, 0, 315, 315, 315,
1034 315, 0, 315, 315, 316, 0, 0, 0, 0, 0,
1035 0, 0, 0, 0, 316, 316, 316, 316, 0, 316,
1036 316, 317, 0, 317, 317, 318, 0, 0, 0, 0,
1037 0, 0, 0, 0, 0, 318, 318, 318, 318, 0,
1038 318, 318, 319, 319, 319, 319, 319, 319, 319, 319,
1040 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
1041 320, 0, 0, 0, 0, 320, 0, 320, 321, 0,
1042 321, 321, 0, 0, 0, 321, 321, 322, 0, 0,
1043 0, 0, 0, 0, 0, 0, 0, 322, 322, 322,
1044 322, 0, 322, 322, 323, 0, 0, 0, 0, 0,
1045 0, 0, 0, 0, 323, 323, 323, 323, 0, 323,
1046 323, 324, 0, 0, 0, 0, 0, 0, 324, 324,
1047 324, 324, 324, 324, 324, 0, 324, 324, 325, 0,
1048 0, 0, 0, 0, 0, 325, 325, 0, 325, 325,
1049 325, 325, 0, 325, 325, 326, 326, 326, 326, 326,
1051 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
1052 326, 326, 326, 327, 327, 327, 327, 327, 327, 327,
1053 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
1054 327, 328, 328, 328, 328, 328, 328, 328, 328, 328,
1055 328, 328, 328, 328, 328, 328, 328, 328, 328, 329,
1056 0, 0, 0, 0, 0, 0, 329, 329, 0, 329,
1057 329, 329, 329, 0, 329, 329, 330, 0, 0, 0,
1058 0, 0, 0, 330, 330, 0, 330, 330, 330, 330,
1059 0, 330, 330, 331, 0, 0, 0, 0, 0, 0,
1060 331, 331, 0, 331, 331, 331, 331, 0, 331, 331,
1062 332, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1063 332, 332, 332, 332, 0, 332, 332, 333, 0, 0,
1064 0, 0, 0, 0, 333, 333, 0, 333, 333, 333,
1065 333, 0, 333, 333, 289, 289, 289, 289, 289, 289,
1066 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
1067 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
1068 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
1069 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
1070 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
1071 289, 289, 289, 289, 289
1078 #define REJECT reject_used_but_not_detected
1079 #define yymore() yymore_used_but_not_detected
1080 #define YY_MORE_ADJ 0
1081 #define YY_RESTORE_YY_MORE_OFFSET
1082 #line 1 "../libinterp/parse-tree/lex.ll"
1104 #line 91 "../libinterp/parse-tree/lex.ll"
1109 #include <algorithm>
1153 #if defined (OCTAVE_STYPE_IS_DECLARED) && ! defined YYSTYPE
1154 # define YYSTYPE OCTAVE_STYPE
1157 #define YY_NO_UNISTD_H 1
1158 #define isatty octave_isatty_wrapper
1160 #if ! (defined (FLEX_SCANNER) \
1161 && defined (YY_FLEX_MAJOR_VERSION) && YY_FLEX_MAJOR_VERSION >= 2 \
1162 && defined (YY_FLEX_MINOR_VERSION) && YY_FLEX_MINOR_VERSION >= 5)
1163 #error lex.l requires flex version 2.5.4 or later
1166 #define YY_EXTRA_TYPE octave::base_lexer *
1167 #define curr_lexer yyextra
1171 #if defined (YY_INPUT)
1174 #define YY_INPUT(buf, result, max_size) \
1175 result = curr_lexer->fill_flex_buffer (buf, max_size)
1179 #if defined (YY_FATAL_ERROR)
1180 # undef YY_FATAL_ERROR
1182 #define YY_FATAL_ERROR(msg) \
1183 (yyget_extra (yyscanner))->fatal_error (msg)
1185 #define CMD_OR_OP(PATTERN, TOK, COMPAT) \
1188 curr_lexer->lexer_debug (PATTERN); \
1190 if (curr_lexer->looks_like_command_arg ()) \
1193 curr_lexer->push_start_state (COMMAND_START); \
1196 return curr_lexer->handle_op (TOK, false, COMPAT); \
1200 #define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT) \
1203 curr_lexer->lexer_debug (PATTERN); \
1205 if (curr_lexer->previous_token_may_be_command ()) \
1207 if (curr_lexer->looks_like_command_arg ()) \
1210 curr_lexer->push_start_state (COMMAND_START); \
1213 return curr_lexer->handle_op (TOK, false, COMPAT); \
1217 if (curr_lexer->maybe_unput_comma_before_unary_op (TOK)) \
1220 curr_lexer->xunput (','); \
1223 return curr_lexer->handle_op (TOK, false, COMPAT); \
1228 #define HANDLE_EOB_OR_EOF(STATUS) \
1231 if (curr_lexer->is_push_lexer ()) \
1233 if (curr_lexer->at_end_of_buffer ()) \
1236 if (curr_lexer->at_end_of_file ()) \
1237 return curr_lexer->handle_end_of_input (); \
1245 #define HANDLE_STRING_CONTINUATION \
1248 curr_lexer->m_filepos.next_line (); \
1250 HANDLE_EOB_OR_EOF (-1); \
1254 #define HANDLE_NUMBER(PATTERN, BASE) \
1257 curr_lexer->lexer_debug (PATTERN); \
1259 if (curr_lexer->previous_token_may_be_command () \
1260 && curr_lexer->space_follows_previous_token ()) \
1263 curr_lexer->push_start_state (COMMAND_START); \
1267 int tok = curr_lexer->previous_token_value (); \
1269 if (curr_lexer->whitespace_is_significant () \
1270 && curr_lexer->space_follows_previous_token () \
1271 && ! (tok == '[' || tok == '{' \
1272 || curr_lexer->previous_token_is_binop ())) \
1275 curr_lexer->xunput (','); \
1278 return curr_lexer->handle_number<BASE> (); \
1283 #define HANDLE_IDENTIFIER(pattern, get_set) \
1286 curr_lexer->lexer_debug (pattern); \
1288 int tok = curr_lexer->previous_token_value (); \
1290 if (curr_lexer->whitespace_is_significant () \
1291 && curr_lexer->space_follows_previous_token () \
1292 && ! (tok == '[' || tok == '{' \
1293 || curr_lexer->previous_token_is_binop ())) \
1296 curr_lexer->xunput (','); \
1300 if (! curr_lexer->m_looking_at_decl_list \
1301 && curr_lexer->previous_token_may_be_command ()) \
1304 curr_lexer->push_start_state (COMMAND_START); \
1311 curr_lexer->m_filepos.increment_column (3); \
1312 curr_lexer->m_maybe_classdef_get_set_method = false; \
1315 return curr_lexer->handle_identifier (); \
1322 is_space_or_tab (
char c)
1324 return c ==
' ' || c ==
'\t';
1328 is_space_or_tab_or_eol (
char c)
1330 return c ==
' ' || c ==
'\t' || c ==
'\n' || c ==
'\r';
1347 && ! (s ==
"set" || s ==
"get" || s ==
"arguments"
1348 || s ==
"enumeration" || s ==
"events"
1349 || s ==
"methods" || s ==
"properties"));
1352 OCTAVE_END_NAMESPACE(
octave)
1354 #line 1355 "libinterp/parse-tree/lex.cc"
1355 #line 351 "../libinterp/parse-tree/lex.ll"
1360 #line 1361 "libinterp/parse-tree/lex.cc"
1361 #line 364 "../libinterp/parse-tree/lex.ll"
1371 #line 1372 "libinterp/parse-tree/lex.cc"
1372 #line 1373 "libinterp/parse-tree/lex.cc"
1375 #define COMMAND_START 1
1376 #define MATRIX_START 2
1377 #define INPUT_FILE_START 3
1378 #define BLOCK_COMMENT_START 4
1379 #define LINE_COMMENT_START 5
1380 #define DQ_STRING_START 6
1381 #define SQ_STRING_START 7
1382 #define FQ_IDENT_START 8
1384 #ifndef YY_NO_UNISTD_H
1392 #ifndef YY_EXTRA_TYPE
1393 #define YY_EXTRA_TYPE void *
1404 FILE *yyin_r, *yyout_r;
1405 size_t yy_buffer_stack_top;
1406 size_t yy_buffer_stack_max;
1414 int yy_did_buffer_switch_on_eof;
1415 int yy_start_stack_ptr;
1416 int yy_start_stack_depth;
1417 int *yy_start_stack;
1419 char* yy_last_accepting_cpos;
1422 int yy_flex_debug_r;
1432 static int yy_init_globals (
yyscan_t yyscanner );
1436 # define yylval yyg->yylval_r
1483 #ifndef YY_SKIP_YYWRAP
1493 static void yyunput (
int c,
char *buf_ptr ,
yyscan_t yyscanner);
1498 static void yy_flex_strncpy (
char *,
const char *,
int ,
yyscan_t yyscanner);
1501 #ifdef YY_NEED_STRLEN
1502 static int yy_flex_strlen (
const char * ,
yyscan_t yyscanner);
1507 static int yyinput (
yyscan_t yyscanner );
1509 static int input (
yyscan_t yyscanner );
1515 #ifndef YY_READ_BUF_SIZE
1518 #define YY_READ_BUF_SIZE 16384
1520 #define YY_READ_BUF_SIZE 8192
1529 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1536 #define YY_INPUT(buf,result,max_size) \
1537 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1541 for ( n = 0; n < max_size && \
1542 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1543 buf[n] = (char) c; \
1545 buf[n++] = (char) c; \
1546 if ( c == EOF && ferror( yyin ) ) \
1547 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1553 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1555 if( errno != EINTR) \
1557 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1573 #define yyterminate() return YY_NULL
1577 #ifndef YY_START_STACK_INCR
1578 #define YY_START_STACK_INCR 25
1582 #ifndef YY_FATAL_ERROR
1583 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1592 #define YY_DECL_IS_OURS 1
1597 #define YY_DECL int yylex \
1598 (YYSTYPE * yylval_param , yyscan_t yyscanner)
1604 #ifndef YY_USER_ACTION
1605 #define YY_USER_ACTION
1610 #define YY_BREAK break;
1613 #define YY_RULE_SETUP \
1615 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1616 (yytext[yyleng - 1] == '\n'); \
1624 char *yy_cp, *yy_bp;
1630 if ( !yyg->yy_init )
1638 if ( ! yyg->yy_start )
1657 #line 384 "../libinterp/parse-tree/lex.ll"
1661 #line 388 "../libinterp/parse-tree/lex.ll"
1666 #line 1667 "libinterp/parse-tree/lex.cc"
1670 yy_cp = yyg->yy_c_buf_p;
1673 *yy_cp = yyg->yy_hold_char;
1680 yy_current_state = yyg->yy_start;
1686 if ( yy_accept[yy_current_state] )
1688 yyg->yy_last_accepting_state = yy_current_state;
1689 yyg->yy_last_accepting_cpos = yy_cp;
1691 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1693 yy_current_state = (int) yy_def[yy_current_state];
1694 if ( yy_current_state >= 290 )
1695 yy_c = yy_meta[yy_c];
1697 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1700 while ( yy_base[yy_current_state] != 1235 );
1703 yy_act = yy_accept[yy_current_state];
1706 yy_cp = yyg->yy_last_accepting_cpos;
1707 yy_current_state = yyg->yy_last_accepting_state;
1708 yy_act = yy_accept[yy_current_state];
1719 *yy_cp = yyg->yy_hold_char;
1720 yy_cp = yyg->yy_last_accepting_cpos;
1721 yy_current_state = yyg->yy_last_accepting_state;
1722 goto yy_find_action;
1727 #line 392 "../libinterp/parse-tree/lex.ll"
1729 curr_lexer->lexer_debug (
"<INPUT_FILE_START>{ANY_INCLUDING_NL}");
1743 #line 406 "../libinterp/parse-tree/lex.ll"
1745 curr_lexer->lexer_debug (
"<INPUT_FILE_START><<EOF>>");
1766 #line 427 "../libinterp/parse-tree/lex.ll"
1768 curr_lexer->lexer_debug (
"<COMMAND_START>(\\.\\.\\.){ANY_EXCEPT_NL}*{NL}");
1786 #line 444 "../libinterp/parse-tree/lex.ll"
1788 curr_lexer->lexer_debug (
"<COMMAND_START>({CCHAR}{ANY_EXCEPT_NL}*)?{NL}");
1800 curr_lexer->m_looking_for_object_index =
false;
1803 curr_lexer->finish_comment (octave::comment_elt::end_of_line);
1810 #line 465 "../libinterp/parse-tree/lex.ll"
1812 curr_lexer->lexer_debug (
"<COMMAND_START>[\\,\\;]");
1825 curr_lexer->m_looking_for_object_index =
false;
1826 curr_lexer->m_at_beginning_of_statement =
true;
1845 #line 498 "../libinterp/parse-tree/lex.ll"
1847 curr_lexer->lexer_debug (
"<COMMAND_START>[\\(\\[\\{]+");
1856 #line 506 "../libinterp/parse-tree/lex.ll"
1858 curr_lexer->lexer_debug (
"<COMMAND_START>[\\)\\]\\}]+");
1878 #line 526 "../libinterp/parse-tree/lex.ll"
1880 curr_lexer->lexer_debug (
"<COMMAND_START>[\\\"\\']");
1882 if (
curr_lexer->m_command_arg_paren_count == 0)
1898 #line 544 "../libinterp/parse-tree/lex.ll"
1900 curr_lexer->lexer_debug (
"<COMMAND_START>{S}*");
1902 if (
curr_lexer->m_command_arg_paren_count == 0)
1922 #line 566 "../libinterp/parse-tree/lex.ll"
1924 curr_lexer->lexer_debug (
"<COMMAND_START>([\\.]|[^#% \\t\\r\\n\\.\\,\\;\\\"\\'\\(\\[\\{\\}\\]\\)]*");
1935 #line 577 "../libinterp/parse-tree/lex.ll"
1937 curr_lexer->lexer_debug (
"<MATRIX_START>{S}*");
1941 curr_lexer->mark_previous_token_trailing_space ();
1947 #line 585 "../libinterp/parse-tree/lex.ll"
1949 curr_lexer->lexer_debug (
"<MATRIX_START>{NL}");
1954 curr_lexer->warn_language_extension (
"bare newline inside parentheses");
1957 int tok =
curr_lexer->previous_token_value ();
1959 if (! (tok ==
';' || tok ==
'[' || tok ==
'{'))
1971 #line 606 "../libinterp/parse-tree/lex.ll"
1973 curr_lexer->lexer_debug (
"<MATRIX_START>\\.\\.\\.{ANY_EXCEPT_NL}*{NL}");
1982 curr_lexer->mark_previous_token_trailing_space ();
2000 #line 633 "../libinterp/parse-tree/lex.ll"
2002 curr_lexer->lexer_debug (
"<MATRIX_START>\\]");
2005 return curr_lexer->handle_close_bracket (
']');
2013 #line 644 "../libinterp/parse-tree/lex.ll"
2015 curr_lexer->lexer_debug (
"<MATRIX_START>\\}*");
2018 return curr_lexer->handle_close_bracket (
'}');
2023 #line 651 "../libinterp/parse-tree/lex.ll"
2027 bool unput_comma =
false;
2030 &&
curr_lexer->space_follows_previous_token ())
2032 int tok =
curr_lexer->previous_token_value ();
2034 if (! (tok ==
'[' || tok ==
'{'
2050 curr_lexer->m_looking_at_object_index.push_front (
false);
2052 curr_lexer->m_looking_for_object_index =
false;
2053 curr_lexer->m_at_beginning_of_statement =
false;
2056 && !
curr_lexer->m_parsed_function_name.top ())
2059 curr_lexer->m_looking_at_matrix_or_assign_lhs =
true;
2071 #line 696 "../libinterp/parse-tree/lex.ll"
2079 curr_lexer->m_looking_at_object_index.pop_front ();
2081 curr_lexer->m_looking_for_object_index =
true;
2082 curr_lexer->m_at_beginning_of_statement =
false;
2101 #line 724 "../libinterp/parse-tree/lex.ll"
2103 curr_lexer->lexer_debug (
"^{S}*{CCHAR}\\{{S}*{NL}");
2113 #line 732 "../libinterp/parse-tree/lex.ll"
2115 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>^{S}*{CCHAR}\\{{S}*{NL}");
2119 if (
curr_lexer->m_block_comment_nesting_level)
2141 #line 757 "../libinterp/parse-tree/lex.ll"
2143 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>^{S}*{CCHAR}\\}{S}*{NL}");
2147 if (
curr_lexer->m_block_comment_nesting_level > 1)
2152 curr_lexer->finish_comment (octave::comment_elt::block);
2157 if (
curr_lexer->m_block_comment_nesting_level == 0)
2176 #line 789 "../libinterp/parse-tree/lex.ll"
2178 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>{ANY_EXCEPT_NL}*{NL}");
2192 #line 802 "../libinterp/parse-tree/lex.ll"
2194 curr_lexer->lexer_debug (
"{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
2212 #line 819 "../libinterp/parse-tree/lex.ll"
2214 curr_lexer->lexer_debug (
"<LINE_COMMENT_START>^{S}*{CCHAR}\\{{S}*{NL}");
2217 curr_lexer->finish_comment (octave::comment_elt::full_line);
2238 #line 842 "../libinterp/parse-tree/lex.ll"
2240 curr_lexer->lexer_debug (
"<LINE_COMMENT_START>{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
2249 bool have_space = (i > 0);
2257 if (c ==
'#' || c ==
'%')
2259 if (first && c ==
'#')
2282 curr_lexer->mark_previous_token_trailing_space ();
2284 curr_lexer->finish_comment (octave::comment_elt::end_of_line);
2308 #line 909 "../libinterp/parse-tree/lex.ll"
2310 curr_lexer->lexer_debug (
"<LINE_COMMENT_START>{ANY_INCLUDING_NL}");
2337 curr_lexer->finish_comment (octave::comment_elt::full_line);
2350 curr_lexer->finish_comment (octave::comment_elt::full_line);
2362 #line 962 "../libinterp/parse-tree/lex.ll"
2364 curr_lexer->lexer_debug (
"<LINE_COMMENT_START><<EOF>>");
2366 curr_lexer->finish_comment (octave::comment_elt::full_line);
2376 #line 974 "../libinterp/parse-tree/lex.ll"
2378 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\"\\\"");
2386 #line 981 "../libinterp/parse-tree/lex.ll"
2388 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\"");
2398 curr_lexer->m_looking_for_object_index =
true;
2399 curr_lexer->m_at_beginning_of_statement =
false;
2414 #line 1006 "../libinterp/parse-tree/lex.ll"
2416 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\[0-7]{1,3}");
2420 unsigned int result;
2421 sscanf (
yytext+1,
"%o", &result);
2428 "invalid octal escape sequence in character string",
2436 curr_lexer->m_string_text +=
static_cast<unsigned char> (result);
2441 #line 1030 "../libinterp/parse-tree/lex.ll"
2443 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\x[0-9a-fA-F]+");
2447 unsigned int result;
2448 sscanf (
yytext+2,
"%x", &result);
2454 curr_lexer->m_string_text +=
static_cast<unsigned char> (result);
2459 #line 1045 "../libinterp/parse-tree/lex.ll"
2461 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\a\"");
2469 #line 1052 "../libinterp/parse-tree/lex.ll"
2471 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\b\"");
2479 #line 1059 "../libinterp/parse-tree/lex.ll"
2481 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\f\"");
2489 #line 1066 "../libinterp/parse-tree/lex.ll"
2491 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\n\"");
2499 #line 1073 "../libinterp/parse-tree/lex.ll"
2501 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\r\"");
2509 #line 1080 "../libinterp/parse-tree/lex.ll"
2511 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\t\"");
2519 #line 1087 "../libinterp/parse-tree/lex.ll"
2521 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\v\"");
2530 #line 1094 "../libinterp/parse-tree/lex.ll"
2532 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\{NL}");
2539 #line 1100 "../libinterp/parse-tree/lex.ll"
2541 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\.");
2549 #line 1107 "../libinterp/parse-tree/lex.ll"
2551 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\.");
2559 #line 1114 "../libinterp/parse-tree/lex.ll"
2561 curr_lexer->lexer_debug (
"<DQ_STRING_START>[^\\.\\\\\\r\\n\\\"]+");
2570 #line 1121 "../libinterp/parse-tree/lex.ll"
2572 curr_lexer->lexer_debug (
"<DQ_STRING_START>{NL}");
2577 "unterminated character string constant",
2592 #line 1141 "../libinterp/parse-tree/lex.ll"
2594 curr_lexer->lexer_debug (
"<SQ_STRING_START>\\'\\'");
2602 #line 1148 "../libinterp/parse-tree/lex.ll"
2604 curr_lexer->lexer_debug (
"<SQ_STRING_START>\\'");
2614 curr_lexer->m_looking_for_object_index =
true;
2615 curr_lexer->m_at_beginning_of_statement =
false;
2630 #line 1173 "../libinterp/parse-tree/lex.ll"
2632 curr_lexer->lexer_debug (
"<SQ_STRING_START>[^\\'\\n\\r]+");
2641 #line 1180 "../libinterp/parse-tree/lex.ll"
2643 curr_lexer->lexer_debug (
"<SQ_STRING_START>{NL}");
2648 "unterminated character string constant",
2663 #line 1200 "../libinterp/parse-tree/lex.ll"
2665 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{FQIDENT}{S}*");
2671 int id_tok =
curr_lexer->handle_fq_identifier ();
2675 curr_lexer->m_looking_for_object_index =
true;
2677 return curr_lexer->count_token_internal (id_tok);
2683 #line 1217 "../libinterp/parse-tree/lex.ll"
2685 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{S}+");
2689 curr_lexer->mark_previous_token_trailing_space ();
2695 #line 1225 "../libinterp/parse-tree/lex.ll"
2697 curr_lexer->lexer_debug (
"<FQ_IDENT_START>(\\.\\.\\.){ANY_EXCEPT_NL}*{NL}");
2705 #line 1231 "../libinterp/parse-tree/lex.ll"
2707 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{ANY_INCLUDING_NL}");
2718 #line 1241 "../libinterp/parse-tree/lex.ll"
2730 *yy_cp = yyg->yy_hold_char;
2731 yyg->yy_c_buf_p = yy_cp -= 2;
2733 #line 1253 "../libinterp/parse-tree/lex.ll"
2736 #line 1253 "../libinterp/parse-tree/lex.ll"
2738 HANDLE_NUMBER (
"{DECIMAL_DIGITS}/\\.[\\*/\\\\^\\']|{DECIMAL_NUMBER}", 10);
2743 #line 1257 "../libinterp/parse-tree/lex.ll"
2754 #line 1266 "../libinterp/parse-tree/lex.ll"
2758 curr_lexer->mark_previous_token_trailing_space ();
2767 #line 1276 "../libinterp/parse-tree/lex.ll"
2769 curr_lexer->lexer_debug (
"\\.\\.\\.{ANY_EXCEPT_NL}*{NL}");
2787 #line 1291 "../libinterp/parse-tree/lex.ll"
2800 #line 1302 "../libinterp/parse-tree/lex.ll"
2807 #line 1306 "../libinterp/parse-tree/lex.ll"
2817 #line 1314 "../libinterp/parse-tree/lex.ll"
2819 curr_lexer->lexer_debug (
"{FQIDENT}{S}*@{S}*{FQIDENT}");
2821 if (
curr_lexer->previous_token_may_be_command ())
2830 std::string txt =
yytext;
2832 std::size_t at_or_dot_pos = txt.find_first_of (
"@.");
2834 if (at_or_dot_pos != std::string::npos)
2836 std::size_t spc_pos = txt.find_first_of (
" \t");
2838 if (spc_pos != std::string::npos && spc_pos < at_or_dot_pos)
2841 curr_lexer->m_filepos.increment_column (spc_pos);
2848 curr_lexer->m_looking_for_object_index =
true;
2849 curr_lexer->m_at_beginning_of_statement =
false;
2851 return curr_lexer->handle_superclass_identifier ();
2860 #line 1355 "../libinterp/parse-tree/lex.ll"
2862 curr_lexer->lexer_debug (
"\\?{S}*{FQIDENT}");
2864 if (
curr_lexer->previous_token_may_be_command ()
2865 &&
curr_lexer->space_follows_previous_token ())
2874 int id_tok =
curr_lexer->handle_meta_identifier ();
2878 curr_lexer->m_looking_for_object_index =
true;
2880 return curr_lexer->count_token_internal (id_tok);
2886 #line 1380 "../libinterp/parse-tree/lex.ll"
2889 #line 1380 "../libinterp/parse-tree/lex.ll"
2891 curr_lexer->lexer_debug (
"\\@|\\@{S}*{FQIDENT}");
2893 if (
curr_lexer->previous_token_may_be_command ()
2894 &&
curr_lexer->space_follows_previous_token ())
2901 int tok_val =
curr_lexer->previous_token_value ();
2904 &&
curr_lexer->space_follows_previous_token ()
2905 && ! (tok_val ==
'[' || tok_val ==
'{'
2915 curr_lexer->m_at_beginning_of_statement =
false;
2917 std::string ident =
yytext;
2922 curr_lexer->m_looking_for_object_index =
false;
2928 ident = ident.substr (1);
2929 ident.erase (std::remove_if (ident.begin (), ident.end (),
2930 is_space_or_tab), ident.end ());
2936 "function handles may not refer to keywords",
2941 curr_lexer->m_looking_for_object_index =
true;
2950 return curr_lexer->count_token_internal (tok->token_value ());
2964 #line 1452 "../libinterp/parse-tree/lex.ll"
2972 curr_lexer->m_at_beginning_of_statement =
false;
2974 (
"bare newline inside parentheses");
2977 ||
curr_lexer->m_nesting_level.is_anon_fcn_body ())
2982 curr_lexer->m_at_beginning_of_statement =
true;
2986 else if (
curr_lexer->m_nesting_level.is_bracket_or_brace ())
2994 "unexpected internal lexer error",
3009 #line 1495 "../libinterp/parse-tree/lex.ll"
3013 if (
curr_lexer->previous_token_may_be_command ()
3014 &&
curr_lexer->space_follows_previous_token ())
3020 else if (
curr_lexer->m_at_beginning_of_statement)
3027 int tok =
curr_lexer->previous_token_value ();
3029 if (
curr_lexer->whitespace_is_significant ())
3031 if (
curr_lexer->space_follows_previous_token ())
3033 if (tok ==
'[' || tok ==
'{'
3047 if (tok ==
'[' || tok ==
'{'
3063 if (! tok || tok ==
'[' || tok ==
'{' || tok ==
'('
3084 #line 1568 "../libinterp/parse-tree/lex.ll"
3088 if (
curr_lexer->previous_token_may_be_command ()
3089 &&
curr_lexer->space_follows_previous_token ())
3097 int tok =
curr_lexer->previous_token_value ();
3099 if (
curr_lexer->whitespace_is_significant ())
3101 if (
curr_lexer->space_follows_previous_token ())
3103 if (tok ==
'[' || tok ==
'{'
3134 #line 1616 "../libinterp/parse-tree/lex.ll"
3139 #line 1617 "../libinterp/parse-tree/lex.ll"
3144 #line 1618 "../libinterp/parse-tree/lex.ll"
3149 #line 1619 "../libinterp/parse-tree/lex.ll"
3154 #line 1620 "../libinterp/parse-tree/lex.ll"
3159 #line 1621 "../libinterp/parse-tree/lex.ll"
3164 #line 1622 "../libinterp/parse-tree/lex.ll"
3169 #line 1623 "../libinterp/parse-tree/lex.ll"
3174 #line 1624 "../libinterp/parse-tree/lex.ll"
3179 #line 1625 "../libinterp/parse-tree/lex.ll"
3184 #line 1626 "../libinterp/parse-tree/lex.ll"
3189 #line 1627 "../libinterp/parse-tree/lex.ll"
3194 #line 1628 "../libinterp/parse-tree/lex.ll"
3199 #line 1629 "../libinterp/parse-tree/lex.ll"
3204 #line 1630 "../libinterp/parse-tree/lex.ll"
3209 #line 1631 "../libinterp/parse-tree/lex.ll"
3217 #line 1637 "../libinterp/parse-tree/lex.ll"
3232 #line 1649 "../libinterp/parse-tree/lex.ll"
3237 #line 1650 "../libinterp/parse-tree/lex.ll"
3242 #line 1651 "../libinterp/parse-tree/lex.ll"
3247 #line 1653 "../libinterp/parse-tree/lex.ll"
3251 bool at_beginning_of_statement
3252 = (! (
curr_lexer->whitespace_is_significant ()
3253 ||
curr_lexer->m_looking_at_object_index.front ()));
3255 return curr_lexer->handle_op (
';', at_beginning_of_statement);
3260 #line 1663 "../libinterp/parse-tree/lex.ll"
3265 #line 1664 "../libinterp/parse-tree/lex.ll"
3270 #line 1666 "../libinterp/parse-tree/lex.ll"
3275 #line 1667 "../libinterp/parse-tree/lex.ll"
3280 #line 1669 "../libinterp/parse-tree/lex.ll"
3284 bool at_beginning_of_statement
3285 = (! (
curr_lexer->whitespace_is_significant ()
3286 ||
curr_lexer->m_looking_at_object_index.front ()));
3288 return curr_lexer->handle_op (
',', at_beginning_of_statement);
3293 #line 1679 "../libinterp/parse-tree/lex.ll"
3302 #line 1685 "../libinterp/parse-tree/lex.ll"
3307 #line 1686 "../libinterp/parse-tree/lex.ll"
3312 #line 1688 "../libinterp/parse-tree/lex.ll"
3316 bool unput_comma =
false;
3319 &&
curr_lexer->space_follows_previous_token ())
3321 int tok =
curr_lexer->previous_token_value ();
3323 if (! (tok ==
'[' || tok ==
'{'
3342 curr_lexer->m_looking_at_object_index.push_front
3345 curr_lexer->m_looking_at_indirect_ref =
false;
3346 curr_lexer->m_looking_for_object_index =
false;
3347 curr_lexer->m_at_beginning_of_statement =
false;
3357 #line 1730 "../libinterp/parse-tree/lex.ll"
3365 curr_lexer->m_looking_at_object_index.pop_front ();
3367 curr_lexer->m_looking_for_object_index =
true;
3368 curr_lexer->m_at_beginning_of_statement =
false;
3372 curr_lexer->m_looking_at_anon_fcn_args =
false;
3373 curr_lexer->m_nesting_level.anon_fcn_body ();
3381 #line 1751 "../libinterp/parse-tree/lex.ll"
3385 if (
curr_lexer->previous_token_may_be_command ()
3386 &&
curr_lexer->space_follows_previous_token ())
3395 curr_lexer->m_looking_for_object_index =
false;
3396 curr_lexer->m_at_beginning_of_statement =
false;
3407 #line 1775 "../libinterp/parse-tree/lex.ll"
3416 #line 1781 "../libinterp/parse-tree/lex.ll"
3421 #line 1782 "../libinterp/parse-tree/lex.ll"
3426 #line 1783 "../libinterp/parse-tree/lex.ll"
3431 #line 1784 "../libinterp/parse-tree/lex.ll"
3436 #line 1785 "../libinterp/parse-tree/lex.ll"
3441 #line 1786 "../libinterp/parse-tree/lex.ll"
3446 #line 1787 "../libinterp/parse-tree/lex.ll"
3451 #line 1788 "../libinterp/parse-tree/lex.ll"
3456 #line 1789 "../libinterp/parse-tree/lex.ll"
3461 #line 1790 "../libinterp/parse-tree/lex.ll"
3466 #line 1791 "../libinterp/parse-tree/lex.ll"
3471 #line 1792 "../libinterp/parse-tree/lex.ll"
3479 #line 1798 "../libinterp/parse-tree/lex.ll"
3483 bool unput_comma =
false;
3486 &&
curr_lexer->space_follows_previous_token ())
3488 int tok =
curr_lexer->previous_token_value ();
3490 if (! (tok ==
'[' || tok ==
'{'
3504 curr_lexer->m_looking_at_object_index.push_front
3508 curr_lexer->m_looking_for_object_index =
false;
3509 curr_lexer->m_at_beginning_of_statement =
false;
3521 #line 1837 "../libinterp/parse-tree/lex.ll"
3527 curr_lexer->m_looking_at_object_index.pop_front ();
3529 curr_lexer->m_looking_for_object_index =
true;
3530 curr_lexer->m_at_beginning_of_statement =
false;
3545 #line 1859 "../libinterp/parse-tree/lex.ll"
3557 else if (
curr_lexer->previous_token_may_be_command ()
3558 &&
curr_lexer->space_follows_previous_token ())
3565 std::ostringstream buf;
3567 buf <<
"invalid character '"
3569 <<
"' (ASCII " << c <<
")";
3585 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
3587 # pragma GCC diagnostic ignored "-Wold-style-cast"
3588 # pragma GCC diagnostic ignored "-Wunused-parameter"
3593 #line 1905 "../libinterp/parse-tree/lex.ll"
3596 #line 3597 "libinterp/parse-tree/lex.cc"
3601 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
3604 *yy_cp = yyg->yy_hold_char;
3634 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
3636 yy_current_state = yy_get_previous_state( yyscanner );
3647 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
3651 if ( yy_next_state )
3654 yy_cp = ++yyg->yy_c_buf_p;
3655 yy_current_state = yy_next_state;
3661 yy_cp = yyg->yy_c_buf_p;
3662 goto yy_find_action;
3666 else switch ( yy_get_next_buffer( yyscanner ) )
3670 yyg->yy_did_buffer_switch_on_eof = 0;
3672 if (
yywrap( yyscanner ) )
3691 if ( ! yyg->yy_did_buffer_switch_on_eof )
3699 yyg->yytext_ptr + yy_amount_of_matched_text;
3701 yy_current_state = yy_get_previous_state( yyscanner );
3703 yy_cp = yyg->yy_c_buf_p;
3711 yy_current_state = yy_get_previous_state( yyscanner );
3713 yy_cp = yyg->yy_c_buf_p;
3715 goto yy_find_action;
3722 "fatal flex scanner internal error--no action found" );
3735 static int yy_get_next_buffer (
yyscan_t yyscanner)
3739 char *source = yyg->yytext_ptr;
3740 int number_to_move, i;
3745 "fatal flex scanner internal error--end of buffer missed" );
3749 if ( yyg->yy_c_buf_p - yyg->yytext_ptr -
YY_MORE_ADJ == 1 )
3769 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
3771 for ( i = 0; i < number_to_move; ++i )
3772 *(dest++) = *(source++);
3785 while ( num_to_read <= 0 )
3791 int yy_c_buf_p_offset =
3792 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
3794 if ( b->yy_is_our_buffer )
3796 int new_size = b->yy_buf_size * 2;
3798 if ( new_size <= 0 )
3799 b->yy_buf_size += b->yy_buf_size / 8;
3801 b->yy_buf_size *= 2;
3803 b->yy_ch_buf = (
char *)
3806 (
yy_size_t) (b->yy_buf_size + 2) , yyscanner );
3810 b->yy_ch_buf = NULL;
3812 if ( ! b->yy_ch_buf )
3814 "fatal error - scanner input buffer overflow" );
3816 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
3828 yyg->yy_n_chars, num_to_read );
3833 if ( yyg->yy_n_chars == 0 )
3854 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
3858 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
3863 yyg->yy_n_chars += number_to_move;
3880 yy_current_state = yyg->yy_start;
3883 for ( yy_cp = yyg->yytext_ptr +
YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
3886 if ( yy_accept[yy_current_state] )
3888 yyg->yy_last_accepting_state = yy_current_state;
3889 yyg->yy_last_accepting_cpos = yy_cp;
3891 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3893 yy_current_state = (int) yy_def[yy_current_state];
3894 if ( yy_current_state >= 290 )
3895 yy_c = yy_meta[yy_c];
3897 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
3900 return yy_current_state;
3912 char *yy_cp = yyg->yy_c_buf_p;
3915 if ( yy_accept[yy_current_state] )
3917 yyg->yy_last_accepting_state = yy_current_state;
3918 yyg->yy_last_accepting_cpos = yy_cp;
3920 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3922 yy_current_state = (int) yy_def[yy_current_state];
3923 if ( yy_current_state >= 290 )
3924 yy_c = yy_meta[yy_c];
3926 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
3927 yy_is_jam = (yy_current_state == 289);
3930 return yy_is_jam ? 0 : yy_current_state;
3935 static void yyunput (
int c,
char * yy_bp ,
yyscan_t yyscanner)
3940 yy_cp = yyg->yy_c_buf_p;
3943 *yy_cp = yyg->yy_hold_char;
3945 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3948 int number_to_move = yyg->yy_n_chars + 2;
3955 *--dest = *--source;
3957 yy_cp += (int) (dest - source);
3958 yy_bp += (int) (dest - source);
3962 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3966 *--yy_cp = (char) c;
3968 yyg->yytext_ptr = yy_bp;
3969 yyg->yy_hold_char = *yy_cp;
3970 yyg->yy_c_buf_p = yy_cp;
3977 static int yyinput (
yyscan_t yyscanner)
3979 static int input (
yyscan_t yyscanner)
3986 *yyg->yy_c_buf_p = yyg->yy_hold_char;
3996 *yyg->yy_c_buf_p =
'\0';
4000 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
4003 switch ( yy_get_next_buffer( yyscanner ) )
4023 if (
yywrap( yyscanner ) )
4026 if ( ! yyg->yy_did_buffer_switch_on_eof )
4029 return yyinput(yyscanner);
4031 return input(yyscanner);
4036 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
4042 c = *(
unsigned char *) yyg->yy_c_buf_p;
4043 *yyg->yy_c_buf_p =
'\0';
4044 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
4091 *yyg->yy_c_buf_p = yyg->yy_hold_char;
4104 yyg->yy_did_buffer_switch_on_eof = 1;
4113 yyg->yy_hold_char = *yyg->yy_c_buf_p;
4130 b->yy_buf_size = size;
4135 b->yy_ch_buf = (
char *)
yyalloc( (
yy_size_t) (b->yy_buf_size + 2) , yyscanner );
4136 if ( ! b->yy_ch_buf )
4139 b->yy_is_our_buffer = 1;
4160 if ( b->yy_is_our_buffer )
4161 yyfree( (
void *) b->yy_ch_buf , yyscanner );
4163 yyfree( (
void *) b , yyscanner );
4178 b->yy_input_file = file;
4179 b->yy_fill_buffer = 1;
4186 b->yy_bs_lineno = 1;
4187 b->yy_bs_column = 0;
4190 b->yy_is_interactive = file ? (
isatty( fileno(file) ) > 0) : 0;
4214 b->yy_buf_pos = &b->yy_ch_buf[0];
4232 if (new_buffer == NULL)
4241 *yyg->yy_c_buf_p = yyg->yy_hold_char;
4248 yyg->yy_buffer_stack_top++;
4253 yyg->yy_did_buffer_switch_on_eof = 1;
4268 if (yyg->yy_buffer_stack_top > 0)
4269 --yyg->yy_buffer_stack_top;
4273 yyg->yy_did_buffer_switch_on_eof = 1;
4285 if (!yyg->yy_buffer_stack) {
4292 yyg->yy_buffer_stack = (
struct yy_buffer_state**)
yyalloc
4293 (num_to_alloc *
sizeof(
struct yy_buffer_state*)
4295 if ( ! yyg->yy_buffer_stack )
4296 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
4298 memset(yyg->yy_buffer_stack, 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
4300 yyg->yy_buffer_stack_max = num_to_alloc;
4301 yyg->yy_buffer_stack_top = 0;
4305 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
4310 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
4311 yyg->yy_buffer_stack = (
struct yy_buffer_state**)
yyrealloc
4312 (yyg->yy_buffer_stack,
4313 num_to_alloc *
sizeof(
struct yy_buffer_state*)
4315 if ( ! yyg->yy_buffer_stack )
4316 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
4319 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size *
sizeof(
struct yy_buffer_state*));
4320 yyg->yy_buffer_stack_max = num_to_alloc;
4344 b->yy_buf_size = (int) (size - 2);
4345 b->yy_buf_pos = b->yy_ch_buf = base;
4346 b->yy_is_our_buffer = 0;
4347 b->yy_input_file = NULL;
4348 b->yy_n_chars = b->yy_buf_size;
4349 b->yy_is_interactive = 0;
4351 b->yy_fill_buffer = 0;
4389 buf = (
char *)
yyalloc(
n , yyscanner );
4393 for ( i = 0; i < _yybytes_len; ++i )
4394 buf[i] = yybytes[i];
4405 b->yy_is_our_buffer = 1;
4410 #ifndef YY_EXIT_FAILURE
4411 #define YY_EXIT_FAILURE 2
4418 fprintf( stderr,
"%s\n", msg );
4429 int yyless_macro_arg = (n); \
4430 YY_LESS_LINENO(yyless_macro_arg);\
4431 yytext[yyleng] = yyg->yy_hold_char; \
4432 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
4433 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
4434 *yyg->yy_c_buf_p = '\0'; \
4435 yyleng = yyless_macro_arg; \
4605 if (ptr_yy_globals == NULL){
4612 if (*ptr_yy_globals == NULL){
4618 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
4620 return yy_init_globals ( *ptr_yy_globals );
4636 if (ptr_yy_globals == NULL){
4643 if (*ptr_yy_globals == NULL){
4650 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
4654 return yy_init_globals ( *ptr_yy_globals );
4657 static int yy_init_globals (
yyscan_t yyscanner)
4664 yyg->yy_buffer_stack = NULL;
4665 yyg->yy_buffer_stack_top = 0;
4666 yyg->yy_buffer_stack_max = 0;
4667 yyg->yy_c_buf_p = NULL;
4671 yyg->yy_start_stack_ptr = 0;
4672 yyg->yy_start_stack_depth = 0;
4673 yyg->yy_start_stack = NULL;
4703 yyfree(yyg->yy_buffer_stack , yyscanner);
4704 yyg->yy_buffer_stack = NULL;
4707 yyfree( yyg->yy_start_stack , yyscanner );
4708 yyg->yy_start_stack = NULL;
4712 yy_init_globals( yyscanner);
4715 yyfree ( yyscanner , yyscanner );
4725 static void yy_flex_strncpy (
char* s1,
const char * s2,
int n ,
yyscan_t yyscanner)
4731 for ( i = 0; i <
n; ++i )
4736 #ifdef YY_NEED_STRLEN
4737 static int yy_flex_strlen (
const char * s ,
yyscan_t yyscanner)
4740 for (
n = 0; s[
n]; ++
n )
4747 #define YYTABLES_NAME "yytables"
4749 #line 1905 "../libinterp/parse-tree/lex.ll"
4752 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
4754 # pragma GCC diagnostic pop
4766 return std::realloc (ptr, size);
4776 display_character (
char c)
4912 std::cerr <<
"SPACE";
4935 int nargin = args.
length ();
4951 std::string kword = wordlist[i].name;
4954 if (! (kword ==
"set" || kword ==
"get" || kword ==
"arguments"
4955 || kword ==
"enumeration" || kword ==
"events"
4956 || kword ==
"methods" || kword ==
"properties"))
4966 std::string name = args(0).xstring_value (
"iskeyword: NAME must be a string");
4989 while (! m_frame_stack.empty ())
4990 m_frame_stack.pop_front ();
4999 m_frame_stack.pop_front ();
5008 return m_frame_stack.front ();
5014 std::size_t sz = size ();
5128 return (tok ==
'+' || tok ==
'-' || tok ==
'@' || tok ==
'~' || tok ==
'!'
5129 || tok ==
',' || tok ==
';' || tok ==
'*' || tok ==
'/'
5130 || tok ==
':' || tok ==
'=' || tok ==
ADD_EQ
5179 looks_like_copyright (
const std::string& s)
5187 std::size_t offset = s.find_first_not_of (
" \t\n\r");
5189 return (offset != std::string::npos
5190 && (s.substr (offset, 9) ==
"Copyright"
5191 || s.substr (offset, 6) ==
"Author"
5192 || s.substr (offset, 23) ==
"SPDX-License-Identifier"));
5196 looks_like_shebang (
const std::string& s)
5198 return ((! s.empty ()) && (s[0] ==
'!'));
5205 m_chars_left = m_buffer.length ();
5215 static const char *
const eol =
"\n";
5217 std::size_t
len = 0;
5220 std::size_t newline_pos = m_buffer.find (
'\n', m_offset);
5221 len = (newline_pos != std::string::npos
5222 ? newline_pos - m_offset + 1
5223 : (max_size > m_chars_left ? m_chars_left : max_size));
5226 len = max_size > m_chars_left ? m_chars_left : max_size;
5229 memcpy (buf, m_buffer.c_str () + m_offset,
len);
5231 m_chars_left -=
len;
5237 if (m_chars_left == 0 && buf[
len-1] !=
'\n')
5279 clear_start_state ();
5288 #define OCTAVE_YYG \
5289 struct yyguts_t *yyg = static_cast<struct yyguts_t*> (m_scanner)
5295 clear_start_state ();
5306 || input_from_eval_string ()))
5311 m_comment_buf.reset ();
5327 push_start_state (state);
5333 lexer_debug (
"<<EOF>>");
5340 warning (
"block comment unterminated at end of input");
5344 warning (
"near line %d of file '%s.m'",
5350 push_token (tok_val);
5375 display_character (c);
5376 std::cerr << std::endl;
5388 display_character (c);
5389 std::cerr << std::endl;
5410 display_character (c);
5411 std::cerr << std::endl;
5421 char *yytxt = flex_yytext ();
5441 int c = text_yyinput ();
5443 return is_space_or_tab (c);
5449 bool retval =
false;
5469 int slen = s.length ();
5481 token *tok_val =
nullptr;
5506 if (inside_any_object_index ()
5563 #if defined (DISABLE_ARGUMENTS_VALIDATION_BLOCK)
5683 update_token_positions (slen);
5688 #if defined (DISABLE_ARGUMENTS_VALIDATION_BLOCK)
5732 push_token (tok_val);
5755 p2 = s.find (
'.', p1);
5757 if (p2 != std::string::npos)
5759 s_part = s.substr (p1, p2 - p1);
5763 s_part = s.substr (p1);
5768 while (p2 != std::string::npos);
5782 looks_like_bin (
const char *s,
int len)
5784 return (
len > 2 && s[0] ==
'0' && (s[1] ==
'b' || s[1] ==
'B'));
5788 looks_like_hex (
const char *s,
int len)
5790 return (
len > 2 && s[0] ==
'0' && (s[1] ==
'x' || s[1] ==
'X'));
5794 make_integer_value (uintmax_t long_int_val,
bool unsigned_val,
int bytes)
5845 base_lexer::handle_number<2> ()
5848 std::string yytxt (flex_yytext () + 2);
5850 yytxt.erase (std::remove (yytxt.begin (), yytxt.end (),
'_'),
5853 std::size_t pos = yytxt.find_first_of (
"su");
5855 bool unsigned_val =
true;
5858 if (pos == std::string::npos)
5860 std::size_t num_digits = yytxt.length ();
5862 if (num_digits <= 8)
5864 else if (num_digits <= 16)
5866 else if (num_digits <= 32)
5868 else if (num_digits <= 64)
5873 unsigned_val = (yytxt[pos] ==
'u');
5874 std::string size_str = yytxt.substr (pos+1);
5875 yytxt = yytxt.substr (0, pos);
5876 std::size_t num_digits = yytxt.length ();
5878 if (size_str ==
"8" && num_digits <= 8)
5880 else if (size_str ==
"16" && num_digits <= 16)
5882 else if (size_str ==
"32" && num_digits <= 32)
5884 else if (size_str ==
"64" && num_digits <= 64)
5892 "too many digits for binary constant",
5906 uintmax_t long_int_val;
5907 if (
sizeof (uintmax_t) ==
sizeof (
unsigned long long))
5908 long_int_val = strtoull (yytxt.c_str (), &end, 2);
5909 else if (
sizeof (uintmax_t) ==
sizeof (
unsigned long))
5910 long_int_val = strtoul (yytxt.c_str (), &end, 2);
5914 if (errno == ERANGE)
5918 = make_integer_value (long_int_val, unsigned_val, bytes);
5923 update_token_positions (flex_yyleng ());
5927 return count_token_internal (
NUMBER);
5933 return (
static_cast<uint64_t
> (1) << std::numeric_limits<double>::digits);
5938 base_lexer::handle_number<10> ()
5941 bool digits_only =
true;
5943 char *yytxt = flex_yytext ();
5944 std::size_t yylng = flex_yyleng ();
5948 char *p = &tmptxt[0];
5951 while ((ch = *rp++))
5961 digits_only =
false;
5969 digits_only =
false;
5978 digits_only =
false;
5993 nread = sscanf (tmptxt,
"%lf", &value);
5997 assert (nread == 1);
6004 if (digits_only && value >= flintmax ())
6014 uintmax_t long_int_val;
6015 if (
sizeof (uintmax_t) ==
sizeof (
unsigned long long))
6016 long_int_val = strtoull (tmptxt, &end, 10);
6017 else if (
sizeof (uintmax_t) ==
sizeof (
unsigned long))
6018 long_int_val = strtoul (tmptxt, &end, 10);
6022 if (errno != ERANGE)
6039 update_token_positions (yylng);
6048 return count_token_internal (
NUMBER);
6053 base_lexer::handle_number<16> ()
6056 std::string yytxt (flex_yytext () + 2);
6058 yytxt.erase (std::remove (yytxt.begin (), yytxt.end (),
'_'),
6061 std::size_t pos = yytxt.find_first_of (
"su");
6063 bool unsigned_val =
true;
6066 if (pos == std::string::npos)
6068 std::size_t num_digits = yytxt.length ();
6070 if (num_digits <= 2)
6072 else if (num_digits <= 4)
6074 else if (num_digits <= 8)
6076 else if (num_digits <= 16)
6081 unsigned_val = (yytxt[pos] ==
'u');
6082 std::string size_str = yytxt.substr (pos+1);
6083 yytxt = yytxt.substr (0, pos);
6084 std::size_t num_digits = yytxt.length ();
6086 if (size_str ==
"8" && num_digits <= 2)
6088 else if (size_str ==
"16" && num_digits <= 4)
6090 else if (size_str ==
"32" && num_digits <= 8)
6092 else if (size_str ==
"64" && num_digits <= 16)
6100 "too many digits for hexadecimal constant",
6111 uintmax_t long_int_val;
6112 int status = sscanf (yytxt.c_str (),
"%jx", &long_int_val);
6116 = make_integer_value (long_int_val, unsigned_val, bytes);
6121 update_token_positions (flex_yyleng ());
6125 return count_token_internal (
NUMBER);
6131 char *yytxt = flex_yytext ();
6132 int yylng = flex_yyleng ();
6135 if (yytxt[0] ==
'\\')
6136 warn_language_extension_continuation ();
6140 bool have_space =
false;
6141 while (offset < yylng)
6143 char c = yytxt[offset];
6144 if (is_space_or_tab (c))
6156 bool have_comment =
false;
6158 while (offset < yylng)
6160 char c = yytxt[offset];
6162 if (c ==
'#' || c ==
'%')
6164 if (first && c ==
'#')
6170 have_comment =
true;
6220 if (bracket_type ==
']')
6222 else if (bracket_type ==
'}')
6230 return count_token (bracket_type);
6240 bool space_after = looking_at_space ();
6242 return (space_before && ! space_after
6249 update_token_positions (flex_yyleng ());
6251 std::string txt = flex_yytext ();
6253 txt.erase (std::remove_if (txt.begin (), txt.end (), is_space_or_tab),
6256 std::size_t pos = txt.find (
"@");
6258 std::string meth = txt.substr (0, pos);
6259 std::string cls = txt.substr (pos + 1);
6261 if (
iskeyword (meth) || fq_identifier_contains_keyword (cls))
6265 "method, class, and package names may not be keywords",
6283 std::string txt = flex_yytext ();
6285 txt.erase (std::remove_if (txt.begin (), txt.end (), is_space_or_tab),
6289 std::string cls = txt.substr (1);
6294 if (fq_identifier_contains_keyword (cls))
6297 "class and package names may not be keywords",
6314 std::string txt = flex_yytext ();
6316 txt.erase (std::remove_if (txt.begin (), txt.end (), is_space_or_tab),
6322 if (fq_identifier_contains_keyword (txt))
6326 "function, method, class, and package names may not be keywords",
6348 update_token_positions (flex_yyleng ());
6350 std::string ident = flex_yytext ();
6369 int kw_token = make_keyword_token (ident);
6380 return count_token_internal (kw_token);
6395 || ident ==
"e" || ident ==
"pi"
6396 || ident ==
"I" || ident ==
"i"
6397 || ident ==
"J" || ident ==
"j"
6398 || ident ==
"Inf" || ident ==
"inf"
6399 || ident ==
"NaN" || ident ==
"nan"))
6411 return count_token_internal (
NAME);
6421 while (i <
len && is_space_or_tab (txt[i]))
6434 "potential auto-insertion of '%c' near line %d",
6438 "potential auto-insertion of '%c' near line %d of file %s",
6449 "Octave language extension used: %s",
6453 "Octave language extension used: %s near line %d offile %s",
6461 warn_language_extension (
"# used as comment character");
6467 warn_language_extension (
"\\ used as line continuation marker");
6474 int n = t.length ();
6477 warn_language_extension (t +
" used as operator");
6487 "%s; near line %d of file '%s'", msg.c_str (),
6495 lval->tok_val = tok;
6503 return lval->tok_val;
6517 case '=': std::cerr <<
"'='\n";
break;
6518 case ':': std::cerr <<
"':'\n";
break;
6519 case '-': std::cerr <<
"'-'\n";
break;
6520 case '+': std::cerr <<
"'+'\n";
break;
6521 case '*': std::cerr <<
"'*'\n";
break;
6522 case '/': std::cerr <<
"'/'\n";
break;
6523 case '~': std::cerr <<
"'~'\n";
break;
6524 case '!': std::cerr <<
"'!'\n";
break;
6525 case ADD_EQ: std::cerr <<
"ADD_EQ\n";
break;
6526 case SUB_EQ: std::cerr <<
"SUB_EQ\n";
break;
6527 case MUL_EQ: std::cerr <<
"MUL_EQ\n";
break;
6528 case DIV_EQ: std::cerr <<
"DIV_EQ\n";
break;
6529 case LEFTDIV_EQ: std::cerr <<
"LEFTDIV_EQ\n";
break;
6530 case POW_EQ: std::cerr <<
"POW_EQ\n";
break;
6531 case EMUL_EQ: std::cerr <<
"EMUL_EQ\n";
break;
6532 case EDIV_EQ: std::cerr <<
"EDIV_EQ\n";
break;
6533 case ELEFTDIV_EQ: std::cerr <<
"ELEFTDIV_EQ\n";
break;
6534 case EPOW_EQ: std::cerr <<
"EPOW_EQ\n";
break;
6535 case AND_EQ: std::cerr <<
"AND_EQ\n";
break;
6536 case OR_EQ: std::cerr <<
"OR_EQ\n";
break;
6537 case EXPR_AND_AND: std::cerr <<
"EXPR_AND_AND\n";
break;
6538 case EXPR_OR_OR: std::cerr <<
"EXPR_OR_OR\n";
break;
6539 case EXPR_AND: std::cerr <<
"EXPR_AND\n";
break;
6540 case EXPR_OR: std::cerr <<
"EXPR_OR\n";
break;
6541 case EXPR_LT: std::cerr <<
"EXPR_LT\n";
break;
6542 case EXPR_LE: std::cerr <<
"EXPR_LE\n";
break;
6543 case EXPR_EQ: std::cerr <<
"EXPR_EQ\n";
break;
6544 case EXPR_NE: std::cerr <<
"EXPR_NE\n";
break;
6545 case EXPR_GE: std::cerr <<
"EXPR_GE\n";
break;
6546 case EXPR_GT: std::cerr <<
"EXPR_GT\n";
break;
6547 case LEFTDIV: std::cerr <<
"LEFTDIV\n";
break;
6548 case EMUL: std::cerr <<
"EMUL\n";
break;
6549 case EDIV: std::cerr <<
"EDIV\n";
break;
6550 case ELEFTDIV: std::cerr <<
"ELEFTDIV\n";
break;
6551 case HERMITIAN: std::cerr <<
"HERMITIAN\n";
break;
6552 case TRANSPOSE: std::cerr <<
"TRANSPOSE\n";
break;
6553 case PLUS_PLUS: std::cerr <<
"PLUS_PLUS\n";
break;
6554 case MINUS_MINUS: std::cerr <<
"MINUS_MINUS\n";
break;
6555 case POW: std::cerr <<
"POW\n";
break;
6556 case EPOW: std::cerr <<
"EPOW\n";
break;
6560 token *tok_val = current_token ();
6561 std::cerr <<
"NUMBER [";
6570 token *tok_val = current_token ();
6571 std::cerr <<
"STRUCT_ELT [" << tok_val->
text () <<
"]\n";
6577 token *tok_val = current_token ();
6578 std::cerr <<
"NAME [" << tok_val->
text () <<
"]\n";
6582 case END: std::cerr <<
"END\n";
break;
6587 token *tok_val = current_token ();
6589 std::cerr << (tok ==
DQ_STRING ?
"DQ_STRING" :
"SQ_STRING")
6590 <<
" [" << tok_val->
text () <<
"]\n";
6594 case FOR: std::cerr <<
"FOR\n";
break;
6595 case WHILE: std::cerr <<
"WHILE\n";
break;
6596 case DO: std::cerr <<
"DO\n";
break;
6597 case UNTIL: std::cerr <<
"UNTIL\n";
break;
6598 case IF: std::cerr <<
"IF\n";
break;
6599 case ELSEIF: std::cerr <<
"ELSEIF\n";
break;
6600 case ELSE: std::cerr <<
"ELSE\n";
break;
6601 case SWITCH: std::cerr <<
"SWITCH\n";
break;
6602 case CASE: std::cerr <<
"CASE\n";
break;
6603 case OTHERWISE: std::cerr <<
"OTHERWISE\n";
break;
6604 case BREAK: std::cerr <<
"BREAK\n";
break;
6605 case CONTINUE: std::cerr <<
"CONTINUE\n";
break;
6606 case FUNC_RET: std::cerr <<
"FUNC_RET\n";
break;
6607 case UNWIND: std::cerr <<
"UNWIND\n";
break;
6608 case CLEANUP: std::cerr <<
"CLEANUP\n";
break;
6609 case TRY: std::cerr <<
"TRY\n";
break;
6610 case CATCH: std::cerr <<
"CATCH\n";
break;
6611 case GLOBAL: std::cerr <<
"GLOBAL\n";
break;
6612 case PERSISTENT: std::cerr <<
"PERSISTENT\n";
break;
6613 case FCN_HANDLE: std::cerr <<
"FCN_HANDLE\n";
break;
6614 case END_OF_INPUT: std::cerr <<
"END_OF_INPUT\n\n";
break;
6615 case LEXICAL_ERROR: std::cerr <<
"LEXICAL_ERROR\n\n";
break;
6616 case FCN: std::cerr <<
"FCN\n";
break;
6617 case INPUT_FILE: std::cerr <<
"INPUT_FILE\n";
break;
6619 case METAQUERY: std::cerr <<
"METAQUERY\n";
break;
6620 case GET: std::cerr <<
"GET\n";
break;
6621 case SET: std::cerr <<
"SET\n";
break;
6622 case PROPERTIES: std::cerr <<
"PROPERTIES\n";
break;
6623 case METHODS: std::cerr <<
"METHODS\n";
break;
6624 case EVENTS: std::cerr <<
"EVENTS\n";
break;
6625 case CLASSDEF: std::cerr <<
"CLASSDEF\n";
break;
6626 case '\n': std::cerr <<
"\\n\n";
break;
6627 case '\r': std::cerr <<
"\\r\n";
break;
6628 case '\t': std::cerr <<
"TAB\n";
break;
6631 if (tok < 256 && tok > 31)
6632 std::cerr << static_cast<char> (tok) <<
"\n";
6634 std::cerr <<
"UNKNOWN(" << tok <<
")\n";
6643 error (
"fatal lexer error: %s", msg);
6674 std::cerr << std::endl;
6676 display_start_state ();
6678 std::cerr <<
"P: " << pattern << std::endl;
6679 std::cerr <<
"T: " << flex_yytext () << std::endl;
6696 start_state_stack.push (state);
6698 BEGIN (start_state ());
6706 start_state_stack.pop ();
6708 BEGIN (start_state ());
6714 while (! start_state_stack.empty ())
6715 start_state_stack.pop ();
6725 switch (start_state ())
6728 std::cerr <<
"INITIAL" << std::endl;
6732 std::cerr <<
"COMMAND_START" << std::endl;
6736 std::cerr <<
"MATRIX_START" << std::endl;
6740 std::cerr <<
"INPUT_FILE_START" << std::endl;
6744 std::cerr <<
"BLOCK_COMMENT_START" << std::endl;
6748 std::cerr <<
"LINE_COMMENT_START" << std::endl;
6752 std::cerr <<
"DQ_STRING_START" << std::endl;
6756 std::cerr <<
"SQ_STRING_START" << std::endl;
6760 std::cerr <<
"FQ_IDENT_START" << std::endl;
6764 std::cerr <<
"UNKNOWN START STATE!" << std::endl;
6774 bool unput_comma =
false;
6778 int c = text_yyinput ();
6781 bool space_after = is_space_or_tab (c);
6783 if (! (prev_tok ==
'[' || prev_tok ==
'{'
6785 || ((tok ==
'+' || tok ==
'-') && space_after)))
6796 warn_language_extension_operator (flex_yytext ());
6798 update_token_positions (flex_yyleng ());
6824 return count_token_internal (tok);
6841 return handle_token (tok, tok_val);
6850 push_token (tok_val);
6852 return count_token_internal (tok);
6860 push_token (tok_val);
6862 return count_token_internal (tok);
6869 increment_token_count ();
6871 return show_token (tok);
6878 if (display_tokens ())
6879 display_token (tok);
6884 display_token (tok);
6885 std::cerr << std::endl;
6896 if (m_input_buf.empty ())
6926 if (! m_input_buf.empty ())
6927 status = m_input_buf.copy_chunk (buf, max_size);
6931 m_initial_input =
false;
6955 m_input_buf.fill (input, eof);
6964 if (m_input_buf.empty () && ! m_input_buf.at_eof ())
6973 assert (max_size > 0);
6975 buf[0] =
static_cast<char> (1);
6983 if (! m_input_buf.empty ())
6984 status = m_input_buf.copy_chunk (buf, max_size,
true);
6992 OCTAVE_END_NAMESPACE(
octave)
charNDArray max(char d, const charNDArray &m)
int make_keyword_token(const std::string &s)
void maybe_warn_separator_insert(char sep)
void warn_language_extension_operator(const std::string &op)
int handle_superclass_identifier()
int handle_op(int tok, bool bos=false, bool compat=true)
void push_start_state(int state)
int handle_close_bracket(int bracket_type)
bool inside_any_object_index()
int count_token_internal(int tok)
void begin_string(int state)
bool input_from_tmp_history_file()
void update_token_positions(int tok_len)
int handle_end_of_input()
void maybe_warn_language_extension_comment(char c)
bool looks_like_command_arg()
bool fq_identifier_contains_keyword(const std::string &s)
void warn_deprecated_syntax(const std::string &msg)
void warn_language_extension(const std::string &msg)
void finish_comment(comment_elt::comment_type typ)
void display_start_state() const
void warn_language_extension_continuation()
void display_token(int tok)
void fatal_error(const char *msg)
void handle_continuation()
void xunput(char c, char *buf)
std::size_t pending_token_count() const
int handle_meta_identifier()
void check_comment_for_hash_char(const char *txt, std::size_t len)
int handle_token(int tok, token *tok_val=nullptr)
bool whitespace_is_significant()
bool display_tokens() const
void lexer_debug(const char *pattern)
bool maybe_unput_comma_before_unary_op(int tok)
int handle_fq_identifier()
void increment_token_count()
static std::string decode_prompt_string(const std::string &s)
void increment_column(int val=1)
octave_value input_from_tmp_file(const octave_value_list &args, int nargout)
symbol_scope get_current_scope() const
settings & get_settings()
octave_value PS1(const octave_value_list &args, int nargout)
history_system & get_history_system()
octave_value PS2(const octave_value_list &args, int nargout)
int fill_flex_buffer(char *buf, unsigned int max_size)
symbol_scope curr_scope() const
symbol_scope parent_scope() const
bool m_looking_at_parameter_list
bool m_reading_classdef_file
bool previous_token_is_binop() const
bool space_follows_previous_token() const
bool m_looking_at_anon_fcn_args
std::string m_package_name
void mark_as_variables(const std::list< std::string > &lst)
bool previous_token_is_keyword() const
bool m_arguments_is_keyword
std::string m_current_input_line
bool m_allow_command_syntax
bool m_parsing_classdef_set_method
bool m_parsing_anon_fcn_body
std::string m_comment_text
std::stack< bool > m_parsed_function_name
bool m_at_beginning_of_statement
int m_block_comment_nesting_level
bool previous_token_may_be_command() const
int m_command_arg_paren_count
std::string m_fcn_file_full_name
bool m_looking_at_return_list
bool m_parsing_classdef_get_method
std::string m_string_text
std::list< bool > m_looking_at_object_index
bool m_parsing_classdef_decl
bool m_looking_at_matrix_or_assign_lhs
bool previous_token_value_is(int tok_val) const
bool m_parsing_classdef_superclass
bool m_looking_for_object_index
interpreter & m_interpreter
bbp_nesting_level m_nesting_level
bool m_reading_script_file
bool m_classdef_element_names_are_keywords
std::size_t m_token_count
std::string m_function_text
bool m_comment_uses_hash_char
std::string m_fcn_file_name
bool m_looking_at_decl_list
symbol_table_context m_symtab_context
bool m_quote_is_transpose
bool m_parsing_class_method
void mark_previous_token_trailing_space()
bool m_buffer_function_text
int previous_token_value() const
void mark_as_variable(const std::string &nm)
bool m_maybe_classdef_get_set_method
bool m_looking_at_indirect_ref
int m_looking_at_function_handle
static const struct octave_kw * in_word_set(const char *str, size_t len)
bool is_undefined() const
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
octave_idx_type length() const
int fill_flex_buffer(char *buf, unsigned int max_size)
void append_input(const std::string &input, bool eof)
octave_value lexer_debug_flag(const octave_value_list &args, int nargout)
octave_value display_tokens(const octave_value_list &args, int nargout)
void increment_token_count()
string_vector & sort(bool make_uniq=false)
void resize(octave_idx_type n, const std::string &rfv="")
void mark_as_variable(const std::string &nm)
static symbol_scope invalid()
void mark_as_variables(const std::list< std::string > &lst)
void mark_trailing_space()
bool token_value_is(int tv) const
void mark_may_be_command()
bool may_be_command() const
octave_value number() const
bool space_follows_token() const
ColumnVector imag(const ComplexColumnVector &a)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void warning(const char *fmt,...)
void warning_with_id(const char *id, const char *fmt,...)
void() error(const char *fmt,...)
#define panic_impossible()
#define yy_load_buffer_state
unsigned char flex_uint8_t
unsigned int flex_uint32_t
void * octave_alloc(yy_size_t, yyscan_t yyscanner)
bool iskeyword(const std::string &s)
#define yypush_buffer_state
struct yy_buffer_state * YY_BUFFER_STATE
#define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT)
#define YY_RESTORE_YY_MORE_OFFSET
#define HANDLE_EOB_OR_EOF(STATUS)
#define yyensure_buffer_stack
void octave_free(void *, yyscan_t yyscanner)
#define HANDLE_NUMBER(PATTERN, BASE)
#define EOB_ACT_END_OF_FILE
#define yypop_buffer_state
#define YY_CURRENT_BUFFER_LVALUE
#define HANDLE_IDENTIFIER(pattern, get_set)
#define yy_switch_to_buffer
#define YY_CURRENT_BUFFER
#define LINE_COMMENT_START
#define YY_INPUT(buf, result, max_size)
#define YY_STATE_EOF(state)
#define YY_END_OF_BUFFER_CHAR
#define YY_FATAL_ERROR(msg)
unsigned short int flex_uint16_t
#define YY_DO_BEFORE_ACTION
#define EOB_ACT_LAST_MATCH
#define YY_BUFFER_EOF_PENDING
#define EOB_ACT_CONTINUE_SCAN
#define HANDLE_STRING_CONTINUATION
#define CMD_OR_OP(PATTERN, TOK, COMPAT)
void * octave_realloc(void *, yy_size_t, yyscan_t yyscanner)
#define BLOCK_COMMENT_START
const char * undo_string_escape(char c)
std::complex< double > Complex
@ unwind_protect_cleanup_kw
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
T::size_type strlen(const typename T::value_type *str)
unsigned char flex_uint8_t
struct yy_buffer_state * YY_BUFFER_STATE
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))