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
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)
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
470struct 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
601static 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
657static 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,
689static 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"
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_ID, 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_ID, false, COMPAT); \
1200#define CMD_OR_UNARY_OP(PATTERN, TOK_ID, 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_ID, false, COMPAT); \
1217 if (curr_lexer->maybe_unput_comma_before_unary_op (TOK_ID)) \
1220 curr_lexer->xunput (','); \
1223 return curr_lexer->handle_op (TOK_ID, 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_id = curr_lexer->previous_token_id (); \
1269 if (curr_lexer->whitespace_is_significant () \
1270 && curr_lexer->space_follows_previous_token () \
1271 && ! (tok_id == '[' || tok_id == '{' \
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_id = curr_lexer->previous_token_id (); \
1290 if (curr_lexer->whitespace_is_significant () \
1291 && curr_lexer->space_follows_previous_token () \
1292 && ! (tok_id == '[' || tok_id == '{' \
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 (); \
1322is_space_or_tab (
char c)
1324 return c ==
' ' || c ==
'\t';
1328is_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"));
1352OCTAVE_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;
1432static 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);
1498static void yy_flex_strncpy (
char *,
const char *,
int ,
yyscan_t yyscanner);
1501#ifdef YY_NEED_STRLEN
1502static int yy_flex_strlen (
const char * ,
yyscan_t yyscanner);
1507static int yyinput (
yyscan_t yyscanner );
1509static 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_id =
curr_lexer->previous_token_id ();
1959 if (! (tok_id ==
';' || tok_id ==
'[' || tok_id ==
'{'))
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_id =
curr_lexer->previous_token_id ();
2034 if (! (tok_id ==
'[' || tok_id ==
'{'
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;
2411#line 1003 "../libinterp/parse-tree/lex.ll"
2413 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\[0-7]{1,3}");
2417 unsigned int result;
2418 if (sscanf (
yytext+1,
"%o", &result) != 1)
2419 curr_lexer->fatal_error (
"scanf failed in lexer rule <DQ_STRING_START>\\\\[0-7]{1,3} - please report this bug");
2424 std::string msg {
"invalid octal escape sequence in character string"};
2428 curr_lexer->m_string_text +=
static_cast<unsigned char> (result);
2433#line 1022 "../libinterp/parse-tree/lex.ll"
2435 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\x[0-9a-fA-F]+");
2439 unsigned int result;
2440 if (sscanf (
yytext+2,
"%x", &result) != 1)
2441 curr_lexer->fatal_error (
"scanf failed in lexer rule <DQ_STRING_START>\\\\x[0-9a-fA-F]+ - please report this bug");
2447 curr_lexer->m_string_text +=
static_cast<unsigned char> (result);
2452#line 1038 "../libinterp/parse-tree/lex.ll"
2454 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\a\"");
2462#line 1045 "../libinterp/parse-tree/lex.ll"
2464 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\b\"");
2472#line 1052 "../libinterp/parse-tree/lex.ll"
2474 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\f\"");
2482#line 1059 "../libinterp/parse-tree/lex.ll"
2484 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\n\"");
2492#line 1066 "../libinterp/parse-tree/lex.ll"
2494 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\r\"");
2502#line 1073 "../libinterp/parse-tree/lex.ll"
2504 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\t\"");
2512#line 1080 "../libinterp/parse-tree/lex.ll"
2514 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\v\"");
2523#line 1087 "../libinterp/parse-tree/lex.ll"
2525 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\{NL}");
2532#line 1093 "../libinterp/parse-tree/lex.ll"
2534 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\.");
2542#line 1100 "../libinterp/parse-tree/lex.ll"
2544 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\.");
2552#line 1107 "../libinterp/parse-tree/lex.ll"
2554 curr_lexer->lexer_debug (
"<DQ_STRING_START>[^\\.\\\\\\r\\n\\\"]+");
2563#line 1114 "../libinterp/parse-tree/lex.ll"
2565 curr_lexer->lexer_debug (
"<DQ_STRING_START>{NL}");
2568 std::string msg {
"unterminated character string constant"};
2577#line 1126 "../libinterp/parse-tree/lex.ll"
2579 curr_lexer->lexer_debug (
"<SQ_STRING_START>\\'\\'");
2587#line 1133 "../libinterp/parse-tree/lex.ll"
2589 curr_lexer->lexer_debug (
"<SQ_STRING_START>\\'");
2599 curr_lexer->m_looking_for_object_index =
true;
2600 curr_lexer->m_at_beginning_of_statement =
false;
2612#line 1155 "../libinterp/parse-tree/lex.ll"
2614 curr_lexer->lexer_debug (
"<SQ_STRING_START>[^\\'\\n\\r]+");
2623#line 1162 "../libinterp/parse-tree/lex.ll"
2625 curr_lexer->lexer_debug (
"<SQ_STRING_START>{NL}");
2628 std::string msg {
"unterminated character string constant"};
2637#line 1174 "../libinterp/parse-tree/lex.ll"
2639 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{FQIDENT}{S}*");
2645 std::string ident =
yytext;
2647 ident.erase (std::remove_if (ident.begin (), ident.end (), is_space_or_tab), ident.end ());
2649 if (
curr_lexer->fq_identifier_contains_keyword (ident))
2650 return curr_lexer->syntax_error (
"function, method, class, and package names may not be keywords");
2652 octave::token *tok =
curr_lexer->make_fq_identifier_token (ident);
2659#line 1193 "../libinterp/parse-tree/lex.ll"
2661 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{S}+");
2665 curr_lexer->mark_previous_token_trailing_space ();
2671#line 1201 "../libinterp/parse-tree/lex.ll"
2673 curr_lexer->lexer_debug (
"<FQ_IDENT_START>(\\.\\.\\.){ANY_EXCEPT_NL}*{NL}");
2681#line 1207 "../libinterp/parse-tree/lex.ll"
2683 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{ANY_INCLUDING_NL}");
2694#line 1217 "../libinterp/parse-tree/lex.ll"
2706*yy_cp = yyg->yy_hold_char;
2707yyg->yy_c_buf_p = yy_cp -= 2;
2709#line 1229 "../libinterp/parse-tree/lex.ll"
2712#line 1229 "../libinterp/parse-tree/lex.ll"
2714 HANDLE_NUMBER (
"{DECIMAL_DIGITS}/\\.[\\*/\\\\^\\']|{DECIMAL_NUMBER}", 10);
2719#line 1233 "../libinterp/parse-tree/lex.ll"
2730#line 1242 "../libinterp/parse-tree/lex.ll"
2734 curr_lexer->mark_previous_token_trailing_space ();
2743#line 1252 "../libinterp/parse-tree/lex.ll"
2745 curr_lexer->lexer_debug (
"\\.\\.\\.{ANY_EXCEPT_NL}*{NL}");
2763#line 1267 "../libinterp/parse-tree/lex.ll"
2776#line 1278 "../libinterp/parse-tree/lex.ll"
2783#line 1282 "../libinterp/parse-tree/lex.ll"
2793#line 1290 "../libinterp/parse-tree/lex.ll"
2795 curr_lexer->lexer_debug (
"{FQIDENT}{S}*@{S}*{FQIDENT}");
2797 if (
curr_lexer->previous_token_may_be_command ())
2806 std::string txt =
yytext;
2808 std::size_t at_or_dot_pos = txt.find_first_of (
"@.");
2810 if (at_or_dot_pos != std::string::npos)
2812 std::size_t spc_pos = txt.find_first_of (
" \t");
2814 if (spc_pos != std::string::npos && spc_pos < at_or_dot_pos)
2817 curr_lexer->m_filepos.increment_column (spc_pos);
2824 curr_lexer->m_looking_for_object_index =
true;
2825 curr_lexer->m_at_beginning_of_statement =
false;
2827 return curr_lexer->handle_superclass_identifier ();
2836#line 1331 "../libinterp/parse-tree/lex.ll"
2838 curr_lexer->lexer_debug (
"\\?{S}*{FQIDENT}");
2840 if (
curr_lexer->previous_token_may_be_command ()
2841 &&
curr_lexer->space_follows_previous_token ())
2850 std::string txt =
yytext;
2852 txt.erase (std::remove_if (txt.begin (), txt.end (), is_space_or_tab), txt.end ());
2855 std::string cls = txt.substr (1);
2857 if (
curr_lexer->fq_identifier_contains_keyword (cls))
2858 return curr_lexer->syntax_error (
"class and package names may not be keywords");
2860 octave::token *tok =
curr_lexer->make_meta_identifier_token (cls);
2867#line 1361 "../libinterp/parse-tree/lex.ll"
2870#line 1361 "../libinterp/parse-tree/lex.ll"
2872 curr_lexer->lexer_debug (
"\\@|\\@{S}*{FQIDENT}");
2874 if (
curr_lexer->previous_token_may_be_command ()
2875 &&
curr_lexer->space_follows_previous_token ())
2882 int tok_id =
curr_lexer->previous_token_id ();
2885 &&
curr_lexer->space_follows_previous_token ()
2886 && ! (tok_id ==
'[' || tok_id ==
'{'
2896 curr_lexer->m_at_beginning_of_statement =
false;
2898 std::string ident =
yytext;
2903 curr_lexer->m_looking_for_object_index =
false;
2909 ident = ident.substr (1);
2910 ident.erase (std::remove_if (ident.begin (), ident.end (),
2911 is_space_or_tab), ident.end ());
2915 if (octave::iskeyword (ident))
2917 std::string msg {
"function handles may not refer to keywords"};
2921 curr_lexer->m_looking_for_object_index =
true;
2939#line 1427 "../libinterp/parse-tree/lex.ll"
2947 curr_lexer->m_at_beginning_of_statement =
false;
2949 (
"bare newline inside parentheses");
2952 ||
curr_lexer->m_nesting_level.is_anon_fcn_body ())
2957 curr_lexer->m_at_beginning_of_statement =
true;
2961 else if (
curr_lexer->m_nesting_level.is_bracket_or_brace ())
2967 std::string msg {
"unexpected internal lexer error"};
2978#line 1464 "../libinterp/parse-tree/lex.ll"
2982 if (
curr_lexer->previous_token_may_be_command ()
2983 &&
curr_lexer->space_follows_previous_token ())
2989 else if (
curr_lexer->m_at_beginning_of_statement)
2996 int tok_id =
curr_lexer->previous_token_id ();
2998 if (
curr_lexer->whitespace_is_significant ())
3000 if (
curr_lexer->space_follows_previous_token ())
3002 if (tok_id ==
'[' || tok_id ==
'{'
3016 if (tok_id ==
'[' || tok_id ==
'{'
3032 if (! tok_id || tok_id ==
'[' || tok_id ==
'{' || tok_id ==
'('
3053#line 1537 "../libinterp/parse-tree/lex.ll"
3057 if (
curr_lexer->previous_token_may_be_command ()
3058 &&
curr_lexer->space_follows_previous_token ())
3066 int tok_id =
curr_lexer->previous_token_id ();
3068 if (
curr_lexer->whitespace_is_significant ())
3070 if (
curr_lexer->space_follows_previous_token ())
3072 if (tok_id ==
'[' || tok_id ==
'{'
3103#line 1585 "../libinterp/parse-tree/lex.ll"
3108#line 1586 "../libinterp/parse-tree/lex.ll"
3113#line 1587 "../libinterp/parse-tree/lex.ll"
3118#line 1588 "../libinterp/parse-tree/lex.ll"
3123#line 1589 "../libinterp/parse-tree/lex.ll"
3128#line 1590 "../libinterp/parse-tree/lex.ll"
3133#line 1591 "../libinterp/parse-tree/lex.ll"
3138#line 1592 "../libinterp/parse-tree/lex.ll"
3143#line 1593 "../libinterp/parse-tree/lex.ll"
3148#line 1594 "../libinterp/parse-tree/lex.ll"
3153#line 1595 "../libinterp/parse-tree/lex.ll"
3158#line 1596 "../libinterp/parse-tree/lex.ll"
3163#line 1597 "../libinterp/parse-tree/lex.ll"
3168#line 1598 "../libinterp/parse-tree/lex.ll"
3173#line 1599 "../libinterp/parse-tree/lex.ll"
3178#line 1600 "../libinterp/parse-tree/lex.ll"
3186#line 1606 "../libinterp/parse-tree/lex.ll"
3201#line 1618 "../libinterp/parse-tree/lex.ll"
3206#line 1619 "../libinterp/parse-tree/lex.ll"
3211#line 1620 "../libinterp/parse-tree/lex.ll"
3216#line 1622 "../libinterp/parse-tree/lex.ll"
3220 bool at_beginning_of_statement
3221 = (! (
curr_lexer->whitespace_is_significant ()
3222 ||
curr_lexer->m_looking_at_object_index.front ()));
3224 return curr_lexer->handle_op (
';', at_beginning_of_statement);
3229#line 1632 "../libinterp/parse-tree/lex.ll"
3234#line 1633 "../libinterp/parse-tree/lex.ll"
3239#line 1635 "../libinterp/parse-tree/lex.ll"
3244#line 1636 "../libinterp/parse-tree/lex.ll"
3249#line 1638 "../libinterp/parse-tree/lex.ll"
3253 bool at_beginning_of_statement
3254 = (! (
curr_lexer->whitespace_is_significant ()
3255 ||
curr_lexer->m_looking_at_object_index.front ()));
3257 return curr_lexer->handle_op (
',', at_beginning_of_statement);
3262#line 1648 "../libinterp/parse-tree/lex.ll"
3271#line 1654 "../libinterp/parse-tree/lex.ll"
3276#line 1655 "../libinterp/parse-tree/lex.ll"
3281#line 1657 "../libinterp/parse-tree/lex.ll"
3285 bool unput_comma =
false;
3288 &&
curr_lexer->space_follows_previous_token ())
3290 int tok_id =
curr_lexer->previous_token_id ();
3292 if (! (tok_id ==
'[' || tok_id ==
'{'
3311 curr_lexer->m_looking_at_object_index.push_front
3314 curr_lexer->m_looking_at_indirect_ref =
false;
3315 curr_lexer->m_looking_for_object_index =
false;
3316 curr_lexer->m_at_beginning_of_statement =
false;
3326#line 1699 "../libinterp/parse-tree/lex.ll"
3334 curr_lexer->m_looking_at_object_index.pop_front ();
3336 curr_lexer->m_looking_for_object_index =
true;
3337 curr_lexer->m_at_beginning_of_statement =
false;
3341 curr_lexer->m_looking_at_anon_fcn_args =
false;
3342 curr_lexer->m_nesting_level.anon_fcn_body ();
3350#line 1720 "../libinterp/parse-tree/lex.ll"
3354 if (
curr_lexer->previous_token_may_be_command ()
3355 &&
curr_lexer->space_follows_previous_token ())
3364 curr_lexer->m_looking_for_object_index =
false;
3365 curr_lexer->m_at_beginning_of_statement =
false;
3376#line 1744 "../libinterp/parse-tree/lex.ll"
3385#line 1750 "../libinterp/parse-tree/lex.ll"
3390#line 1751 "../libinterp/parse-tree/lex.ll"
3395#line 1752 "../libinterp/parse-tree/lex.ll"
3400#line 1753 "../libinterp/parse-tree/lex.ll"
3405#line 1754 "../libinterp/parse-tree/lex.ll"
3410#line 1755 "../libinterp/parse-tree/lex.ll"
3415#line 1756 "../libinterp/parse-tree/lex.ll"
3420#line 1757 "../libinterp/parse-tree/lex.ll"
3425#line 1758 "../libinterp/parse-tree/lex.ll"
3430#line 1759 "../libinterp/parse-tree/lex.ll"
3435#line 1760 "../libinterp/parse-tree/lex.ll"
3440#line 1761 "../libinterp/parse-tree/lex.ll"
3448#line 1767 "../libinterp/parse-tree/lex.ll"
3452 bool unput_comma =
false;
3455 &&
curr_lexer->space_follows_previous_token ())
3457 int tok_id =
curr_lexer->previous_token_id ();
3459 if (! (tok_id ==
'[' || tok_id ==
'{'
3473 curr_lexer->m_looking_at_object_index.push_front
3477 curr_lexer->m_looking_for_object_index =
false;
3478 curr_lexer->m_at_beginning_of_statement =
false;
3490#line 1806 "../libinterp/parse-tree/lex.ll"
3496 curr_lexer->m_looking_at_object_index.pop_front ();
3498 curr_lexer->m_looking_for_object_index =
true;
3499 curr_lexer->m_at_beginning_of_statement =
false;
3514#line 1828 "../libinterp/parse-tree/lex.ll"
3526 else if (
curr_lexer->previous_token_may_be_command ()
3527 &&
curr_lexer->space_follows_previous_token ())
3534 std::ostringstream buf;
3536 buf <<
"invalid character '"
3537 << octave::undo_string_escape (
static_cast<char> (c))
3538 <<
"' (ASCII " << c <<
")";
3542 return curr_lexer->syntax_error (buf.str ());
3547#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
3549# pragma GCC diagnostic ignored "-Wold-style-cast"
3550# pragma GCC diagnostic ignored "-Wunused-parameter"
3555#line 1867 "../libinterp/parse-tree/lex.ll"
3558#line 3559 "libinterp/parse-tree/lex.cc"
3563 int yy_amount_of_matched_text = (
int) (yy_cp - yyg->yytext_ptr) - 1;
3566 *yy_cp = yyg->yy_hold_char;
3596 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
3598 yy_current_state = yy_get_previous_state( yyscanner );
3609 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
3613 if ( yy_next_state )
3616 yy_cp = ++yyg->yy_c_buf_p;
3617 yy_current_state = yy_next_state;
3623 yy_cp = yyg->yy_c_buf_p;
3624 goto yy_find_action;
3628 else switch ( yy_get_next_buffer( yyscanner ) )
3632 yyg->yy_did_buffer_switch_on_eof = 0;
3634 if (
yywrap( yyscanner ) )
3653 if ( ! yyg->yy_did_buffer_switch_on_eof )
3661 yyg->yytext_ptr + yy_amount_of_matched_text;
3663 yy_current_state = yy_get_previous_state( yyscanner );
3665 yy_cp = yyg->yy_c_buf_p;
3673 yy_current_state = yy_get_previous_state( yyscanner );
3675 yy_cp = yyg->yy_c_buf_p;
3677 goto yy_find_action;
3684 "fatal flex scanner internal error--no action found" );
3697static int yy_get_next_buffer (
yyscan_t yyscanner)
3701 char *source = yyg->yytext_ptr;
3702 int number_to_move, i;
3707 "fatal flex scanner internal error--end of buffer missed" );
3711 if ( yyg->yy_c_buf_p - yyg->yytext_ptr -
YY_MORE_ADJ == 1 )
3731 number_to_move = (
int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
3733 for ( i = 0; i < number_to_move; ++i )
3734 *(dest++) = *(source++);
3747 while ( num_to_read <= 0 )
3753 int yy_c_buf_p_offset =
3754 (
int) (yyg->yy_c_buf_p - b->yy_ch_buf);
3756 if ( b->yy_is_our_buffer )
3758 int new_size = b->yy_buf_size * 2;
3760 if ( new_size <= 0 )
3761 b->yy_buf_size += b->yy_buf_size / 8;
3763 b->yy_buf_size *= 2;
3765 b->yy_ch_buf = (
char *)
3768 (
yy_size_t) (b->yy_buf_size + 2) , yyscanner );
3772 b->yy_ch_buf = NULL;
3774 if ( ! b->yy_ch_buf )
3776 "fatal error - scanner input buffer overflow" );
3778 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
3790 yyg->yy_n_chars, num_to_read );
3795 if ( yyg->yy_n_chars == 0 )
3816 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
3820 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
3825 yyg->yy_n_chars += number_to_move;
3842 yy_current_state = yyg->yy_start;
3845 for ( yy_cp = yyg->yytext_ptr +
YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
3848 if ( yy_accept[yy_current_state] )
3850 yyg->yy_last_accepting_state = yy_current_state;
3851 yyg->yy_last_accepting_cpos = yy_cp;
3853 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3855 yy_current_state = (
int) yy_def[yy_current_state];
3856 if ( yy_current_state >= 290 )
3857 yy_c = yy_meta[yy_c];
3859 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
3862 return yy_current_state;
3874 char *yy_cp = yyg->yy_c_buf_p;
3877 if ( yy_accept[yy_current_state] )
3879 yyg->yy_last_accepting_state = yy_current_state;
3880 yyg->yy_last_accepting_cpos = yy_cp;
3882 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3884 yy_current_state = (
int) yy_def[yy_current_state];
3885 if ( yy_current_state >= 290 )
3886 yy_c = yy_meta[yy_c];
3888 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
3889 yy_is_jam = (yy_current_state == 289);
3892 return yy_is_jam ? 0 : yy_current_state;
3897 static void yyunput (
int c,
char * yy_bp ,
yyscan_t yyscanner)
3902 yy_cp = yyg->yy_c_buf_p;
3905 *yy_cp = yyg->yy_hold_char;
3907 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3910 int number_to_move = yyg->yy_n_chars + 2;
3917 *--dest = *--source;
3919 yy_cp += (
int) (dest - source);
3920 yy_bp += (
int) (dest - source);
3924 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3928 *--yy_cp = (char) c;
3930 yyg->yytext_ptr = yy_bp;
3931 yyg->yy_hold_char = *yy_cp;
3932 yyg->yy_c_buf_p = yy_cp;
3939 static int yyinput (
yyscan_t yyscanner)
3941 static int input (
yyscan_t yyscanner)
3948 *yyg->yy_c_buf_p = yyg->yy_hold_char;
3958 *yyg->yy_c_buf_p =
'\0';
3962 int offset = (
int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
3965 switch ( yy_get_next_buffer( yyscanner ) )
3985 if (
yywrap( yyscanner ) )
3988 if ( ! yyg->yy_did_buffer_switch_on_eof )
3991 return yyinput(yyscanner);
3993 return input(yyscanner);
3998 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
4004 c = *(
unsigned char *) yyg->yy_c_buf_p;
4005 *yyg->yy_c_buf_p =
'\0';
4006 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
4053 *yyg->yy_c_buf_p = yyg->yy_hold_char;
4066 yyg->yy_did_buffer_switch_on_eof = 1;
4075 yyg->yy_hold_char = *yyg->yy_c_buf_p;
4092 b->yy_buf_size = size;
4097 b->yy_ch_buf = (
char *)
yyalloc( (
yy_size_t) (b->yy_buf_size + 2) , yyscanner );
4098 if ( ! b->yy_ch_buf )
4101 b->yy_is_our_buffer = 1;
4122 if ( b->yy_is_our_buffer )
4123 yyfree( (
void *) b->yy_ch_buf , yyscanner );
4125 yyfree( (
void *) b , yyscanner );
4140 b->yy_input_file = file;
4141 b->yy_fill_buffer = 1;
4148 b->yy_bs_lineno = 1;
4149 b->yy_bs_column = 0;
4152 b->yy_is_interactive = file ? (
isatty( fileno(file) ) > 0) : 0;
4176 b->yy_buf_pos = &b->yy_ch_buf[0];
4194 if (new_buffer == NULL)
4203 *yyg->yy_c_buf_p = yyg->yy_hold_char;
4210 yyg->yy_buffer_stack_top++;
4215 yyg->yy_did_buffer_switch_on_eof = 1;
4230 if (yyg->yy_buffer_stack_top > 0)
4231 --yyg->yy_buffer_stack_top;
4235 yyg->yy_did_buffer_switch_on_eof = 1;
4247 if (!yyg->yy_buffer_stack) {
4254 yyg->yy_buffer_stack = (
struct yy_buffer_state**)
yyalloc
4255 (num_to_alloc *
sizeof(
struct yy_buffer_state*)
4257 if ( ! yyg->yy_buffer_stack )
4258 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
4260 memset(yyg->yy_buffer_stack, 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
4262 yyg->yy_buffer_stack_max = num_to_alloc;
4263 yyg->yy_buffer_stack_top = 0;
4267 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
4272 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
4273 yyg->yy_buffer_stack = (
struct yy_buffer_state**)
yyrealloc
4274 (yyg->yy_buffer_stack,
4275 num_to_alloc *
sizeof(
struct yy_buffer_state*)
4277 if ( ! yyg->yy_buffer_stack )
4278 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
4281 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size *
sizeof(
struct yy_buffer_state*));
4282 yyg->yy_buffer_stack_max = num_to_alloc;
4306 b->yy_buf_size = (
int) (size - 2);
4307 b->yy_buf_pos = b->yy_ch_buf = base;
4308 b->yy_is_our_buffer = 0;
4309 b->yy_input_file = NULL;
4310 b->yy_n_chars = b->yy_buf_size;
4311 b->yy_is_interactive = 0;
4313 b->yy_fill_buffer = 0;
4351 buf = (
char *)
yyalloc( n , yyscanner );
4355 for ( i = 0; i < _yybytes_len; ++i )
4356 buf[i] = yybytes[i];
4367 b->yy_is_our_buffer = 1;
4372#ifndef YY_EXIT_FAILURE
4373#define YY_EXIT_FAILURE 2
4380 fprintf( stderr,
"%s\n", msg );
4391 int yyless_macro_arg = (n); \
4392 YY_LESS_LINENO(yyless_macro_arg);\
4393 yytext[yyleng] = yyg->yy_hold_char; \
4394 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
4395 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
4396 *yyg->yy_c_buf_p = '\0'; \
4397 yyleng = yyless_macro_arg; \
4567 if (ptr_yy_globals == NULL){
4574 if (*ptr_yy_globals == NULL){
4580 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
4582 return yy_init_globals ( *ptr_yy_globals );
4598 if (ptr_yy_globals == NULL){
4605 if (*ptr_yy_globals == NULL){
4612 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
4616 return yy_init_globals ( *ptr_yy_globals );
4619static int yy_init_globals (
yyscan_t yyscanner)
4626 yyg->yy_buffer_stack = NULL;
4627 yyg->yy_buffer_stack_top = 0;
4628 yyg->yy_buffer_stack_max = 0;
4629 yyg->yy_c_buf_p = NULL;
4633 yyg->yy_start_stack_ptr = 0;
4634 yyg->yy_start_stack_depth = 0;
4635 yyg->yy_start_stack = NULL;
4665 yyfree(yyg->yy_buffer_stack , yyscanner);
4666 yyg->yy_buffer_stack = NULL;
4669 yyfree( yyg->yy_start_stack , yyscanner );
4670 yyg->yy_start_stack = NULL;
4674 yy_init_globals( yyscanner);
4677 yyfree ( yyscanner , yyscanner );
4687static void yy_flex_strncpy (
char* s1,
const char * s2,
int n ,
yyscan_t yyscanner)
4693 for ( i = 0; i < n; ++i )
4698#ifdef YY_NEED_STRLEN
4699static int yy_flex_strlen (
const char * s ,
yyscan_t yyscanner)
4702 for ( n = 0; s[n]; ++n )
4709#define YYTABLES_NAME "yytables"
4711#line 1867 "../libinterp/parse-tree/lex.ll"
4714#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
4716# pragma GCC diagnostic pop
4722 return std::malloc (size);
4728 return std::realloc (ptr, size);
4738display_character (
char c)
4874 std::cerr <<
"SPACE";
4897 int nargin = args.
length ();
4913 std::string kword = wordlist[i].name;
4916 if (! (kword ==
"set" || kword ==
"get" || kword ==
"arguments"
4917 || kword ==
"enumeration" || kword ==
"events"
4918 || kword ==
"methods" || kword ==
"properties"))
4928 std::string name = args(0).xstring_value (
"iskeyword: NAME must be a string");
4951 while (! m_frame_stack.empty ())
4952 m_frame_stack.pop_front ();
4959 error (
"unexpected: empty stack in lexical_feedback::symbol_table_context::pop - please report this bug");
4961 m_frame_stack.pop_front ();
4970 return m_frame_stack.front ();
4976 std::size_t sz = size ();
5072 return prev_tok ? prev_tok->
token_id () : 0;
5079 return prev_tok ? prev_tok->
token_is (tok_id) :
false;
5086 return prev_tok ? prev_tok->
token_is (tok) :
false;
5109 return (tok_id ==
'+' || tok_id ==
'-' || tok_id ==
'@' || tok_id ==
'~' || tok_id ==
'!'
5110 || tok_id ==
',' || tok_id ==
';' || tok_id ==
'*' || tok_id ==
'/'
5111 || tok_id ==
':' || tok_id ==
'=' || tok_id ==
ADD_EQ
5128 return prev_tok ? prev_tok->
iskeyword () :
false;
5160looks_like_copyright (
const std::string& s)
5168 std::size_t offset = s.find_first_not_of (
" \t\n\r");
5170 return (offset != std::string::npos
5171 && (s.substr (offset, 9) ==
"Copyright"
5172 || s.substr (offset, 6) ==
"Author"
5173 || s.substr (offset, 23) ==
"SPDX-License-Identifier"));
5177looks_like_shebang (
const std::string& s)
5179 return ((! s.empty ()) && (s[0] ==
'!'));
5186 m_chars_left = m_buffer.length ();
5196 static const char *
const eol =
"\n";
5198 std::size_t
len = 0;
5201 std::size_t newline_pos = m_buffer.find (
'\n', m_offset);
5202 len = (newline_pos != std::string::npos
5203 ? newline_pos - m_offset + 1
5204 : (max_size > m_chars_left ? m_chars_left : max_size));
5207 len = max_size > m_chars_left ? m_chars_left : max_size;
5210 error (
"unexpected: buffer underflow in base_lexer::input_buffer::copy_chunk - please report this bug");
5212 memcpy (buf, m_buffer.c_str () + m_offset,
len);
5214 m_chars_left -=
len;
5220 if (m_chars_left == 0 && buf[
len-1] !=
'\n')
5262 clear_start_state ();
5272 struct yyguts_t *yyg = static_cast<struct yyguts_t*> (m_scanner)
5278 clear_start_state ();
5289 || input_from_eval_string ()))
5294 m_comment_list.clear ();
5310 push_start_state (state);
5316 lexer_debug (
"<<EOF>>");
5323 std::string msg {
"block comment unterminated at end of input"};
5334 return handle_token (tok);
5357 display_character (c);
5358 std::cerr << std::endl;
5370 display_character (c);
5371 std::cerr << std::endl;
5392 display_character (c);
5393 std::cerr << std::endl;
5403 char *yytxt = flex_yytext ();
5423 int c = text_yyinput ();
5425 return is_space_or_tab (c);
5431 bool retval =
false;
5451 int slen = s.length ();
5463 token *tok =
nullptr;
5488 if (inside_any_object_index ()
5542#if defined (DISABLE_ARGUMENTS_VALIDATION_BLOCK)
5656 update_token_positions (slen);
5661#if defined (DISABLE_ARGUMENTS_VALIDATION_BLOCK)
5727 p2 = s.find (
'.', p1);
5729 if (p2 != std::string::npos)
5731 s_part = s.substr (p1, p2 - p1);
5735 s_part = s.substr (p1);
5740 while (p2 != std::string::npos);
5754looks_like_bin (
const char *s,
int len)
5756 return (
len > 2 && s[0] ==
'0' && (s[1] ==
'b' || s[1] ==
'B'));
5760looks_like_hex (
const char *s,
int len)
5762 return (
len > 2 && s[0] ==
'0' && (s[1] ==
'x' || s[1] ==
'X'));
5765OCTAVE_NORETURN
static void
5766error_unexpected_bytes (
int bytes)
5768 error (
"unexpected: bytes (= %d) not 1, 2, 4, or 8 in make_integer_value - please report this bug", bytes);
5772make_integer_value (uintmax_t long_int_val,
bool unsigned_val,
int bytes)
5791 error_unexpected_bytes (bytes);
5814 error_unexpected_bytes (bytes);
5823 base_lexer::handle_number<2> ()
5826 std::string yytxt (flex_yytext () + 2);
5828 yytxt.erase (std::remove (yytxt.begin (), yytxt.end (),
'_'),
5831 std::size_t pos = yytxt.find_first_of (
"su");
5833 bool unsigned_val =
true;
5836 if (pos == std::string::npos)
5838 std::size_t num_digits = yytxt.length ();
5840 if (num_digits <= 8)
5842 else if (num_digits <= 16)
5844 else if (num_digits <= 32)
5846 else if (num_digits <= 64)
5851 unsigned_val = (yytxt[pos] ==
'u');
5852 std::string size_str = yytxt.substr (pos+1);
5853 yytxt = yytxt.substr (0, pos);
5854 std::size_t num_digits = yytxt.length ();
5856 if (size_str ==
"8" && num_digits <= 8)
5858 else if (size_str ==
"16" && num_digits <= 16)
5860 else if (size_str ==
"32" && num_digits <= 32)
5862 else if (size_str ==
"64" && num_digits <= 64)
5868 std::string msg {
"too many digits for binary constant"};
5869 return syntax_error (msg);
5878 uintmax_t long_int_val;
5879 if (
sizeof (uintmax_t) ==
sizeof (
unsigned long long))
5880 long_int_val = strtoull (yytxt.c_str (), &end, 2);
5881 else if (
sizeof (uintmax_t) ==
sizeof (
unsigned long))
5882 long_int_val = strtoul (yytxt.c_str (), &end, 2);
5884 error (
"unexpected: size mismatch: uintmax_t vs unsigned long or unsigned long long in base_lexer::handle_number<2> - please report this bug");
5886 if (errno == ERANGE)
5887 error (
"unexpected: ERANGE error in base_lexer::handle_number<2> - please report this bug");
5890 = make_integer_value (long_int_val, unsigned_val, bytes);
5895 update_token_positions (flex_yyleng ());
5899 return handle_token (tok);
5905 return (
static_cast<uint64_t
> (1) << std::numeric_limits<double>::digits);
5910 base_lexer::handle_number<10> ()
5913 bool digits_only =
true;
5915 char *yytxt = flex_yytext ();
5916 std::size_t yylng = flex_yyleng ();
5920 char *p = &tmptxt[0];
5923 while ((ch = *rp++))
5933 digits_only =
false;
5941 digits_only =
false;
5950 digits_only =
false;
5963 if (sscanf (tmptxt,
"%lf", &value) != 1)
5964 fatal_error (
"scanf failed in base_lexer::handle_number<10> - please report this bug");
5971 if (digits_only && value >= flintmax ())
5981 uintmax_t long_int_val;
5982 if (
sizeof (uintmax_t) ==
sizeof (
unsigned long long))
5983 long_int_val = strtoull (tmptxt, &end, 10);
5984 else if (
sizeof (uintmax_t) ==
sizeof (
unsigned long))
5985 long_int_val = strtoul (tmptxt, &end, 10);
5987 error (
"unexpected: size mismatch: uintmax_t vs unsigned long or unsigned long long in base_lexer::handle_number<10> - please report this bug");
5989 if (errno != ERANGE)
5994 if (long_int_val > std::numeric_limits<int64_t>::max ())
6006 update_token_positions (yylng);
6015 return handle_token (tok);
6020 base_lexer::handle_number<16> ()
6023 std::string yytxt (flex_yytext () + 2);
6025 yytxt.erase (std::remove (yytxt.begin (), yytxt.end (),
'_'),
6028 std::size_t pos = yytxt.find_first_of (
"su");
6030 bool unsigned_val =
true;
6033 if (pos == std::string::npos)
6035 std::size_t num_digits = yytxt.length ();
6037 if (num_digits <= 2)
6039 else if (num_digits <= 4)
6041 else if (num_digits <= 8)
6043 else if (num_digits <= 16)
6048 unsigned_val = (yytxt[pos] ==
'u');
6049 std::string size_str = yytxt.substr (pos+1);
6050 yytxt = yytxt.substr (0, pos);
6051 std::size_t num_digits = yytxt.length ();
6053 if (size_str ==
"8" && num_digits <= 2)
6055 else if (size_str ==
"16" && num_digits <= 4)
6057 else if (size_str ==
"32" && num_digits <= 8)
6059 else if (size_str ==
"64" && num_digits <= 16)
6065 std::string msg {
"too many digits for hexadecimal constant"};
6066 return syntax_error (msg);
6069 uintmax_t long_int_val;
6070 if (sscanf (yytxt.c_str (),
"%jx", &long_int_val) != 1)
6071 fatal_error (
"sscanf failed in base_lexer::handle_number<16> - please report this bug");
6073 octave_value ov_value = make_integer_value (long_int_val, unsigned_val, bytes);
6078 update_token_positions (flex_yyleng ());
6082 return handle_token (tok);
6088 char *yytxt = flex_yytext ();
6089 int yylng = flex_yyleng ();
6092 if (yytxt[0] ==
'\\')
6093 warn_language_extension_continuation ();
6097 bool have_space =
false;
6098 while (offset < yylng)
6100 char c = yytxt[offset];
6101 if (is_space_or_tab (c))
6113 bool have_comment =
false;
6115 while (offset < yylng)
6117 char c = yytxt[offset];
6119 if (c ==
'#' || c ==
'%')
6121 if (first && c ==
'#')
6127 have_comment =
true;
6177 if (bracket_type ==
']')
6179 else if (bracket_type ==
'}')
6182 error (
"unexpected: bracket_type not ']' or '}' in base_lexer::handle_close_bracket - please report this bug");
6187 return handle_token (bracket_type);
6197 bool space_after = looking_at_space ();
6199 return (space_before && ! space_after
6206 update_token_positions (flex_yyleng ());
6208 std::string txt = flex_yytext ();
6210 txt.erase (std::remove_if (txt.begin (), txt.end (), is_space_or_tab),
6213 std::size_t pos = txt.find (
"@");
6215 std::string meth = txt.substr (0, pos);
6216 std::string cls = txt.substr (pos + 1);
6218 if (
iskeyword (meth) || fq_identifier_contains_keyword (cls))
6220 std::string msg {
"method, class, and package names may not be keywords"};
6221 return syntax_error (msg);
6228 return handle_token (tok);
6268 update_token_positions (flex_yyleng ());
6270 std::string ident = flex_yytext ();
6282 return handle_token (tok);
6289 token *tok = make_keyword_token (ident);
6300 return handle_token (tok);
6315 || ident ==
"e" || ident ==
"pi"
6316 || ident ==
"I" || ident ==
"i"
6317 || ident ==
"J" || ident ==
"j"
6318 || ident ==
"Inf" || ident ==
"inf"
6319 || ident ==
"NaN" || ident ==
"nan"))
6329 return handle_token (tok);
6339 while (i <
len && is_space_or_tab (txt[i]))
6352 "potential auto-insertion of '%c' near line %d",
6356 "potential auto-insertion of '%c' near line %d of file %s",
6367 "Octave language extension used: %s",
6371 "Octave language extension used: %s near line %d of file %s",
6379 warn_language_extension (
"# used as comment character");
6385 warn_language_extension (
"\\ used as line continuation marker");
6392 int n = t.length ();
6395 warn_language_extension (t +
" used as operator");
6405 "%s; near line %d of file '%s'", msg.c_str (),
6418 return syntax_error (msg, pos, pos);
6428 return count_token_internal (tok->
token_id ());
6457 case '=': std::cerr <<
"'='\n";
break;
6458 case ':': std::cerr <<
"':'\n";
break;
6459 case '-': std::cerr <<
"'-'\n";
break;
6460 case '+': std::cerr <<
"'+'\n";
break;
6461 case '*': std::cerr <<
"'*'\n";
break;
6462 case '/': std::cerr <<
"'/'\n";
break;
6463 case '~': std::cerr <<
"'~'\n";
break;
6464 case '!': std::cerr <<
"'!'\n";
break;
6465 case ADD_EQ: std::cerr <<
"ADD_EQ\n";
break;
6466 case SUB_EQ: std::cerr <<
"SUB_EQ\n";
break;
6467 case MUL_EQ: std::cerr <<
"MUL_EQ\n";
break;
6468 case DIV_EQ: std::cerr <<
"DIV_EQ\n";
break;
6469 case LEFTDIV_EQ: std::cerr <<
"LEFTDIV_EQ\n";
break;
6470 case POW_EQ: std::cerr <<
"POW_EQ\n";
break;
6471 case EMUL_EQ: std::cerr <<
"EMUL_EQ\n";
break;
6472 case EDIV_EQ: std::cerr <<
"EDIV_EQ\n";
break;
6473 case ELEFTDIV_EQ: std::cerr <<
"ELEFTDIV_EQ\n";
break;
6474 case EPOW_EQ: std::cerr <<
"EPOW_EQ\n";
break;
6475 case AND_EQ: std::cerr <<
"AND_EQ\n";
break;
6476 case OR_EQ: std::cerr <<
"OR_EQ\n";
break;
6477 case EXPR_AND_AND: std::cerr <<
"EXPR_AND_AND\n";
break;
6478 case EXPR_OR_OR: std::cerr <<
"EXPR_OR_OR\n";
break;
6479 case EXPR_AND: std::cerr <<
"EXPR_AND\n";
break;
6480 case EXPR_OR: std::cerr <<
"EXPR_OR\n";
break;
6481 case EXPR_LT: std::cerr <<
"EXPR_LT\n";
break;
6482 case EXPR_LE: std::cerr <<
"EXPR_LE\n";
break;
6483 case EXPR_EQ: std::cerr <<
"EXPR_EQ\n";
break;
6484 case EXPR_NE: std::cerr <<
"EXPR_NE\n";
break;
6485 case EXPR_GE: std::cerr <<
"EXPR_GE\n";
break;
6486 case EXPR_GT: std::cerr <<
"EXPR_GT\n";
break;
6487 case LEFTDIV: std::cerr <<
"LEFTDIV\n";
break;
6488 case EMUL: std::cerr <<
"EMUL\n";
break;
6489 case EDIV: std::cerr <<
"EDIV\n";
break;
6490 case ELEFTDIV: std::cerr <<
"ELEFTDIV\n";
break;
6491 case HERMITIAN: std::cerr <<
"HERMITIAN\n";
break;
6492 case TRANSPOSE: std::cerr <<
"TRANSPOSE\n";
break;
6493 case PLUS_PLUS: std::cerr <<
"PLUS_PLUS\n";
break;
6494 case MINUS_MINUS: std::cerr <<
"MINUS_MINUS\n";
break;
6495 case POW: std::cerr <<
"POW\n";
break;
6496 case EPOW: std::cerr <<
"EPOW\n";
break;
6500 token *tok = current_token ();
6501 std::cerr <<
"NUMBER [";
6510 token *tok = current_token ();
6511 std::cerr <<
"STRUCT_ELT [" << tok->
text () <<
"]\n";
6517 token *tok = current_token ();
6518 std::cerr <<
"NAME [" << tok->
text () <<
"]\n";
6522 case END: std::cerr <<
"END\n";
break;
6527 token *tok = current_token ();
6529 std::cerr << (tok_id ==
DQ_STRING ?
"DQ_STRING" :
"SQ_STRING")
6530 <<
" [" << tok->
text () <<
"]\n";
6534 case FOR: std::cerr <<
"FOR\n";
break;
6535 case WHILE: std::cerr <<
"WHILE\n";
break;
6536 case DO: std::cerr <<
"DO\n";
break;
6537 case UNTIL: std::cerr <<
"UNTIL\n";
break;
6538 case IF: std::cerr <<
"IF\n";
break;
6539 case ELSEIF: std::cerr <<
"ELSEIF\n";
break;
6540 case ELSE: std::cerr <<
"ELSE\n";
break;
6541 case SWITCH: std::cerr <<
"SWITCH\n";
break;
6542 case CASE: std::cerr <<
"CASE\n";
break;
6543 case OTHERWISE: std::cerr <<
"OTHERWISE\n";
break;
6544 case BREAK: std::cerr <<
"BREAK\n";
break;
6545 case CONTINUE: std::cerr <<
"CONTINUE\n";
break;
6546 case RETURN: std::cerr <<
"RETURN\n";
break;
6547 case UNWIND: std::cerr <<
"UNWIND\n";
break;
6548 case CLEANUP: std::cerr <<
"CLEANUP\n";
break;
6549 case TRY: std::cerr <<
"TRY\n";
break;
6550 case CATCH: std::cerr <<
"CATCH\n";
break;
6551 case GLOBAL: std::cerr <<
"GLOBAL\n";
break;
6552 case PERSISTENT: std::cerr <<
"PERSISTENT\n";
break;
6553 case FCN_HANDLE: std::cerr <<
"FCN_HANDLE\n";
break;
6554 case END_OF_INPUT: std::cerr <<
"END_OF_INPUT\n\n";
break;
6555 case LEXICAL_ERROR: std::cerr <<
"LEXICAL_ERROR\n\n";
break;
6556 case FUNCTION: std::cerr <<
"FUNCTION\n";
break;
6557 case INPUT_FILE: std::cerr <<
"INPUT_FILE\n";
break;
6559 case METAQUERY: std::cerr <<
"METAQUERY\n";
break;
6560 case GET: std::cerr <<
"GET\n";
break;
6561 case SET: std::cerr <<
"SET\n";
break;
6562 case PROPERTIES: std::cerr <<
"PROPERTIES\n";
break;
6563 case METHODS: std::cerr <<
"METHODS\n";
break;
6564 case EVENTS: std::cerr <<
"EVENTS\n";
break;
6565 case CLASSDEF: std::cerr <<
"CLASSDEF\n";
break;
6566 case '\n': std::cerr <<
"\\n\n";
break;
6567 case '\r': std::cerr <<
"\\r\n";
break;
6568 case '\t': std::cerr <<
"TAB\n";
break;
6571 if (tok_id < 256 && tok_id > 31)
6572 std::cerr << static_cast<char> (tok_id) <<
"\n";
6574 std::cerr <<
"UNKNOWN(" << tok_id <<
")\n";
6583 ::error (
"fatal lexer error: %s", msg);
6614 std::cerr << std::endl;
6616 display_start_state ();
6618 std::cerr <<
"P: " << pattern << std::endl;
6619 std::cerr <<
"T: " << flex_yytext () << std::endl;
6636 start_state_stack.push (state);
6638 BEGIN (start_state ());
6646 start_state_stack.pop ();
6648 BEGIN (start_state ());
6654 while (! start_state_stack.empty ())
6655 start_state_stack.pop ();
6665 switch (start_state ())
6668 std::cerr <<
"INITIAL" << std::endl;
6672 std::cerr <<
"COMMAND_START" << std::endl;
6676 std::cerr <<
"MATRIX_START" << std::endl;
6680 std::cerr <<
"INPUT_FILE_START" << std::endl;
6684 std::cerr <<
"BLOCK_COMMENT_START" << std::endl;
6688 std::cerr <<
"LINE_COMMENT_START" << std::endl;
6692 std::cerr <<
"DQ_STRING_START" << std::endl;
6696 std::cerr <<
"SQ_STRING_START" << std::endl;
6700 std::cerr <<
"FQ_IDENT_START" << std::endl;
6704 std::cerr <<
"UNKNOWN START STATE!" << std::endl;
6714 bool unput_comma =
false;
6718 int c = text_yyinput ();
6721 bool space_after = is_space_or_tab (c);
6723 if (! (prev_tok_id ==
'[' || prev_tok_id ==
'{'
6725 || ((tok_id ==
'+' || tok_id ==
'-') && space_after)))
6736 warn_language_extension_operator (flex_yytext ());
6738 update_token_positions (flex_yyleng ());
6764 return handle_token (tok);
6779 return handle_token (tok);
6796 && ! (tok_id ==
';' || tok_id ==
',' || tok_id ==
'\n'))
6799 return count_token_internal (tok_id);
6806 increment_token_count ();
6808 return show_token (tok_id);
6815 if (display_tokens ())
6816 display_token (tok_id);
6821 display_token (tok_id);
6822 std::cerr << std::endl;
6833 if (m_input_buf.empty ())
6863 if (! m_input_buf.empty ())
6864 status = m_input_buf.copy_chunk (buf, max_size);
6868 m_initial_input =
false;
6892 m_input_buf.fill (input, eof);
6901 if (m_input_buf.empty () && ! m_input_buf.at_eof ())
6911 error (
"unexpected: max_size <= 0 in push_lexer::fill_flex_buffer - please report this bug");
6913 buf[0] =
static_cast<char> (1);
6921 if (! m_input_buf.empty ())
6922 status = m_input_buf.copy_chunk (buf, max_size,
true);
6930OCTAVE_END_NAMESPACE(octave)
void maybe_warn_separator_insert(char sep)
void warn_language_extension_operator(const std::string &op)
int handle_superclass_identifier()
void push_start_state(int state)
int handle_close_bracket(int bracket_type)
bool inside_any_object_index()
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
token * make_meta_identifier_token(const std::string &cls)
void warn_language_extension_continuation()
token * make_keyword_token(const std::string &s)
token * make_fq_identifier_token(const std::string &ident)
void fatal_error(const char *msg)
int handle_op(int tok_id, bool bos=false, bool compat=true)
int syntax_error(const std::string &msg)
int show_token(int tok_id)
int handle_token(int tok_id)
void handle_continuation()
bool maybe_unput_comma_before_unary_op(int tok_id)
void xunput(char c, char *buf)
void display_token(int tok_id)
std::size_t pending_token_count() const
void check_comment_for_hash_char(const char *txt, std::size_t len)
int count_token_internal(int tok_id)
bool whitespace_is_significant()
bool display_tokens() const
void lexer_debug(const char *pattern)
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)
settings & get_settings()
symbol_scope get_current_scope() const
history_system & get_history_system()
octave_value PS1(const octave_value_list &args, int nargout)
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 previous_token_is(int tok_id) 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 m_parsing_classdef_superclass
bool m_looking_for_object_index
interpreter & m_interpreter
bbp_nesting_level m_nesting_level
int previous_token_id() const
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
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()
void mark_may_be_command()
bool token_is(int id) const
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_with_id(const char *id, const char *fmt,...)
void error(const char *fmt,...)
#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 YY_RESTORE_YY_MORE_OFFSET
#define HANDLE_EOB_OR_EOF(STATUS)
#define CMD_OR_UNARY_OP(PATTERN, TOK_ID, COMPAT)
#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 CMD_OR_OP(PATTERN, TOK_ID, COMPAT)
#define EOB_ACT_CONTINUE_SCAN
#define HANDLE_STRING_CONTINUATION
void * octave_realloc(void *, yy_size_t, yyscan_t yyscanner)
#define BLOCK_COMMENT_START
bool iskeyword(const std::string &s)
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