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
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
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 124
614#define YY_END_OF_BUFFER 125
624 0, 0, 5, 5, 10, 10, 0, 0, 0, 0,
625 0, 0, 0, 0, 0, 0, 0, 0, 125, 123,
626 55, 65, 65, 96, 67, 123, 60, 81, 66, 101,
627 102, 85, 93, 97, 94, 103, 86, 53, 53, 68,
628 92, 83, 104, 84, 123, 63, 15, 87, 16, 88,
629 60, 60, 121, 82, 122, 95, 55, 123, 9, 8,
630 3, 3, 7, 124, 5, 6, 4, 9, 10, 11,
631 11, 103, 13, 14, 10, 1, 1, 124, 20, 20,
632 124, 124, 24, 24, 24, 24, 24, 24, 41, 42,
633 42, 26, 40, 124, 45, 46, 46, 44, 50, 48,
635 50, 47, 50, 55, 0, 65, 78, 0, 21, 21,
636 0, 60, 0, 0, 90, 119, 89, 107, 99, 105,
637 100, 106, 98, 71, 69, 70, 0, 72, 53, 73,
638 74, 108, 53, 53, 0, 0, 53, 0, 76, 77,
639 80, 0, 62, 0, 64, 0, 57, 57, 0, 109,
640 115, 60, 60, 120, 91, 79, 55, 0, 0, 9,
641 8, 3, 0, 3, 5, 6, 0, 10, 11, 0,
642 10, 1, 0, 20, 20, 0, 0, 0, 0, 0,
643 0, 24, 0, 23, 23, 0, 0, 0, 41, 42,
644 25, 0, 39, 39, 38, 38, 27, 29, 30, 31,
646 32, 33, 34, 35, 39, 45, 46, 43, 48, 50,
647 0, 47, 0, 0, 0, 0, 0, 61, 116, 75,
648 112, 110, 111, 0, 113, 53, 114, 117, 52, 51,
649 0, 53, 54, 0, 62, 0, 0, 64, 0, 0,
650 58, 58, 60, 0, 17, 17, 0, 0, 0, 18,
651 18, 0, 19, 19, 0, 22, 22, 0, 0, 37,
652 37, 27, 28, 0, 47, 0, 0, 0, 61, 0,
653 118, 0, 56, 56, 51, 0, 53, 54, 0, 0,
654 62, 0, 64, 0, 59, 0, 2, 2, 0, 12,
655 12, 0, 36, 36, 27, 47, 0, 49, 49, 0,
657 61, 0, 0, 0, 51, 0, 0, 0, 54, 62,
663 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
664 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
665 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
666 1, 2, 5, 6, 7, 8, 7, 9, 10, 11,
667 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
668 22, 23, 24, 25, 24, 26, 27, 28, 29, 30,
669 31, 32, 33, 34, 35, 36, 35, 37, 37, 35,
670 8, 8, 38, 38, 8, 8, 8, 8, 8, 8,
671 8, 8, 8, 8, 8, 8, 8, 39, 8, 8,
672 40, 41, 42, 43, 44, 1, 45, 46, 35, 37,
674 47, 48, 49, 8, 38, 38, 8, 8, 8, 50,
675 8, 8, 8, 51, 52, 53, 54, 55, 8, 56,
676 8, 8, 57, 58, 59, 60, 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,
680 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,
685 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
686 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
687 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
688 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
689 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
695 1, 2, 3, 3, 1, 4, 5, 6, 1, 7,
696 5, 5, 1, 8, 5, 8, 9, 1, 10, 10,
697 10, 10, 10, 10, 10, 10, 10, 1, 5, 1,
698 1, 1, 1, 11, 12, 12, 13, 14, 6, 5,
699 15, 5, 1, 16, 12, 12, 13, 12, 6, 6,
700 6, 17, 6, 17, 6, 6, 5, 1, 5, 1
705 0, 59, 65, 123, 61, 89, 903, 902, 70, 81,
706 93, 97, 106, 115, 133, 141, 181, 236, 905, 1227,
707 79, 1227, 898, 866, 1227, 86, 137, 119, 1227, 1227,
708 1227, 85, 48, 1227, 71, 283, 865, 310, 121, 1227,
709 1227, 864, 863, 862, 889, 888, 1227, 166, 1227, 858,
710 144, 147, 1227, 83, 1227, 854, 106, 155, 0, 879,
711 1227, 875, 1227, 171, 144, 150, 1227, 860, 186, 1227,
712 872, 857, 1227, 1227, 188, 1227, 870, 183, 1227, 858,
713 200, 202, 1227, 206, 854, 196, 208, 219, 0, 1227,
714 832, 823, 807, 365, 0, 1227, 820, 751, 1227, 757,
716 754, 194, 739, 239, 239, 1227, 1227, 244, 1227, 752,
717 222, 243, 752, 748, 1227, 1227, 715, 1227, 1227, 1227,
718 1227, 1227, 1227, 236, 714, 713, 726, 711, 217, 709,
719 708, 1227, 412, 0, 231, 101, 1227, 0, 1227, 1227,
720 1227, 736, 261, 732, 277, 309, 1227, 727, 254, 1227,
721 1227, 321, 326, 1227, 1227, 1227, 263, 265, 315, 0,
722 727, 1227, 311, 725, 340, 283, 710, 337, 1227, 709,
723 338, 1227, 317, 1227, 721, 368, 349, 359, 374, 357,
724 378, 1227, 388, 1227, 720, 391, 391, 397, 0, 1227,
725 1227, 705, 1227, 400, 1227, 715, 421, 1227, 1227, 1227,
727 1227, 1227, 1227, 1227, 0, 0, 1227, 1227, 709, 1227,
728 348, 356, 708, 691, 705, 445, 704, 407, 1227, 536,
729 1227, 1227, 1227, 423, 1227, 414, 1227, 1227, 1227, 437,
730 391, 526, 360, 452, 456, 561, 458, 461, 559, 425,
731 1227, 538, 463, 464, 1227, 519, 467, 473, 480, 1227,
732 492, 483, 1227, 469, 490, 1227, 461, 496, 499, 1227,
733 420, 485, 0, 394, 494, 509, 512, 513, 514, 381,
734 1227, 514, 1227, 338, 500, 501, 260, 365, 512, 264,
735 522, 260, 523, 531, 1227, 532, 1227, 249, 546, 1227,
736 218, 553, 1227, 211, 1227, 526, 555, 1227, 176, 174,
738 543, 147, 145, 130, 1227, 117, 90, 47, 1227, 545,
739 549, 551, 1227, 568, 585, 602, 619, 636, 653, 670,
740 687, 703, 719, 735, 752, 769, 786, 803, 820, 837,
741 854, 870, 886, 902, 910, 480, 917, 929, 945, 962,
742 970, 982, 998, 1014, 1031, 1039, 1046, 1062, 1078, 1095,
743 1112, 1128, 1145, 1161, 1177, 1193, 1209
748 313, 1, 314, 314, 1, 1, 315, 315, 316, 316,
749 317, 317, 318, 318, 319, 319, 320, 320, 313, 313,
750 313, 313, 313, 313, 313, 321, 322, 313, 313, 313,
751 313, 313, 313, 313, 313, 313, 313, 313, 38, 313,
752 313, 313, 313, 313, 323, 324, 313, 313, 313, 313,
753 322, 322, 313, 313, 313, 313, 313, 321, 325, 313,
754 313, 313, 313, 326, 313, 313, 313, 313, 313, 313,
755 313, 36, 313, 313, 313, 313, 313, 327, 313, 313,
756 327, 327, 313, 313, 313, 328, 313, 328, 329, 313,
757 313, 313, 313, 330, 331, 313, 313, 313, 313, 313,
759 313, 332, 313, 313, 321, 313, 313, 321, 313, 313,
760 313, 322, 333, 334, 313, 313, 313, 313, 313, 313,
761 313, 313, 313, 313, 313, 313, 313, 313, 335, 313,
762 313, 313, 313, 39, 313, 336, 313, 337, 313, 313,
763 313, 323, 338, 324, 339, 313, 313, 313, 340, 313,
764 313, 322, 322, 313, 313, 313, 313, 321, 321, 325,
765 313, 313, 326, 313, 313, 313, 313, 313, 313, 313,
766 313, 313, 327, 313, 313, 327, 327, 327, 327, 313,
767 328, 313, 328, 313, 313, 313, 328, 328, 329, 313,
768 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
770 313, 313, 313, 313, 341, 331, 313, 313, 313, 313,
771 313, 332, 342, 313, 333, 343, 334, 344, 313, 313,
772 313, 313, 313, 345, 313, 335, 313, 313, 313, 313,
773 336, 346, 347, 313, 338, 348, 313, 339, 349, 340,
774 313, 313, 322, 321, 313, 313, 350, 351, 327, 313,
775 313, 327, 313, 313, 328, 313, 313, 313, 313, 313,
776 313, 313, 341, 342, 352, 353, 343, 313, 344, 354,
777 313, 345, 313, 313, 313, 313, 346, 347, 313, 348,
778 355, 349, 356, 313, 313, 350, 313, 313, 351, 313,
779 313, 313, 313, 313, 313, 352, 353, 313, 313, 354,
781 357, 313, 313, 313, 313, 313, 313, 313, 313, 355,
782 356, 357, 0, 313, 313, 313, 313, 313, 313, 313,
783 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
784 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
785 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
786 313, 313, 313, 313, 313, 313, 313
791 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
792 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
793 39, 39, 39, 39, 39, 39, 39, 40, 41, 42,
794 43, 44, 45, 46, 27, 27, 27, 27, 27, 47,
795 48, 49, 50, 27, 27, 27, 27, 27, 51, 27,
796 27, 52, 27, 27, 27, 27, 53, 54, 55, 56,
797 57, 119, 69, 70, 71, 58, 60, 61, 62, 309,
798 63, 64, 79, 80, 63, 65, 66, 72, 120, 67,
799 104, 68, 81, 79, 80, 105, 121, 82, 109, 110,
800 75, 70, 71, 67, 84, 58, 85, 117, 87, 86,
802 85, 122, 73, 88, 65, 72, 66, 157, 90, 91,
803 309, 92, 158, 154, 231, 118, 231, 90, 91, 74,
804 92, 65, 93, 66, 60, 61, 62, 115, 63, 64,
805 73, 93, 63, 65, 66, 96, 97, 67, 111, 68,
806 155, 309, 98, 96, 97, 111, 94, 74, 111, 116,
807 98, 67, 305, 113, 165, 94, 313, 109, 110, 313,
808 113, 166, 65, 113, 66, 305, 313, 146, 147, 148,
809 114, 305, 149, 162, 164, 300, 313, 114, 298, 65,
810 114, 66, 100, 165, 101, 174, 175, 168, 102, 171,
811 152, 166, 105, 153, 158, 211, 150, 103, 184, 185,
813 165, 176, 174, 175, 174, 175, 177, 180, 166, 186,
814 213, 159, 181, 293, 187, 102, 102, 102, 102, 102,
815 290, 184, 185, 111, 102, 102, 102, 102, 102, 102,
816 102, 102, 102, 102, 102, 102, 102, 100, 113, 101,
817 104, 109, 110, 102, 111, 105, 109, 110, 220, 230,
818 230, 287, 103, 136, 137, 114, 241, 242, 178, 113,
819 179, 282, 234, 136, 157, 280, 221, 109, 110, 158,
820 102, 102, 102, 102, 102, 188, 114, 236, 237, 102,
821 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
822 102, 102, 123, 239, 166, 124, 125, 137, 126, 127,
824 128, 129, 129, 129, 129, 129, 129, 129, 129, 129,
825 146, 147, 148, 162, 164, 149, 244, 245, 246, 174,
826 175, 159, 111, 130, 166, 131, 133, 111, 134, 134,
827 134, 134, 134, 134, 134, 134, 134, 113, 168, 171,
828 273, 166, 113, 105, 158, 135, 136, 137, 138, 211,
829 165, 174, 175, 134, 114, 135, 136, 211, 180, 114,
830 249, 250, 251, 181, 213, 138, 194, 195, 196, 176,
831 174, 175, 213, 243, 177, 252, 253, 254, 243, 165,
832 184, 185, 300, 197, 197, 197, 197, 197, 197, 197,
833 184, 185, 186, 184, 185, 264, 165, 187, 255, 256,
835 257, 259, 260, 261, 313, 178, 313, 179, 268, 198,
836 199, 279, 200, 279, 201, 202, 279, 203, 279, 204,
837 205, 229, 260, 270, 229, 273, 274, 241, 242, 229,
838 129, 129, 129, 129, 129, 129, 129, 129, 129, 262,
839 262, 262, 262, 262, 262, 262, 111, 188, 136, 137,
840 136, 137, 229, 234, 229, 275, 275, 234, 136, 237,
841 136, 113, 237, 256, 284, 244, 245, 246, 236, 287,
842 288, 253, 236, 285, 239, 290, 291, 239, 114, 113,
843 275, 249, 250, 251, 252, 253, 254, 232, 276, 232,
844 276, 255, 256, 257, 250, 211, 114, 292, 293, 294,
846 259, 260, 261, 295, 295, 295, 295, 295, 295, 295,
847 213, 298, 299, 111, 268, 268, 273, 274, 275, 275,
848 302, 245, 303, 234, 237, 304, 305, 211, 113, 270,
849 270, 306, 284, 307, 287, 288, 308, 309, 236, 239,
850 241, 285, 213, 275, 268, 114, 234, 113, 290, 291,
851 237, 276, 268, 276, 292, 293, 294, 298, 299, 270,
852 282, 236, 280, 137, 114, 239, 271, 270, 59, 59,
853 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
854 59, 59, 59, 59, 59, 76, 76, 76, 76, 76,
855 76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
857 76, 76, 78, 78, 78, 78, 78, 78, 78, 78,
858 78, 78, 78, 78, 78, 78, 78, 78, 78, 83,
859 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
860 83, 83, 83, 83, 83, 83, 89, 89, 89, 89,
861 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
862 89, 89, 89, 95, 95, 95, 95, 95, 95, 95,
863 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
864 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
865 99, 99, 99, 99, 99, 99, 99, 108, 108, 108,
866 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
868 108, 108, 108, 108, 112, 217, 215, 266, 112, 264,
869 209, 112, 112, 112, 112, 112, 112, 195, 112, 112,
870 143, 258, 184, 174, 143, 248, 247, 162, 161, 147,
871 143, 143, 143, 144, 143, 143, 145, 142, 228, 227,
872 145, 225, 224, 223, 222, 219, 145, 145, 145, 217,
873 145, 145, 160, 215, 109, 214, 210, 160, 209, 160,
874 208, 160, 160, 160, 160, 160, 160, 160, 160, 163,
875 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
876 163, 163, 163, 163, 163, 163, 173, 173, 173, 173,
877 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
879 173, 173, 173, 183, 183, 183, 183, 183, 183, 183,
880 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
881 189, 189, 207, 192, 189, 189, 189, 189, 191, 189,
882 189, 189, 189, 189, 190, 189, 189, 193, 193, 193,
883 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
884 193, 193, 193, 193, 206, 206, 182, 206, 206, 206,
885 174, 206, 206, 206, 206, 206, 206, 206, 206, 206,
886 206, 212, 172, 170, 169, 212, 167, 162, 212, 212,
887 161, 212, 212, 212, 156, 212, 212, 216, 151, 144,
888 142, 216, 141, 140, 139, 132, 107, 216, 216, 216,
890 106, 216, 216, 218, 313, 77, 77, 218, 313, 313,
891 313, 313, 313, 218, 218, 218, 313, 218, 218, 226,
892 313, 313, 226, 226, 313, 226, 233, 313, 233, 233,
893 235, 313, 313, 313, 235, 313, 313, 235, 235, 313,
894 235, 235, 235, 313, 235, 235, 238, 313, 313, 313,
895 238, 313, 313, 238, 238, 313, 238, 238, 238, 313,
896 238, 238, 240, 240, 240, 240, 240, 240, 240, 240,
897 240, 240, 240, 240, 240, 240, 240, 240, 240, 263,
898 313, 263, 263, 265, 313, 313, 313, 265, 313, 313,
899 313, 313, 313, 265, 265, 265, 313, 265, 265, 267,
901 313, 313, 313, 267, 313, 313, 267, 267, 267, 267,
902 267, 267, 313, 267, 267, 269, 313, 313, 313, 269,
903 313, 313, 269, 269, 313, 269, 269, 269, 313, 269,
904 269, 272, 272, 272, 272, 272, 272, 272, 272, 272,
905 272, 272, 272, 272, 272, 272, 272, 272, 277, 313,
906 313, 313, 277, 313, 277, 278, 313, 278, 278, 313,
907 313, 278, 278, 281, 313, 313, 313, 281, 313, 313,
908 313, 313, 313, 281, 281, 281, 313, 281, 281, 283,
909 313, 313, 313, 283, 313, 313, 313, 313, 313, 283,
910 283, 283, 313, 283, 283, 286, 286, 286, 286, 286,
912 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
913 286, 286, 289, 289, 289, 289, 289, 289, 289, 289,
914 289, 289, 289, 289, 289, 289, 289, 289, 289, 296,
915 313, 313, 313, 296, 313, 313, 296, 296, 313, 296,
916 296, 296, 313, 296, 296, 297, 297, 297, 297, 297,
917 297, 297, 297, 297, 297, 297, 297, 297, 297, 297,
918 297, 297, 301, 313, 313, 313, 301, 313, 313, 313,
919 313, 313, 301, 301, 301, 313, 301, 301, 310, 313,
920 313, 313, 310, 313, 313, 310, 310, 313, 310, 310,
921 310, 313, 310, 310, 311, 313, 313, 313, 311, 313,
923 313, 311, 311, 313, 311, 311, 311, 313, 311, 311,
924 312, 313, 313, 313, 312, 313, 313, 312, 312, 313,
925 312, 312, 312, 313, 312, 312, 19, 313, 313, 313,
926 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
927 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
928 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
929 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
930 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
931 313, 313, 313, 313, 313, 313, 313
936 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
937 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
938 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
939 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
940 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
941 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
942 2, 33, 5, 5, 5, 2, 3, 3, 3, 308,
943 3, 3, 9, 9, 3, 3, 3, 5, 33, 3,
944 21, 3, 10, 10, 10, 21, 35, 10, 26, 26,
945 6, 6, 6, 3, 11, 6, 11, 32, 12, 11,
947 12, 35, 5, 12, 3, 6, 3, 57, 13, 13,
948 307, 13, 57, 54, 136, 32, 136, 14, 14, 5,
949 14, 3, 13, 3, 4, 4, 4, 28, 4, 4,
950 6, 14, 4, 4, 4, 15, 15, 4, 27, 4,
951 54, 306, 15, 16, 16, 51, 13, 6, 52, 28,
952 16, 4, 304, 27, 65, 14, 39, 58, 58, 39,
953 51, 66, 4, 52, 4, 303, 39, 48, 48, 48,
954 27, 302, 48, 64, 64, 300, 39, 51, 299, 4,
955 52, 4, 17, 65, 17, 78, 78, 69, 17, 75,
956 51, 66, 69, 52, 75, 102, 48, 17, 86, 86,
958 65, 81, 81, 81, 82, 82, 81, 84, 66, 87,
959 102, 58, 84, 294, 87, 17, 17, 17, 17, 17,
960 291, 88, 88, 111, 17, 17, 17, 17, 17, 17,
961 17, 17, 17, 17, 17, 17, 17, 18, 111, 18,
962 104, 105, 105, 18, 112, 104, 108, 108, 124, 135,
963 135, 288, 18, 129, 129, 111, 149, 149, 82, 112,
964 82, 282, 143, 129, 157, 280, 124, 158, 158, 157,
965 18, 18, 18, 18, 18, 88, 112, 143, 145, 18,
966 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
967 18, 18, 36, 145, 166, 36, 36, 277, 36, 36,
969 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
970 146, 146, 146, 163, 163, 146, 159, 159, 159, 173,
971 173, 158, 152, 36, 166, 36, 38, 153, 38, 38,
972 38, 38, 38, 38, 38, 38, 38, 152, 168, 171,
973 274, 166, 153, 168, 171, 38, 38, 38, 38, 211,
974 165, 177, 177, 38, 152, 38, 38, 212, 180, 153,
975 178, 178, 178, 180, 211, 38, 94, 94, 94, 176,
976 176, 176, 212, 152, 176, 179, 179, 179, 153, 165,
977 181, 181, 270, 94, 94, 94, 94, 94, 94, 94,
978 183, 183, 186, 187, 187, 264, 165, 186, 188, 188,
980 188, 194, 194, 194, 231, 177, 231, 177, 218, 94,
981 94, 233, 94, 233, 94, 94, 278, 94, 278, 94,
982 94, 133, 261, 218, 133, 224, 224, 240, 240, 133,
983 133, 133, 133, 133, 133, 133, 133, 133, 133, 197,
984 197, 197, 197, 197, 197, 197, 216, 187, 133, 133,
985 226, 226, 133, 234, 133, 230, 230, 235, 133, 237,
986 226, 216, 238, 257, 243, 244, 244, 244, 234, 247,
987 247, 254, 235, 243, 237, 248, 248, 238, 216, 243,
988 230, 249, 249, 249, 252, 252, 252, 336, 230, 336,
989 230, 255, 255, 255, 251, 265, 243, 258, 258, 258,
991 259, 259, 259, 262, 262, 262, 262, 262, 262, 262,
992 265, 266, 266, 267, 268, 269, 272, 272, 275, 275,
993 276, 246, 276, 281, 283, 276, 276, 296, 267, 268,
994 269, 279, 284, 279, 286, 286, 279, 279, 281, 283,
995 242, 284, 296, 275, 301, 267, 310, 284, 289, 289,
996 311, 275, 312, 275, 292, 292, 292, 297, 297, 301,
997 239, 310, 236, 232, 284, 311, 220, 312, 314, 314,
998 314, 314, 314, 314, 314, 314, 314, 314, 314, 314,
999 314, 314, 314, 314, 314, 315, 315, 315, 315, 315,
1000 315, 315, 315, 315, 315, 315, 315, 315, 315, 315,
1002 315, 315, 316, 316, 316, 316, 316, 316, 316, 316,
1003 316, 316, 316, 316, 316, 316, 316, 316, 316, 317,
1004 317, 317, 317, 317, 317, 317, 317, 317, 317, 317,
1005 317, 317, 317, 317, 317, 317, 318, 318, 318, 318,
1006 318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
1007 318, 318, 318, 319, 319, 319, 319, 319, 319, 319,
1008 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
1009 320, 320, 320, 320, 320, 320, 320, 320, 320, 320,
1010 320, 320, 320, 320, 320, 320, 320, 321, 321, 321,
1011 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
1013 321, 321, 321, 321, 322, 217, 215, 214, 322, 213,
1014 209, 322, 322, 322, 322, 322, 322, 196, 322, 322,
1015 323, 192, 185, 175, 323, 170, 167, 164, 161, 148,
1016 323, 323, 323, 144, 323, 323, 324, 142, 131, 130,
1017 324, 128, 127, 126, 125, 117, 324, 324, 324, 114,
1018 324, 324, 325, 113, 110, 103, 101, 325, 100, 325,
1019 98, 325, 325, 325, 325, 325, 325, 325, 325, 326,
1020 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
1021 326, 326, 326, 326, 326, 326, 327, 327, 327, 327,
1022 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
1024 327, 327, 327, 328, 328, 328, 328, 328, 328, 328,
1025 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
1026 329, 329, 97, 93, 329, 329, 329, 329, 92, 329,
1027 329, 329, 329, 329, 91, 329, 329, 330, 330, 330,
1028 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
1029 330, 330, 330, 330, 331, 331, 85, 331, 331, 331,
1030 80, 331, 331, 331, 331, 331, 331, 331, 331, 331,
1031 331, 332, 77, 72, 71, 332, 68, 62, 332, 332,
1032 60, 332, 332, 332, 56, 332, 332, 333, 50, 46,
1033 45, 333, 44, 43, 42, 37, 24, 333, 333, 333,
1035 23, 333, 333, 334, 19, 8, 7, 334, 0, 0,
1036 0, 0, 0, 334, 334, 334, 0, 334, 334, 335,
1037 0, 0, 335, 335, 0, 335, 337, 0, 337, 337,
1038 338, 0, 0, 0, 338, 0, 0, 338, 338, 0,
1039 338, 338, 338, 0, 338, 338, 339, 0, 0, 0,
1040 339, 0, 0, 339, 339, 0, 339, 339, 339, 0,
1041 339, 339, 340, 340, 340, 340, 340, 340, 340, 340,
1042 340, 340, 340, 340, 340, 340, 340, 340, 340, 341,
1043 0, 341, 341, 342, 0, 0, 0, 342, 0, 0,
1044 0, 0, 0, 342, 342, 342, 0, 342, 342, 343,
1046 0, 0, 0, 343, 0, 0, 343, 343, 343, 343,
1047 343, 343, 0, 343, 343, 344, 0, 0, 0, 344,
1048 0, 0, 344, 344, 0, 344, 344, 344, 0, 344,
1049 344, 345, 345, 345, 345, 345, 345, 345, 345, 345,
1050 345, 345, 345, 345, 345, 345, 345, 345, 346, 0,
1051 0, 0, 346, 0, 346, 347, 0, 347, 347, 0,
1052 0, 347, 347, 348, 0, 0, 0, 348, 0, 0,
1053 0, 0, 0, 348, 348, 348, 0, 348, 348, 349,
1054 0, 0, 0, 349, 0, 0, 0, 0, 0, 349,
1055 349, 349, 0, 349, 349, 350, 350, 350, 350, 350,
1057 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
1058 350, 350, 351, 351, 351, 351, 351, 351, 351, 351,
1059 351, 351, 351, 351, 351, 351, 351, 351, 351, 352,
1060 0, 0, 0, 352, 0, 0, 352, 352, 0, 352,
1061 352, 352, 0, 352, 352, 353, 353, 353, 353, 353,
1062 353, 353, 353, 353, 353, 353, 353, 353, 353, 353,
1063 353, 353, 354, 0, 0, 0, 354, 0, 0, 0,
1064 0, 0, 354, 354, 354, 0, 354, 354, 355, 0,
1065 0, 0, 355, 0, 0, 355, 355, 0, 355, 355,
1066 355, 0, 355, 355, 356, 0, 0, 0, 356, 0,
1068 0, 356, 356, 0, 356, 356, 356, 0, 356, 356,
1069 357, 0, 0, 0, 357, 0, 0, 357, 357, 0,
1070 357, 357, 357, 0, 357, 357, 313, 313, 313, 313,
1071 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
1072 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
1073 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
1074 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
1075 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
1076 313, 313, 313, 313, 313, 313, 313
1082#define REJECT reject_used_but_not_detected
1083#define yymore() yymore_used_but_not_detected
1084#define YY_MORE_ADJ 0
1085#define YY_RESTORE_YY_MORE_OFFSET
1086#line 1 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1108#line 91 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1157#if defined (OCTAVE_STYPE_IS_DECLARED) && ! defined YYSTYPE
1158# define YYSTYPE OCTAVE_STYPE
1161#define YY_NO_UNISTD_H 1
1162#define isatty octave_isatty_wrapper
1164#if ! (defined (FLEX_SCANNER) \
1165 && defined (YY_FLEX_MAJOR_VERSION) && YY_FLEX_MAJOR_VERSION >= 2 \
1166 && defined (YY_FLEX_MINOR_VERSION) && YY_FLEX_MINOR_VERSION >= 5)
1167#error lex.l requires flex version 2.5.4 or later
1170#define YY_EXTRA_TYPE octave::base_lexer *
1171#define curr_lexer yyextra
1175#if defined (YY_INPUT)
1178#define YY_INPUT(buf, result, max_size) \
1179 result = curr_lexer->fill_flex_buffer (buf, max_size)
1183#if defined (YY_FATAL_ERROR)
1184# undef YY_FATAL_ERROR
1186#define YY_FATAL_ERROR(msg) \
1187 (yyget_extra (yyscanner))->fatal_error (msg)
1189#define CMD_OR_OP(PATTERN, TOK, COMPAT) \
1192 curr_lexer->lexer_debug (PATTERN); \
1194 if (curr_lexer->looks_like_command_arg ()) \
1197 curr_lexer->push_start_state (COMMAND_START); \
1200 return curr_lexer->handle_op (TOK, false, COMPAT); \
1204#define CMD_OR_DEPRECATED_OP(PATTERN, REPLACEMENT, VERSION, TOK) \
1207 curr_lexer->lexer_debug (PATTERN); \
1209 if (curr_lexer->looks_like_command_arg ()) \
1212 curr_lexer->push_start_state (COMMAND_START); \
1216 curr_lexer->warn_deprecated_operator (PATTERN, REPLACEMENT, \
1221 return curr_lexer->handle_op (TOK, false, true); \
1226#define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT) \
1229 curr_lexer->lexer_debug (PATTERN); \
1231 if (curr_lexer->previous_token_may_be_command ()) \
1233 if (curr_lexer->looks_like_command_arg ()) \
1236 curr_lexer->push_start_state (COMMAND_START); \
1239 return curr_lexer->handle_op (TOK, false, COMPAT); \
1243 if (curr_lexer->maybe_unput_comma_before_unary_op (TOK)) \
1246 curr_lexer->xunput (','); \
1249 return curr_lexer->handle_op (TOK, false, COMPAT); \
1254#define HANDLE_EOB_OR_EOF(STATUS) \
1257 if (curr_lexer->is_push_lexer ()) \
1259 if (curr_lexer->at_end_of_buffer ()) \
1262 if (curr_lexer->at_end_of_file ()) \
1263 return curr_lexer->handle_end_of_input (); \
1271#define HANDLE_STRING_CONTINUATION \
1274 curr_lexer->m_filepos.next_line (); \
1276 HANDLE_EOB_OR_EOF (-1); \
1280#define HANDLE_NUMBER(PATTERN, BASE) \
1283 curr_lexer->lexer_debug (PATTERN); \
1285 if (curr_lexer->previous_token_may_be_command () \
1286 && curr_lexer->space_follows_previous_token ()) \
1289 curr_lexer->push_start_state (COMMAND_START); \
1293 int tok = curr_lexer->previous_token_value (); \
1295 if (curr_lexer->whitespace_is_significant () \
1296 && curr_lexer->space_follows_previous_token () \
1297 && ! (tok == '[' || tok == '{' \
1298 || curr_lexer->previous_token_is_binop ())) \
1301 curr_lexer->xunput (','); \
1304 return curr_lexer->handle_number<BASE> (); \
1309#define HANDLE_IDENTIFIER(pattern, get_set) \
1312 curr_lexer->lexer_debug (pattern); \
1314 int tok = curr_lexer->previous_token_value (); \
1316 if (curr_lexer->whitespace_is_significant () \
1317 && curr_lexer->space_follows_previous_token () \
1318 && ! (tok == '[' || tok == '{' \
1319 || curr_lexer->previous_token_is_binop ())) \
1322 curr_lexer->xunput (','); \
1326 if (! curr_lexer->m_looking_at_decl_list \
1327 && curr_lexer->previous_token_may_be_command ()) \
1330 curr_lexer->push_start_state (COMMAND_START); \
1337 curr_lexer->m_filepos.increment_column (3); \
1338 curr_lexer->m_maybe_classdef_get_set_method = false; \
1341 return curr_lexer->handle_identifier (); \
1350 return c ==
' ' || c ==
'\t';
1356 return c ==
' ' || c ==
'\t' || c ==
'\n' || c ==
'\r';
1359OCTAVE_NAMESPACE_BEGIN
1373 && ! (s ==
"set" || s ==
"get" || s ==
"arguments"
1374 || s ==
"enumeration" || s ==
"events"
1375 || s ==
"methods" || s ==
"properties"));
1380#line 1381 "libinterp/parse-tree/lex.cc"
1381#line 373 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1386#line 1387 "libinterp/parse-tree/lex.cc"
1387#line 386 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1397#line 1398 "libinterp/parse-tree/lex.cc"
1398#line 1399 "libinterp/parse-tree/lex.cc"
1401#define COMMAND_START 1
1402#define MATRIX_START 2
1403#define INPUT_FILE_START 3
1404#define BLOCK_COMMENT_START 4
1405#define LINE_COMMENT_START 5
1406#define DQ_STRING_START 6
1407#define SQ_STRING_START 7
1408#define FQ_IDENT_START 8
1410#ifndef YY_NO_UNISTD_H
1418#ifndef YY_EXTRA_TYPE
1419#define YY_EXTRA_TYPE void *
1462 # define yylval yyg->yylval_r
1509#ifndef YY_SKIP_YYWRAP
1524static void yy_flex_strncpy (
char *,
const char *,
int ,
yyscan_t yyscanner);
1527#ifdef YY_NEED_STRLEN
1528static int yy_flex_strlen (
const char * ,
yyscan_t yyscanner);
1533static int yyinput (
yyscan_t yyscanner );
1541#ifndef YY_READ_BUF_SIZE
1544#define YY_READ_BUF_SIZE 16384
1546#define YY_READ_BUF_SIZE 8192
1555#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1562#define YY_INPUT(buf,result,max_size) \
1563 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1567 for ( n = 0; n < max_size && \
1568 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1569 buf[n] = (char) c; \
1571 buf[n++] = (char) c; \
1572 if ( c == EOF && ferror( yyin ) ) \
1573 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1579 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1581 if( errno != EINTR) \
1583 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1599#define yyterminate() return YY_NULL
1603#ifndef YY_START_STACK_INCR
1604#define YY_START_STACK_INCR 25
1608#ifndef YY_FATAL_ERROR
1609#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1618#define YY_DECL_IS_OURS 1
1623#define YY_DECL int yylex \
1624 (YYSTYPE * yylval_param , yyscan_t yyscanner)
1630#ifndef YY_USER_ACTION
1631#define YY_USER_ACTION
1636#define YY_BREAK break;
1639#define YY_RULE_SETUP \
1641 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1642 (yytext[yyleng - 1] == '\n'); \
1650 char *yy_cp, *yy_bp;
1683#line 406 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1687#line 410 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1692#line 1693 "libinterp/parse-tree/lex.cc"
1717 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
1719 yy_current_state = (
int)
yy_def[yy_current_state];
1720 if ( yy_current_state >= 314 )
1723 yy_current_state =
yy_nxt[
yy_base[yy_current_state] + yy_c];
1726 while (
yy_base[yy_current_state] != 1227 );
1748 goto yy_find_action;
1753#line 414 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1755 curr_lexer->lexer_debug (
"<INPUT_FILE_START>{ANY_INCLUDING_NL}");
1769#line 428 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1771 curr_lexer->lexer_debug (
"<INPUT_FILE_START><<EOF>>");
1792#line 449 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1794 curr_lexer->lexer_debug (
"<COMMAND_START>(\\.\\.\\.){ANY_EXCEPT_NL}*{NL}");
1812#line 466 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1814 curr_lexer->lexer_debug (
"<COMMAND_START>({CCHAR}{ANY_EXCEPT_NL}*)?{NL}");
1826 curr_lexer->m_looking_for_object_index =
false;
1827 curr_lexer->m_at_beginning_of_statement =
true;
1835#line 486 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1837 curr_lexer->lexer_debug (
"<COMMAND_START>[\\,\\;]");
1850 curr_lexer->m_looking_for_object_index =
false;
1851 curr_lexer->m_at_beginning_of_statement =
true;
1870#line 519 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1872 curr_lexer->lexer_debug (
"<COMMAND_START>[\\(\\[\\{]+");
1881#line 527 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1883 curr_lexer->lexer_debug (
"<COMMAND_START>[\\)\\]\\}]+");
1903#line 547 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1905 curr_lexer->lexer_debug (
"<COMMAND_START>[\\\"\\']");
1907 if (
curr_lexer->m_command_arg_paren_count == 0)
1923#line 565 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1925 curr_lexer->lexer_debug (
"<COMMAND_START>{S}*");
1927 if (
curr_lexer->m_command_arg_paren_count == 0)
1947#line 587 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1949 curr_lexer->lexer_debug (
"<COMMAND_START>([\\.]|[^#% \\t\\r\\n\\.\\,\\;\\\"\\'\\(\\[\\{\\}\\]\\)]*");
1960#line 598 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1962 curr_lexer->lexer_debug (
"<MATRIX_START>{S}*");
1966 curr_lexer->mark_previous_token_trailing_space ();
1972#line 606 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1974 curr_lexer->lexer_debug (
"<MATRIX_START>{NL}");
1979 curr_lexer->warn_language_extension (
"bare newline inside parentheses");
1982 int tok =
curr_lexer->previous_token_value ();
1984 if (! (tok ==
';' || tok ==
'[' || tok ==
'{'))
1996#line 627 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
1998 curr_lexer->lexer_debug (
"<MATRIX_START>\\.\\.\\.{ANY_EXCEPT_NL}*{NL}");
2007 curr_lexer->mark_previous_token_trailing_space ();
2025#line 654 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2027 curr_lexer->lexer_debug (
"<MATRIX_START>\\]");
2030 return curr_lexer->handle_close_bracket (
']');
2038#line 665 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2040 curr_lexer->lexer_debug (
"<MATRIX_START>\\}*");
2043 return curr_lexer->handle_close_bracket (
'}');
2048#line 672 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2052 bool unput_comma =
false;
2055 &&
curr_lexer->space_follows_previous_token ())
2057 int tok =
curr_lexer->previous_token_value ();
2059 if (! (tok ==
'[' || tok ==
'{'
2075 curr_lexer->m_looking_at_object_index.push_front (
false);
2077 curr_lexer->m_looking_for_object_index =
false;
2078 curr_lexer->m_at_beginning_of_statement =
false;
2081 && !
curr_lexer->m_parsed_function_name.top ())
2084 curr_lexer->m_looking_at_matrix_or_assign_lhs =
true;
2096#line 717 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2104 curr_lexer->m_looking_at_object_index.pop_front ();
2106 curr_lexer->m_looking_for_object_index =
true;
2107 curr_lexer->m_at_beginning_of_statement =
false;
2126#line 745 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2128 curr_lexer->lexer_debug (
"^{S}*{CCHAR}\\{{S}*{NL}");
2138#line 753 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2140 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>^{S}*{CCHAR}\\{{S}*{NL}");
2144 if (
curr_lexer->m_block_comment_nesting_level)
2164#line 776 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2166 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>^{S}*{CCHAR}\\}{S}*{NL}");
2170 if (
curr_lexer->m_block_comment_nesting_level > 1)
2179 if (
curr_lexer->m_block_comment_nesting_level == 0)
2195#line 804 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2197 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>{ANY_EXCEPT_NL}*{NL}");
2211#line 817 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2213 curr_lexer->lexer_debug (
"{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
2231#line 834 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2233 curr_lexer->lexer_debug (
"<LINE_COMMENT_START>^{S}*{CCHAR}\\{{S}*{NL}");
2257#line 857 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2259 curr_lexer->lexer_debug (
"<LINE_COMMENT_START>{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
2268 bool have_space = (i > 0);
2284 curr_lexer->mark_previous_token_trailing_space ();
2310#line 907 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2312 curr_lexer->lexer_debug (
"<LINE_COMMENT_START>{ANY_INCLUDING_NL}");
2364#line 960 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2366 curr_lexer->lexer_debug (
"<LINE_COMMENT_START><<EOF>>");
2378#line 972 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2380 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\"\\\"");
2388#line 979 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2390 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\"");
2400 curr_lexer->m_looking_for_object_index =
true;
2401 curr_lexer->m_at_beginning_of_statement =
false;
2416#line 1004 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2418 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\[0-7]{1,3}");
2422 unsigned int result;
2423 sscanf (
yytext+1,
"%o", &result);
2430 "invalid octal escape sequence in character string",
2438 curr_lexer->m_string_text +=
static_cast<unsigned char> (result);
2443#line 1028 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2445 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\x[0-9a-fA-F]+");
2449 unsigned int result;
2450 sscanf (
yytext+2,
"%x", &result);
2456 curr_lexer->m_string_text +=
static_cast<unsigned char> (result);
2461#line 1043 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2463 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\a\"");
2471#line 1050 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2473 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\b\"");
2481#line 1057 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2483 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\f\"");
2491#line 1064 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2493 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\n\"");
2501#line 1071 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2503 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\r\"");
2511#line 1078 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2513 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\t\"");
2521#line 1085 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2523 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\v\"");
2532#line 1092 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2534 curr_lexer->lexer_debug (
"<DQ_STRING_START>(\\.\\.\\.){S}*{NL}");
2537 static const char *msg =
"'...' continuations in double-quoted character strings were deprecated in version 7 and will not be allowed in a future version of Octave; please use '\\' instead";
2547#line 1103 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2549 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\{S}+{NL}");
2552 static const char *msg =
"whitespace after continuation markers in double-quoted character strings were deprecated in version 7 and will not be allowed in a future version of Octave";
2562#line 1114 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2564 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\{NL}");
2571#line 1120 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2573 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\.");
2581#line 1127 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2583 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\.");
2591#line 1134 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2593 curr_lexer->lexer_debug (
"<DQ_STRING_START>[^\\.\\\\\\r\\n\\\"]+");
2602#line 1141 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2604 curr_lexer->lexer_debug (
"<DQ_STRING_START>{NL}");
2609 "unterminated character string constant",
2624#line 1161 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2626 curr_lexer->lexer_debug (
"<SQ_STRING_START>\\'\\'");
2634#line 1168 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2636 curr_lexer->lexer_debug (
"<SQ_STRING_START>\\'");
2646 curr_lexer->m_looking_for_object_index =
true;
2647 curr_lexer->m_at_beginning_of_statement =
false;
2662#line 1193 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2664 curr_lexer->lexer_debug (
"<SQ_STRING_START>[^\\'\\n\\r]+");
2673#line 1200 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2675 curr_lexer->lexer_debug (
"<SQ_STRING_START>{NL}");
2680 "unterminated character string constant",
2695#line 1220 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2697 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{FQIDENT}{S}*");
2703 int id_tok =
curr_lexer->handle_fq_identifier ();
2707 curr_lexer->m_looking_for_object_index =
true;
2709 return curr_lexer->count_token_internal (id_tok);
2715#line 1237 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2717 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{S}+");
2721 curr_lexer->mark_previous_token_trailing_space ();
2727#line 1245 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2729 curr_lexer->lexer_debug (
"<FQ_IDENT_START>(\\.\\.\\.){ANY_EXCEPT_NL}*{NL}");
2737#line 1251 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2739 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{ANY_INCLUDING_NL}");
2750#line 1261 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2765#line 1273 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2768#line 1273 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2770 HANDLE_NUMBER (
"{DECIMAL_DIGITS}/\\.[\\*/\\\\^\\']|{DECIMAL_NUMBER}", 10);
2775#line 1277 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2786#line 1286 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2790 curr_lexer->mark_previous_token_trailing_space ();
2799#line 1296 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2801 curr_lexer->lexer_debug (
"\\.\\.\\.{ANY_EXCEPT_NL}*{NL}");
2811#line 1307 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2815#line 1307 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2817 curr_lexer->lexer_debug (
"\\\\{S}*{NL}|\\\\{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
2820 static const char *msg =
"using continuation marker \\ outside of double quoted strings was deprecated in version 7 and will be removed from a future version of Octave, use ... instead";
2837#line 1322 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2850#line 1333 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2857#line 1337 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2867#line 1345 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2869 curr_lexer->lexer_debug (
"{FQIDENT}{S}*@{S}*{FQIDENT}");
2871 if (
curr_lexer->previous_token_may_be_command ())
2880 std::string txt =
yytext;
2882 std::size_t at_or_dot_pos = txt.find_first_of (
"@.");
2884 if (at_or_dot_pos != std::string::npos)
2886 std::size_t spc_pos = txt.find_first_of (
" \t");
2888 if (spc_pos != std::string::npos && spc_pos < at_or_dot_pos)
2891 curr_lexer->m_filepos.increment_column (spc_pos);
2898 curr_lexer->m_looking_for_object_index =
true;
2899 curr_lexer->m_at_beginning_of_statement =
false;
2901 return curr_lexer->handle_superclass_identifier ();
2910#line 1386 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2912 curr_lexer->lexer_debug (
"\\?{S}*{FQIDENT}");
2914 if (
curr_lexer->previous_token_may_be_command ()
2915 &&
curr_lexer->space_follows_previous_token ())
2924 int id_tok =
curr_lexer->handle_meta_identifier ();
2928 curr_lexer->m_looking_for_object_index =
true;
2930 return curr_lexer->count_token_internal (id_tok);
2936#line 1411 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2939#line 1411 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
2941 curr_lexer->lexer_debug (
"\\@|\\@{S}*{FQIDENT}");
2943 if (
curr_lexer->previous_token_may_be_command ()
2944 &&
curr_lexer->space_follows_previous_token ())
2951 int tok_val =
curr_lexer->previous_token_value ();
2954 &&
curr_lexer->space_follows_previous_token ()
2955 && ! (tok_val ==
'[' || tok_val ==
'{'
2965 curr_lexer->m_at_beginning_of_statement =
false;
2967 std::string ident =
yytext;
2972 curr_lexer->m_looking_for_object_index =
false;
2978 ident = ident.substr (1);
2979 ident.erase (std::remove_if (ident.begin (), ident.end (),
2986 "function handles may not refer to keywords",
2991 curr_lexer->m_looking_for_object_index =
true;
3014#line 1483 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3022 curr_lexer->m_at_beginning_of_statement =
false;
3024 (
"bare newline inside parentheses");
3027 ||
curr_lexer->m_nesting_level.is_anon_fcn_body ())
3032 curr_lexer->m_at_beginning_of_statement =
true;
3036 else if (
curr_lexer->m_nesting_level.is_bracket_or_brace ())
3044 "unexpected internal lexer error",
3059#line 1526 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3063 if (
curr_lexer->previous_token_may_be_command ()
3064 &&
curr_lexer->space_follows_previous_token ())
3070 else if (
curr_lexer->m_at_beginning_of_statement)
3077 int tok =
curr_lexer->previous_token_value ();
3079 if (
curr_lexer->whitespace_is_significant ())
3081 if (
curr_lexer->space_follows_previous_token ())
3083 if (tok ==
'[' || tok ==
'{'
3097 if (tok ==
'[' || tok ==
'{'
3113 if (! tok || tok ==
'[' || tok ==
'{' || tok ==
'('
3134#line 1599 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3138 if (
curr_lexer->previous_token_may_be_command ()
3139 &&
curr_lexer->space_follows_previous_token ())
3147 int tok =
curr_lexer->previous_token_value ();
3149 if (
curr_lexer->whitespace_is_significant ())
3151 if (
curr_lexer->space_follows_previous_token ())
3153 if (tok ==
'[' || tok ==
'{'
3184#line 1647 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3189#line 1648 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3194#line 1649 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3199#line 1650 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3204#line 1651 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3209#line 1652 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3214#line 1653 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3219#line 1654 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3224#line 1655 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3229#line 1656 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3234#line 1657 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3239#line 1658 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3244#line 1659 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3249#line 1660 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3254#line 1661 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3259#line 1662 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3264#line 1663 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3269#line 1664 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3274#line 1665 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3282#line 1671 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3297#line 1683 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3302#line 1684 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3307#line 1685 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3312#line 1686 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3317#line 1688 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3321 bool at_beginning_of_statement
3322 = (! (
curr_lexer->whitespace_is_significant ()
3323 ||
curr_lexer->m_looking_at_object_index.front ()));
3325 return curr_lexer->handle_op (
';', at_beginning_of_statement);
3330#line 1698 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3335#line 1699 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3340#line 1701 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3345#line 1702 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3350#line 1704 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3354 bool at_beginning_of_statement
3355 = (! (
curr_lexer->whitespace_is_significant ()
3356 ||
curr_lexer->m_looking_at_object_index.front ()));
3358 return curr_lexer->handle_op (
',', at_beginning_of_statement);
3363#line 1714 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3372#line 1720 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3377#line 1721 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3382#line 1723 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3386 bool unput_comma =
false;
3389 &&
curr_lexer->space_follows_previous_token ())
3391 int tok =
curr_lexer->previous_token_value ();
3393 if (! (tok ==
'[' || tok ==
'{'
3412 curr_lexer->m_looking_at_object_index.push_front
3415 curr_lexer->m_looking_at_indirect_ref =
false;
3416 curr_lexer->m_looking_for_object_index =
false;
3417 curr_lexer->m_at_beginning_of_statement =
false;
3427#line 1765 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3435 curr_lexer->m_looking_at_object_index.pop_front ();
3437 curr_lexer->m_looking_for_object_index =
true;
3438 curr_lexer->m_at_beginning_of_statement =
false;
3442 curr_lexer->m_looking_at_anon_fcn_args =
false;
3443 curr_lexer->m_nesting_level.anon_fcn_body ();
3451#line 1786 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3455 if (
curr_lexer->previous_token_may_be_command ()
3456 &&
curr_lexer->space_follows_previous_token ())
3465 curr_lexer->m_looking_for_object_index =
false;
3466 curr_lexer->m_at_beginning_of_statement =
false;
3477#line 1810 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3486#line 1816 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3491#line 1817 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3496#line 1818 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3501#line 1819 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3506#line 1820 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3511#line 1821 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3516#line 1822 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3521#line 1823 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3526#line 1824 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3531#line 1825 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3536#line 1826 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3541#line 1827 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3546#line 1828 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3551#line 1829 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3556#line 1830 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3561#line 1831 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3569#line 1837 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3573 bool unput_comma =
false;
3576 &&
curr_lexer->space_follows_previous_token ())
3578 int tok =
curr_lexer->previous_token_value ();
3580 if (! (tok ==
'[' || tok ==
'{'
3594 curr_lexer->m_looking_at_object_index.push_front
3598 curr_lexer->m_looking_for_object_index =
false;
3599 curr_lexer->m_at_beginning_of_statement =
false;
3611#line 1876 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3617 curr_lexer->m_looking_at_object_index.pop_front ();
3619 curr_lexer->m_looking_for_object_index =
true;
3620 curr_lexer->m_at_beginning_of_statement =
false;
3635#line 1898 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3647 else if (
curr_lexer->previous_token_may_be_command ()
3648 &&
curr_lexer->space_follows_previous_token ())
3655 std::ostringstream buf;
3657 buf <<
"invalid character '"
3659 <<
"' (ASCII " << c <<
")";
3675#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
3677# pragma GCC diagnostic ignored "-Wold-style-cast"
3678# pragma GCC diagnostic ignored "-Wunused-parameter"
3683#line 1944 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
3686#line 3687 "libinterp/parse-tree/lex.cc"
3691 int yy_amount_of_matched_text = (
int) (yy_cp - yyg->yytext_ptr) - 1;
3724 yyg->
yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
3741 if ( yy_next_state )
3745 yy_current_state = yy_next_state;
3752 goto yy_find_action;
3762 if (
yywrap( yyscanner ) )
3789 yyg->yytext_ptr + yy_amount_of_matched_text;
3805 goto yy_find_action;
3812 "fatal flex scanner internal error--no action found" );
3829 char *source = yyg->yytext_ptr;
3830 int number_to_move, i;
3835 "fatal flex scanner internal error--end of buffer missed" );
3859 number_to_move = (
int) (yyg->
yy_c_buf_p - yyg->yytext_ptr - 1);
3861 for ( i = 0; i < number_to_move; ++i )
3862 *(dest++) = *(source++);
3875 while ( num_to_read <= 0 )
3881 int yy_c_buf_p_offset =
3888 if ( new_size <= 0 )
3904 "fatal error - scanner input buffer overflow" );
3948 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
3981 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
3983 yy_current_state = (
int)
yy_def[yy_current_state];
3984 if ( yy_current_state >= 314 )
3987 yy_current_state =
yy_nxt[
yy_base[yy_current_state] + yy_c];
3990 return yy_current_state;
4010 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
4012 yy_current_state = (
int)
yy_def[yy_current_state];
4013 if ( yy_current_state >= 314 )
4016 yy_current_state =
yy_nxt[
yy_base[yy_current_state] + yy_c];
4017 yy_is_jam = (yy_current_state == 313);
4020 return yy_is_jam ? 0 : yy_current_state;
4035 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
4045 *--dest = *--source;
4047 yy_cp += (
int) (dest - source);
4048 yy_bp += (
int) (dest - source);
4052 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
4056 *--yy_cp = (char) c;
4058 yyg->yytext_ptr = yy_bp;
4113 if (
yywrap( yyscanner ) )
4119 return yyinput(yyscanner);
4121 return input(yyscanner);
4253 yyfree( (
void *) b , yyscanner );
4322 if (new_buffer == NULL)
4386 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
4406 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
4479 buf = (
char *)
yyalloc( n , yyscanner );
4483 for ( i = 0; i < _yybytes_len; ++i )
4484 buf[i] = yybytes[i];
4500#ifndef YY_EXIT_FAILURE
4501#define YY_EXIT_FAILURE 2
4508 fprintf( stderr,
"%s\n", msg );
4519 int yyless_macro_arg = (n); \
4520 YY_LESS_LINENO(yyless_macro_arg);\
4521 yytext[yyleng] = yyg->yy_hold_char; \
4522 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
4523 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
4524 *yyg->yy_c_buf_p = '\0'; \
4525 yyleng = yyless_macro_arg; \
4695 if (ptr_yy_globals == NULL){
4702 if (*ptr_yy_globals == NULL){
4708 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
4726 if (ptr_yy_globals == NULL){
4733 if (*ptr_yy_globals == NULL){
4740 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
4805 yyfree ( yyscanner , yyscanner );
4815static void yy_flex_strncpy (
char* s1,
const char * s2,
int n ,
yyscan_t yyscanner)
4821 for ( i = 0; i < n; ++i )
4826#ifdef YY_NEED_STRLEN
4827static int yy_flex_strlen (
const char * s ,
yyscan_t yyscanner)
4830 for ( n = 0; s[n]; ++n )
4837#define YYTABLES_NAME "yytables"
4839#line 1944 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
4842#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
4844# pragma GCC diagnostic pop
4856 return std::realloc (ptr, size);
5002 std::cerr <<
"SPACE";
5011OCTAVE_NAMESPACE_BEGIN
5025 int nargin = args.
length ();
5044 if (! (kword ==
"set" || kword ==
"get" || kword ==
"arguments"
5045 || kword ==
"enumeration" || kword ==
"events"
5046 || kword ==
"methods" || kword ==
"properties"))
5056 std::string
name = args(0).xstring_value (
"iskeyword: NAME must be a string");
5077 lexical_feedback::symbol_table_context::clear (
void)
5079 while (! m_frame_stack.empty ())
5080 m_frame_stack.pop_front ();
5084 lexical_feedback::symbol_table_context::pop (
void)
5089 m_frame_stack.pop_front ();
5093 lexical_feedback::symbol_table_context::curr_scope (
void)
const
5096 return m_interpreter.get_current_scope ();
5098 return m_frame_stack.front ();
5102 lexical_feedback::symbol_table_context::parent_scope (
void)
const
5104 std::size_t sz = size ();
5111 lexical_feedback::~lexical_feedback (
void)
5117 lexical_feedback::init (
void)
5121 m_looking_at_object_index.push_front (
false);
5125 lexical_feedback::reset (
void)
5127 m_end_of_input =
false;
5128 m_allow_command_syntax =
true;
5129 m_at_beginning_of_statement =
true;
5130 m_looking_at_anon_fcn_args =
false;
5131 m_looking_at_return_list =
false;
5132 m_looking_at_parameter_list =
false;
5133 m_looking_at_decl_list =
false;
5134 m_looking_at_matrix_or_assign_lhs =
false;
5135 m_looking_for_object_index =
false;
5136 m_looking_at_indirect_ref =
false;
5137 m_arguments_is_keyword =
false;
5138 m_classdef_element_names_are_keywords =
false;
5139 m_parsing_anon_fcn_body =
false;
5140 m_parsing_class_method =
false;
5141 m_parsing_classdef =
false;
5142 m_parsing_classdef_decl =
false;
5143 m_parsing_classdef_superclass =
false;
5144 m_maybe_classdef_get_set_method =
false;
5145 m_parsing_classdef_get_method =
false;
5146 m_parsing_classdef_set_method =
false;
5147 m_quote_is_transpose =
false;
5148 m_force_script =
false;
5149 m_reading_fcn_file =
false;
5150 m_reading_script_file =
false;
5151 m_reading_classdef_file =
false;
5152 m_buffer_function_text =
false;
5156 m_defining_func = 0;
5157 m_looking_at_function_handle = 0;
5158 m_block_comment_nesting_level = 0;
5159 m_command_arg_paren_count = 0;
5165 m_current_input_line =
"";
5166 m_comment_text =
"";
5168 m_function_text =
"";
5169 m_fcn_file_name =
"";
5170 m_fcn_file_full_name =
"";
5172 m_package_name =
"";
5173 m_looking_at_object_index.clear ();
5174 m_looking_at_object_index.push_front (
false);
5176 while (! m_parsed_function_name.empty ())
5177 m_parsed_function_name.pop ();
5179 m_symtab_context.clear ();
5180 m_nesting_level.reset ();
5185 lexical_feedback::previous_token_value (
void)
const
5187 const token *tok = m_tokens.front ();
5192 lexical_feedback::previous_token_value_is (
int tok_val)
const
5194 const token *tok = m_tokens.front ();
5199 lexical_feedback::mark_previous_token_trailing_space (
void)
5201 token *tok = m_tokens.front ();
5202 if (tok && ! previous_token_value_is (
'\n'))
5207 lexical_feedback::space_follows_previous_token (
void)
const
5209 const token *tok = m_tokens.front ();
5214 lexical_feedback::previous_token_is_binop (
void)
const
5216 int tok = previous_token_value ();
5218 return (tok ==
'+' || tok ==
'-' || tok ==
'@'
5219 || tok ==
',' || tok ==
';' || tok ==
'*' || tok ==
'/'
5220 || tok ==
':' || tok ==
'=' || tok ==
ADD_EQ
5234 lexical_feedback::previous_token_is_keyword (
void)
const
5236 const token *tok = m_tokens.front ();
5241 lexical_feedback::mark_as_variable (
const std::string& nm)
5250 lexical_feedback::mark_as_variables (
const std::list<std::string>& lst)
5259 lexical_feedback::previous_token_may_be_command (
void)
const
5261 if (! m_allow_command_syntax)
5264 const token *tok = m_tokens.front ();
5277 std::size_t offset = s.find_first_not_of (
" \t\n\r");
5279 return (offset != std::string::npos
5280 && (s.substr (offset, 9) ==
"Copyright"
5281 || s.substr (offset, 6) ==
"Author"
5282 || s.substr (offset, 23) ==
"SPDX-License-Identifier"));
5288 return ((! s.empty ()) && (s[0] ==
'!'));
5292 base_lexer::input_buffer::fill (
const std::string&
input,
bool eof_arg)
5295 m_chars_left = m_buffer.length ();
5302 base_lexer::input_buffer::copy_chunk (
char *buf, std::size_t max_size,
5305 static const char *
const eol =
"\n";
5307 std::size_t
len = 0;
5310 std::size_t newline_pos = m_buffer.find (
'\n', m_offset);
5311 len = (newline_pos != std::string::npos
5312 ? newline_pos - m_offset + 1
5313 : (max_size > m_chars_left ? m_chars_left : max_size));
5316 len = max_size > m_chars_left ? m_chars_left : max_size;
5319 memcpy (buf, m_buffer.c_str () + m_offset,
len);
5321 m_chars_left -=
len;
5327 if (m_chars_left == 0 && buf[
len-1] !=
'\n')
5355 base_lexer::~base_lexer (
void)
5361 base_lexer::init (
void)
5369 clear_start_state ();
5379 struct yyguts_t *yyg = static_cast<struct yyguts_t*> (m_scanner)
5382 base_lexer::reset (
void)
5385 clear_start_state ();
5387 m_symtab_context.clear ();
5392 if (m_interpreter.interactive ()
5393 && ! (m_reading_fcn_file
5394 || m_reading_classdef_file
5395 || m_reading_script_file
5396 || input_from_eval_string ()))
5399 lexical_feedback::reset ();
5401 m_comment_buf.reset ();
5405 base_lexer::prep_for_file (
void)
5407 m_reading_script_file =
true;
5413 base_lexer::begin_string (
int state)
5415 m_tok_beg = m_filepos;
5417 push_start_state (
state);
5421 base_lexer::handle_end_of_input (
void)
5423 lexer_debug (
"<<EOF>>");
5425 m_tok_beg = m_filepos;
5426 m_tok_end = m_filepos;
5428 if (m_block_comment_nesting_level != 0)
5430 warning (
"block comment unterminated at end of input");
5432 if ((m_reading_fcn_file || m_reading_script_file || m_reading_classdef_file)
5433 && ! m_fcn_file_name.empty ())
5434 warning (
"near line %d of file '%s.m'",
5435 m_filepos.line (), m_fcn_file_name.c_str ());
5440 push_token (tok_val);
5446 base_lexer::flex_yytext (
void)
5452 base_lexer::flex_yyleng (
void)
5458 base_lexer::text_yyinput (
void)
5466 std::cerr << std::endl;
5479 std::cerr << std::endl;
5493 base_lexer::xunput (
char c,
char *buf)
5501 std::cerr << std::endl;
5509 base_lexer::xunput (
char c)
5511 char *yytxt = flex_yytext ();
5517 base_lexer::update_token_positions (
int tok_len)
5519 m_tok_beg = m_filepos;
5520 m_tok_end = m_filepos;
5523 m_tok_end.increment_column (tok_len - 1);
5525 m_filepos.increment_column (tok_len);
5529 base_lexer::looking_at_space (
void)
5531 int c = text_yyinput ();
5537 base_lexer::inside_any_object_index (
void)
5539 bool retval =
false;
5541 for (
const bool is_obj_idx : m_looking_at_object_index)
5554 base_lexer::make_keyword_token (
const std::string& s)
5559 int slen = s.length ();
5566 bool previous_at_bos = m_at_beginning_of_statement;
5569 m_at_beginning_of_statement =
false;
5571 token *tok_val =
nullptr;
5582 m_at_beginning_of_statement =
true;
5587 m_looking_at_decl_list =
true;
5596 if (inside_any_object_index ()
5598 && ! (m_looking_at_return_list
5599 || m_parsed_function_name.top ())))
5601 m_at_beginning_of_statement = previous_at_bos;
5605 tok_val =
new token (
end_kw, token::simple_end, m_tok_beg, m_tok_end);
5606 m_at_beginning_of_statement =
true;
5612 m_at_beginning_of_statement =
true;
5617 token::unwind_protect_end, m_tok_beg, m_tok_end);
5618 m_at_beginning_of_statement =
true;
5622 tok_val =
new token (
endfor_kw, token::for_end, m_tok_beg, m_tok_end);
5623 m_at_beginning_of_statement =
true;
5629 m_at_beginning_of_statement =
true;
5633 tok_val =
new token (
endif_kw, token::if_end, m_tok_beg, m_tok_end);
5634 m_at_beginning_of_statement =
true;
5640 m_at_beginning_of_statement =
true;
5646 m_at_beginning_of_statement =
true;
5652 m_at_beginning_of_statement =
true;
5656#if defined (DISABLE_ARGUMENTS_VALIDATION_BLOCK)
5661 m_at_beginning_of_statement =
true;
5668 m_at_beginning_of_statement =
true;
5673 m_tok_beg, m_tok_end);
5674 m_at_beginning_of_statement =
true;
5680 m_at_beginning_of_statement =
true;
5686 m_at_beginning_of_statement =
true;
5692 m_at_beginning_of_statement =
true;
5702 m_at_beginning_of_statement =
true;
5708 m_at_beginning_of_statement =
true;
5719 if (! m_maybe_classdef_get_set_method)
5721 m_at_beginning_of_statement = previous_at_bos;
5732 if (! m_classdef_element_names_are_keywords)
5734 m_at_beginning_of_statement = previous_at_bos;
5741 if (! m_force_script && m_token_count == 0 && input_from_file ())
5743 m_reading_classdef_file =
true;
5744 m_reading_script_file =
false;
5750 m_parsed_function_name.push (
false);
5752 if (! m_force_script && m_token_count == 0 && input_from_file ())
5754 m_reading_fcn_file =
true;
5755 m_reading_script_file =
false;
5762 if (! (m_reading_fcn_file || m_reading_script_file
5763 || m_reading_classdef_file))
5766 m_buffer_function_text =
true;
5767 m_function_text += (m_current_input_line +
"\n");
5776 update_token_positions (slen);
5781#if defined (DISABLE_ARGUMENTS_VALIDATION_BLOCK)
5784 if (! m_arguments_is_keyword)
5790 m_at_beginning_of_statement =
true;
5794 tok_val =
new token (
endspmd_kw, token::spmd_end, m_tok_beg, m_tok_end);
5795 m_at_beginning_of_statement =
true;
5800 if ((m_reading_fcn_file || m_reading_script_file
5801 || m_reading_classdef_file)
5802 && ! m_fcn_file_full_name.empty ())
5804 m_tok_beg, m_tok_end);
5812 int l = m_tok_beg.line ();
5815 m_tok_beg, m_tok_end);
5824 tok_val =
new token (kw->
tok,
true, m_tok_beg, m_tok_end);
5826 push_token (tok_val);
5832 base_lexer::fq_identifier_contains_keyword (
const std::string& s)
5841 p2 = s.find (
'.', p1);
5843 if (p2 != std::string::npos)
5845 s_part = s.substr (p1, p2 - p1);
5849 s_part = s.substr (p1);
5854 while (p2 != std::string::npos);
5860 base_lexer::whitespace_is_significant (
void)
5862 return (m_nesting_level.is_bracket ()
5863 || (m_nesting_level.is_brace ()
5864 && ! m_looking_at_object_index.front ()));
5870 return (
len > 2 && s[0] ==
'0' && (s[1] ==
'b' || s[1] ==
'B'));
5876 return (
len > 2 && s[0] ==
'0' && (s[1] ==
'x' || s[1] ==
'X'));
5931 base_lexer::handle_number<2> (
void)
5934 std::string yytxt (flex_yytext () + 2);
5936 yytxt.erase (std::remove (yytxt.begin (), yytxt.end (),
'_'),
5939 std::size_t pos = yytxt.find_first_of (
"su");
5941 bool unsigned_val =
true;
5944 if (pos == std::string::npos)
5959 unsigned_val = (yytxt[pos] ==
'u');
5960 std::string size_str = yytxt.substr (pos+1);
5961 yytxt = yytxt.substr (0, pos);
5966 else if (size_str ==
"16" &&
num_digits <= 16)
5968 else if (size_str ==
"32" &&
num_digits <= 32)
5970 else if (size_str ==
"64" &&
num_digits <= 64)
5978 "too many digits for binary constant",
5979 m_tok_beg, m_tok_end);
5992 uintmax_t long_int_val;
5993 if (
sizeof (uintmax_t) ==
sizeof (
unsigned long long))
5994 long_int_val = strtoull (yytxt.c_str (), &end, 2);
5995 else if (
sizeof (uintmax_t) ==
sizeof (
unsigned long))
5996 long_int_val = strtoul (yytxt.c_str (), &end, 2);
6000 if (errno == ERANGE)
6006 m_looking_for_object_index =
false;
6007 m_at_beginning_of_statement =
false;
6009 update_token_positions (flex_yyleng ());
6011 push_token (
new token (
NUMBER, ov_value, yytxt, m_tok_beg, m_tok_end));
6013 return count_token_internal (
NUMBER);
6019 return (
static_cast<uint64_t
> (1) << std::numeric_limits<double>::digits);
6024 base_lexer::handle_number<10> (
void)
6027 bool digits_only =
true;
6029 char *yytxt = flex_yytext ();
6030 std::size_t yylng = flex_yyleng ();
6034 char *p = &tmptxt[0];
6037 while ((ch = *rp++))
6047 digits_only =
false;
6055 digits_only =
false;
6064 digits_only =
false;
6079 nread = sscanf (tmptxt,
"%lf", &value);
6083 assert (nread == 1);
6090 if (digits_only && value >=
flintmax ())
6100 uintmax_t long_int_val;
6101 if (
sizeof (uintmax_t) ==
sizeof (
unsigned long long))
6102 long_int_val = strtoull (tmptxt, &end, 10);
6103 else if (
sizeof (uintmax_t) ==
sizeof (
unsigned long))
6104 long_int_val = strtoul (tmptxt, &end, 10);
6108 if (errno != ERANGE)
6122 m_looking_for_object_index =
false;
6123 m_at_beginning_of_statement =
false;
6125 update_token_positions (yylng);
6132 push_token (
new token (
NUMBER, ov_value, yytxt, m_tok_beg, m_tok_end));
6134 return count_token_internal (
NUMBER);
6139 base_lexer::handle_number<16> (
void)
6142 std::string yytxt (flex_yytext () + 2);
6144 yytxt.erase (std::remove (yytxt.begin (), yytxt.end (),
'_'),
6147 std::size_t pos = yytxt.find_first_of (
"su");
6149 bool unsigned_val =
true;
6152 if (pos == std::string::npos)
6167 unsigned_val = (yytxt[pos] ==
'u');
6168 std::string size_str = yytxt.substr (pos+1);
6169 yytxt = yytxt.substr (0, pos);
6174 else if (size_str ==
"16" &&
num_digits <= 4)
6176 else if (size_str ==
"32" &&
num_digits <= 8)
6178 else if (size_str ==
"64" &&
num_digits <= 16)
6186 "too many digits for hexadecimal constant",
6187 m_tok_beg, m_tok_end);
6197 uintmax_t long_int_val;
6198 int status = sscanf (yytxt.c_str (),
"%jx", &long_int_val);
6204 m_looking_for_object_index =
false;
6205 m_at_beginning_of_statement =
false;
6207 update_token_positions (flex_yyleng ());
6209 push_token (
new token (
NUMBER, ov_value, yytxt, m_tok_beg, m_tok_end));
6211 return count_token_internal (
NUMBER);
6215 base_lexer::handle_continuation (
void)
6217 char *yytxt = flex_yytext ();
6218 int yylng = flex_yyleng ();
6221 if (yytxt[0] ==
'\\')
6222 warn_language_extension_continuation ();
6226 bool have_space =
false;
6227 while (offset < yylng)
6229 char c = yytxt[offset];
6240 mark_previous_token_trailing_space ();
6242 bool have_comment =
false;
6243 while (offset < yylng)
6245 char c = yytxt[offset];
6246 if (c ==
'#' || c ==
'%')
6248 have_comment =
true;
6257 m_comment_text = &yytxt[offset];
6263 bool saved_bos = m_at_beginning_of_statement;
6265 finish_comment (comment_elt::end_of_line);
6267 m_at_beginning_of_statement = saved_bos;
6270 m_filepos.next_line ();
6278 if (m_nesting_level.none () && m_help_text.empty () && ! m_comment_text.empty ()
6280 m_help_text = m_comment_text;
6283 typ = comment_elt::copyright;
6285 m_comment_buf.append (m_comment_text, typ);
6287 m_comment_text =
"";
6289 m_at_beginning_of_statement =
true;
6293 base_lexer::handle_close_bracket (
int bracket_type)
6295 m_looking_at_object_index.pop_front ();
6297 m_looking_for_object_index =
true;
6298 m_at_beginning_of_statement =
false;
6300 if (! m_nesting_level.none ())
6302 m_nesting_level.remove ();
6304 if (bracket_type ==
']')
6306 else if (bracket_type ==
'}')
6314 return count_token (bracket_type);
6318 base_lexer::looks_like_command_arg (
void)
6320 if (! m_allow_command_syntax)
6323 bool space_before = space_follows_previous_token ();
6324 bool space_after = looking_at_space ();
6326 return (space_before && ! space_after
6327 && previous_token_may_be_command ());
6331 base_lexer::handle_superclass_identifier (
void)
6333 update_token_positions (flex_yyleng ());
6335 std::string txt = flex_yytext ();
6337 txt.erase (std::remove_if (txt.begin (), txt.end (),
is_space_or_tab),
6340 std::size_t pos = txt.find (
"@");
6342 std::string meth = txt.substr (0, pos);
6343 std::string cls = txt.substr (pos + 1);
6345 if (
iskeyword (meth) || fq_identifier_contains_keyword (cls))
6349 "method, class, and package names may not be keywords",
6350 m_tok_beg, m_tok_end);
6359 m_filepos.increment_column (flex_yyleng ());
6365 base_lexer::handle_meta_identifier (
void)
6367 std::string txt = flex_yytext ();
6369 txt.erase (std::remove_if (txt.begin (), txt.end (),
is_space_or_tab),
6373 std::string cls = txt.substr (1);
6378 if (fq_identifier_contains_keyword (cls))
6381 "class and package names may not be keywords",
6382 m_tok_beg, m_tok_end);
6390 m_filepos.increment_column (flex_yyleng ());
6396 base_lexer::handle_fq_identifier (
void)
6398 std::string txt = flex_yytext ();
6400 txt.erase (std::remove_if (txt.begin (), txt.end (),
is_space_or_tab),
6406 if (fq_identifier_contains_keyword (txt))
6410 "function, method, class, and package names may not be keywords",
6411 m_tok_beg, m_tok_end);
6418 push_token (
new token (
FQ_IDENT, txt, m_tok_beg, m_tok_end));
6420 m_filepos.increment_column (flex_yyleng ());
6430 base_lexer::handle_identifier (
void)
6432 update_token_positions (flex_yyleng ());
6434 std::string ident = flex_yytext ();
6440 if (m_looking_at_indirect_ref)
6444 m_looking_for_object_index =
true;
6453 int kw_token = make_keyword_token (ident);
6460 m_looking_for_object_index =
false;
6464 return count_token_internal (kw_token);
6479 if (m_at_beginning_of_statement
6480 && ! (m_parsing_anon_fcn_body
6481 || ident ==
"e" || ident ==
"pi"
6482 || ident ==
"I" || ident ==
"i"
6483 || ident ==
"J" || ident ==
"j"
6484 || ident ==
"Inf" || ident ==
"inf"
6485 || ident ==
"NaN" || ident ==
"nan"))
6493 m_looking_for_object_index =
true;
6495 m_at_beginning_of_statement =
false;
6497 return count_token_internal (
NAME);
6501 base_lexer::maybe_warn_separator_insert (
char sep)
6503 std::string nm = m_fcn_file_full_name;
6507 "potential auto-insertion of '%c' near line %d",
6508 sep, m_filepos.line ());
6511 "potential auto-insertion of '%c' near line %d of file %s",
6512 sep, m_filepos.line (), nm.c_str ());
6516 base_lexer::warn_single_quote_string (
void)
6518 std::string nm = m_fcn_file_full_name;
6522 "single quote delimited string near line %d",
6526 "single quote delimited string near line %d of file %s",
6527 m_filepos.line (), nm.c_str ());
6531 base_lexer::warn_language_extension (
const std::string& msg)
6533 std::string nm = m_fcn_file_full_name;
6537 "Octave language extension used: %s",
6541 "Octave language extension used: %s near line %d offile %s",
6542 msg.c_str (), m_filepos.line (), nm.c_str ());
6546 base_lexer::maybe_warn_language_extension_comment (
char c)
6549 warn_language_extension (
"# used as comment character");
6553 base_lexer::warn_language_extension_continuation (
void)
6555 warn_language_extension (
"\\ used as line continuation marker");
6559 base_lexer::warn_language_extension_operator (
const std::string& op)
6562 int n = t.length ();
6565 warn_language_extension (t +
" used as operator");
6569 base_lexer::warn_deprecated_syntax (
const std::string& msg)
6571 if (m_fcn_file_full_name.empty ())
6575 "%s; near line %d of file '%s'", msg.c_str (),
6576 m_filepos.line (), m_fcn_file_full_name.c_str ());
6580 base_lexer::warn_deprecated_operator (
const std::string& deprecated_op,
6581 const std::string& recommended_op,
6582 const std::string& version)
6584 std::string msg =
"the '" + deprecated_op +
"' operator was deprecated in version " + version +
" and will not be allowed in a future version of Octave; please use '" + recommended_op +
"' instead";
6586 warn_deprecated_syntax (msg);
6590 base_lexer::push_token (
token *tok)
6593 lval->tok_val = tok;
6594 m_tokens.push (tok);
6598 base_lexer::current_token (
void)
6601 return lval->tok_val;
6605 base_lexer::pending_token_count (
void)
const
6607 return m_tokens.size ();
6611 base_lexer::display_token (
int tok)
6615 case '=': std::cerr <<
"'='\n";
break;
6616 case ':': std::cerr <<
"':'\n";
break;
6617 case '-': std::cerr <<
"'-'\n";
break;
6618 case '+': std::cerr <<
"'+'\n";
break;
6619 case '*': std::cerr <<
"'*'\n";
break;
6620 case '/': std::cerr <<
"'/'\n";
break;
6621 case ADD_EQ: std::cerr <<
"ADD_EQ\n";
break;
6622 case SUB_EQ: std::cerr <<
"SUB_EQ\n";
break;
6623 case MUL_EQ: std::cerr <<
"MUL_EQ\n";
break;
6624 case DIV_EQ: std::cerr <<
"DIV_EQ\n";
break;
6625 case LEFTDIV_EQ: std::cerr <<
"LEFTDIV_EQ\n";
break;
6626 case POW_EQ: std::cerr <<
"POW_EQ\n";
break;
6627 case EMUL_EQ: std::cerr <<
"EMUL_EQ\n";
break;
6628 case EDIV_EQ: std::cerr <<
"EDIV_EQ\n";
break;
6629 case ELEFTDIV_EQ: std::cerr <<
"ELEFTDIV_EQ\n";
break;
6630 case EPOW_EQ: std::cerr <<
"EPOW_EQ\n";
break;
6631 case AND_EQ: std::cerr <<
"AND_EQ\n";
break;
6632 case OR_EQ: std::cerr <<
"OR_EQ\n";
break;
6633 case EXPR_AND_AND: std::cerr <<
"EXPR_AND_AND\n";
break;
6634 case EXPR_OR_OR: std::cerr <<
"EXPR_OR_OR\n";
break;
6635 case EXPR_AND: std::cerr <<
"EXPR_AND\n";
break;
6636 case EXPR_OR: std::cerr <<
"EXPR_OR\n";
break;
6637 case EXPR_NOT: std::cerr <<
"EXPR_NOT\n";
break;
6638 case EXPR_LT: std::cerr <<
"EXPR_LT\n";
break;
6639 case EXPR_LE: std::cerr <<
"EXPR_LE\n";
break;
6640 case EXPR_EQ: std::cerr <<
"EXPR_EQ\n";
break;
6641 case EXPR_NE: std::cerr <<
"EXPR_NE\n";
break;
6642 case EXPR_GE: std::cerr <<
"EXPR_GE\n";
break;
6643 case EXPR_GT: std::cerr <<
"EXPR_GT\n";
break;
6644 case LEFTDIV: std::cerr <<
"LEFTDIV\n";
break;
6645 case EMUL: std::cerr <<
"EMUL\n";
break;
6646 case EDIV: std::cerr <<
"EDIV\n";
break;
6647 case ELEFTDIV: std::cerr <<
"ELEFTDIV\n";
break;
6648 case HERMITIAN: std::cerr <<
"HERMITIAN\n";
break;
6649 case TRANSPOSE: std::cerr <<
"TRANSPOSE\n";
break;
6650 case PLUS_PLUS: std::cerr <<
"PLUS_PLUS\n";
break;
6651 case MINUS_MINUS: std::cerr <<
"MINUS_MINUS\n";
break;
6652 case POW: std::cerr <<
"POW\n";
break;
6653 case EPOW: std::cerr <<
"EPOW\n";
break;
6657 token *tok_val = current_token ();
6658 std::cerr <<
"NUMBER [";
6667 token *tok_val = current_token ();
6668 std::cerr <<
"STRUCT_ELT [" << tok_val->
text () <<
"]\n";
6674 token *tok_val = current_token ();
6675 std::cerr <<
"NAME [" << tok_val->
text () <<
"]\n";
6679 case END: std::cerr <<
"END\n";
break;
6684 token *tok_val = current_token ();
6686 std::cerr << (tok ==
DQ_STRING ?
"DQ_STRING" :
"SQ_STRING")
6687 <<
" [" << tok_val->
text () <<
"]\n";
6691 case FOR: std::cerr <<
"FOR\n";
break;
6692 case WHILE: std::cerr <<
"WHILE\n";
break;
6693 case DO: std::cerr <<
"DO\n";
break;
6694 case UNTIL: std::cerr <<
"UNTIL\n";
break;
6695 case IF: std::cerr <<
"IF\n";
break;
6696 case ELSEIF: std::cerr <<
"ELSEIF\n";
break;
6697 case ELSE: std::cerr <<
"ELSE\n";
break;
6698 case SWITCH: std::cerr <<
"SWITCH\n";
break;
6699 case CASE: std::cerr <<
"CASE\n";
break;
6700 case OTHERWISE: std::cerr <<
"OTHERWISE\n";
break;
6701 case BREAK: std::cerr <<
"BREAK\n";
break;
6702 case CONTINUE: std::cerr <<
"CONTINUE\n";
break;
6703 case FUNC_RET: std::cerr <<
"FUNC_RET\n";
break;
6704 case UNWIND: std::cerr <<
"UNWIND\n";
break;
6705 case CLEANUP: std::cerr <<
"CLEANUP\n";
break;
6706 case TRY: std::cerr <<
"TRY\n";
break;
6707 case CATCH: std::cerr <<
"CATCH\n";
break;
6708 case GLOBAL: std::cerr <<
"GLOBAL\n";
break;
6709 case PERSISTENT: std::cerr <<
"PERSISTENT\n";
break;
6710 case FCN_HANDLE: std::cerr <<
"FCN_HANDLE\n";
break;
6711 case END_OF_INPUT: std::cerr <<
"END_OF_INPUT\n\n";
break;
6712 case LEXICAL_ERROR: std::cerr <<
"LEXICAL_ERROR\n\n";
break;
6713 case FCN: std::cerr <<
"FCN\n";
break;
6714 case INPUT_FILE: std::cerr <<
"INPUT_FILE\n";
break;
6716 case METAQUERY: std::cerr <<
"METAQUERY\n";
break;
6717 case GET: std::cerr <<
"GET\n";
break;
6718 case SET: std::cerr <<
"SET\n";
break;
6719 case PROPERTIES: std::cerr <<
"PROPERTIES\n";
break;
6720 case METHODS: std::cerr <<
"METHODS\n";
break;
6721 case EVENTS: std::cerr <<
"EVENTS\n";
break;
6722 case CLASSDEF: std::cerr <<
"CLASSDEF\n";
break;
6723 case '\n': std::cerr <<
"\\n\n";
break;
6724 case '\r': std::cerr <<
"\\r\n";
break;
6725 case '\t': std::cerr <<
"TAB\n";
break;
6728 if (tok < 256 && tok > 31)
6729 std::cerr << static_cast<char> (tok) <<
"\n";
6731 std::cerr <<
"UNKNOWN(" << tok <<
")\n";
6738 base_lexer::fatal_error (
const char *msg)
6740 error (
"fatal lexer error: %s", msg);
6744 base_lexer::debug_flag (
void)
const
6746 settings& stgs = m_interpreter.get_settings ();
6751 base_lexer::display_tokens (
void)
const
6753 settings& stgs = m_interpreter.get_settings ();
6758 base_lexer::increment_token_count (
void)
6760 settings& stgs = m_interpreter.get_settings ();
6767 base_lexer::lexer_debug (
const char *pattern)
6771 std::cerr << std::endl;
6773 display_start_state ();
6775 std::cerr <<
"P: " << pattern << std::endl;
6776 std::cerr <<
"T: " << flex_yytext () << std::endl;
6781 base_lexer::input_from_tmp_history_file (
void)
6783 history_system& history_sys = m_interpreter.get_history_system ();
6789 base_lexer::push_start_state (
int state)
6793 start_state_stack.push (
state);
6795 BEGIN (start_state ());
6799 base_lexer::pop_start_state (
void)
6803 start_state_stack.pop ();
6805 BEGIN (start_state ());
6809 base_lexer::clear_start_state (
void)
6811 while (! start_state_stack.empty ())
6812 start_state_stack.pop ();
6818 base_lexer::display_start_state (
void)
const
6822 switch (start_state ())
6825 std::cerr <<
"INITIAL" << std::endl;
6829 std::cerr <<
"COMMAND_START" << std::endl;
6833 std::cerr <<
"MATRIX_START" << std::endl;
6837 std::cerr <<
"INPUT_FILE_START" << std::endl;
6841 std::cerr <<
"BLOCK_COMMENT_START" << std::endl;
6845 std::cerr <<
"LINE_COMMENT_START" << std::endl;
6849 std::cerr <<
"DQ_STRING_START" << std::endl;
6853 std::cerr <<
"SQ_STRING_START" << std::endl;
6857 std::cerr <<
"FQ_IDENT_START" << std::endl;
6861 std::cerr <<
"UNKNOWN START STATE!" << std::endl;
6867 base_lexer::maybe_unput_comma_before_unary_op (
int tok)
6869 int prev_tok = previous_token_value ();
6871 bool unput_comma =
false;
6873 if (whitespace_is_significant () && space_follows_previous_token ())
6875 int c = text_yyinput ();
6880 if (! (prev_tok ==
'[' || prev_tok ==
'{'
6881 || previous_token_is_binop ()
6882 || ((tok ==
'+' || tok ==
'-') && space_after)))
6890 base_lexer::handle_op (
int tok,
bool bos,
bool compat)
6893 warn_language_extension_operator (flex_yytext ());
6895 update_token_positions (flex_yyleng ());
6897 push_token (
new token (tok, m_tok_beg, m_tok_end));
6899 m_looking_for_object_index =
false;
6900 m_at_beginning_of_statement = bos;
6905 if (m_parsing_classdef_decl)
6907 m_parsing_classdef_superclass =
true;
6913 if (m_parsing_classdef_superclass)
6921 return count_token_internal (tok);
6929 base_lexer::finish_command_arg (
void)
6933 token *tok_val =
new token (tok, m_string_text, m_tok_beg, m_tok_end);
6936 m_command_arg_paren_count = 0;
6938 return handle_token (tok, tok_val);
6942 base_lexer::handle_token (
int tok,
token *tok_val)
6945 tok_val =
new token (tok, m_tok_beg, m_tok_end);
6947 push_token (tok_val);
6949 return count_token_internal (tok);
6953 base_lexer::count_token (
int tok)
6955 token *tok_val =
new token (tok, m_tok_beg, m_tok_end);
6957 push_token (tok_val);
6959 return count_token_internal (tok);
6963 base_lexer::count_token_internal (
int tok)
6966 increment_token_count ();
6968 return show_token (tok);
6972 base_lexer::show_token (
int tok)
6975 if (display_tokens ())
6976 display_token (tok);
6981 display_token (tok);
6982 std::cerr << std::endl;
6989 lexer::fill_flex_buffer (
char *buf,
unsigned max_size)
6993 if (m_input_buf.empty ())
6995 input_system& input_sys = m_interpreter.get_input_system ();
6998 = m_initial_input ? input_sys.
PS1 () : input_sys.
PS2 ();
7000 std::string prompt = command_editor::decode_prompt_string (ps);
7003 m_current_input_line = m_reader.get_input (prompt, eof);
7005 m_input_buf.fill (m_current_input_line, eof);
7014 if (m_buffer_function_text)
7016 if (! m_current_input_line.empty ())
7018 m_function_text += m_current_input_line;
7019 if (m_current_input_line.back () !=
'\n')
7020 m_function_text +=
'\n';
7025 if (! m_input_buf.empty ())
7026 status = m_input_buf.copy_chunk (buf, max_size);
7030 m_initial_input =
false;
7036 push_lexer::append_input (
const std::string&
input,
bool eof)
7054 m_input_buf.fill (
input, eof);
7055 m_current_input_line =
input;
7059 push_lexer::fill_flex_buffer (
char *buf,
unsigned max_size)
7063 if (m_input_buf.empty () && ! m_input_buf.at_eof ())
7072 assert (max_size > 0);
7074 buf[0] =
static_cast<char> (1);
7082 if (! m_input_buf.empty ())
7083 status = m_input_buf.copy_chunk (buf, max_size,
true);
charNDArray max(char d, const charNDArray &m)
octave_value input_from_tmp_file(const octave_value_list &args, int nargout)
void mark_as_variable(const std::string &nm)
void mark_as_variables(const std::list< std::string > &lst)
bool token_value_is(int tv) const
void mark_trailing_space(void)
octave_value number(void) const
bool space_follows_token(void) const
std::string text(void) const
bool iskeyword(void) const
void mark_may_be_command(void)
bool may_be_command(void) const
int token_value(void) const
static const struct octave_kw * in_word_set(const char *str, size_t len)
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
bool is_undefined(void) const
OCTINTERP_API octave_idx_type length(void) const
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(void)
string_vector & sort(bool make_uniq=false)
void resize(octave_idx_type n, const std::string &rfv="")
ColumnVector imag(const ComplexColumnVector &a)
OCTINTERP_API void print_usage(void)
#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
#define CMD_OR_DEPRECATED_OP(PATTERN, REPLACEMENT, VERSION, TOK)
unsigned char flex_uint8_t
static bool looks_like_bin(const char *s, int len)
static int yy_init_globals(yyscan_t yyscanner)
OCTAVE_NAMESPACE_BEGIN bool iskeyword(const std::string &s)
static const YY_CHAR yy_meta[61]
static int yy_get_next_buffer(yyscan_t yyscanner)
static octave_value make_integer_value(uintmax_t long_int_val, bool unsigned_val, int bytes)
unsigned int flex_uint32_t
static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner)
void * octave_alloc(yy_size_t, yyscan_t yyscanner)
static void display_character(char c)
#define yypush_buffer_state
struct yy_buffer_state * YY_BUFFER_STATE
static bool is_space_or_tab_or_eol(char c)
#define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT)
#define YY_RESTORE_YY_MORE_OFFSET
static int input(yyscan_t yyscanner)
#define HANDLE_EOB_OR_EOF(STATUS)
static bool looks_like_shebang(const std::string &s)
#define yyensure_buffer_stack
void octave_free(void *, yyscan_t yyscanner)
#define HANDLE_NUMBER(PATTERN, BASE)
#define EOB_ACT_END_OF_FILE
static void yyunput(int c, char *buf_ptr, yyscan_t yyscanner)
#define yypop_buffer_state
#define YY_CURRENT_BUFFER_LVALUE
static const flex_int16_t yy_def[358]
static const flex_int16_t yy_nxt[1288]
#define HANDLE_IDENTIFIER(pattern, get_set)
static bool looks_like_hex(const char *s, int len)
static uint64_t flintmax(void)
#define yy_switch_to_buffer
static void yy_fatal_error(const char *msg, yyscan_t yyscanner)
static bool is_space_or_tab(char c)
#define YY_CURRENT_BUFFER
#define LINE_COMMENT_START
static const flex_int16_t yy_chk[1288]
#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
static bool looks_like_copyright(const std::string &s)
#define EOB_ACT_LAST_MATCH
#define YY_BUFFER_EOF_PENDING
static const flex_int16_t yy_base[358]
static const YY_CHAR yy_ec[256]
#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)
static yy_state_type yy_get_previous_state(yyscan_t yyscanner)
static const flex_int16_t yy_accept[314]
#define BLOCK_COMMENT_START
static uint32_t state[624]
bool iskeyword(const std::string &s)
std::complex< double > Complex
@ unwind_protect_cleanup_kw
static const struct octave_kw wordlist[]
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
T::size_type strlen(const typename T::value_type *str)
unsigned char flex_uint8_t
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
static int num_digits(T x)
int yy_bs_column
The column count.
int yy_bs_lineno
The line count.
int yy_did_buffer_switch_on_eof
size_t yy_buffer_stack_max
capacity of stack.
char * yy_last_accepting_cpos
yy_state_type yy_last_accepting_state
YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
octave::base_lexer * yyextra_r
size_t yy_buffer_stack_top
index of top of stack.
const char * undo_string_escape(char c)