Commit 95f1d639ade8fdf9572ac8a926f62b29dd66eaba

Authored by Michal Marek
1 parent 9c281f13b6

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>

Showing 2 changed files with 123 additions and 138 deletions Side-by-side Diff

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