henrikbach
Posts: 28
Joined: Jul. 9, '04,
From: Copenhagen, Denmark
Status: offline
|
>I'm assuming you're using a Danish version of Windows.
No, I'm using the English version of W2K Svr with Danish Locales and keyboard input set.
>Try downloading it and running the a.out and see what it produces for you.
Now, it ignores cr as expected.
>Then do a diff between my lex.yy.c and your lex.yy.c.
I saved your file as rodney_lex.yy.c and submitted the command:
diff lex.yy.c rodney_lex.yy.c 2>&1 | tee -a diff.txt
Remember, that my latest *.c file was generated by lex.
The result of the diff is:
4c4
< * $Header: /E/interix/src/lex/2.5.4a/flex.skl,v 1.1 1999/07/05 19:09:07 SSI_DEV+mark Exp $
---
> * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
287c287
< static yyconst short int yy_accept[87] =
---
> static yyconst short int yy_accept[80] =
290,297c290,296
< 19, 19, 21, 21, 21, 21, 21, 21, 21, 21,
< 21, 20, 0, 0, 0, 19, 0, 0, 0, 16,
< 0, 0, 0, 0, 0, 0, 0, 0, 15, 0,
< 0, 0, 18, 17, 0, 0, 1, 0, 19, 0,
< 0, 5, 0, 0, 10, 12, 0, 0, 4, 14,
< 0, 0, 19, 0, 0, 6, 0, 9, 0, 0,
< 8, 0, 3, 11, 13, 0, 0, 0, 7, 0,
< 0, 0, 0, 0, 2, 0
---
> 19, 19, 16, 21, 16, 16, 16, 16, 16, 16,
> 16, 20, 0, 18, 17, 19, 1, 0, 0, 16,
> 0, 16, 16, 16, 16, 16, 16, 15, 16, 16,
> 16, 17, 1, 19, 19, 0, 0, 5, 16, 16,
> 10, 12, 16, 16, 4, 14, 16, 16, 0, 3,
> 6, 16, 9, 16, 16, 8, 16, 11, 13, 16,
> 16, 16, 7, 16, 0, 0, 0, 2, 0
334,337c333,336
< 1, 1, 2, 3, 1, 1, 1, 1, 4, 4,
< 4, 5, 6, 1, 1, 5, 7, 5, 5, 5,
< 5, 6, 6, 6, 6, 6, 6, 6, 6, 6,
< 8, 1, 1
---
> 1, 1, 2, 1, 1, 1, 1, 1, 3, 3,
> 3, 4, 5, 1, 1, 4, 6, 4, 4, 4,
> 4, 5, 5, 5, 5, 5, 5, 5, 5, 5,
> 7, 1, 1
340c339
< static yyconst short int yy_base[97] =
---
> static yyconst short int yy_base[90] =
342,352c341,349
< 0, 0, 222, 223, 32, 35, 216, 0, 31, 212,
< 26, 35, 215, 186, 43, 44, 45, 46, 47, 51,
< 48, 56, 212, 212, 211, 53, 210, 44, 0, 223,
< 209, 179, 52, 63, 69, 71, 74, 72, 76, 78,
< 80, 79, 223, 223, 207, 206, 205, 81, 0, 175,
< 192, 82, 83, 92, 202, 201, 85, 93, 200, 199,
< 94, 95, 223, 169, 197, 196, 96, 170, 97, 98,
< 161, 100, 223, 145, 144, 110, 99, 111, 126, 130,
< 117, 122, 121, 109, 223, 223, 134, 138, 143, 149,
< 155, 163, 168, 175, 183, 191
<
---
> 0, 0, 162, 163, 32, 35, 156, 0, 31, 152,
> 26, 35, 0, 127, 135, 23, 32, 134, 131, 30,
> 126, 52, 149, 163, 0, 49, 0, 52, 0, 0,
> 120, 123, 135, 131, 127, 127, 127, 45, 117, 117,
> 117, 0, 0, 55, 0, 110, 127, 113, 112, 119,
> 0, 0, 114, 113, 0, 0, 107, 112, 101, 163,
> 0, 105, 0, 91, 72, 0, 63, 0, 0, 68,
> 51, 52, 0, 64, 66, 65, 46, 163, 163, 74,
> 78, 83, 88, 93, 100, 105, 111, 118, 125
355c352
< static yyconst short int yy_def[97] =
---
> static yyconst short int yy_def[90] =
357,367c354,362
< 86, 1, 86, 86, 86, 86, 87, 88, 86, 86,
< 89, 86, 90, 86, 90, 90, 90, 90, 90, 90,
< 90, 86, 87, 86, 91, 86, 92, 86, 93, 86,
< 90, 94, 90, 90, 90, 90, 90, 90, 90, 90,
< 90, 90, 86, 86, 91, 92, 92, 86, 93, 94,
< 95, 90, 90, 90, 90, 90, 90, 90, 90, 90,
< 90, 90, 86, 94, 86, 90, 90, 90, 90, 90,
< 90, 90, 86, 90, 90, 90, 90, 90, 90, 90,
< 86, 96, 96, 86, 86, 0, 86, 86, 86, 86,
< 86, 86, 86, 86, 86, 86
<
---
> 79, 1, 79, 79, 79, 79, 80, 81, 79, 79,
> 82, 79, 83, 79, 83, 83, 83, 83, 83, 83,
> 83, 79, 80, 79, 84, 79, 85, 79, 86, 83,
> 87, 83, 83, 83, 83, 83, 83, 83, 83, 83,
> 83, 84, 85, 79, 86, 87, 88, 83, 83, 83,
> 83, 83, 83, 83, 83, 83, 83, 83, 87, 79,
> 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
> 83, 83, 83, 83, 79, 89, 89, 79, 0, 79,
> 79, 79, 79, 79, 79, 79, 79, 79, 79
370c365
< static yyconst short int yy_nxt[257] =
---
> static yyconst short int yy_nxt[197] =
376,399c371,388
< 26, 26, 28, 26, 26, 26, 30, 30, 30, 30,
< 30, 30, 48, 48, 30, 30, 29, 22, 22, 22,
< 36, 26, 26, 26, 37, 33, 30, 34, 38, 35,
< 40, 39, 30, 41, 30, 30, 42, 30, 53, 30,
< 52, 30, 30, 30, 63, 30, 30, 54, 30, 48,
< 48, 57, 55, 58, 56, 30, 30, 30, 30, 30,
<
< 30, 30, 30, 30, 59, 62, 60, 61, 69, 66,
< 67, 68, 85, 30, 30, 75, 70, 72, 81, 81,
< 79, 82, 71, 74, 77, 84, 84, 76, 78, 30,
< 80, 81, 81, 30, 23, 23, 23, 23, 23, 23,
< 23, 23, 25, 25, 25, 25, 26, 30, 30, 26,
< 26, 31, 31, 31, 31, 31, 31, 45, 45, 45,
< 45, 45, 45, 46, 30, 46, 46, 46, 46, 46,
< 46, 49, 49, 30, 49, 50, 50, 50, 50, 50,
< 50, 50, 50, 64, 64, 64, 64, 64, 64, 64,
< 64, 83, 83, 83, 83, 83, 83, 83, 83, 30,
<
< 73, 51, 30, 30, 30, 30, 65, 51, 47, 47,
< 44, 51, 30, 47, 44, 43, 24, 32, 30, 27,
< 24, 86, 3, 86, 86, 86, 86, 86, 86, 86,
< 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
< 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
< 86, 86, 86, 86, 86, 86
---
> 26, 26, 28, 26, 26, 26, 33, 35, 34, 39,
> 78, 36, 40, 22, 22, 22, 29, 26, 26, 26,
> 44, 44, 54, 44, 44, 75, 75, 75, 75, 78,
> 76, 74, 73, 55, 23, 23, 23, 23, 23, 23,
> 23, 25, 25, 25, 25, 26, 72, 71, 26, 26,
> 30, 30, 30, 30, 30, 42, 42, 42, 42, 42,
>
> 43, 70, 43, 43, 43, 43, 43, 45, 45, 69,
> 45, 46, 46, 46, 46, 46, 46, 46, 59, 59,
> 59, 59, 59, 59, 59, 77, 77, 77, 77, 77,
> 77, 77, 68, 47, 67, 66, 65, 64, 63, 62,
> 61, 60, 47, 58, 57, 56, 53, 52, 51, 50,
> 49, 48, 47, 24, 41, 38, 37, 32, 31, 27,
> 24, 79, 3, 79, 79, 79, 79, 79, 79, 79,
> 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> 79, 79, 79, 79, 79, 79
>
402c391
< static yyconst short int yy_chk[257] =
---
> static yyconst short int yy_chk[197] =
408,431c397,414
< 9, 9, 11, 12, 12, 12, 15, 16, 17, 18,
< 19, 21, 28, 28, 20, 33, 11, 22, 22, 22,
< 17, 26, 26, 26, 17, 15, 34, 16, 18, 16,
< 20, 19, 35, 20, 36, 38, 21, 37, 34, 39,
< 33, 40, 42, 41, 48, 52, 53, 35, 57, 48,
< 48, 38, 36, 39, 37, 54, 58, 61, 62, 67,
<
< 69, 70, 77, 72, 39, 42, 40, 41, 57, 52,
< 53, 54, 84, 76, 78, 69, 58, 62, 81, 81,
< 77, 81, 61, 67, 72, 83, 82, 70, 76, 79,
< 78, 80, 80, 80, 87, 87, 87, 87, 87, 87,
< 87, 87, 88, 88, 88, 88, 89, 75, 74, 89,
< 89, 90, 90, 90, 90, 90, 90, 91, 91, 91,
< 91, 91, 91, 92, 71, 92, 92, 92, 92, 92,
< 92, 93, 93, 68, 93, 94, 94, 94, 94, 94,
< 94, 94, 94, 95, 95, 95, 95, 95, 95, 95,
< 95, 96, 96, 96, 96, 96, 96, 96, 96, 66,
<
< 65, 64, 60, 59, 56, 55, 51, 50, 47, 46,
< 45, 32, 31, 27, 25, 24, 23, 14, 13, 10,
< 7, 3, 86, 86, 86, 86, 86, 86, 86, 86,
< 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
< 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
< 86, 86, 86, 86, 86, 86
---
> 9, 9, 11, 12, 12, 12, 16, 17, 16, 20,
> 77, 17, 20, 22, 22, 22, 11, 26, 26, 26,
> 28, 28, 38, 44, 44, 74, 74, 75, 75, 76,
> 75, 72, 71, 38, 80, 80, 80, 80, 80, 80,
> 80, 81, 81, 81, 81, 82, 70, 67, 82, 82,
> 83, 83, 83, 83, 83, 84, 84, 84, 84, 84,
>
> 85, 65, 85, 85, 85, 85, 85, 86, 86, 64,
> 86, 87, 87, 87, 87, 87, 87, 87, 88, 88,
> 88, 88, 88, 88, 88, 89, 89, 89, 89, 89,
> 89, 89, 62, 59, 58, 57, 54, 53, 50, 49,
> 48, 47, 46, 41, 40, 39, 37, 36, 35, 34,
> 33, 32, 31, 23, 21, 19, 18, 15, 14, 10,
> 7, 3, 79, 79, 79, 79, 79, 79, 79, 79,
> 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
> 79, 79, 79, 79, 79, 79
>
445c428
< #line 1 "t2.l"
---
> #line 1 "hr1"
447,454c430,437
< int num_chars = 0;
< static int CommentDepth = 0;
< /*%%
< [ \t\n\r]+ printf("ignore: %X\n", yytext[0]);
< . ++num_chars; printf("count: %d %c\n", num_chars, yytext[0]);
<
< %%*/
< #line 455 "lex.yy.c"
---
> int num_chars = 0;
> static int CommentDepth = 0;
> /*%%
> [ \t\n\r]+ printf("ignore: %X\n", yytext[0]);
> . ++num_chars; printf("count: %d %c\n", num_chars, yytext[0]);
>
> %%*/
> #line 438 "lex.yy.c"
605c588,589
< #line 18 "t2.l"
---
> #line 17 "hr1"
>
607,608c591
<
< #line 609 "lex.yy.c"
---
> #line 592 "lex.yy.c"
659c642
< if ( yy_current_state >= 87 )
---
> if ( yy_current_state >= 80 )
665c648
< while ( yy_base[yy_current_state] != 223 );
---
> while ( yy_base[yy_current_state] != 163 );
693,694c676,677
< #line 20 "t2.l"
< { /* Ignore comments */ }
---
> #line 19 "hr1"
> { /* Ignore comments */ }
698,720c681,703
< #line 22 "t2.l"
< {
< char *Buffer;
< unsigned Length;
< uint i;
<
< Buffer = yytext;
< printf ("include: %s\n", yytext);
<
< Length = yyleng;
<
< printf ("Length = %d\n", Length);
< printf ("idx\thex\tchar\n");
< for (i=0; i < Length; i++)
< {
< printf ("%d\t%X\t%c\n", i, Buffer[i], Buffer[i]);
< }
< printf ("WhatsInBuffer = %s\n", Buffer);
< if (Buffer[Length-1] == '"')
< printf ("assert=true\n");
< else
< printf ("assert=false\n");
< }
---
> #line 21 "hr1"
> {
> char *Buffer;
> unsigned Length;
> uint i;
>
> Buffer = yytext;
> printf ("include: %s\n", yytext);
>
> Length = yyleng;
>
> printf ("Length = %d\n", Length);
> printf ("idx\thex\tchar\n");
> for (i=0; i < Length; i++)
> {
> printf ("%d\t%X\t%c\n", i, Buffer[i], Buffer[i]);
> }
> printf ("WhatsInBuffer = %s\n", Buffer);
> if (Buffer[Length-1] == '"')
> printf ("assert=true\n");
> else
> printf ("assert=false\n");
> }
724,726c707,709
< #line 46 "t2.l"
< { /*Filelval.StrVal = new std::string(yytext+2, yytext+yyleng-2);
< return CODEFRAGMENT;*/ }
---
> #line 45 "hr1"
> { /*Filelval.StrVal = new std::string(yytext+2, yytext+yyleng-2);
> return CODEFRAGMENT;*/ }
730,731c713,714
< #line 49 "t2.l"
< { /*return INT;*/ }
---
> #line 48 "hr1"
> { /*return INT;*/ }
735,736c718,719
< #line 50 "t2.l"
< { /*return BIT;*/ }
---
> #line 49 "hr1"
> { /*return BIT;*/ }
740,741c723,724
< #line 51 "t2.l"
< { /*return BITS;*/ }
---
> #line 50 "hr1"
> { /*return BITS;*/ }
745,746c728,729
< #line 52 "t2.l"
< { /*return STRING;*/ }
---
> #line 51 "hr1"
> { /*return STRING;*/ }
750,751c733,734
< #line 53 "t2.l"
< { /*return LIST;*/ }
---
> #line 52 "hr1"
> { /*return LIST;*/ }
755,756c738,739
< #line 54 "t2.l"
< { /*return CODE;*/ }
---
> #line 53 "hr1"
> { /*return CODE;*/ }
760,761c743,744
< #line 55 "t2.l"
< { /*return DAG;*/ }
---
> #line 54 "hr1"
> { /*return DAG;*/ }
765,766c748,749
< #line 57 "t2.l"
< { /*return CLASS;*/ }
---
> #line 56 "hr1"
> { /*return CLASS;*/ }
770,771c753,754
< #line 58 "t2.l"
< { /*return DEF;*/ }
---
> #line 57 "hr1"
> { /*return DEF;*/ }
775,776c758,759
< #line 59 "t2.l"
< { /*return FIELD;*/ }
---
> #line 58 "hr1"
> { /*return FIELD;*/ }
780,781c763,764
< #line 60 "t2.l"
< { /*return LET;*/ }
---
> #line 59 "hr1"
> { /*return LET;*/ }
785,786c768,769
< #line 61 "t2.l"
< { /*return IN;*/ }
---
> #line 60 "hr1"
> { /*return IN;*/ }
790,792c773,775
< #line 63 "t2.l"
< { /*Filelval.StrVal = new std::string(yytext, yytext+yyleng);
< return ID;*/ }
---
> #line 62 "hr1"
> { /*Filelval.StrVal = new std::string(yytext, yytext+yyleng);
> return ID;*/ }
796,798c779,781
< #line 65 "t2.l"
< { /*Filelval.StrVal = new std::string(yytext+1, yytext+yyleng);
< return VARNAME;*/ }
---
> #line 64 "hr1"
> { /*Filelval.StrVal = new std::string(yytext+1, yytext+yyleng);
> return VARNAME;*/ }
802,804c785,787
< #line 68 "t2.l"
< { /*Filelval.StrVal = new std::string(yytext+1, yytext+yyleng-1);
< return STRVAL;*/ }
---
> #line 67 "hr1"
> { /*Filelval.StrVal = new std::string(yytext+1, yytext+yyleng-1);
> return STRVAL;*/ }
808,809c791,792
< #line 71 "t2.l"
< { /*Filelval.IntVal = ParseInt(Filetext); return INTVAL;*/ }
---
> #line 70 "hr1"
> { /*Filelval.IntVal = ParseInt(Filetext); return INTVAL;*/ }
813,814c796,797
< #line 73 "t2.l"
< { printf("ignore: %X\n", yytext[0]); }
---
> #line 72 "hr1"
> { printf("ignore: %X\n", yytext[0]); }
818,819c801,802
< #line 75 "t2.l"
< { ++num_chars; printf("count: %d %c\n", num_chars, yytext[0]); }
---
> #line 74 "hr1"
> { ++num_chars; printf("count: %d %c\n", num_chars, yytext[0]); }
823c806
< #line 77 "t2.l"
---
> #line 76 "hr1"
826c809
< #line 827 "lex.yy.c"
---
> #line 810 "lex.yy.c"
1118c1101
< if ( yy_current_state >= 87 )
---
> if ( yy_current_state >= 80 )
1153c1136
< if ( yy_current_state >= 87 )
---
> if ( yy_current_state >= 80 )
1157c1140
< yy_is_jam = (yy_current_state == 86);
---
> yy_is_jam = (yy_current_state == 79);
1712c1695,1703
< #line 77 "t2.l"
---
> #line 76 "hr1"
>
>
>
> main()
> {
> yylex();
> printf( "# of chars = %d\n", num_chars );
> }
1714,1721d1704
<
<
< main()
< {
< yylex();
< printf( "# of chars = %d\n", num_chars );
< }
<
|