1 #line 44 "../../libinterp/parse-tree/lex.ll"
9 #line 10 "parse-tree/lex.cc"
11 #define YY_INT_ALIGNED short int
16 #define YY_FLEX_MAJOR_VERSION 2
17 #define YY_FLEX_MINOR_VERSION 5
18 #define YY_FLEX_SUBMINOR_VERSION 39
19 #if YY_FLEX_SUBMINOR_VERSION > 0
40 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
45 #ifndef __STDC_LIMIT_MACROS
46 #define __STDC_LIMIT_MACROS 1
66 #define INT8_MIN (-128)
69 #define INT16_MIN (-32767-1)
72 #define INT32_MIN (-2147483647-1)
75 #define INT8_MAX (127)
78 #define INT16_MAX (32767)
81 #define INT32_MAX (2147483647)
84 #define UINT8_MAX (255U)
87 #define UINT16_MAX (65535U)
90 #define UINT32_MAX (4294967295U)
105 #if defined (__STDC__)
113 #define yyconst const
126 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
129 #ifndef YY_TYPEDEF_YY_SCANNER_T
130 #define YY_TYPEDEF_YY_SCANNER_T
136 #define yyin yyg->yyin_r
137 #define yyout yyg->yyout_r
138 #define yyextra yyg->yyextra_r
139 #define yyleng yyg->yyleng_r
140 #define yytext yyg->yytext_r
141 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
142 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
143 #define yy_flex_debug yyg->yy_flex_debug_r
149 #define BEGIN yyg->yy_start = 1 + 2 *
155 #define YY_START ((yyg->yy_start - 1) / 2)
156 #define YYSTATE YY_START
159 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
162 #define YY_NEW_FILE octave_restart(yyin ,yyscanner )
164 #define YY_END_OF_BUFFER_CHAR 0
173 #define YY_BUF_SIZE 32768
175 #define YY_BUF_SIZE 16384
181 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
183 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
184 #define YY_TYPEDEF_YY_BUFFER_STATE
188 #ifndef YY_TYPEDEF_YY_SIZE_T
189 #define YY_TYPEDEF_YY_SIZE_T
193 #define EOB_ACT_CONTINUE_SCAN 0
194 #define EOB_ACT_END_OF_FILE 1
195 #define EOB_ACT_LAST_MATCH 2
197 #define YY_LESS_LINENO(n)
198 #define YY_LINENO_REWIND_TO(ptr)
205 int yyless_macro_arg = (n); \
206 YY_LESS_LINENO(yyless_macro_arg);\
207 *yy_cp = yyg->yy_hold_char; \
208 YY_RESTORE_YY_MORE_OFFSET \
209 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
210 YY_DO_BEFORE_ACTION; \
214 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
216 #ifndef YY_STRUCT_YY_BUFFER_STATE
217 #define YY_STRUCT_YY_BUFFER_STATE
264 #define YY_BUFFER_NEW 0
265 #define YY_BUFFER_NORMAL 1
276 #define YY_BUFFER_EOF_PENDING 2
287 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
288 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
294 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
308 #define YY_FLUSH_BUFFER octave__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
318 #define yy_new_buffer octave__create_buffer
320 #define yy_set_interactive(is_interactive) \
322 if ( ! YY_CURRENT_BUFFER ){ \
323 octave_ensure_buffer_stack (yyscanner); \
324 YY_CURRENT_BUFFER_LVALUE = \
325 octave__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
327 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
330 #define yy_set_bol(at_bol) \
332 if ( ! YY_CURRENT_BUFFER ){\
333 octave_ensure_buffer_stack (yyscanner); \
334 YY_CURRENT_BUFFER_LVALUE = \
335 octave__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
337 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
340 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
344 #define octave_wrap(yyscanner) 1
345 #define YY_SKIP_YYWRAP
351 #define yytext_ptr yytext_r
361 #define YY_DO_BEFORE_ACTION \
362 yyg->yytext_ptr = yy_bp; \
363 yyleng = (size_t) (yy_cp - yy_bp); \
364 yyg->yy_hold_char = *yy_cp; \
366 yyg->yy_c_buf_p = yy_cp;
368 #define YY_NUM_RULES 123
369 #define YY_END_OF_BUFFER 124
379 5, 6, 8, 9, 5, 6, 8, 9, 10, 10,
380 124, 122, 123, 51, 122, 123, 60, 123, 60, 122,
381 123, 93, 122, 123, 62, 122, 123, 122, 123, 56,
382 122, 123, 76, 122, 123, 61, 122, 123, 98, 122,
383 123, 99, 122, 123, 80, 122, 123, 90, 122, 123,
384 94, 122, 123, 91, 122, 123, 100, 122, 123, 81,
385 122, 123, 50, 122, 123, 50, 122, 123, 63, 122,
386 123, 89, 122, 123, 78, 122, 123, 101, 122, 123,
387 79, 122, 123, 122, 123, 59, 122, 123, 14, 122,
388 123, 82, 122, 123, 15, 122, 123, 83, 122, 123,
390 56, 122, 123, 56, 122, 123, 120, 122, 123, 77,
391 122, 123, 121, 122, 123, 92, 122, 123, 51, 122,
392 123, 122, 123, 9, 123, 8, 123, 3, 123, 3,
393 123, 7, 123, 123, 5, 123, 6, 123, 4, 123,
394 9, 123, 10, 51, 122, 123, 11, 60, 123, 11,
395 60, 122, 123, 12, 15, 122, 123, 13, 121, 122,
396 123, 10, 51, 122, 123, 1, 123, 1, 123, 123,
397 19, 123, 19, 123, 123, 123, 22, 123, 22, 123,
398 22, 123, 22, 123, 39, 123, 40, 123, 40, 123,
399 24, 123, 38, 123, 123, 43, 123, 44, 123, 44,
401 123, 42, 123, 47, 123, 46, 47, 123, 123, 45,
402 47, 123, 51, 60, 74, 20, 20, 56, 85, 116,
403 84, 104, 96, 102, 97, 103, 95, 66, 64, 65,
404 67, 50, 68, 69, 105, 50, 50, 48, 87, 71,
405 72, 75, 88, 58, 53, 53, 106, 112, 56, 56,
406 117, 86, 73, 51, 9, 8, 3, 3, 5, 6,
407 10, 51, 11, 60, 10, 51, 1, 19, 19, 22,
408 21, 21, 39, 40, 23, 37, 37, 36, 36, 37,
409 25, 37, 27, 37, 28, 37, 29, 37, 30, 37,
410 31, 37, 32, 37, 33, 37, 37, 43, 44, 41,
412 46, 45, 57, 113, 70, 109, 107, 108, 110, 111,
413 114, 49, 50, 50, 50, 118, 119, 58, 54, 54,
414 56,16439, 16, 20, 16, 20, 17, 19, 17, 19,
415 18, 19, 18, 19, 35, 35, 25, 26, 45, 57,
416 115, 52, 52, 50, 58, 8247, 2, 2, 34, 34,
422 1, 1, 1, 5, 9, 10, 11, 11, 11, 11,
423 11, 11, 11, 11, 11, 11, 11, 11, 11, 12,
424 14, 17, 19, 22, 25, 28, 30, 33, 36, 39,
425 42, 45, 48, 51, 54, 57, 60, 63, 66, 69,
426 72, 75, 78, 81, 84, 86, 89, 92, 95, 98,
427 101, 104, 107, 110, 113, 116, 119, 122, 124, 126,
428 128, 130, 132, 134, 135, 137, 139, 141, 143, 147,
429 150, 154, 158, 162, 166, 168, 170, 171, 173, 175,
430 176, 177, 179, 181, 183, 185, 187, 189, 191, 193,
431 195, 196, 198, 200, 202, 204, 206, 209, 210, 213,
433 214, 214, 215, 216, 216, 217, 218, 219, 219, 220,
434 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
435 231, 231, 232, 233, 234, 235, 236, 237, 238, 238,
436 239, 239, 240, 241, 242, 243, 244, 245, 245, 246,
437 247, 247, 248, 249, 250, 251, 252, 253, 254, 255,
438 255, 255, 256, 257, 258, 258, 259, 260, 261, 261,
439 263, 265, 267, 268, 268, 269, 270, 270, 270, 270,
440 270, 270, 270, 271, 271, 272, 273, 274, 275, 276,
441 276, 277, 278, 279, 281, 283, 285, 287, 289, 291,
442 293, 295, 297, 298, 299, 300, 301, 302, 303, 303,
444 304, 305, 306, 307, 308, 309, 309, 310, 310, 311,
445 312, 313, 314, 314, 315, 316, 317, 318, 319, 319,
446 319, 320, 321, 323, 323, 325, 327, 327, 327, 329,
447 331, 331, 333, 335, 335, 335, 336, 337, 338, 339,
448 340, 341, 341, 342, 342, 343, 344, 344, 345, 346,
449 346, 347, 347, 348, 349, 349, 350, 351, 352, 353,
455 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
456 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
457 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458 1, 2, 5, 6, 7, 8, 7, 9, 10, 11,
459 12, 13, 14, 15, 16, 17, 18, 19, 20, 20,
460 20, 20, 20, 20, 20, 21, 21, 22, 23, 24,
461 25, 26, 27, 28, 29, 29, 29, 30, 30, 29,
462 8, 8, 31, 31, 8, 8, 8, 8, 8, 8,
463 8, 8, 8, 8, 8, 8, 8, 32, 8, 8,
464 33, 34, 35, 36, 8, 1, 37, 38, 29, 30,
466 39, 40, 41, 8, 31, 31, 8, 8, 8, 42,
467 8, 8, 8, 43, 44, 45, 8, 46, 8, 47,
468 8, 8, 48, 49, 50, 51, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
487 1, 2, 3, 3, 1, 4, 2, 5, 1, 6,
488 2, 2, 1, 1, 2, 1, 7, 1, 8, 8,
489 8, 1, 2, 1, 1, 1, 1, 9, 10, 10,
490 5, 5, 2, 11, 2, 1, 10, 10, 10, 10,
491 5, 5, 5, 5, 5, 5, 5, 2, 1, 2,
497 0, 50, 56, 105, 51, 91, 657, 656, 61, 73,
498 80, 81, 93, 115, 120, 132, 154, 200, 659, 721,
499 54, 721, 655, 630, 721, 66, 613, 65, 721, 721,
500 721, 89, 67, 721, 109, 238, 613, 258, 148, 721,
501 721, 119, 610, 120, 0, 721, 721, 156, 721, 607,
502 109, 111, 721, 80, 721, 606, 145, 167, 0, 628,
503 721, 626, 721, 169, 171, 139, 721, 609, 159, 721,
504 620, 721, 721, 173, 721, 613, 173, 721, 610, 203,
505 213, 721, 207, 593, 208, 0, 721, 590, 586, 535,
506 304, 0, 721, 548, 539, 721, 546, 721, 530, 211,
508 217, 721, 721, 219, 721, 541, 515, 0, 721, 721,
509 517, 721, 721, 721, 721, 721, 721, 211, 516, 511,
510 518, 419, 261, 418, 417, 721, 342, 282, 246, 721,
511 0, 416, 721, 721, 721, 401, 383, 266, 721, 381,
512 222, 721, 721, 205, 248, 721, 721, 721, 302, 280,
513 283, 0, 377, 721, 224, 374, 283, 283, 354, 308,
514 721, 312, 721, 231, 721, 356, 323, 332, 335, 354,
515 315, 350, 721, 361, 721, 345, 0, 721, 721, 328,
516 721, 364, 721, 340, 350, 721, 721, 721, 721, 721,
517 721, 721, 0, 0, 721, 721, 338, 317, 0, 315,
519 721, 304, 721, 721, 721, 371, 721, 369, 721, 721,
520 721, 372, 375, 378, 267, 721, 721, 279, 0, 383,
521 721, 268, 399, 402, 721, 261, 404, 410, 721, 250,
522 413, 721, 246, 416, 419, 721, 187, 405, 0, 171,
523 147, 0, 721, 425, 721, 151, 411, 414, 116, 309,
524 721, 433, 721, 128, 436, 721, 110, 721, 86, 83,
525 61, 55, 721, 445, 456, 467, 478, 489, 500, 511,
526 522, 529, 535, 545, 556, 567, 578, 589, 599, 610,
527 617, 623, 626, 632, 642, 646, 652, 658, 668, 675,
528 685, 692, 698, 704, 710
534 263, 1, 264, 264, 1, 1, 265, 265, 266, 266,
535 267, 267, 268, 268, 269, 269, 270, 270, 263, 263,
536 263, 263, 263, 263, 263, 271, 272, 263, 263, 263,
537 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
538 263, 263, 263, 263, 273, 263, 263, 263, 263, 263,
539 272, 272, 263, 263, 263, 263, 263, 271, 274, 263,
540 263, 263, 263, 275, 263, 263, 263, 263, 263, 263,
541 263, 263, 263, 263, 263, 263, 276, 263, 263, 276,
542 276, 263, 263, 263, 277, 278, 263, 263, 263, 263,
543 279, 280, 263, 263, 263, 263, 263, 263, 281, 263,
545 271, 263, 263, 271, 263, 263, 272, 282, 263, 263,
546 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
547 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
548 283, 263, 263, 263, 263, 263, 284, 263, 263, 263,
549 285, 263, 263, 272, 272, 263, 263, 263, 263, 271,
550 271, 274, 263, 263, 275, 263, 263, 263, 263, 263,
551 263, 263, 263, 276, 263, 263, 276, 276, 276, 276,
552 263, 277, 263, 277, 263, 263, 278, 263, 263, 263,
553 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
554 263, 263, 286, 280, 263, 263, 263, 281, 287, 288,
556 263, 263, 263, 263, 263, 289, 263, 263, 263, 263,
557 263, 263, 263, 263, 283, 263, 263, 284, 290, 285,
558 263, 263, 272, 271, 263, 263, 291, 276, 263, 263,
559 276, 263, 263, 263, 263, 263, 263, 263, 286, 292,
560 288, 293, 263, 289, 263, 263, 263, 263, 294, 263,
561 263, 291, 263, 263, 263, 263, 263, 263, 292, 295,
562 294, 295, 0, 263, 263, 263, 263, 263, 263, 263,
563 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
564 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
565 263, 263, 263, 263, 263
571 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
572 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
573 39, 40, 41, 42, 43, 44, 45, 46, 27, 27,
574 27, 27, 47, 48, 49, 50, 27, 27, 27, 27,
575 51, 27, 27, 52, 27, 27, 27, 53, 54, 55,
576 56, 57, 69, 70, 71, 100, 58, 60, 61, 62,
577 101, 63, 64, 78, 79, 63, 65, 66, 105, 106,
578 67, 242, 68, 109, 80, 78, 79, 219, 67, 81,
579 113, 83, 83, 84, 84, 72, 85, 85, 65, 110,
580 66, 114, 74, 70, 71, 87, 88, 58, 89, 242,
582 73, 111, 199, 65, 146, 66, 60, 61, 62, 90,
583 63, 64, 256, 112, 63, 65, 66, 87, 88, 67,
584 89, 68, 93, 94, 115, 72, 91, 67, 147, 95,
585 253, 90, 219, 116, 93, 94, 108, 65, 108, 66,
586 73, 95, 132, 133, 135, 136, 149, 144, 91, 145,
587 158, 150, 65, 245, 66, 97, 98, 138, 139, 140,
588 160, 99, 141, 242, 127, 101, 128, 128, 128, 105,
589 106, 154, 156, 158, 162, 165, 166, 129, 130, 150,
590 142, 157, 99, 99, 99, 99, 129, 199, 158, 236,
591 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
593 99, 97, 98, 157, 167, 165, 166, 99, 171, 168,
594 175, 176, 100, 172, 151, 165, 166, 101, 157, 105,
595 106, 105, 106, 202, 221, 222, 154, 156, 99, 99,
596 99, 99, 108, 165, 166, 203, 99, 99, 99, 99,
597 99, 99, 99, 99, 99, 99, 99, 117, 232, 223,
598 118, 119, 229, 120, 121, 122, 123, 123, 123, 213,
599 169, 213, 170, 225, 214, 214, 214, 138, 139, 140,
600 221, 124, 141, 125, 127, 108, 128, 128, 128, 123,
601 123, 123, 105, 106, 224, 225, 226, 129, 130, 131,
602 208, 130, 223, 157, 158, 219, 129, 130, 127, 208,
604 128, 128, 128, 149, 131, 182, 183, 184, 150, 160,
605 250, 129, 130, 162, 101, 157, 171, 158, 150, 251,
606 129, 172, 185, 185, 167, 165, 166, 151, 243, 168,
607 157, 242, 158, 199, 165, 166, 228, 229, 230, 197,
608 186, 187, 183, 188, 234, 189, 190, 175, 191, 192,
609 193, 211, 175, 176, 211, 231, 232, 233, 165, 211,
610 212, 212, 212, 175, 176, 235, 236, 237, 238, 238,
611 227, 129, 130, 245, 246, 211, 154, 211, 153, 169,
612 129, 170, 247, 139, 247, 221, 222, 248, 248, 248,
613 212, 212, 212, 214, 214, 214, 214, 214, 214, 219,
615 250, 129, 130, 224, 225, 226, 253, 254, 130, 251,
616 129, 228, 229, 230, 231, 232, 233, 255, 256, 257,
617 235, 236, 237, 258, 258, 217, 108, 245, 246, 248,
618 248, 248, 248, 248, 248, 253, 254, 255, 256, 257,
619 216, 210, 209, 207, 130, 59, 59, 59, 59, 59,
620 59, 59, 59, 59, 59, 59, 75, 75, 75, 75,
621 75, 75, 75, 75, 75, 75, 75, 77, 77, 77,
622 77, 77, 77, 77, 77, 77, 77, 77, 82, 82,
623 82, 82, 82, 82, 82, 82, 82, 82, 82, 86,
624 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
626 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
627 92, 96, 96, 96, 96, 96, 96, 96, 96, 96,
628 96, 96, 104, 104, 104, 104, 104, 104, 104, 104,
629 104, 104, 104, 107, 206, 205, 107, 107, 107, 137,
630 204, 201, 108, 105, 137, 152, 199, 197, 196, 152,
631 195, 180, 152, 152, 152, 152, 155, 155, 155, 155,
632 155, 155, 155, 155, 155, 155, 155, 164, 164, 164,
633 164, 164, 164, 164, 164, 164, 164, 164, 174, 174,
634 174, 174, 174, 174, 174, 174, 174, 174, 174, 177,
635 177, 179, 178, 177, 177, 173, 177, 177, 177, 181,
637 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
638 194, 194, 165, 194, 194, 163, 194, 194, 194, 194,
639 194, 198, 161, 198, 198, 159, 198, 200, 154, 153,
640 148, 143, 200, 215, 134, 215, 218, 126, 218, 218,
641 108, 218, 220, 220, 220, 220, 220, 220, 220, 220,
642 220, 220, 220, 239, 103, 239, 240, 102, 263, 76,
643 76, 240, 241, 263, 241, 241, 263, 241, 244, 244,
644 244, 244, 244, 244, 244, 244, 244, 244, 244, 249,
645 263, 263, 263, 263, 249, 252, 252, 252, 252, 252,
646 252, 252, 252, 252, 252, 252, 259, 263, 259, 259,
648 263, 259, 260, 263, 263, 263, 263, 260, 261, 263,
649 261, 261, 263, 261, 262, 263, 262, 262, 263, 262,
650 19, 263, 263, 263, 263, 263, 263, 263, 263, 263,
651 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
652 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
653 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
654 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
660 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
661 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
662 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
663 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
664 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
665 1, 2, 5, 5, 5, 21, 2, 3, 3, 3,
666 21, 3, 3, 9, 9, 3, 3, 3, 26, 26,
667 3, 262, 3, 28, 10, 10, 10, 261, 3, 10,
668 33, 11, 12, 11, 12, 5, 11, 12, 3, 28,
669 3, 33, 6, 6, 6, 13, 13, 6, 13, 260,
671 5, 32, 259, 3, 54, 3, 4, 4, 4, 13,
672 4, 4, 257, 32, 4, 4, 4, 14, 14, 4,
673 14, 4, 15, 15, 35, 6, 13, 4, 54, 15,
674 254, 14, 249, 35, 16, 16, 51, 4, 52, 4,
675 6, 16, 42, 42, 44, 44, 57, 51, 14, 52,
676 66, 57, 4, 246, 4, 17, 17, 48, 48, 48,
677 69, 17, 48, 241, 39, 69, 39, 39, 39, 58,
678 58, 64, 64, 66, 74, 77, 77, 39, 39, 74,
679 48, 65, 17, 17, 17, 17, 39, 240, 66, 237,
680 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
682 17, 18, 18, 65, 80, 80, 80, 18, 83, 80,
683 85, 85, 100, 83, 58, 81, 81, 100, 65, 101,
684 101, 104, 104, 118, 141, 141, 155, 155, 18, 18,
685 18, 18, 144, 164, 164, 118, 18, 18, 18, 18,
686 18, 18, 18, 18, 18, 18, 18, 36, 233, 144,
687 36, 36, 230, 36, 36, 36, 36, 36, 36, 129,
688 81, 129, 81, 226, 129, 129, 129, 138, 138, 138,
689 222, 36, 138, 36, 38, 145, 38, 38, 38, 123,
690 123, 123, 150, 150, 151, 151, 151, 38, 38, 38,
691 123, 123, 145, 157, 158, 218, 38, 215, 128, 123,
693 128, 128, 128, 149, 38, 91, 91, 91, 149, 160,
694 250, 128, 128, 162, 160, 157, 171, 158, 162, 250,
695 128, 171, 91, 91, 167, 167, 167, 150, 202, 167,
696 157, 200, 158, 198, 168, 168, 169, 169, 169, 197,
697 91, 91, 184, 91, 180, 91, 91, 176, 91, 91,
698 91, 127, 172, 172, 127, 170, 170, 170, 166, 127,
699 127, 127, 127, 174, 174, 182, 182, 182, 185, 185,
700 159, 127, 127, 206, 206, 127, 156, 127, 153, 168,
701 127, 168, 208, 140, 208, 220, 220, 208, 208, 208,
702 212, 212, 212, 213, 213, 213, 214, 214, 214, 137,
704 223, 212, 212, 224, 224, 224, 227, 227, 214, 223,
705 212, 228, 228, 228, 231, 231, 231, 234, 234, 234,
706 235, 235, 235, 238, 238, 136, 223, 244, 244, 247,
707 247, 247, 248, 248, 248, 252, 252, 255, 255, 255,
708 132, 125, 124, 122, 248, 264, 264, 264, 264, 264,
709 264, 264, 264, 264, 264, 264, 265, 265, 265, 265,
710 265, 265, 265, 265, 265, 265, 265, 266, 266, 266,
711 266, 266, 266, 266, 266, 266, 266, 266, 267, 267,
712 267, 267, 267, 267, 267, 267, 267, 267, 267, 268,
713 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
715 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
716 269, 270, 270, 270, 270, 270, 270, 270, 270, 270,
717 270, 270, 271, 271, 271, 271, 271, 271, 271, 271,
718 271, 271, 271, 272, 121, 120, 272, 272, 272, 273,
719 119, 111, 107, 106, 273, 274, 99, 97, 95, 274,
720 94, 90, 274, 274, 274, 274, 275, 275, 275, 275,
721 275, 275, 275, 275, 275, 275, 275, 276, 276, 276,
722 276, 276, 276, 276, 276, 276, 276, 276, 277, 277,
723 277, 277, 277, 277, 277, 277, 277, 277, 277, 278,
724 278, 89, 88, 278, 278, 84, 278, 278, 278, 279,
726 279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
727 280, 280, 79, 280, 280, 76, 280, 280, 280, 280,
728 280, 281, 71, 281, 281, 68, 281, 282, 62, 60,
729 56, 50, 282, 283, 43, 283, 284, 37, 284, 284,
730 27, 284, 285, 285, 285, 285, 285, 285, 285, 285,
731 285, 285, 285, 286, 24, 286, 287, 23, 19, 8,
732 7, 287, 288, 0, 288, 288, 0, 288, 289, 289,
733 289, 289, 289, 289, 289, 289, 289, 289, 289, 290,
734 0, 0, 0, 0, 290, 291, 291, 291, 291, 291,
735 291, 291, 291, 291, 291, 291, 292, 0, 292, 292,
737 0, 292, 293, 0, 0, 0, 0, 293, 294, 0,
738 294, 294, 0, 294, 295, 0, 295, 295, 0, 295,
739 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
740 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
741 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
742 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
743 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
747 #define YY_TRAILING_MASK 0x2000
748 #define YY_TRAILING_HEAD_MASK 0x4000
751 *yy_cp = yyg->yy_hold_char; \
752 yy_cp = yyg->yy_full_match; \
753 yyg->yy_lp = yyg->yy_full_lp; \
754 yyg->yy_state_ptr = yyg->yy_full_state; \
755 yy_current_state = *yyg->yy_state_ptr; \
760 #define yymore() yymore_used_but_not_detected
761 #define YY_MORE_ADJ 0
762 #define YY_RESTORE_YY_MORE_OFFSET
763 #line 1 "../../libinterp/parse-tree/lex.ll"
804 #line 64 "../../libinterp/parse-tree/lex.ll"
815 #include <sys/types.h>
853 #if defined (OCTAVE_STYPE_IS_DECLARED) && ! defined YYSTYPE
854 #define YYSTYPE OCTAVE_STYPE
857 #if defined (GNULIB_NAMESPACE)
861 #define fprintf GNULIB_NAMESPACE::fprintf
862 #define fwrite GNULIB_NAMESPACE::fwrite
863 #define isatty GNULIB_NAMESPACE::isatty
864 #define malloc GNULIB_NAMESPACE::malloc
865 #define realloc GNULIB_NAMESPACE::realloc
868 #if ! (defined (FLEX_SCANNER) \
869 && defined (YY_FLEX_MAJOR_VERSION) && YY_FLEX_MAJOR_VERSION >= 2 \
870 && defined (YY_FLEX_MINOR_VERSION) && YY_FLEX_MINOR_VERSION >= 5)
871 #error lex.l requires flex version 2.5.4 or later
874 #define YY_EXTRA_TYPE octave_base_lexer *
875 #define curr_lexer yyextra
882 #define YY_INPUT(buf, result, max_size) \
883 result = curr_lexer->fill_flex_buffer (buf, max_size)
887 #ifdef YY_FATAL_ERROR
888 #undef YY_FATAL_ERROR
890 #define YY_FATAL_ERROR(msg) \
891 (octave_get_extra (yyscanner))->fatal_error (msg)
893 #define CMD_OR_OP(PATTERN, TOK, COMPAT) \
897 curr_lexer->lexer_debug (PATTERN); \
899 if (curr_lexer->looks_like_command_arg ()) \
902 curr_lexer->push_start_state (COMMAND_START); \
906 return curr_lexer->handle_op_internal (TOK, false, COMPAT); \
911 #define CMD_OR_COMPUTED_ASSIGN_OP(PATTERN, TOK) \
915 curr_lexer->lexer_debug (PATTERN); \
917 if (curr_lexer->previous_token_may_be_command () \
918 && curr_lexer->space_follows_previous_token ()) \
921 curr_lexer->push_start_state (COMMAND_START); \
925 return curr_lexer->handle_language_extension_op (PATTERN, TOK, \
931 #define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT) \
935 curr_lexer->lexer_debug (PATTERN); \
937 if (curr_lexer->previous_token_may_be_command ()) \
939 if (curr_lexer->looks_like_command_arg ()) \
942 curr_lexer->push_start_state (COMMAND_START); \
946 return curr_lexer->handle_op_internal (TOK, false, COMPAT); \
953 ? curr_lexer->handle_unary_op (TOK) \
954 : curr_lexer->handle_language_extension_unary_op (TOK)); \
959 curr_lexer->xunput (','); \
961 curr_lexer->current_input_column--; \
977 #define HANDLE_STRING_CONTINUATION \
980 curr_lexer->decrement_promptflag (); \
981 curr_lexer->input_line_number++; \
982 curr_lexer->current_input_column = 1; \
984 if (curr_lexer->is_push_lexer ()) \
986 if (curr_lexer->at_end_of_buffer ()) \
989 if (curr_lexer->at_end_of_file ()) \
990 return curr_lexer->handle_end_of_input (); \
999 #define COMMAND_ARG_FINISH \
1002 if (curr_lexer->string_text.empty ()) \
1005 int retval = curr_lexer->handle_token (curr_lexer->string_text, \
1008 curr_lexer->string_text = ""; \
1009 curr_lexer->command_arg_paren_count = 0; \
1017 #define HANDLE_IDENTIFIER(pattern, get_set) \
1020 curr_lexer->lexer_debug (pattern); \
1022 int tok = curr_lexer->previous_token_value (); \
1024 if (curr_lexer->whitespace_is_significant () \
1025 && curr_lexer->space_follows_previous_token () \
1026 && ! (tok == '[' || tok == '{' \
1027 || curr_lexer->previous_token_is_binop ())) \
1034 if (! curr_lexer->looking_at_decl_list \
1035 && curr_lexer->previous_token_may_be_command ()) \
1038 curr_lexer->push_start_state (COMMAND_START); \
1043 curr_lexer->maybe_classdef_get_set_method = false; \
1045 int id_tok = curr_lexer->handle_identifier (); \
1048 return curr_lexer->count_token_internal (id_tok); \
1061 #line 1062 "parse-tree/lex.cc"
1064 #define COMMAND_START 1
1065 #define MATRIX_START 2
1066 #define INPUT_FILE_START 3
1067 #define BLOCK_COMMENT_START 4
1068 #define LINE_COMMENT_START 5
1069 #define DQ_STRING_START 6
1070 #define SQ_STRING_START 7
1071 #define FQ_IDENT_START 8
1073 #ifndef YY_NO_UNISTD_H
1081 #ifndef YY_EXTRA_TYPE
1082 #define YY_EXTRA_TYPE void *
1136 # define yylval yyg->yylval_r
1183 #ifndef YY_SKIP_YYWRAP
1194 static void yy_flex_strncpy (
char *,
yyconst char *,
int ,
yyscan_t yyscanner);
1197 #ifdef YY_NEED_STRLEN
1204 static int yyinput (
yyscan_t yyscanner );
1212 #ifndef YY_READ_BUF_SIZE
1215 #define YY_READ_BUF_SIZE 16384
1217 #define YY_READ_BUF_SIZE 8192
1226 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
1233 #define YY_INPUT(buf,result,max_size) \
1234 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1238 for ( n = 0; n < max_size && \
1239 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1240 buf[n] = (char) c; \
1242 buf[n++] = (char) c; \
1243 if ( c == EOF && ferror( yyin ) ) \
1244 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1250 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1252 if( errno != EINTR) \
1254 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1270 #define yyterminate() return YY_NULL
1274 #ifndef YY_START_STACK_INCR
1275 #define YY_START_STACK_INCR 25
1279 #ifndef YY_FATAL_ERROR
1280 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1289 #define YY_DECL_IS_OURS 1
1294 #define YY_DECL int octave_lex \
1295 (YYSTYPE * yylval_param , yyscan_t yyscanner)
1301 #ifndef YY_USER_ACTION
1302 #define YY_USER_ACTION
1307 #define YY_BREAK break;
1310 #define YY_RULE_SETUP \
1312 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1313 (yytext[yyleng - 1] == '\n'); \
1321 register char *yy_cp, *yy_bp;
1322 register int yy_act;
1360 #line 335 "../../libinterp/parse-tree/lex.ll"
1368 #line 1369 "parse-tree/lex.cc"
1392 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
1394 yy_current_state = (
int)
yy_def[yy_current_state];
1395 if ( yy_current_state >= 264 )
1398 yy_current_state =
yy_nxt[
yy_base[yy_current_state] + (
unsigned int) yy_c];
1402 while (
yy_base[yy_current_state] != 721 );
1452 #line 342 "../../libinterp/parse-tree/lex.ll"
1454 curr_lexer->lexer_debug (
"<INPUT_FILE_START>{ANY_INCLUDING_NL}");
1468 #line 356 "../../libinterp/parse-tree/lex.ll"
1470 curr_lexer->lexer_debug (
"<INPUT_FILE_START><<EOF>>");
1491 #line 377 "../../libinterp/parse-tree/lex.ll"
1493 curr_lexer->lexer_debug (
"<COMMAND_START>(\\.\\.\\.){ANY_EXCEPT_NL}*{NL}");
1509 #line 392 "../../libinterp/parse-tree/lex.ll"
1511 curr_lexer->lexer_debug (
"<COMMAND_START>({CCHAR}{ANY_EXCEPT_NL}*)?{NL}");
1517 curr_lexer->looking_for_object_index =
false;
1518 curr_lexer->at_beginning_of_statement =
true;
1526 #line 406 "../../libinterp/parse-tree/lex.ll"
1528 curr_lexer->lexer_debug (
"<COMMAND_START>[\\,\\;]");
1533 curr_lexer->looking_for_object_index =
false;
1534 curr_lexer->at_beginning_of_statement =
true;
1551 #line 429 "../../libinterp/parse-tree/lex.ll"
1553 curr_lexer->lexer_debug (
"<COMMAND_START>[\\(\\[\\{]+");
1562 #line 437 "../../libinterp/parse-tree/lex.ll"
1564 curr_lexer->lexer_debug (
"<COMMAND_START>[\\)\\]\\}]+");
1584 #line 457 "../../libinterp/parse-tree/lex.ll"
1586 curr_lexer->lexer_debug (
"<COMMAND_START>[\\\"\\']");
1588 if (
curr_lexer->command_arg_paren_count == 0)
1604 #line 475 "../../libinterp/parse-tree/lex.ll"
1606 curr_lexer->lexer_debug (
"<COMMAND_START>{S}*");
1608 if (
curr_lexer->command_arg_paren_count == 0)
1621 #line 490 "../../libinterp/parse-tree/lex.ll"
1623 curr_lexer->lexer_debug (
"<COMMAND_START>([\\.]|[^#% \\t\\r\\n\\.\\,\\;\\\"\\'\\(\\[\\{\\}\\]\\)]*");
1631 #line 497 "../../libinterp/parse-tree/lex.ll"
1633 curr_lexer->lexer_debug (
"<MATRIX_START>{S}*");
1635 curr_lexer->mark_previous_token_trailing_space ();
1641 #line 503 "../../libinterp/parse-tree/lex.ll"
1643 curr_lexer->lexer_debug (
"<MATRIX_START>{NL}");
1649 curr_lexer->gripe_language_extension (
"bare newline inside parentheses");
1652 int tok =
curr_lexer->previous_token_value ();
1654 if (! (tok ==
';' || tok ==
'[' || tok ==
'{'))
1678 #line 538 "../../libinterp/parse-tree/lex.ll"
1680 curr_lexer->lexer_debug (
"<MATRIX_START>\\]");
1682 curr_lexer->looking_at_object_index.pop_front ();
1685 curr_lexer->at_beginning_of_statement =
false;
1697 #line 555 "../../libinterp/parse-tree/lex.ll"
1699 curr_lexer->lexer_debug (
"<MATRIX_START>\\}*");
1701 curr_lexer->looking_at_object_index.pop_front ();
1704 curr_lexer->at_beginning_of_statement =
false;
1713 #line 568 "../../libinterp/parse-tree/lex.ll"
1717 bool unput_comma =
false;
1720 &&
curr_lexer->space_follows_previous_token ())
1722 int tok =
curr_lexer->previous_token_value ();
1724 if (! (tok ==
'[' || tok ==
'{'
1740 curr_lexer->looking_at_object_index.push_front (
false);
1743 curr_lexer->looking_for_object_index =
false;
1744 curr_lexer->at_beginning_of_statement =
false;
1747 && !
curr_lexer->parsed_function_name.top ())
1750 curr_lexer->looking_at_matrix_or_assign_lhs =
true;
1764 #line 616 "../../libinterp/parse-tree/lex.ll"
1770 curr_lexer->looking_at_object_index.pop_front ();
1773 curr_lexer->at_beginning_of_statement =
false;
1789 #line 639 "../../libinterp/parse-tree/lex.ll"
1791 curr_lexer->lexer_debug (
"^{S}*{CCHAR}\\{{S}*{NL}");
1812 #line 658 "../../libinterp/parse-tree/lex.ll"
1814 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>^{S}*{CCHAR}\\{{S}*{NL}");
1833 #line 676 "../../libinterp/parse-tree/lex.ll"
1835 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>^{S}*{CCHAR}\\}{S}*{NL}");
1840 if (
curr_lexer->block_comment_nesting_level > 1)
1847 if (
curr_lexer->block_comment_nesting_level == 0)
1861 #line 701 "../../libinterp/parse-tree/lex.ll"
1863 curr_lexer->lexer_debug (
"<BLOCK_COMMENT_START>{ANY_EXCEPT_NL}*{NL}");
1876 #line 713 "../../libinterp/parse-tree/lex.ll"
1878 curr_lexer->lexer_debug (
"{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
1887 #line 720 "../../libinterp/parse-tree/lex.ll"
1889 curr_lexer->lexer_debug (
"<LINE_COMMENT_START>{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
1891 bool full_line_comment =
curr_lexer->current_input_column == 1;
1895 bool have_space =
false;
1901 if (c ==
' ' || c ==
'\t')
1910 size_t num_comment_chars = 0;
1915 if (c ==
'#' || c ==
'%')
1917 num_comment_chars++;
1926 if (full_line_comment)
1928 if (num_comment_chars == 1 &&
yytext[i++] ==
'{')
1930 bool looks_like_block_comment =
true;
1935 if (! (c ==
' ' || c ==
'\t' || c ==
'\n' || c ==
'\r'))
1937 looks_like_block_comment =
false;
1942 if (looks_like_block_comment)
1955 curr_lexer->mark_previous_token_trailing_space ();
1972 #line 802 "../../libinterp/parse-tree/lex.ll"
1974 curr_lexer->lexer_debug (
"<LINE_COMMENT_START>{ANY_INCLUDING_NL}");
1987 #line 816 "../../libinterp/parse-tree/lex.ll"
1989 curr_lexer->lexer_debug (
"<LINE_COMMENT_START><<EOF>>");
2001 #line 828 "../../libinterp/parse-tree/lex.ll"
2003 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\"\\\"");
2011 #line 835 "../../libinterp/parse-tree/lex.ll"
2013 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\"");
2022 curr_lexer->at_beginning_of_statement =
false;
2037 #line 858 "../../libinterp/parse-tree/lex.ll"
2039 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\[0-7]{1,3}");
2044 sscanf (
yytext+1,
"%o", &result);
2047 error (
"invalid octal escape sequence in character string");
2049 curr_lexer->string_text +=
static_cast<unsigned char> (result);
2054 #line 872 "../../libinterp/parse-tree/lex.ll"
2056 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\x[0-9a-fA-F]+");
2061 sscanf (
yytext+2,
"%x", &result);
2067 curr_lexer->string_text +=
static_cast<unsigned char> (result);
2072 #line 887 "../../libinterp/parse-tree/lex.ll"
2074 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\a\"");
2082 #line 894 "../../libinterp/parse-tree/lex.ll"
2084 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\b\"");
2092 #line 901 "../../libinterp/parse-tree/lex.ll"
2094 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\f\"");
2102 #line 908 "../../libinterp/parse-tree/lex.ll"
2104 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\n\"");
2112 #line 915 "../../libinterp/parse-tree/lex.ll"
2114 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\r\"");
2122 #line 922 "../../libinterp/parse-tree/lex.ll"
2124 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\t\"");
2132 #line 929 "../../libinterp/parse-tree/lex.ll"
2134 curr_lexer->lexer_debug (
"<DQ_STRING_START>\"\\\\v\"");
2143 #line 936 "../../libinterp/parse-tree/lex.ll"
2145 curr_lexer->lexer_debug (
"<DQ_STRING_START>(\\.\\.\\.){S}*{NL}");
2147 static const char *msg =
"'...' continuations in double-quoted character strings are obsolete and will not be allowed in a future version of Octave; please use '\\' instead";
2149 std::string nm =
curr_lexer->fcn_file_full_name;
2155 "%s; near line %d of file '%s'", msg,
2164 #line 953 "../../libinterp/parse-tree/lex.ll"
2166 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\{S}+{NL}");
2168 static const char *msg =
"white space and comments after continuation markers in double-quoted character strings are obsolete and will not be allowed in a future version of Octave";
2170 std::string nm =
curr_lexer->fcn_file_full_name;
2176 "%s; near line %d of file '%s'", msg,
2185 #line 970 "../../libinterp/parse-tree/lex.ll"
2187 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\{NL}");
2194 #line 976 "../../libinterp/parse-tree/lex.ll"
2196 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\\\.");
2204 #line 983 "../../libinterp/parse-tree/lex.ll"
2206 curr_lexer->lexer_debug (
"<DQ_STRING_START>\\.");
2214 #line 990 "../../libinterp/parse-tree/lex.ll"
2216 curr_lexer->lexer_debug (
"<DQ_STRING_START>[^\\.\\\\\\r\\n\\\"]+");
2225 #line 997 "../../libinterp/parse-tree/lex.ll"
2227 curr_lexer->lexer_debug (
"<DQ_STRING_START>{NL}");
2232 error (
"unterminated character string constant");
2242 #line 1012 "../../libinterp/parse-tree/lex.ll"
2244 curr_lexer->lexer_debug (
"<SQ_STRING_START>\\'\\'");
2252 #line 1019 "../../libinterp/parse-tree/lex.ll"
2254 curr_lexer->lexer_debug (
"<SQ_STRING_START>\\'");
2263 curr_lexer->at_beginning_of_statement =
false;
2278 #line 1042 "../../libinterp/parse-tree/lex.ll"
2280 curr_lexer->lexer_debug (
"<SQ_STRING_START>[^\\'\\n\\r]+");
2289 #line 1049 "../../libinterp/parse-tree/lex.ll"
2291 curr_lexer->lexer_debug (
"<SQ_STRING_START>{NL}");
2296 error (
"unterminated character string constant");
2306 #line 1064 "../../libinterp/parse-tree/lex.ll"
2308 curr_lexer->lexer_debug (
"<FQ_IDENT_START>{FQIDENT}");
2311 int id_tok =
curr_lexer->handle_fq_identifier ();
2317 return curr_lexer->count_token_internal (id_tok);
2323 #line 1078 "../../libinterp/parse-tree/lex.ll"
2327 curr_lexer->mark_previous_token_trailing_space ();
2332 #line 1084 "../../libinterp/parse-tree/lex.ll"
2343 #line 1093 "../../libinterp/parse-tree/lex.ll"
2347 if (
curr_lexer->previous_token_may_be_command ()
2348 &&
curr_lexer->space_follows_previous_token ())
2355 int tok =
curr_lexer->previous_token_value ();
2358 &&
curr_lexer->space_follows_previous_token ()
2359 && ! (tok ==
'[' || tok ==
'{'
2381 #line 1128 "../../libinterp/parse-tree/lex.ll"
2384 #line 1128 "../../libinterp/parse-tree/lex.ll"
2386 curr_lexer->lexer_debug (
"{D}+/\\.[\\*/\\\\^\\']|{NUMBER}");
2388 if (
curr_lexer->previous_token_may_be_command ()
2389 &&
curr_lexer->space_follows_previous_token ())
2396 int tok =
curr_lexer->previous_token_value ();
2399 &&
curr_lexer->space_follows_previous_token ()
2400 && ! (tok ==
'[' || tok ==
'{'
2420 #line 1162 "../../libinterp/parse-tree/lex.ll"
2424 curr_lexer->mark_previous_token_trailing_space ();
2433 #line 1172 "../../libinterp/parse-tree/lex.ll"
2435 curr_lexer->lexer_debug (
"\\.\\.\\.{ANY_EXCEPT_NL}*{NL}");
2445 #line 1183 "../../libinterp/parse-tree/lex.ll"
2449 #line 1183 "../../libinterp/parse-tree/lex.ll"
2451 curr_lexer->lexer_debug (
"\\\\{S}*{NL}|\\\\{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");
2453 static const char *msg =
"using continuation marker \\ outside of double quoted strings is deprecated and will be removed in a future version of Octave";
2455 std::string nm =
curr_lexer->fcn_file_full_name;
2461 "%s; near line %d of file '%s'", msg,
2477 #line 1204 "../../libinterp/parse-tree/lex.ll"
2490 #line 1215 "../../libinterp/parse-tree/lex.ll"
2497 #line 1219 "../../libinterp/parse-tree/lex.ll"
2507 #line 1227 "../../libinterp/parse-tree/lex.ll"
2509 curr_lexer->lexer_debug (
"{IDENT}@{FQIDENT}");
2511 if (
curr_lexer->previous_token_may_be_command ())
2518 int id_tok =
curr_lexer->handle_superclass_identifier ();
2524 return curr_lexer->count_token_internal (id_tok);
2534 #line 1252 "../../libinterp/parse-tree/lex.ll"
2538 if (
curr_lexer->previous_token_may_be_command ()
2539 &&
curr_lexer->space_follows_previous_token ())
2546 int id_tok =
curr_lexer->handle_meta_identifier ();
2552 return curr_lexer->count_token_internal (id_tok);
2559 #line 1274 "../../libinterp/parse-tree/lex.ll"
2563 if (
curr_lexer->previous_token_may_be_command ()
2564 &&
curr_lexer->space_follows_previous_token ())
2571 int tok =
curr_lexer->previous_token_value ();
2574 &&
curr_lexer->space_follows_previous_token ()
2575 && ! (tok ==
'[' || tok ==
'{'
2586 curr_lexer->looking_for_object_index =
false;
2587 curr_lexer->at_beginning_of_statement =
false;
2602 #line 1314 "../../libinterp/parse-tree/lex.ll"
2611 curr_lexer->at_beginning_of_statement =
false;
2613 (
"bare newline inside parentheses");
2616 ||
curr_lexer->nesting_level.is_anon_fcn_body ())
2618 curr_lexer->at_beginning_of_statement =
true;
2621 else if (
curr_lexer->nesting_level.is_bracket_or_brace ())
2631 #line 1341 "../../libinterp/parse-tree/lex.ll"
2635 if (
curr_lexer->previous_token_may_be_command ()
2636 &&
curr_lexer->space_follows_previous_token ())
2642 else if (
curr_lexer->at_beginning_of_statement)
2649 int tok =
curr_lexer->previous_token_value ();
2651 if (
curr_lexer->whitespace_is_significant ())
2653 if (
curr_lexer->space_follows_previous_token ())
2655 if (tok ==
'[' || tok ==
'{'
2671 if (tok ==
'[' || tok ==
'{'
2684 if (! tok || tok ==
'[' || tok ==
'{' || tok ==
'('
2702 #line 1410 "../../libinterp/parse-tree/lex.ll"
2706 if (
curr_lexer->previous_token_may_be_command ()
2707 &&
curr_lexer->space_follows_previous_token ())
2715 int tok =
curr_lexer->previous_token_value ();
2717 if (
curr_lexer->whitespace_is_significant ())
2719 if (
curr_lexer->space_follows_previous_token ())
2721 if (tok ==
'[' || tok ==
'{'
2754 #line 1460 "../../libinterp/parse-tree/lex.ll"
2759 #line 1461 "../../libinterp/parse-tree/lex.ll"
2764 #line 1462 "../../libinterp/parse-tree/lex.ll"
2769 #line 1463 "../../libinterp/parse-tree/lex.ll"
2774 #line 1464 "../../libinterp/parse-tree/lex.ll"
2779 #line 1465 "../../libinterp/parse-tree/lex.ll"
2784 #line 1466 "../../libinterp/parse-tree/lex.ll"
2789 #line 1467 "../../libinterp/parse-tree/lex.ll"
2794 #line 1468 "../../libinterp/parse-tree/lex.ll"
2799 #line 1469 "../../libinterp/parse-tree/lex.ll"
2804 #line 1470 "../../libinterp/parse-tree/lex.ll"
2809 #line 1471 "../../libinterp/parse-tree/lex.ll"
2814 #line 1472 "../../libinterp/parse-tree/lex.ll"
2819 #line 1473 "../../libinterp/parse-tree/lex.ll"
2824 #line 1474 "../../libinterp/parse-tree/lex.ll"
2829 #line 1475 "../../libinterp/parse-tree/lex.ll"
2834 #line 1476 "../../libinterp/parse-tree/lex.ll"
2839 #line 1477 "../../libinterp/parse-tree/lex.ll"
2844 #line 1478 "../../libinterp/parse-tree/lex.ll"
2852 #line 1484 "../../libinterp/parse-tree/lex.ll"
2857 #line 1486 "../../libinterp/parse-tree/lex.ll"
2862 #line 1487 "../../libinterp/parse-tree/lex.ll"
2867 #line 1488 "../../libinterp/parse-tree/lex.ll"
2872 #line 1489 "../../libinterp/parse-tree/lex.ll"
2877 #line 1490 "../../libinterp/parse-tree/lex.ll"
2882 #line 1491 "../../libinterp/parse-tree/lex.ll"
2887 #line 1493 "../../libinterp/parse-tree/lex.ll"
2889 bool at_beginning_of_statement
2890 = (! (
curr_lexer->whitespace_is_significant ()
2891 ||
curr_lexer->looking_at_object_index.front ()));
2893 return curr_lexer->handle_op (
";",
';', at_beginning_of_statement);
2898 #line 1501 "../../libinterp/parse-tree/lex.ll"
2903 #line 1502 "../../libinterp/parse-tree/lex.ll"
2908 #line 1504 "../../libinterp/parse-tree/lex.ll"
2913 #line 1505 "../../libinterp/parse-tree/lex.ll"
2918 #line 1507 "../../libinterp/parse-tree/lex.ll"
2920 bool at_beginning_of_statement
2921 = (! (
curr_lexer->whitespace_is_significant ()
2922 ||
curr_lexer->looking_at_object_index.front ()));
2924 return curr_lexer->handle_op (
",",
',', at_beginning_of_statement);
2929 #line 1515 "../../libinterp/parse-tree/lex.ll"
2936 #line 1519 "../../libinterp/parse-tree/lex.ll"
2941 #line 1520 "../../libinterp/parse-tree/lex.ll"
2946 #line 1522 "../../libinterp/parse-tree/lex.ll"
2950 bool unput_comma =
false;
2953 &&
curr_lexer->space_follows_previous_token ())
2955 int tok =
curr_lexer->previous_token_value ();
2957 if (! (tok ==
'[' || tok ==
'{'
2976 curr_lexer->looking_at_object_index.push_front
2980 curr_lexer->looking_for_object_index =
false;
2981 curr_lexer->at_beginning_of_statement =
false;
2992 #line 1565 "../../libinterp/parse-tree/lex.ll"
2999 curr_lexer->looking_at_object_index.pop_front ();
3002 curr_lexer->at_beginning_of_statement =
false;
3006 curr_lexer->looking_at_anon_fcn_args =
false;
3015 #line 1585 "../../libinterp/parse-tree/lex.ll"
3019 if (
curr_lexer->previous_token_may_be_command ()
3020 &&
curr_lexer->space_follows_previous_token ())
3027 curr_lexer->looking_for_object_index =
false;
3028 curr_lexer->at_beginning_of_statement =
false;
3039 #line 1607 "../../libinterp/parse-tree/lex.ll"
3041 curr_lexer->maybe_mark_previous_token_as_variable ();
3048 #line 1613 "../../libinterp/parse-tree/lex.ll"
3053 #line 1614 "../../libinterp/parse-tree/lex.ll"
3058 #line 1615 "../../libinterp/parse-tree/lex.ll"
3063 #line 1616 "../../libinterp/parse-tree/lex.ll"
3068 #line 1617 "../../libinterp/parse-tree/lex.ll"
3073 #line 1618 "../../libinterp/parse-tree/lex.ll"
3078 #line 1619 "../../libinterp/parse-tree/lex.ll"
3083 #line 1620 "../../libinterp/parse-tree/lex.ll"
3088 #line 1621 "../../libinterp/parse-tree/lex.ll"
3093 #line 1622 "../../libinterp/parse-tree/lex.ll"
3098 #line 1623 "../../libinterp/parse-tree/lex.ll"
3103 #line 1624 "../../libinterp/parse-tree/lex.ll"
3108 #line 1625 "../../libinterp/parse-tree/lex.ll"
3113 #line 1626 "../../libinterp/parse-tree/lex.ll"
3118 #line 1627 "../../libinterp/parse-tree/lex.ll"
3123 #line 1628 "../../libinterp/parse-tree/lex.ll"
3128 #line 1629 "../../libinterp/parse-tree/lex.ll"
3133 #line 1630 "../../libinterp/parse-tree/lex.ll"
3141 #line 1636 "../../libinterp/parse-tree/lex.ll"
3145 bool unput_comma =
false;
3148 &&
curr_lexer->space_follows_previous_token ())
3150 int tok =
curr_lexer->previous_token_value ();
3152 if (! (tok ==
'[' || tok ==
'{'
3168 curr_lexer->looking_at_object_index.push_front
3172 curr_lexer->looking_for_object_index =
false;
3173 curr_lexer->at_beginning_of_statement =
false;
3187 #line 1679 "../../libinterp/parse-tree/lex.ll"
3191 curr_lexer->looking_at_object_index.pop_front ();
3194 curr_lexer->at_beginning_of_statement =
false;
3206 #line 1696 "../../libinterp/parse-tree/lex.ll"
3222 error (
"invalid character '%s' (ASCII %d) near line %d, column %d",
3232 #line 1719 "../../libinterp/parse-tree/lex.ll"
3235 #line 3236 "parse-tree/lex.cc"
3240 int yy_amount_of_matched_text = (
int) (yy_cp - yyg->yytext_ptr) - 1;
3273 yyg->
yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
3290 if ( yy_next_state )
3294 yy_current_state = yy_next_state;
3301 goto yy_find_action;
3338 yyg->yytext_ptr + yy_amount_of_matched_text;
3354 goto yy_find_action;
3361 "fatal flex scanner internal error--no action found" );
3378 register char *source = yyg->yytext_ptr;
3379 register int number_to_move, i;
3384 "fatal flex scanner internal error--end of buffer missed" );
3408 number_to_move = (
int) (yyg->
yy_c_buf_p - yyg->yytext_ptr) - 1;
3410 for ( i = 0; i < number_to_move; ++i )
3411 *(dest++) = *(source++);
3424 while ( num_to_read <= 0 )
3428 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
3466 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
3483 register char *yy_cp;
3495 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
3497 yy_current_state = (
int)
yy_def[yy_current_state];
3498 if ( yy_current_state >= 264 )
3501 yy_current_state =
yy_nxt[
yy_base[yy_current_state] + (
unsigned int) yy_c];
3505 return yy_current_state;
3515 register int yy_is_jam;
3519 while (
yy_chk[
yy_base[yy_current_state] + yy_c] != yy_current_state )
3521 yy_current_state = (
int)
yy_def[yy_current_state];
3522 if ( yy_current_state >= 264 )
3525 yy_current_state =
yy_nxt[
yy_base[yy_current_state] + (
unsigned int) yy_c];
3526 yy_is_jam = (yy_current_state == 263);
3531 return yy_is_jam ? 0 : yy_current_state;
3536 register char *yy_cp;
3544 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3550 register char *source =
3554 *--dest = *--source;
3556 yy_cp += (
int) (dest - source);
3557 yy_bp += (
int) (dest - source);
3561 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3565 *--yy_cp = (
char) c;
3567 yyg->yytext_ptr = yy_bp;
3574 static int yyinput (
yyscan_t yyscanner)
3626 return yyinput(yyscanner);
3628 return input(yyscanner);
3725 YY_FATAL_ERROR(
"out of dynamic memory in octave__create_buffer()" );
3734 YY_FATAL_ERROR(
"out of dynamic memory in octave__create_buffer()" );
3829 if (new_buffer == NULL)
3893 YY_FATAL_ERROR(
"out of dynamic memory in octave_ensure_buffer_stack()" );
3913 YY_FATAL_ERROR(
"out of dynamic memory in octave_ensure_buffer_stack()" );
3939 YY_FATAL_ERROR(
"out of dynamic memory in octave__scan_buffer()" );
3985 n = _yybytes_len + 2;
3988 YY_FATAL_ERROR(
"out of dynamic memory in octave__scan_bytes()" );
3990 for ( i = 0; i < _yybytes_len; ++i )
3991 buf[i] = yybytes[i];
4007 #ifndef YY_EXIT_FAILURE
4008 #define YY_EXIT_FAILURE 2
4013 (void) fprintf( stderr,
"%s\n", msg );
4024 int yyless_macro_arg = (n); \
4025 YY_LESS_LINENO(yyless_macro_arg);\
4026 yytext[yyleng] = yyg->yy_hold_char; \
4027 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
4028 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
4029 *yyg->yy_c_buf_p = '\0'; \
4030 yyleng = yyless_macro_arg; \
4202 if (ptr_yy_globals == NULL){
4209 if (*ptr_yy_globals == NULL){
4215 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
4235 if (ptr_yy_globals == NULL){
4242 if (*ptr_yy_globals == NULL){
4249 memset(*ptr_yy_globals,0x00,
sizeof(
struct yyguts_t));
4332 static void yy_flex_strncpy (
char* s1,
yyconst char * s2,
int n ,
yyscan_t yyscanner)
4335 for ( i = 0; i < n; ++i )
4340 #ifdef YY_NEED_STRLEN
4344 for ( n = 0; s[n]; ++n )
4351 #define YYTABLES_NAME "yytables"
4353 #line 1718 "../../libinterp/parse-tree/lex.ll"
4366 return realloc (ptr, size);
4512 std::cerr <<
"SPACE";
4531 && ! (s ==
"set" || s ==
"get"));
4534 DEFUN (iskeyword, args, ,
4536 @deftypefn {Built-in Function} {} iskeyword ()\n\
4537 @deftypefnx {Built-in Function} {} iskeyword (@var{name})\n\
4538 Return true if @var{name} is an Octave keyword.\n\
4540 If @var{name} is omitted, return a list of keywords.\n\
4541 @seealso{isvarname, exist}\n\
4546 int argc = args.
length () + 1;
4566 if (! (tmp ==
"set" || tmp ==
"get"))
4592 DEFUN (__display_tokens__, args, nargout,
4594 @deftypefn {Built-in Function} {} __display_tokens__ ()\n\
4595 Query or set the internal variable that determines whether Octave's\n\
4596 lexer displays tokens as they are read.\n\
4597 @seealso{__lexer_debug_flag__, __token_count__}\n\
4603 DEFUN (__token_count__, , ,
4605 @deftypefn {Built-in Function} {} __token_count__ ()\n\
4606 Return the number of language tokens processed since Octave startup.\n\
4607 @seealso{__lexer_debug_flag__, __display_tokens__}\n\
4613 DEFUN (__lexer_debug_flag__, args, nargout,
4615 @deftypefn {Built-in Function} {@var{val} =} __lexer_debug_flag__ ()\n\
4616 @deftypefnx {Built-in Function} {@var{old_val} =} __lexer_debug_flag__ (@var{new_val})\n\
4617 Query or set the internal flag that determines whether Octave's lexer prints\n\
4618 debug information as it processes an expression.\n\
4619 @seealso{__display_tokens__, __token_count__, __parse_debug_flag__}\n\
4625 "__lexer_debug_flag__");
4728 return (tok ==
'+' || tok ==
'-' || tok ==
'@'
4729 || tok ==
',' || tok ==
';' || tok ==
'*' || tok ==
'/'
4730 || tok ==
':' || tok ==
'=' || tok ==
ADD_EQ
4770 for (std::list<std::string>::const_iterator p = lst.begin ();
4771 p != lst.end (); p++)
4780 bool retval =
false;
4784 size_t offset = s.find_first_not_of (
" \t");
4786 retval = (s.substr (offset, 9) ==
"Copyright" || s.substr (offset, 6) ==
"Author");
4804 static const char *
const eol =
"\n";
4806 size_t len = max_size > chars_left ? chars_left : max_size;
4809 memcpy (buf, pos, len);
4815 if (chars_left == 0 && buf[len-1] !=
'\n')
4859 #define OCTAVE_YYG \
4860 struct yyguts_t *yyg = static_cast<struct yyguts_t*> (scanner)
4913 warning (
"block comment open at end of input");
4917 warning (
"near line %d of file '%s.m'",
4945 std::cerr << std::endl;
4958 std::cerr << std::endl;
4980 std::cerr << std::endl;
5000 return (c ==
' ' || c ==
'\t');
5006 bool retval =
false;
5037 int len = s.length ();
5250 tok_val =
new token (kw->
tok,
true, l, c);
5270 p2 = s.find (
'.', p1);
5272 if (p2 != std::string::npos)
5274 s_part = s.substr (p1, p2 - p1);
5278 s_part = s.substr (p1);
5283 while (p2 != std::string::npos);
5299 return (len > 2 && s[0] ==
'0' && (s[1] ==
'x' || s[1] ==
'X'));
5314 nread = sscanf (yytxt,
"%lx", &ival);
5316 value =
static_cast<double> (ival);
5322 char *idx = strpbrk (tmp,
"Dd");
5327 nread = sscanf (tmp,
"%lf", &value);
5334 assert (nread == 1);
5352 if (yytxt[0] ==
'\\')
5357 bool have_space =
false;
5358 while (offset < yylng)
5360 char c = yytxt[offset];
5361 if (c ==
' ' || c ==
'\t')
5373 bool have_comment =
false;
5374 while (offset < yylng)
5376 char c = yytxt[offset];
5377 if (c ==
'#' || c ==
'%')
5379 have_comment =
true;
5428 int retval = bracket_type;
5434 if (bracket_type ==
']')
5436 else if (bracket_type ==
'}')
5453 return (space_before && ! space_after
5462 size_t pos = meth.find (
"@");
5463 std::string cls = meth.substr (pos + 1);
5464 meth = meth.substr (0, pos);
5471 error (
"method, class, and package names may not be keywords");
5486 std::string cls = std::string(
flex_yytext ()).substr (1);
5490 error (
"class and package names may not be keywords");
5509 error (
"function, method, class, and package names may not be keywords");
5530 std::string tok = yytxt;
5558 error (
"function handles may not refer to keywords");
5608 || tok ==
"e" || tok ==
"pi"
5609 || tok ==
"I" || tok ==
"i"
5610 || tok ==
"J" || tok ==
"j"
5611 || tok ==
"Inf" || tok ==
"inf"
5612 || tok ==
"NaN" || tok ==
"nan")))
5636 "potential auto-insertion of '%c' near line %d",
5640 "potential auto-insertion of '%c' near line %d of file %s",
5651 "single quote delimited string near line %d",
5655 "single quote delimited string near line %d of file %s",
5666 "Octave language extension used: %s",
5670 "Octave language extension used: %s near line %d offile %s",
5691 int n = t.length ();
5701 lval->tok_val = tok;
5709 return lval->tok_val;
5717 case '=': std::cerr <<
"'='\n";
break;
5718 case ':': std::cerr <<
"':'\n";
break;
5719 case '-': std::cerr <<
"'-'\n";
break;
5720 case '+': std::cerr <<
"'+'\n";
break;
5721 case '*': std::cerr <<
"'*'\n";
break;
5722 case '/': std::cerr <<
"'/'\n";
break;
5723 case ADD_EQ: std::cerr <<
"ADD_EQ\n";
break;
5724 case SUB_EQ: std::cerr <<
"SUB_EQ\n";
break;
5725 case MUL_EQ: std::cerr <<
"MUL_EQ\n";
break;
5726 case DIV_EQ: std::cerr <<
"DIV_EQ\n";
break;
5727 case LEFTDIV_EQ: std::cerr <<
"LEFTDIV_EQ\n";
break;
5728 case POW_EQ: std::cerr <<
"POW_EQ\n";
break;
5729 case EMUL_EQ: std::cerr <<
"EMUL_EQ\n";
break;
5730 case EDIV_EQ: std::cerr <<
"EDIV_EQ\n";
break;
5731 case ELEFTDIV_EQ: std::cerr <<
"ELEFTDIV_EQ\n";
break;
5732 case EPOW_EQ: std::cerr <<
"EPOW_EQ\n";
break;
5733 case AND_EQ: std::cerr <<
"AND_EQ\n";
break;
5734 case OR_EQ: std::cerr <<
"OR_EQ\n";
break;
5735 case LSHIFT_EQ: std::cerr <<
"LSHIFT_EQ\n";
break;
5736 case RSHIFT_EQ: std::cerr <<
"RSHIFT_EQ\n";
break;
5737 case LSHIFT: std::cerr <<
"LSHIFT\n";
break;
5738 case RSHIFT: std::cerr <<
"RSHIFT\n";
break;
5739 case EXPR_AND_AND: std::cerr <<
"EXPR_AND_AND\n";
break;
5740 case EXPR_OR_OR: std::cerr <<
"EXPR_OR_OR\n";
break;
5741 case EXPR_AND: std::cerr <<
"EXPR_AND\n";
break;
5742 case EXPR_OR: std::cerr <<
"EXPR_OR\n";
break;
5743 case EXPR_NOT: std::cerr <<
"EXPR_NOT\n";
break;
5744 case EXPR_LT: std::cerr <<
"EXPR_LT\n";
break;
5745 case EXPR_LE: std::cerr <<
"EXPR_LE\n";
break;
5746 case EXPR_EQ: std::cerr <<
"EXPR_EQ\n";
break;
5747 case EXPR_NE: std::cerr <<
"EXPR_NE\n";
break;
5748 case EXPR_GE: std::cerr <<
"EXPR_GE\n";
break;
5749 case EXPR_GT: std::cerr <<
"EXPR_GT\n";
break;
5750 case LEFTDIV: std::cerr <<
"LEFTDIV\n";
break;
5751 case EMUL: std::cerr <<
"EMUL\n";
break;
5752 case EDIV: std::cerr <<
"EDIV\n";
break;
5753 case ELEFTDIV: std::cerr <<
"ELEFTDIV\n";
break;
5754 case EPLUS: std::cerr <<
"EPLUS\n";
break;
5755 case EMINUS: std::cerr <<
"EMINUS\n";
break;
5756 case HERMITIAN: std::cerr <<
"HERMITIAN\n";
break;
5757 case TRANSPOSE: std::cerr <<
"TRANSPOSE\n";
break;
5758 case PLUS_PLUS: std::cerr <<
"PLUS_PLUS\n";
break;
5759 case MINUS_MINUS: std::cerr <<
"MINUS_MINUS\n";
break;
5760 case POW: std::cerr <<
"POW\n";
break;
5761 case EPOW: std::cerr <<
"EPOW\n";
break;
5767 std::cerr << (tok ==
NUM ?
"NUM" :
"IMAG_NUM")
5768 <<
" [" << tok_val->
number () <<
"]\n";
5775 std::cerr <<
"STRUCT_ELT [" << tok_val->
text () <<
"]\n";
5783 std::cerr <<
"NAME";
5785 std::cerr <<
" [" << sr->
name () <<
"]";
5790 case END: std::cerr <<
"END\n";
break;
5797 std::cerr << (tok ==
DQ_STRING ?
"DQ_STRING" :
"SQ_STRING")
5798 <<
" [" << tok_val->
text () <<
"]\n";
5802 case FOR: std::cerr <<
"FOR\n";
break;
5803 case WHILE: std::cerr <<
"WHILE\n";
break;
5804 case DO: std::cerr <<
"DO\n";
break;
5805 case UNTIL: std::cerr <<
"UNTIL\n";
break;
5806 case IF: std::cerr <<
"IF\n";
break;
5807 case ELSEIF: std::cerr <<
"ELSEIF\n";
break;
5808 case ELSE: std::cerr <<
"ELSE\n";
break;
5809 case SWITCH: std::cerr <<
"SWITCH\n";
break;
5810 case CASE: std::cerr <<
"CASE\n";
break;
5811 case OTHERWISE: std::cerr <<
"OTHERWISE\n";
break;
5812 case BREAK: std::cerr <<
"BREAK\n";
break;
5813 case CONTINUE: std::cerr <<
"CONTINUE\n";
break;
5814 case FUNC_RET: std::cerr <<
"FUNC_RET\n";
break;
5815 case UNWIND: std::cerr <<
"UNWIND\n";
break;
5816 case CLEANUP: std::cerr <<
"CLEANUP\n";
break;
5817 case TRY: std::cerr <<
"TRY\n";
break;
5818 case CATCH: std::cerr <<
"CATCH\n";
break;
5819 case GLOBAL: std::cerr <<
"GLOBAL\n";
break;
5820 case PERSISTENT: std::cerr <<
"PERSISTENT\n";
break;
5821 case FCN_HANDLE: std::cerr <<
"FCN_HANDLE\n";
break;
5822 case END_OF_INPUT: std::cerr <<
"END_OF_INPUT\n\n";
break;
5823 case LEXICAL_ERROR: std::cerr <<
"LEXICAL_ERROR\n\n";
break;
5824 case FCN: std::cerr <<
"FCN\n";
break;
5825 case INPUT_FILE: std::cerr <<
"INPUT_FILE\n";
break;
5827 case METAQUERY: std::cerr <<
"METAQUERY\n";
break;
5828 case GET: std::cerr <<
"GET\n";
break;
5829 case SET: std::cerr <<
"SET\n";
break;
5830 case PROPERTIES: std::cerr <<
"PROPERTIES\n";
break;
5831 case METHODS: std::cerr <<
"METHODS\n";
break;
5832 case EVENTS: std::cerr <<
"EVENTS\n";
break;
5833 case CLASSDEF: std::cerr <<
"CLASSDEF\n";
break;
5834 case '\n': std::cerr <<
"\\n\n";
break;
5835 case '\r': std::cerr <<
"\\r\n";
break;
5836 case '\t': std::cerr <<
"TAB\n";
break;
5839 if (tok < 256 && tok > 31)
5840 std::cerr << static_cast<char> (tok) <<
"\n";
5842 std::cerr <<
"UNKNOWN(" << tok <<
")\n";
5863 std::cerr << std::endl;
5867 std::cerr <<
"P: " << pattern << std::endl;
5868 std::cerr <<
"T: " <<
flex_yytext () << std::endl;
5909 std::cerr <<
"INITIAL" << std::endl;
5913 std::cerr <<
"COMMAND_START" << std::endl;
5917 std::cerr <<
"MATRIX_START" << std::endl;
5921 std::cerr <<
"INPUT_FILE_BEGIN" << std::endl;
5925 std::cerr <<
"BLOCK_COMMENT_START" << std::endl;
5929 std::cerr <<
"LINE_COMMENT_START" << std::endl;
5933 std::cerr <<
"DQ_STRING_START" << std::endl;
5937 std::cerr <<
"SQ_STRING_START" << std::endl;
5941 std::cerr <<
"UNKNOWN START STATE!" << std::endl;
5968 bool unput_comma =
false;
5975 bool space_after = (c ==
' ' || c ==
'\t');
5977 if (! (prev_tok ==
'[' || prev_tok ==
'{'
5979 || ((tok ==
'+' || tok ==
'-') && space_after)))
6069 std::cerr << std::endl;
6107 input_buf.
fill (std::string (1, static_cast<char> (1)),
false);
void octave_set_debug(int debug_flag, yyscan_t yyscanner)
void warning_with_id(const char *id, const char *fmt,...)
void octave__flush_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Discard all buffered characters.
size_t yy_buffer_stack_top
index of top of stack.
void fatal_error(const char *msg)
static void display_character(char c)
bool token_value_is(int tv) const
void octave_set_in(FILE *in_str, yyscan_t yyscanner)
Set the input stream.
void mark_as_variables(const std::list< std::string > &lst)
bool space_follows_previous_token(void) const
bool space_follows_token(void) const
void pop_start_state(void)
static flex_int32_t yy_meta[52]
YY_BUFFER_STATE octave__scan_bytes(char *bytes, yy_size_t len, yyscan_t yyscanner)
Setup the input buffer state to scan the given bytes.
void octave_pop_buffer_state(yyscan_t yyscanner)
Removes and deletes the top of the stack, if present.
int handle_end_of_input(void)
void handle_continuation(void)
symbol_table::scope_id curr_scope(void) const
bool looking_at_parameter_list
static bool lexer_debug_flag
static uint32_t state[624]
symbol_table::symbol_record * sym_rec(void)
void octave_free(void *, yyscan_t yyscanner)
#define YY_CURRENT_BUFFER
static void yy_fatal_error(char msg[], yyscan_t yyscanner)
OCTINTERP_API void print_usage(void)
#define YY_CURRENT_BUFFER_LVALUE
char * octave_get_text(yyscan_t yyscanner)
Get the current token.
void display_start_state(void) const
void gripe_language_extension_operator(const std::string &op)
int block_comment_nesting_level
bool looking_at_space(void)
unsigned char flex_uint8_t
int octave_get_lineno(yyscan_t yyscanner)
Get the current line number.
void gripe_single_quote_string(void)
int handle_identifier(void)
virtual bool input_from_eval_string(void) const
bool may_be_command(void) const
#define YY_STATE_BUF_SIZE
void mark_may_be_command(void)
static char * strsave(const char *s)
static const struct octave_kw wordlist[]
std::stack< int > start_state_stack
std::string text(void) const
void begin_string(int state)
void enable_fq_identifier(void)
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
int yy_bs_lineno
The line count.
#define SET_INTERNAL_VARIABLE(NM)
std::stack< bool > parsed_function_name
int octave_lex_destroy(yyscan_t yyscanner)
bool previous_token_is_keyword(void) const
#define CMD_OR_COMPUTED_ASSIGN_OP(PATTERN, TOK)
static const struct octave_kw * in_word_set(const char *str, unsigned int len)
bool looking_at_initializer_expression
token * current_token(void)
#define BLOCK_COMMENT_START
YY_BUFFER_STATE octave__scan_buffer(char *base, yy_size_t size, yyscan_t yyscanner)
Setup the input buffer state to scan directly from a user-specified character buffer.
double number(void) const
#define EOB_ACT_CONTINUE_SCAN
void lexer_debug(const char *pattern)
static symbol_record & insert(const std::string &name, scope_id scope=xcurrent_scope)
size_t yy_buffer_stack_max
capacity of stack.
#define YY_TRAILING_HEAD_MASK
static flex_int16_t yy_accept[265]
void octave_set_lval(OCTAVE_STYPE *yylval_param, yyscan_t yyscanner)
std::string symbol_name(void) const
bool previous_token_is_binop(void) const
octave_value set_internal_variable(bool &var, const octave_value_list &args, int nargout, const char *nm)
#define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT)
#define HANDLE_STRING_CONTINUATION
static int yy_get_next_buffer(yyscan_t yyscanner)
unsigned short int flex_uint16_t
bool is_keyword(const std::string &s)
void gripe_language_extension(const std::string &msg)
static bool Vdisplay_tokens
bool looking_at_anon_fcn_args
int handle_op(const char *pattern, int tok, bool bos=false)
void octave__delete_buffer(YY_BUFFER_STATE b, yyscan_t yyscanner)
Destroy the buffer.
FILE * octave_get_out(yyscan_t yyscanner)
Get the output stream.
OCTAVE_STYPE * octave_get_lval(yyscan_t yyscanner)
void push_start_state(int state)
void finish_comment(octave_comment_elt::comment_type typ)
symbol_table_context symtab_context
std::list< bool > looking_at_object_index
static flex_int16_t yy_acclist[356]
#define octave_wrap(yyscanner)
void octave_set_extra(octave_base_lexer *user_defined, yyscan_t yyscanner)
Set the user-defined data.
std::string current_input_line
int command_arg_paren_count
#define YY_STATE_EOF(state)
virtual bool input_from_file(void) const
static flex_int16_t yy_nxt[773]
static void octave_ensure_buffer_stack(yyscan_t yyscanner)
bool whitespace_is_significant(void)
YY_BUFFER_STATE octave__scan_string(char *yy_str, yyscan_t yyscanner)
Setup the input buffer state to scan a string.
FILE * octave_get_in(yyscan_t yyscanner)
Get the input stream.
int yy_did_buffer_switch_on_eof
int yy_bs_column
The column count.
bool maybe_unput_comma_before_unary_op(int tok)
int handle_language_extension_unary_op(int tok, bool bos=false)
yy_state_type * yy_state_buf
static flex_int16_t yy_chk[773]
void octave_push_buffer_state(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Pushes the new state onto the stack.
static bool looks_like_copyright(const std::string &s)
void octave_set_lineno(int line_number, yyscan_t yyscanner)
Set the current line number.
int handle_close_bracket(int bracket_type)
static yy_state_type yy_get_previous_state(yyscan_t yyscanner)
bbp_nesting_level nesting_level
static void octave__load_buffer_state(yyscan_t yyscanner)
int octave_get_debug(yyscan_t yyscanner)
int octave_lex_init(yyscan_t *scanner)
int fill_flex_buffer(char *buf, unsigned int max_size)
#define YY_END_OF_BUFFER_CHAR
bool parsing_classdef_get_method
void resize(octave_idx_type n, const std::string &rfv=std::string())
YY_BUFFER_STATE octave__create_buffer(FILE *file, int size, yyscan_t yyscanner)
Allocate and initialize an input buffer state.
static flex_int32_t yy_ec[256]
bool fq_identifier_contains_keyword(const std::string &s)
struct yy_buffer_state * YY_BUFFER_STATE
static void octave__init_buffer(YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner)
static int input(yyscan_t yyscanner)
const char * undo_string_escape(char c)
static bool is_variable(const std::string &name)
bool is_symbol(void) const
#define YY_INPUT(buf, result, max_size)
#define panic_impossible()
unsigned int flex_uint32_t
#define COMMAND_ARG_FINISH
int handle_superclass_identifier(void)
void * octave_realloc(void *, yy_size_t, yyscan_t yyscanner)
bool parsing_class_method
std::string fcn_file_name
bool previous_token_may_be_command(void) const
static flex_int16_t yy_base[296]
void octave__switch_to_buffer(YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
Switch to a different input buffer.
string_vector & sort(bool make_uniq=false)
void maybe_gripe_language_extension_comment(char c)
int previous_token_value(void) const
std::set< std::string > pending_local_variables
octave_idx_type length(void) const
void mark_previous_token_trailing_space(void)
int octave_lex(OCTAVE_STYPE *yylval_param, yyscan_t yyscanner)
The main scanner function which does all the work.
#define CMD_OR_OP(PATTERN, TOK, COMPAT)
size_t size(T const (&)[z])
bool is_keyword(void) const
void octave_restart(FILE *input_file, yyscan_t yyscanner)
Immediately switch to a different input stream.
octave_base_lexer * octave_get_extra(yyscan_t yyscanner)
Get the user-defined data for this scanner.
int is_keyword_token(const std::string &s)
#define LINE_COMMENT_START
bool at_beginning_of_statement
yy_state_type yy_last_accepting_state
bool looking_for_object_index
void gripe_language_extension_continuation(void)
#define YY_RESTORE_YY_MORE_OFFSET
int octave_get_column(yyscan_t yyscanner)
Get the current column number.
#define YY_DO_BEFORE_ACTION
void xunput(char c, char *buf)
int fill_flex_buffer(char *buf, unsigned int max_size)
bool looks_like_command_arg(void)
void warning(const char *fmt,...)
int start_state(void) const
int handle_language_extension_op(const char *pattern, int tok, bool bos=false)
void clear_start_state(void)
#define YY_BUFFER_EOF_PENDING
std::string fcn_file_full_name
int handle_meta_identifier(void)
virtual int promptflag(void) const =0
void mark_trailing_space(void)
void display_token(int tok)
static bool looks_like_hex(const char *s, int len)
int handle_token(const std::string &name, int tok)
bool looking_at_matrix_or_assign_lhs
int count_token_internal(int tok)
octave_base_lexer * yyextra_r
static yy_state_type yy_try_NUL_trans(yy_state_type current_state, yyscan_t yyscanner)
yy_size_t octave_get_leng(yyscan_t yyscanner)
Get the length of the current token.
bool reading_classdef_file
#define YY_FATAL_ERROR(msg)
bool looking_at_decl_list
bool looking_at_return_list
static int yy_init_globals(yyscan_t yyscanner)
yy_state_type * yy_state_ptr
int handle_unary_op(int tok, bool bos=false)
bool maybe_classdef_get_set_method
int looking_at_function_handle
void octave_set_column(int column_no, yyscan_t yyscanner)
Set the current column.
int token_value(void) const
static unsigned int Vtoken_count
bool is_variable(const std::string &name)
int handle_fq_identifier(void)
int octave_lex_init_extra(octave_base_lexer *user_defined, yyscan_t *scanner)
bool looking_at_indirect_ref
YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
char * yy_last_accepting_cpos
bool parsing_classdef_set_method
#define HANDLE_IDENTIFIER(pattern, get_set)
int yy_looking_for_trail_begin
void * octave_alloc(yy_size_t, yyscan_t yyscanner)
static flex_int16_t yy_def[296]
bool previous_token_value_is(int tok_val) const
virtual ~octave_base_lexer(void)
void maybe_mark_previous_token_as_variable(void)
virtual void decrement_promptflag(void)=0
comment_buffer comment_buf
static void yyunput(int c, char *buf_ptr, yyscan_t yyscanner)
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
int handle_op_internal(int tok, bool bos, bool compat)
void octave_set_out(FILE *out_str, yyscan_t yyscanner)
#define EOB_ACT_LAST_MATCH
void maybe_warn_separator_insert(char sep)
bool inside_any_object_index(void)
#define EOB_ACT_END_OF_FILE
const std::string & name(void) const