aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-01-20 10:19:58 -0500
committerMichal Marek <mmarek@suse.cz>2011-03-17 10:13:55 -0400
commit95f1d639ade8fdf9572ac8a926f62b29dd66eaba (patch)
tree9b8864def448176b950e1f747d33b5e7439ef429
parent9c281f13b68da49764cbc8d7d610c2f229a0f9a0 (diff)
genksyms: Simplify lexer
The V2_TOKENS state is active all the time. Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r--scripts/genksyms/lex.c_shipped250
-rw-r--r--scripts/genksyms/lex.l11
2 files changed, 123 insertions, 138 deletions
diff --git a/scripts/genksyms/lex.c_shipped b/scripts/genksyms/lex.c_shipped
index b54044ac1fa..d0a0423361f 100644
--- a/scripts/genksyms/lex.c_shipped
+++ b/scripts/genksyms/lex.c_shipped
@@ -455,16 +455,16 @@ struct yy_trans_info
455 flex_int32_t yy_verify; 455 flex_int32_t yy_verify;
456 flex_int32_t yy_nxt; 456 flex_int32_t yy_nxt;
457 }; 457 };
458static yyconst flex_int16_t yy_accept[76] = 458static yyconst flex_int16_t yy_accept[73] =
459 { 0, 459 { 0,
460 0, 0, 0, 0, 14, 12, 4, 3, 12, 7, 460 0, 0, 14, 12, 4, 3, 12, 7, 12, 12,
461 12, 12, 7, 12, 12, 12, 12, 12, 9, 9, 461 12, 12, 12, 9, 9, 12, 12, 7, 12, 12,
462 12, 12, 12, 4, 0, 5, 0, 7, 0, 6, 462 4, 0, 5, 0, 7, 8, 0, 6, 0, 0,
463 0, 0, 0, 0, 0, 0, 2, 8, 10, 10, 463 10, 10, 9, 0, 0, 9, 9, 0, 9, 0,
464 9, 0, 0, 9, 9, 0, 9, 0, 0, 11, 464 0, 0, 0, 2, 0, 0, 11, 0, 10, 0,
465 0, 0, 0, 10, 0, 10, 9, 9, 0, 0, 465 10, 9, 9, 0, 0, 0, 10, 10, 0, 0,
466 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 466 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
467 0, 0, 0, 1, 0 467 1, 0
468 } ; 468 } ;
469 469
470static yyconst flex_int32_t yy_ec[256] = 470static yyconst flex_int32_t yy_ec[256] =
@@ -506,108 +506,104 @@ static yyconst flex_int32_t yy_meta[29] =
506 8, 7, 3, 3, 3, 1, 3, 1 506 8, 7, 3, 3, 3, 1, 3, 1
507 } ; 507 } ;
508 508
509static yyconst flex_int16_t yy_base[88] = 509static yyconst flex_int16_t yy_base[85] =
510 { 0, 510 { 0,
511 0, 147, 21, 140, 145, 284, 39, 284, 26, 0, 511 0, 145, 150, 266, 27, 266, 25, 0, 131, 23,
512 32, 126, 40, 44, 115, 35, 36, 46, 50, 53, 512 23, 16, 23, 39, 31, 25, 39, 60, 22, 65,
513 39, 61, 54, 79, 65, 284, 0, 0, 66, 284, 513 57, 43, 266, 0, 0, 266, 61, 266, 0, 128,
514 0, 119, 79, 75, 123, 104, 284, 284, 107, 0, 514 74, 0, 113, 59, 62, 113, 52, 0, 0, 72,
515 79, 73, 76, 76, 66, 0, 0, 85, 86, 284, 515 66, 110, 100, 266, 73, 74, 266, 70, 266, 90,
516 133, 83, 91, 284, 99, 147, 284, 114, 122, 70, 516 103, 266, 84, 129, 108, 113, 143, 266, 107, 66,
517 107, 141, 172, 151, 135, 181, 284, 137, 114, 157, 517 118, 137, 168, 120, 80, 91, 145, 143, 83, 41,
518 149, 48, 45, 284, 284, 208, 214, 222, 230, 238, 518 266, 266, 190, 196, 204, 212, 220, 228, 232, 237,
519 246, 250, 255, 256, 261, 267, 275 519 238, 243, 249, 257
520 } ; 520 } ;
521 521
522static yyconst flex_int16_t yy_def[88] = 522static yyconst flex_int16_t yy_def[85] =
523 { 0, 523 { 0,
524 75, 1, 1, 3, 75, 75, 75, 75, 76, 77, 524 72, 1, 72, 72, 72, 72, 73, 74, 72, 72,
525 78, 75, 77, 79, 75, 75, 75, 75, 75, 19, 525 75, 72, 72, 72, 14, 72, 72, 74, 72, 76,
526 75, 75, 75, 75, 76, 75, 80, 77, 78, 75, 526 72, 73, 72, 77, 74, 72, 75, 72, 78, 72,
527 81, 75, 76, 78, 79, 79, 75, 75, 75, 39, 527 72, 31, 14, 79, 80, 72, 72, 81, 15, 73,
528 19, 82, 83, 75, 75, 84, 20, 76, 78, 75, 528 75, 76, 76, 72, 73, 75, 72, 82, 72, 72,
529 79, 51, 85, 75, 75, 75, 75, 84, 79, 51, 529 72, 72, 81, 76, 54, 72, 72, 72, 76, 54,
530 79, 79, 79, 51, 75, 75, 75, 86, 79, 63, 530 76, 76, 76, 54, 83, 76, 63, 83, 84, 84,
531 86, 87, 87, 75, 0, 75, 75, 75, 75, 75, 531 72, 0, 72, 72, 72, 72, 72, 72, 72, 72,
532 75, 75, 75, 75, 75, 75, 75 532 72, 72, 72, 72
533 } ; 533 } ;
534 534
535static yyconst flex_int16_t yy_nxt[313] = 535static yyconst flex_int16_t yy_nxt[295] =
536 { 0, 536 { 0,
537 6, 7, 8, 7, 9, 6, 10, 6, 6, 11, 537 4, 5, 6, 5, 7, 4, 8, 9, 10, 11,
538 6, 6, 12, 6, 6, 6, 6, 6, 6, 10, 538 9, 12, 13, 14, 15, 15, 16, 9, 17, 8,
539 10, 10, 13, 10, 10, 6, 10, 6, 15, 16, 539 8, 8, 18, 8, 8, 4, 8, 19, 21, 23,
540 26, 15, 17, 18, 19, 20, 20, 21, 15, 22, 540 21, 26, 28, 26, 26, 30, 31, 31, 31, 26,
541 24, 30, 24, 38, 33, 36, 37, 74, 23, 34, 541 26, 26, 26, 71, 39, 39, 39, 23, 29, 26,
542 74, 27, 38, 38, 38, 38, 38, 31, 32, 39, 542 24, 32, 33, 33, 34, 72, 26, 26, 21, 35,
543 39, 39, 40, 41, 41, 42, 47, 47, 47, 26, 543 21, 36, 37, 38, 40, 36, 43, 44, 24, 41,
544 43, 38, 44, 45, 46, 30, 44, 75, 38, 38, 544 28, 32, 50, 50, 52, 28, 23, 23, 52, 35,
545 24, 38, 24, 26, 30, 40, 55, 55, 57, 26, 545 56, 56, 44, 28, 42, 71, 29, 31, 31, 31,
546 27, 31, 57, 43, 35, 30, 64, 64, 64, 57, 546 42, 29, 59, 44, 48, 49, 49, 24, 24, 29,
547 547
548 31, 65, 65, 75, 27, 36, 37, 35, 59, 37, 548 49, 43, 44, 51, 51, 51, 36, 37, 59, 44,
549 27, 31, 56, 56, 56, 59, 37, 51, 52, 52, 549 36, 65, 44, 54, 55, 55, 51, 51, 51, 59,
550 39, 39, 39, 59, 37, 37, 68, 53, 54, 54, 550 44, 64, 64, 64, 58, 58, 57, 57, 57, 58,
551 69, 50, 38, 54, 59, 37, 44, 45, 32, 37, 551 59, 44, 42, 64, 64, 64, 52, 72, 59, 44,
552 44, 35, 59, 37, 75, 14, 60, 60, 66, 66, 552 47, 66, 60, 60, 42, 44, 59, 69, 26, 72,
553 66, 37, 14, 72, 75, 61, 62, 63, 59, 61, 553 20, 61, 62, 63, 72, 61, 57, 57, 57, 66,
554 56, 56, 56, 69, 64, 64, 64, 69, 67, 67, 554 72, 72, 72, 66, 49, 49, 72, 61, 62, 49,
555 75, 75, 75, 67, 37, 35, 75, 75, 75, 61, 555 44, 61, 72, 72, 72, 72, 72, 72, 72, 72,
556 62, 75, 75, 61, 75, 70, 70, 70, 75, 75, 556 72, 67, 67, 67, 72, 72, 72, 67, 67, 67,
557 75, 70, 70, 70, 66, 66, 66, 75, 75, 75, 557 22, 22, 22, 22, 22, 22, 22, 22, 25, 72,
558 558
559 75, 75, 54, 54, 75, 75, 75, 54, 25, 25, 559 72, 25, 25, 25, 27, 27, 27, 27, 27, 27,
560 25, 25, 25, 25, 25, 25, 28, 75, 75, 28, 560 27, 27, 42, 42, 42, 42, 42, 42, 42, 42,
561 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 561 45, 72, 45, 45, 45, 45, 45, 45, 46, 72,
562 35, 35, 35, 35, 35, 35, 35, 35, 48, 75, 562 46, 46, 46, 46, 46, 46, 34, 34, 72, 34,
563 48, 48, 48, 48, 48, 48, 49, 75, 49, 49, 563 51, 72, 51, 53, 53, 53, 57, 72, 57, 68,
564 49, 49, 49, 49, 42, 42, 75, 42, 56, 75, 564 68, 68, 68, 68, 68, 68, 68, 70, 70, 70,
565 56, 58, 58, 58, 66, 75, 66, 71, 71, 71, 565 70, 70, 70, 70, 70, 3, 72, 72, 72, 72,
566 71, 71, 71, 71, 71, 73, 73, 73, 73, 73, 566 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
567 73, 73, 73, 5, 75, 75, 75, 75, 75, 75, 567 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
568 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 568 72, 72, 72, 72
569 569
570 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
571 75, 75
572 } ; 570 } ;
573 571
574static yyconst flex_int16_t yy_chk[313] = 572static yyconst flex_int16_t yy_chk[295] =
575 { 0, 573 { 0,
576 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 574 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
577 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 575 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
578 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 576 1, 1, 1, 1, 1, 1, 1, 1, 5, 7,
579 9, 3, 3, 3, 3, 3, 3, 3, 3, 3, 577 5, 10, 11, 12, 12, 13, 13, 13, 13, 19,
580 7, 11, 7, 16, 13, 14, 14, 73, 3, 13, 578 10, 16, 16, 70, 15, 15, 15, 22, 11, 19,
581 72, 9, 16, 17, 17, 21, 21, 11, 18, 18, 579 7, 14, 14, 14, 14, 15, 17, 17, 21, 14,
582 18, 18, 19, 19, 19, 19, 20, 20, 20, 25, 580 21, 14, 14, 14, 18, 14, 20, 20, 22, 18,
583 19, 23, 19, 19, 19, 29, 19, 20, 22, 22, 581 27, 34, 35, 35, 37, 41, 40, 45, 37, 34,
584 24, 23, 24, 33, 34, 42, 43, 43, 45, 48, 582 48, 48, 65, 46, 65, 69, 27, 31, 31, 31,
585 25, 29, 45, 42, 60, 49, 52, 52, 52, 44, 583 60, 41, 66, 66, 31, 31, 31, 40, 45, 46,
586 584
587 34, 53, 53, 41, 33, 36, 36, 52, 61, 61, 585 31, 43, 43, 50, 50, 50, 53, 53, 59, 59,
588 48, 49, 55, 55, 55, 69, 69, 36, 36, 36, 586 53, 59, 42, 43, 43, 43, 51, 51, 51, 61,
589 39, 39, 39, 59, 59, 35, 59, 39, 39, 39, 587 61, 55, 55, 55, 51, 51, 56, 56, 56, 51,
590 61, 32, 15, 39, 51, 51, 58, 58, 12, 68, 588 54, 54, 55, 64, 64, 64, 36, 33, 62, 62,
591 58, 68, 62, 62, 5, 4, 51, 51, 65, 65, 589 30, 61, 54, 54, 64, 68, 67, 68, 9, 3,
592 65, 71, 2, 71, 0, 51, 51, 51, 70, 51, 590 2, 54, 54, 54, 0, 54, 57, 57, 57, 62,
593 56, 56, 56, 62, 64, 64, 64, 62, 56, 56, 591 0, 0, 0, 62, 57, 57, 0, 67, 67, 57,
594 0, 0, 0, 56, 63, 64, 0, 0, 0, 70, 592 63, 67, 0, 0, 0, 0, 0, 0, 0, 0,
595 70, 0, 0, 70, 0, 63, 63, 63, 0, 0, 593 0, 63, 63, 63, 0, 0, 0, 63, 63, 63,
596 0, 63, 63, 63, 66, 66, 66, 0, 0, 0, 594 73, 73, 73, 73, 73, 73, 73, 73, 74, 0,
597 595
598 0, 0, 66, 66, 0, 0, 0, 66, 76, 76, 596 0, 74, 74, 74, 75, 75, 75, 75, 75, 75,
599 76, 76, 76, 76, 76, 76, 77, 0, 0, 77, 597 75, 75, 76, 76, 76, 76, 76, 76, 76, 76,
600 77, 77, 78, 78, 78, 78, 78, 78, 78, 78, 598 77, 0, 77, 77, 77, 77, 77, 77, 78, 0,
601 79, 79, 79, 79, 79, 79, 79, 79, 80, 0, 599 78, 78, 78, 78, 78, 78, 79, 79, 0, 79,
602 80, 80, 80, 80, 80, 80, 81, 0, 81, 81, 600 80, 0, 80, 81, 81, 81, 82, 0, 82, 83,
603 81, 81, 81, 81, 82, 82, 0, 82, 83, 0, 601 83, 83, 83, 83, 83, 83, 83, 84, 84, 84,
604 83, 84, 84, 84, 85, 0, 85, 86, 86, 86, 602 84, 84, 84, 84, 84, 72, 72, 72, 72, 72,
605 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 603 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
606 87, 87, 87, 75, 75, 75, 75, 75, 75, 75, 604 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
607 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 605 72, 72, 72, 72
608 606
609 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
610 75, 75
611 } ; 607 } ;
612 608
613static yy_state_type yy_last_accepting_state; 609static yy_state_type yy_last_accepting_state;
@@ -618,8 +614,8 @@ int yy_flex_debug = 1;
618 614
619static yyconst flex_int16_t yy_rule_linenum[13] = 615static yyconst flex_int16_t yy_rule_linenum[13] =
620 { 0, 616 { 0,
621 71, 72, 73, 76, 79, 80, 81, 87, 88, 89, 617 67, 68, 69, 72, 75, 76, 77, 83, 84, 85,
622 91, 94 618 87, 90
623 } ; 619 } ;
624 620
625/* The intent behind this definition is that it'll catch 621/* The intent behind this definition is that it'll catch
@@ -666,15 +662,11 @@ char *yytext;
666 and then we categorize those basic tokens in the second stage. */ 662 and then we categorize those basic tokens in the second stage. */
667#define YY_DECL static int yylex1(void) 663#define YY_DECL static int yylex1(void)
668 664
669/* Version 2 checksumming does proper tokenization; version 1 wasn't
670 quite so pedantic. */
671
672/* We don't do multiple input files. */ 665/* We don't do multiple input files. */
673#define YY_NO_INPUT 1 666#define YY_NO_INPUT 1
674#line 675 "scripts/genksyms/lex.c" 667#line 668 "scripts/genksyms/lex.c"
675 668
676#define INITIAL 0 669#define INITIAL 0
677#define V2_TOKENS 1
678 670
679#ifndef YY_NO_UNISTD_H 671#ifndef YY_NO_UNISTD_H
680/* 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
@@ -917,12 +909,12 @@ YY_DECL
917 register int yy_act; 909 register int yy_act;
918 910
919/* %% [7.0] user's declarations go here */ 911/* %% [7.0] user's declarations go here */
920#line 67 "scripts/genksyms/lex.l" 912#line 63 "scripts/genksyms/lex.l"
921 913
922 914
923 915
924 /* Keep track of our location in the original source files. */ 916 /* Keep track of our location in the original source files. */
925#line 926 "scripts/genksyms/lex.c" 917#line 918 "scripts/genksyms/lex.c"
926 918
927 if ( !(yy_init) ) 919 if ( !(yy_init) )
928 { 920 {
@@ -986,13 +978,13 @@ yy_match:
986 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 )
987 { 979 {
988 yy_current_state = (int) yy_def[yy_current_state]; 980 yy_current_state = (int) yy_def[yy_current_state];
989 if ( yy_current_state >= 76 ) 981 if ( yy_current_state >= 73 )
990 yy_c = yy_meta[(unsigned int) yy_c]; 982 yy_c = yy_meta[(unsigned int) yy_c];
991 } 983 }
992 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];
993 ++yy_cp; 985 ++yy_cp;
994 } 986 }
995 while ( yy_base[yy_current_state] != 284 ); 987 while ( yy_base[yy_current_state] != 266 );
996 988
997yy_find_action: 989yy_find_action:
998/* %% [10.0] code to find the action number goes here */ 990/* %% [10.0] code to find the action number goes here */
@@ -1040,42 +1032,42 @@ do_action: /* This label is used only to access EOF actions. */
1040case 1: 1032case 1:
1041/* rule 1 can match eol */ 1033/* rule 1 can match eol */
1042YY_RULE_SETUP 1034YY_RULE_SETUP
1043#line 71 "scripts/genksyms/lex.l" 1035#line 67 "scripts/genksyms/lex.l"
1044return FILENAME; 1036return FILENAME;
1045 YY_BREAK 1037 YY_BREAK
1046case 2: 1038case 2:
1047/* rule 2 can match eol */ 1039/* rule 2 can match eol */
1048YY_RULE_SETUP 1040YY_RULE_SETUP
1049#line 72 "scripts/genksyms/lex.l" 1041#line 68 "scripts/genksyms/lex.l"
1050cur_line++; 1042cur_line++;
1051 YY_BREAK 1043 YY_BREAK
1052case 3: 1044case 3:
1053/* rule 3 can match eol */ 1045/* rule 3 can match eol */
1054YY_RULE_SETUP 1046YY_RULE_SETUP
1055#line 73 "scripts/genksyms/lex.l" 1047#line 69 "scripts/genksyms/lex.l"
1056cur_line++; 1048cur_line++;
1057 YY_BREAK 1049 YY_BREAK
1058/* Ignore all other whitespace. */ 1050/* Ignore all other whitespace. */
1059case 4: 1051case 4:
1060YY_RULE_SETUP 1052YY_RULE_SETUP
1061#line 76 "scripts/genksyms/lex.l" 1053#line 72 "scripts/genksyms/lex.l"
1062; 1054;
1063 YY_BREAK 1055 YY_BREAK
1064case 5: 1056case 5:
1065/* rule 5 can match eol */ 1057/* rule 5 can match eol */
1066YY_RULE_SETUP 1058YY_RULE_SETUP
1067#line 79 "scripts/genksyms/lex.l" 1059#line 75 "scripts/genksyms/lex.l"
1068return STRING; 1060return STRING;
1069 YY_BREAK 1061 YY_BREAK
1070case 6: 1062case 6:
1071/* rule 6 can match eol */ 1063/* rule 6 can match eol */
1072YY_RULE_SETUP 1064YY_RULE_SETUP
1073#line 80 "scripts/genksyms/lex.l" 1065#line 76 "scripts/genksyms/lex.l"
1074return CHAR; 1066return CHAR;
1075 YY_BREAK 1067 YY_BREAK
1076case 7: 1068case 7:
1077YY_RULE_SETUP 1069YY_RULE_SETUP
1078#line 81 "scripts/genksyms/lex.l" 1070#line 77 "scripts/genksyms/lex.l"
1079return IDENT; 1071return IDENT;
1080 YY_BREAK 1072 YY_BREAK
1081/* The Pedant requires that the other C multi-character tokens be 1073/* The Pedant requires that the other C multi-character tokens be
@@ -1084,38 +1076,37 @@ return IDENT;
1084 around them properly. */ 1076 around them properly. */
1085case 8: 1077case 8:
1086YY_RULE_SETUP 1078YY_RULE_SETUP
1087#line 87 "scripts/genksyms/lex.l" 1079#line 83 "scripts/genksyms/lex.l"
1088return OTHER; 1080return OTHER;
1089 YY_BREAK 1081 YY_BREAK
1090case 9: 1082case 9:
1091YY_RULE_SETUP 1083YY_RULE_SETUP
1092#line 88 "scripts/genksyms/lex.l" 1084#line 84 "scripts/genksyms/lex.l"
1093return INT; 1085return INT;
1094 YY_BREAK 1086 YY_BREAK
1095case 10: 1087case 10:
1096YY_RULE_SETUP 1088YY_RULE_SETUP
1097#line 89 "scripts/genksyms/lex.l" 1089#line 85 "scripts/genksyms/lex.l"
1098return REAL; 1090return REAL;
1099 YY_BREAK 1091 YY_BREAK
1100case 11: 1092case 11:
1101YY_RULE_SETUP 1093YY_RULE_SETUP
1102#line 91 "scripts/genksyms/lex.l" 1094#line 87 "scripts/genksyms/lex.l"
1103return DOTS; 1095return DOTS;
1104 YY_BREAK 1096 YY_BREAK
1105/* All other tokens are single characters. */ 1097/* All other tokens are single characters. */
1106case 12: 1098case 12:
1107YY_RULE_SETUP 1099YY_RULE_SETUP
1108#line 94 "scripts/genksyms/lex.l" 1100#line 90 "scripts/genksyms/lex.l"
1109return yytext[0]; 1101return yytext[0];
1110 YY_BREAK 1102 YY_BREAK
1111case 13: 1103case 13:
1112YY_RULE_SETUP 1104YY_RULE_SETUP
1113#line 97 "scripts/genksyms/lex.l" 1105#line 93 "scripts/genksyms/lex.l"
1114ECHO; 1106ECHO;
1115 YY_BREAK 1107 YY_BREAK
1116#line 1117 "scripts/genksyms/lex.c" 1108#line 1109 "scripts/genksyms/lex.c"
1117case YY_STATE_EOF(INITIAL): 1109case YY_STATE_EOF(INITIAL):
1118case YY_STATE_EOF(V2_TOKENS):
1119 yyterminate(); 1110 yyterminate();
1120 1111
1121 case YY_END_OF_BUFFER: 1112 case YY_END_OF_BUFFER:
@@ -1428,7 +1419,7 @@ static int yy_get_next_buffer (void)
1428 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 )
1429 { 1420 {
1430 yy_current_state = (int) yy_def[yy_current_state]; 1421 yy_current_state = (int) yy_def[yy_current_state];
1431 if ( yy_current_state >= 76 ) 1422 if ( yy_current_state >= 73 )
1432 yy_c = yy_meta[(unsigned int) yy_c]; 1423 yy_c = yy_meta[(unsigned int) yy_c];
1433 } 1424 }
1434 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];
@@ -1461,11 +1452,11 @@ static int yy_get_next_buffer (void)
1461 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 )
1462 { 1453 {
1463 yy_current_state = (int) yy_def[yy_current_state]; 1454 yy_current_state = (int) yy_def[yy_current_state];
1464 if ( yy_current_state >= 76 ) 1455 if ( yy_current_state >= 73 )
1465 yy_c = yy_meta[(unsigned int) yy_c]; 1456 yy_c = yy_meta[(unsigned int) yy_c];
1466 } 1457 }
1467 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];
1468 yy_is_jam = (yy_current_state == 75); 1459 yy_is_jam = (yy_current_state == 72);
1469 1460
1470 return yy_is_jam ? 0 : yy_current_state; 1461 return yy_is_jam ? 0 : yy_current_state;
1471} 1462}
@@ -2251,7 +2242,7 @@ void yyfree (void * ptr )
2251 2242
2252/* %ok-for-header */ 2243/* %ok-for-header */
2253 2244
2254#line 97 "scripts/genksyms/lex.l" 2245#line 93 "scripts/genksyms/lex.l"
2255 2246
2256 2247
2257 2248
@@ -2293,7 +2284,6 @@ yylex(void)
2293 2284
2294 if (lexstate == ST_NOTSTARTED) 2285 if (lexstate == ST_NOTSTARTED)
2295 { 2286 {
2296 BEGIN(V2_TOKENS);
2297 next_node = xmalloc(sizeof(*next_node)); 2287 next_node = xmalloc(sizeof(*next_node));
2298 next_node->next = NULL; 2288 next_node->next = NULL;
2299 lexstate = ST_NORMAL; 2289 lexstate = ST_NORMAL;
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
index fe50ff9dacd..4687b1d147d 100644
--- a/scripts/genksyms/lex.l
+++ b/scripts/genksyms/lex.l
@@ -55,10 +55,6 @@ CHAR L?\'([^\\\']*\\.)*[^\\\']*\'
55 55
56MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>) 56MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>)
57 57
58/* Version 2 checksumming does proper tokenization; version 1 wasn't
59 quite so pedantic. */
60%s V2_TOKENS
61
62/* We don't do multiple input files. */ 58/* We don't do multiple input files. */
63%option noyywrap 59%option noyywrap
64 60
@@ -84,9 +80,9 @@ MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>)
84 recognized as tokens. We don't actually use them since we don't 80 recognized as tokens. We don't actually use them since we don't
85 parse expressions, but we do want whitespace to be arranged 81 parse expressions, but we do want whitespace to be arranged
86 around them properly. */ 82 around them properly. */
87<V2_TOKENS>{MC_TOKEN} return OTHER; 83{MC_TOKEN} return OTHER;
88<V2_TOKENS>{INT} return INT; 84{INT} return INT;
89<V2_TOKENS>{REAL} return REAL; 85{REAL} return REAL;
90 86
91"..." return DOTS; 87"..." return DOTS;
92 88
@@ -134,7 +130,6 @@ yylex(void)
134 130
135 if (lexstate == ST_NOTSTARTED) 131 if (lexstate == ST_NOTSTARTED)
136 { 132 {
137 BEGIN(V2_TOKENS);
138 next_node = xmalloc(sizeof(*next_node)); 133 next_node = xmalloc(sizeof(*next_node));
139 next_node->next = NULL; 134 next_node->next = NULL;
140 lexstate = ST_NORMAL; 135 lexstate = ST_NORMAL;