aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/genksyms/lex.c_shipped
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/genksyms/lex.c_shipped')
-rw-r--r--scripts/genksyms/lex.c_shipped427
1 files changed, 150 insertions, 277 deletions
diff --git a/scripts/genksyms/lex.c_shipped b/scripts/genksyms/lex.c_shipped
index 2ac23bcca5b5..af4939041e4b 100644
--- a/scripts/genksyms/lex.c_shipped
+++ b/scripts/genksyms/lex.c_shipped
@@ -79,6 +79,7 @@ typedef int flex_int32_t;
79typedef unsigned char flex_uint8_t; 79typedef unsigned char flex_uint8_t;
80typedef unsigned short int flex_uint16_t; 80typedef unsigned short int flex_uint16_t;
81typedef unsigned int flex_uint32_t; 81typedef unsigned int flex_uint32_t;
82#endif /* ! C99 */
82 83
83/* Limits of integral types. */ 84/* Limits of integral types. */
84#ifndef INT8_MIN 85#ifndef INT8_MIN
@@ -109,8 +110,6 @@ typedef unsigned int flex_uint32_t;
109#define UINT32_MAX (4294967295U) 110#define UINT32_MAX (4294967295U)
110#endif 111#endif
111 112
112#endif /* ! C99 */
113
114#endif /* ! FLEXINT_H */ 113#endif /* ! FLEXINT_H */
115 114
116/* %endif */ 115/* %endif */
@@ -456,16 +455,16 @@ struct yy_trans_info
456 flex_int32_t yy_verify; 455 flex_int32_t yy_verify;
457 flex_int32_t yy_nxt; 456 flex_int32_t yy_nxt;
458 }; 457 };
459static yyconst flex_int16_t yy_accept[76] = 458static yyconst flex_int16_t yy_accept[73] =
460 { 0, 459 { 0,
461 0, 0, 0, 0, 14, 12, 4, 3, 12, 7, 460 0, 0, 14, 12, 4, 3, 12, 7, 12, 12,
462 12, 12, 7, 12, 12, 12, 12, 12, 9, 9, 461 12, 12, 12, 9, 9, 12, 12, 7, 12, 12,
463 12, 12, 12, 4, 0, 5, 0, 7, 0, 6, 462 4, 0, 5, 0, 7, 8, 0, 6, 0, 0,
464 0, 0, 0, 0, 0, 0, 2, 8, 10, 10, 463 10, 10, 9, 0, 0, 9, 9, 0, 9, 0,
465 9, 0, 0, 9, 9, 0, 9, 0, 0, 11, 464 0, 0, 0, 2, 0, 0, 11, 0, 10, 0,
466 0, 0, 0, 10, 0, 10, 9, 9, 0, 0, 465 10, 9, 9, 0, 0, 0, 10, 10, 0, 0,
467 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 466 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
468 0, 0, 0, 1, 0 467 1, 0
469 } ; 468 } ;
470 469
471static yyconst flex_int32_t yy_ec[256] = 470static yyconst flex_int32_t yy_ec[256] =
@@ -507,108 +506,104 @@ static yyconst flex_int32_t yy_meta[29] =
507 8, 7, 3, 3, 3, 1, 3, 1 506 8, 7, 3, 3, 3, 1, 3, 1
508 } ; 507 } ;
509 508
510static yyconst flex_int16_t yy_base[88] = 509static yyconst flex_int16_t yy_base[85] =
511 { 0, 510 { 0,
512 0, 147, 21, 140, 145, 284, 39, 284, 26, 0, 511 0, 145, 150, 266, 27, 266, 25, 0, 131, 23,
513 32, 126, 40, 44, 115, 35, 36, 46, 50, 53, 512 23, 16, 23, 39, 31, 25, 39, 60, 22, 65,
514 39, 61, 54, 79, 65, 284, 0, 0, 66, 284, 513 57, 43, 266, 0, 0, 266, 61, 266, 0, 128,
515 0, 119, 79, 75, 123, 104, 284, 284, 107, 0, 514 74, 0, 113, 59, 62, 113, 52, 0, 0, 72,
516 79, 73, 76, 76, 66, 0, 0, 85, 86, 284, 515 66, 110, 100, 266, 73, 74, 266, 70, 266, 90,
517 133, 83, 91, 284, 99, 147, 284, 114, 122, 70, 516 103, 266, 84, 129, 108, 113, 143, 266, 107, 66,
518 107, 141, 172, 151, 135, 181, 284, 137, 114, 157, 517 118, 137, 168, 120, 80, 91, 145, 143, 83, 41,
519 149, 48, 45, 284, 284, 208, 214, 222, 230, 238, 518 266, 266, 190, 196, 204, 212, 220, 228, 232, 237,
520 246, 250, 255, 256, 261, 267, 275 519 238, 243, 249, 257
521 } ; 520 } ;
522 521
523static yyconst flex_int16_t yy_def[88] = 522static yyconst flex_int16_t yy_def[85] =
524 { 0, 523 { 0,
525 75, 1, 1, 3, 75, 75, 75, 75, 76, 77, 524 72, 1, 72, 72, 72, 72, 73, 74, 72, 72,
526 78, 75, 77, 79, 75, 75, 75, 75, 75, 19, 525 75, 72, 72, 72, 14, 72, 72, 74, 72, 76,
527 75, 75, 75, 75, 76, 75, 80, 77, 78, 75, 526 72, 73, 72, 77, 74, 72, 75, 72, 78, 72,
528 81, 75, 76, 78, 79, 79, 75, 75, 75, 39, 527 72, 31, 14, 79, 80, 72, 72, 81, 15, 73,
529 19, 82, 83, 75, 75, 84, 20, 76, 78, 75, 528 75, 76, 76, 72, 73, 75, 72, 82, 72, 72,
530 79, 51, 85, 75, 75, 75, 75, 84, 79, 51, 529 72, 72, 81, 76, 54, 72, 72, 72, 76, 54,
531 79, 79, 79, 51, 75, 75, 75, 86, 79, 63, 530 76, 76, 76, 54, 83, 76, 63, 83, 84, 84,
532 86, 87, 87, 75, 0, 75, 75, 75, 75, 75, 531 72, 0, 72, 72, 72, 72, 72, 72, 72, 72,
533 75, 75, 75, 75, 75, 75, 75 532 72, 72, 72, 72
534 } ; 533 } ;
535 534
536static yyconst flex_int16_t yy_nxt[313] = 535static yyconst flex_int16_t yy_nxt[295] =
537 { 0, 536 { 0,
538 6, 7, 8, 7, 9, 6, 10, 6, 6, 11, 537 4, 5, 6, 5, 7, 4, 8, 9, 10, 11,
539 6, 6, 12, 6, 6, 6, 6, 6, 6, 10, 538 9, 12, 13, 14, 15, 15, 16, 9, 17, 8,
540 10, 10, 13, 10, 10, 6, 10, 6, 15, 16, 539 8, 8, 18, 8, 8, 4, 8, 19, 21, 23,
541 26, 15, 17, 18, 19, 20, 20, 21, 15, 22, 540 21, 26, 28, 26, 26, 30, 31, 31, 31, 26,
542 24, 30, 24, 38, 33, 36, 37, 74, 23, 34, 541 26, 26, 26, 71, 39, 39, 39, 23, 29, 26,
543 74, 27, 38, 38, 38, 38, 38, 31, 32, 39, 542 24, 32, 33, 33, 34, 72, 26, 26, 21, 35,
544 39, 39, 40, 41, 41, 42, 47, 47, 47, 26, 543 21, 36, 37, 38, 40, 36, 43, 44, 24, 41,
545 43, 38, 44, 45, 46, 30, 44, 75, 38, 38, 544 28, 32, 50, 50, 52, 28, 23, 23, 52, 35,
546 24, 38, 24, 26, 30, 40, 55, 55, 57, 26, 545 56, 56, 44, 28, 42, 71, 29, 31, 31, 31,
547 27, 31, 57, 43, 35, 30, 64, 64, 64, 57, 546 42, 29, 59, 44, 48, 49, 49, 24, 24, 29,
548 547
549 31, 65, 65, 75, 27, 36, 37, 35, 59, 37, 548 49, 43, 44, 51, 51, 51, 36, 37, 59, 44,
550 27, 31, 56, 56, 56, 59, 37, 51, 52, 52, 549 36, 65, 44, 54, 55, 55, 51, 51, 51, 59,
551 39, 39, 39, 59, 37, 37, 68, 53, 54, 54, 550 44, 64, 64, 64, 58, 58, 57, 57, 57, 58,
552 69, 50, 38, 54, 59, 37, 44, 45, 32, 37, 551 59, 44, 42, 64, 64, 64, 52, 72, 59, 44,
553 44, 35, 59, 37, 75, 14, 60, 60, 66, 66, 552 47, 66, 60, 60, 42, 44, 59, 69, 26, 72,
554 66, 37, 14, 72, 75, 61, 62, 63, 59, 61, 553 20, 61, 62, 63, 72, 61, 57, 57, 57, 66,
555 56, 56, 56, 69, 64, 64, 64, 69, 67, 67, 554 72, 72, 72, 66, 49, 49, 72, 61, 62, 49,
556 75, 75, 75, 67, 37, 35, 75, 75, 75, 61, 555 44, 61, 72, 72, 72, 72, 72, 72, 72, 72,
557 62, 75, 75, 61, 75, 70, 70, 70, 75, 75, 556 72, 67, 67, 67, 72, 72, 72, 67, 67, 67,
558 75, 70, 70, 70, 66, 66, 66, 75, 75, 75, 557 22, 22, 22, 22, 22, 22, 22, 22, 25, 72,
559 558
560 75, 75, 54, 54, 75, 75, 75, 54, 25, 25, 559 72, 25, 25, 25, 27, 27, 27, 27, 27, 27,
561 25, 25, 25, 25, 25, 25, 28, 75, 75, 28, 560 27, 27, 42, 42, 42, 42, 42, 42, 42, 42,
562 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 561 45, 72, 45, 45, 45, 45, 45, 45, 46, 72,
563 35, 35, 35, 35, 35, 35, 35, 35, 48, 75, 562 46, 46, 46, 46, 46, 46, 34, 34, 72, 34,
564 48, 48, 48, 48, 48, 48, 49, 75, 49, 49, 563 51, 72, 51, 53, 53, 53, 57, 72, 57, 68,
565 49, 49, 49, 49, 42, 42, 75, 42, 56, 75, 564 68, 68, 68, 68, 68, 68, 68, 70, 70, 70,
566 56, 58, 58, 58, 66, 75, 66, 71, 71, 71, 565 70, 70, 70, 70, 70, 3, 72, 72, 72, 72,
567 71, 71, 71, 71, 71, 73, 73, 73, 73, 73, 566 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
568 73, 73, 73, 5, 75, 75, 75, 75, 75, 75, 567 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
569 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 568 72, 72, 72, 72
570 569
571 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
572 75, 75
573 } ; 570 } ;
574 571
575static yyconst flex_int16_t yy_chk[313] = 572static yyconst flex_int16_t yy_chk[295] =
576 { 0, 573 { 0,
577 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 574 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
578 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 575 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
579 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 576 1, 1, 1, 1, 1, 1, 1, 1, 5, 7,
580 9, 3, 3, 3, 3, 3, 3, 3, 3, 3, 577 5, 10, 11, 12, 12, 13, 13, 13, 13, 19,
581 7, 11, 7, 16, 13, 14, 14, 73, 3, 13, 578 10, 16, 16, 70, 15, 15, 15, 22, 11, 19,
582 72, 9, 16, 17, 17, 21, 21, 11, 18, 18, 579 7, 14, 14, 14, 14, 15, 17, 17, 21, 14,
583 18, 18, 19, 19, 19, 19, 20, 20, 20, 25, 580 21, 14, 14, 14, 18, 14, 20, 20, 22, 18,
584 19, 23, 19, 19, 19, 29, 19, 20, 22, 22, 581 27, 34, 35, 35, 37, 41, 40, 45, 37, 34,
585 24, 23, 24, 33, 34, 42, 43, 43, 45, 48, 582 48, 48, 65, 46, 65, 69, 27, 31, 31, 31,
586 25, 29, 45, 42, 60, 49, 52, 52, 52, 44, 583 60, 41, 66, 66, 31, 31, 31, 40, 45, 46,
587 584
588 34, 53, 53, 41, 33, 36, 36, 52, 61, 61, 585 31, 43, 43, 50, 50, 50, 53, 53, 59, 59,
589 48, 49, 55, 55, 55, 69, 69, 36, 36, 36, 586 53, 59, 42, 43, 43, 43, 51, 51, 51, 61,
590 39, 39, 39, 59, 59, 35, 59, 39, 39, 39, 587 61, 55, 55, 55, 51, 51, 56, 56, 56, 51,
591 61, 32, 15, 39, 51, 51, 58, 58, 12, 68, 588 54, 54, 55, 64, 64, 64, 36, 33, 62, 62,
592 58, 68, 62, 62, 5, 4, 51, 51, 65, 65, 589 30, 61, 54, 54, 64, 68, 67, 68, 9, 3,
593 65, 71, 2, 71, 0, 51, 51, 51, 70, 51, 590 2, 54, 54, 54, 0, 54, 57, 57, 57, 62,
594 56, 56, 56, 62, 64, 64, 64, 62, 56, 56, 591 0, 0, 0, 62, 57, 57, 0, 67, 67, 57,
595 0, 0, 0, 56, 63, 64, 0, 0, 0, 70, 592 63, 67, 0, 0, 0, 0, 0, 0, 0, 0,
596 70, 0, 0, 70, 0, 63, 63, 63, 0, 0, 593 0, 63, 63, 63, 0, 0, 0, 63, 63, 63,
597 0, 63, 63, 63, 66, 66, 66, 0, 0, 0, 594 73, 73, 73, 73, 73, 73, 73, 73, 74, 0,
598 595
599 0, 0, 66, 66, 0, 0, 0, 66, 76, 76, 596 0, 74, 74, 74, 75, 75, 75, 75, 75, 75,
600 76, 76, 76, 76, 76, 76, 77, 0, 0, 77, 597 75, 75, 76, 76, 76, 76, 76, 76, 76, 76,
601 77, 77, 78, 78, 78, 78, 78, 78, 78, 78, 598 77, 0, 77, 77, 77, 77, 77, 77, 78, 0,
602 79, 79, 79, 79, 79, 79, 79, 79, 80, 0, 599 78, 78, 78, 78, 78, 78, 79, 79, 0, 79,
603 80, 80, 80, 80, 80, 80, 81, 0, 81, 81, 600 80, 0, 80, 81, 81, 81, 82, 0, 82, 83,
604 81, 81, 81, 81, 82, 82, 0, 82, 83, 0, 601 83, 83, 83, 83, 83, 83, 83, 84, 84, 84,
605 83, 84, 84, 84, 85, 0, 85, 86, 86, 86, 602 84, 84, 84, 84, 84, 72, 72, 72, 72, 72,
606 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 603 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
607 87, 87, 87, 75, 75, 75, 75, 75, 75, 75, 604 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
608 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 605 72, 72, 72, 72
609 606
610 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
611 75, 75
612 } ; 607 } ;
613 608
614static yy_state_type yy_last_accepting_state; 609static yy_state_type yy_last_accepting_state;
@@ -619,8 +614,8 @@ int yy_flex_debug = 1;
619 614
620static yyconst flex_int16_t yy_rule_linenum[13] = 615static yyconst flex_int16_t yy_rule_linenum[13] =
621 { 0, 616 { 0,
622 71, 72, 73, 76, 79, 80, 81, 87, 88, 89, 617 67, 68, 69, 72, 75, 76, 77, 83, 84, 85,
623 91, 94 618 87, 90
624 } ; 619 } ;
625 620
626/* The intent behind this definition is that it'll catch 621/* The intent behind this definition is that it'll catch
@@ -667,15 +662,11 @@ char *yytext;
667 and then we categorize those basic tokens in the second stage. */ 662 and then we categorize those basic tokens in the second stage. */
668#define YY_DECL static int yylex1(void) 663#define YY_DECL static int yylex1(void)
669 664
670/* Version 2 checksumming does proper tokenization; version 1 wasn't
671 quite so pedantic. */
672
673/* We don't do multiple input files. */ 665/* We don't do multiple input files. */
674#define YY_NO_INPUT 1 666#define YY_NO_INPUT 1
675#line 676 "scripts/genksyms/lex.c" 667#line 668 "scripts/genksyms/lex.c"
676 668
677#define INITIAL 0 669#define INITIAL 0
678#define V2_TOKENS 1
679 670
680#ifndef YY_NO_UNISTD_H 671#ifndef YY_NO_UNISTD_H
681/* Special case for "unistd.h", since it is non-ANSI. We include it way 672/* Special case for "unistd.h", since it is non-ANSI. We include it way
@@ -808,7 +799,7 @@ static int input (void );
808 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 799 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
809 { \ 800 { \
810 int c = '*'; \ 801 int c = '*'; \
811 size_t n; \ 802 int n; \
812 for ( n = 0; n < max_size && \ 803 for ( n = 0; n < max_size && \
813 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 804 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
814 buf[n] = (char) c; \ 805 buf[n] = (char) c; \
@@ -918,12 +909,12 @@ YY_DECL
918 register int yy_act; 909 register int yy_act;
919 910
920/* %% [7.0] user's declarations go here */ 911/* %% [7.0] user's declarations go here */
921#line 67 "scripts/genksyms/lex.l" 912#line 63 "scripts/genksyms/lex.l"
922 913
923 914
924 915
925 /* Keep track of our location in the original source files. */ 916 /* Keep track of our location in the original source files. */
926#line 927 "scripts/genksyms/lex.c" 917#line 918 "scripts/genksyms/lex.c"
927 918
928 if ( !(yy_init) ) 919 if ( !(yy_init) )
929 { 920 {
@@ -987,13 +978,13 @@ yy_match:
987 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 978 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
988 { 979 {
989 yy_current_state = (int) yy_def[yy_current_state]; 980 yy_current_state = (int) yy_def[yy_current_state];
990 if ( yy_current_state >= 76 ) 981 if ( yy_current_state >= 73 )
991 yy_c = yy_meta[(unsigned int) yy_c]; 982 yy_c = yy_meta[(unsigned int) yy_c];
992 } 983 }
993 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 984 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
994 ++yy_cp; 985 ++yy_cp;
995 } 986 }
996 while ( yy_base[yy_current_state] != 284 ); 987 while ( yy_base[yy_current_state] != 266 );
997 988
998yy_find_action: 989yy_find_action:
999/* %% [10.0] code to find the action number goes here */ 990/* %% [10.0] code to find the action number goes here */
@@ -1041,42 +1032,42 @@ do_action: /* This label is used only to access EOF actions. */
1041case 1: 1032case 1:
1042/* rule 1 can match eol */ 1033/* rule 1 can match eol */
1043YY_RULE_SETUP 1034YY_RULE_SETUP
1044#line 71 "scripts/genksyms/lex.l" 1035#line 67 "scripts/genksyms/lex.l"
1045return FILENAME; 1036return FILENAME;
1046 YY_BREAK 1037 YY_BREAK
1047case 2: 1038case 2:
1048/* rule 2 can match eol */ 1039/* rule 2 can match eol */
1049YY_RULE_SETUP 1040YY_RULE_SETUP
1050#line 72 "scripts/genksyms/lex.l" 1041#line 68 "scripts/genksyms/lex.l"
1051cur_line++; 1042cur_line++;
1052 YY_BREAK 1043 YY_BREAK
1053case 3: 1044case 3:
1054/* rule 3 can match eol */ 1045/* rule 3 can match eol */
1055YY_RULE_SETUP 1046YY_RULE_SETUP
1056#line 73 "scripts/genksyms/lex.l" 1047#line 69 "scripts/genksyms/lex.l"
1057cur_line++; 1048cur_line++;
1058 YY_BREAK 1049 YY_BREAK
1059/* Ignore all other whitespace. */ 1050/* Ignore all other whitespace. */
1060case 4: 1051case 4:
1061YY_RULE_SETUP 1052YY_RULE_SETUP
1062#line 76 "scripts/genksyms/lex.l" 1053#line 72 "scripts/genksyms/lex.l"
1063; 1054;
1064 YY_BREAK 1055 YY_BREAK
1065case 5: 1056case 5:
1066/* rule 5 can match eol */ 1057/* rule 5 can match eol */
1067YY_RULE_SETUP 1058YY_RULE_SETUP
1068#line 79 "scripts/genksyms/lex.l" 1059#line 75 "scripts/genksyms/lex.l"
1069return STRING; 1060return STRING;
1070 YY_BREAK 1061 YY_BREAK
1071case 6: 1062case 6:
1072/* rule 6 can match eol */ 1063/* rule 6 can match eol */
1073YY_RULE_SETUP 1064YY_RULE_SETUP
1074#line 80 "scripts/genksyms/lex.l" 1065#line 76 "scripts/genksyms/lex.l"
1075return CHAR; 1066return CHAR;
1076 YY_BREAK 1067 YY_BREAK
1077case 7: 1068case 7:
1078YY_RULE_SETUP 1069YY_RULE_SETUP
1079#line 81 "scripts/genksyms/lex.l" 1070#line 77 "scripts/genksyms/lex.l"
1080return IDENT; 1071return IDENT;
1081 YY_BREAK 1072 YY_BREAK
1082/* The Pedant requires that the other C multi-character tokens be 1073/* The Pedant requires that the other C multi-character tokens be
@@ -1085,38 +1076,37 @@ return IDENT;
1085 around them properly. */ 1076 around them properly. */
1086case 8: 1077case 8:
1087YY_RULE_SETUP 1078YY_RULE_SETUP
1088#line 87 "scripts/genksyms/lex.l" 1079#line 83 "scripts/genksyms/lex.l"
1089return OTHER; 1080return OTHER;
1090 YY_BREAK 1081 YY_BREAK
1091case 9: 1082case 9:
1092YY_RULE_SETUP 1083YY_RULE_SETUP
1093#line 88 "scripts/genksyms/lex.l" 1084#line 84 "scripts/genksyms/lex.l"
1094return INT; 1085return INT;
1095 YY_BREAK 1086 YY_BREAK
1096case 10: 1087case 10:
1097YY_RULE_SETUP 1088YY_RULE_SETUP
1098#line 89 "scripts/genksyms/lex.l" 1089#line 85 "scripts/genksyms/lex.l"
1099return REAL; 1090return REAL;
1100 YY_BREAK 1091 YY_BREAK
1101case 11: 1092case 11:
1102YY_RULE_SETUP 1093YY_RULE_SETUP
1103#line 91 "scripts/genksyms/lex.l" 1094#line 87 "scripts/genksyms/lex.l"
1104return DOTS; 1095return DOTS;
1105 YY_BREAK 1096 YY_BREAK
1106/* All other tokens are single characters. */ 1097/* All other tokens are single characters. */
1107case 12: 1098case 12:
1108YY_RULE_SETUP 1099YY_RULE_SETUP
1109#line 94 "scripts/genksyms/lex.l" 1100#line 90 "scripts/genksyms/lex.l"
1110return yytext[0]; 1101return yytext[0];
1111 YY_BREAK 1102 YY_BREAK
1112case 13: 1103case 13:
1113YY_RULE_SETUP 1104YY_RULE_SETUP
1114#line 97 "scripts/genksyms/lex.l" 1105#line 93 "scripts/genksyms/lex.l"
1115ECHO; 1106ECHO;
1116 YY_BREAK 1107 YY_BREAK
1117#line 1118 "scripts/genksyms/lex.c" 1108#line 1109 "scripts/genksyms/lex.c"
1118case YY_STATE_EOF(INITIAL): 1109case YY_STATE_EOF(INITIAL):
1119case YY_STATE_EOF(V2_TOKENS):
1120 yyterminate(); 1110 yyterminate();
1121 1111
1122 case YY_END_OF_BUFFER: 1112 case YY_END_OF_BUFFER:
@@ -1429,7 +1419,7 @@ static int yy_get_next_buffer (void)
1429 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1419 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1430 { 1420 {
1431 yy_current_state = (int) yy_def[yy_current_state]; 1421 yy_current_state = (int) yy_def[yy_current_state];
1432 if ( yy_current_state >= 76 ) 1422 if ( yy_current_state >= 73 )
1433 yy_c = yy_meta[(unsigned int) yy_c]; 1423 yy_c = yy_meta[(unsigned int) yy_c];
1434 } 1424 }
1435 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1425 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1462,11 +1452,11 @@ static int yy_get_next_buffer (void)
1462 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1452 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1463 { 1453 {
1464 yy_current_state = (int) yy_def[yy_current_state]; 1454 yy_current_state = (int) yy_def[yy_current_state];
1465 if ( yy_current_state >= 76 ) 1455 if ( yy_current_state >= 73 )
1466 yy_c = yy_meta[(unsigned int) yy_c]; 1456 yy_c = yy_meta[(unsigned int) yy_c];
1467 } 1457 }
1468 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1458 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1469 yy_is_jam = (yy_current_state == 75); 1459 yy_is_jam = (yy_current_state == 72);
1470 1460
1471 return yy_is_jam ? 0 : yy_current_state; 1461 return yy_is_jam ? 0 : yy_current_state;
1472} 1462}
@@ -2252,7 +2242,7 @@ void yyfree (void * ptr )
2252 2242
2253/* %ok-for-header */ 2243/* %ok-for-header */
2254 2244
2255#line 97 "scripts/genksyms/lex.l" 2245#line 93 "scripts/genksyms/lex.l"
2256 2246
2257 2247
2258 2248
@@ -2263,12 +2253,23 @@ void yyfree (void * ptr )
2263 2253
2264/* Macros to append to our phrase collection list. */ 2254/* Macros to append to our phrase collection list. */
2265 2255
2256/*
2257 * We mark any token, that that equals to a known enumerator, as
2258 * SYM_ENUM_CONST. The parser will change this for struct and union tags later,
2259 * the only problem is struct and union members:
2260 * enum e { a, b }; struct s { int a, b; }
2261 * but in this case, the only effect will be, that the ABI checksums become
2262 * more volatile, which is acceptable. Also, such collisions are quite rare,
2263 * so far it was only observed in include/linux/telephony.h.
2264 */
2266#define _APP(T,L) do { \ 2265#define _APP(T,L) do { \
2267 cur_node = next_node; \ 2266 cur_node = next_node; \
2268 next_node = xmalloc(sizeof(*next_node)); \ 2267 next_node = xmalloc(sizeof(*next_node)); \
2269 next_node->next = cur_node; \ 2268 next_node->next = cur_node; \
2270 cur_node->string = memcpy(xmalloc(L+1), T, L+1); \ 2269 cur_node->string = memcpy(xmalloc(L+1), T, L+1); \
2271 cur_node->tag = SYM_NORMAL; \ 2270 cur_node->tag = \
2271 find_symbol(cur_node->string, SYM_ENUM_CONST, 1)?\
2272 SYM_ENUM_CONST : SYM_NORMAL ; \
2272 } while (0) 2273 } while (0)
2273 2274
2274#define APP _APP(yytext, yyleng) 2275#define APP _APP(yytext, yyleng)
@@ -2294,7 +2295,6 @@ yylex(void)
2294 2295
2295 if (lexstate == ST_NOTSTARTED) 2296 if (lexstate == ST_NOTSTARTED)
2296 { 2297 {
2297 BEGIN(V2_TOKENS);
2298 next_node = xmalloc(sizeof(*next_node)); 2298 next_node = xmalloc(sizeof(*next_node));
2299 next_node->next = NULL; 2299 next_node->next = NULL;
2300 lexstate = ST_NORMAL; 2300 lexstate = ST_NORMAL;
@@ -2347,8 +2347,8 @@ repeat:
2347 2347
2348 case STRUCT_KEYW: 2348 case STRUCT_KEYW:
2349 case UNION_KEYW: 2349 case UNION_KEYW:
2350 dont_want_brace_phrase = 3;
2351 case ENUM_KEYW: 2350 case ENUM_KEYW:
2351 dont_want_brace_phrase = 3;
2352 suppress_type_lookup = 2; 2352 suppress_type_lookup = 2;
2353 goto fini; 2353 goto fini;
2354 2354
@@ -2358,8 +2358,7 @@ repeat:
2358 } 2358 }
2359 if (!suppress_type_lookup) 2359 if (!suppress_type_lookup)
2360 { 2360 {
2361 struct symbol *sym = find_symbol(yytext, SYM_TYPEDEF); 2361 if (find_symbol(yytext, SYM_TYPEDEF, 1))
2362 if (sym && sym->type == SYM_TYPEDEF)
2363 token = TYPE; 2362 token = TYPE;
2364 } 2363 }
2365 } 2364 }
@@ -2478,7 +2477,20 @@ repeat:
2478 ++count; 2477 ++count;
2479 APP; 2478 APP;
2480 goto repeat; 2479 goto repeat;
2481 case ')': case ']': case '}': 2480 case '}':
2481 /* is this the last line of an enum declaration? */
2482 if (count == 0)
2483 {
2484 /* Put back the token we just read so's we can find it again
2485 after registering the expression. */
2486 unput(token);
2487
2488 lexstate = ST_NORMAL;
2489 token = EXPRESSION_PHRASE;
2490 break;
2491 }
2492 /* FALLTHRU */
2493 case ')': case ']':
2482 --count; 2494 --count;
2483 APP; 2495 APP;
2484 goto repeat; 2496 goto repeat;
@@ -2567,143 +2579,4 @@ fini:
2567 2579
2568 return token; 2580 return token;
2569} 2581}
2570/* A Bison parser, made by GNU Bison 2.3. */
2571
2572/* Skeleton interface for Bison's Yacc-like parsers in C
2573
2574 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
2575 Free Software Foundation, Inc.
2576
2577 This program is free software; you can redistribute it and/or modify
2578 it under the terms of the GNU General Public License as published by
2579 the Free Software Foundation; either version 2, or (at your option)
2580 any later version.
2581
2582 This program is distributed in the hope that it will be useful,
2583 but WITHOUT ANY WARRANTY; without even the implied warranty of
2584 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2585 GNU General Public License for more details.
2586
2587 You should have received a copy of the GNU General Public License
2588 along with this program; if not, write to the Free Software
2589 Foundation, Inc., 51 Franklin Street, Fifth Floor,
2590 Boston, MA 02110-1301, USA. */
2591
2592/* As a special exception, you may create a larger work that contains
2593 part or all of the Bison parser skeleton and distribute that work
2594 under terms of your choice, so long as that work isn't itself a
2595 parser generator using the skeleton or a modified version thereof
2596 as a parser skeleton. Alternatively, if you modify or redistribute
2597 the parser skeleton itself, you may (at your option) remove this
2598 special exception, which will cause the skeleton and the resulting
2599 Bison output files to be licensed under the GNU General Public
2600 License without this special exception.
2601
2602 This special exception was added by the Free Software Foundation in
2603 version 2.2 of Bison. */
2604
2605/* Tokens. */
2606#ifndef YYTOKENTYPE
2607# define YYTOKENTYPE
2608 /* Put the tokens into the symbol table, so that GDB and other debuggers
2609 know about them. */
2610 enum yytokentype {
2611 ASM_KEYW = 258,
2612 ATTRIBUTE_KEYW = 259,
2613 AUTO_KEYW = 260,
2614 BOOL_KEYW = 261,
2615 CHAR_KEYW = 262,
2616 CONST_KEYW = 263,
2617 DOUBLE_KEYW = 264,
2618 ENUM_KEYW = 265,
2619 EXTERN_KEYW = 266,
2620 EXTENSION_KEYW = 267,
2621 FLOAT_KEYW = 268,
2622 INLINE_KEYW = 269,
2623 INT_KEYW = 270,
2624 LONG_KEYW = 271,
2625 REGISTER_KEYW = 272,
2626 RESTRICT_KEYW = 273,
2627 SHORT_KEYW = 274,
2628 SIGNED_KEYW = 275,
2629 STATIC_KEYW = 276,
2630 STRUCT_KEYW = 277,
2631 TYPEDEF_KEYW = 278,
2632 UNION_KEYW = 279,
2633 UNSIGNED_KEYW = 280,
2634 VOID_KEYW = 281,
2635 VOLATILE_KEYW = 282,
2636 TYPEOF_KEYW = 283,
2637 EXPORT_SYMBOL_KEYW = 284,
2638 ASM_PHRASE = 285,
2639 ATTRIBUTE_PHRASE = 286,
2640 BRACE_PHRASE = 287,
2641 BRACKET_PHRASE = 288,
2642 EXPRESSION_PHRASE = 289,
2643 CHAR = 290,
2644 DOTS = 291,
2645 IDENT = 292,
2646 INT = 293,
2647 REAL = 294,
2648 STRING = 295,
2649 TYPE = 296,
2650 OTHER = 297,
2651 FILENAME = 298
2652 };
2653#endif
2654/* Tokens. */
2655#define ASM_KEYW 258
2656#define ATTRIBUTE_KEYW 259
2657#define AUTO_KEYW 260
2658#define BOOL_KEYW 261
2659#define CHAR_KEYW 262
2660#define CONST_KEYW 263
2661#define DOUBLE_KEYW 264
2662#define ENUM_KEYW 265
2663#define EXTERN_KEYW 266
2664#define EXTENSION_KEYW 267
2665#define FLOAT_KEYW 268
2666#define INLINE_KEYW 269
2667#define INT_KEYW 270
2668#define LONG_KEYW 271
2669#define REGISTER_KEYW 272
2670#define RESTRICT_KEYW 273
2671#define SHORT_KEYW 274
2672#define SIGNED_KEYW 275
2673#define STATIC_KEYW 276
2674#define STRUCT_KEYW 277
2675#define TYPEDEF_KEYW 278
2676#define UNION_KEYW 279
2677#define UNSIGNED_KEYW 280
2678#define VOID_KEYW 281
2679#define VOLATILE_KEYW 282
2680#define TYPEOF_KEYW 283
2681#define EXPORT_SYMBOL_KEYW 284
2682#define ASM_PHRASE 285
2683#define ATTRIBUTE_PHRASE 286
2684#define BRACE_PHRASE 287
2685#define BRACKET_PHRASE 288
2686#define EXPRESSION_PHRASE 289
2687#define CHAR 290
2688#define DOTS 291
2689#define IDENT 292
2690#define INT 293
2691#define REAL 294
2692#define STRING 295
2693#define TYPE 296
2694#define OTHER 297
2695#define FILENAME 298
2696
2697
2698
2699
2700#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
2701typedef int YYSTYPE;
2702# define yystype YYSTYPE /* obsolescent; will be withdrawn */
2703# define YYSTYPE_IS_DECLARED 1
2704# define YYSTYPE_IS_TRIVIAL 1
2705#endif
2706
2707extern YYSTYPE yylval;
2708
2709 2582