ENH: Patch from Maik to add Fortran03 USE syntax support.

- I tweaked the patch to add 'other' production rules for COMMA and DCOLON
  - See issue #6884.
This commit is contained in:
Brad King 2008-04-23 23:53:20 -04:00
parent 4cf167173f
commit 5bf6dba9e8
5 changed files with 466 additions and 353 deletions

View File

@ -372,8 +372,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 41
#define YY_END_OF_BUFFER 42
#define YY_NUM_RULES 43
#define YY_END_OF_BUFFER 44
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@ -381,25 +381,25 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[158] =
static yyconst flex_int16_t yy_accept[161] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
42, 36, 38, 37, 40, 1, 36, 31, 2, 37,
34, 36, 35, 36, 35, 38, 36, 37, 36, 35,
9, 8, 9, 4, 3, 36, 0, 10, 0, 0,
0, 0, 0, 31, 31, 32, 34, 36, 35, 0,
39, 35, 0, 0, 0, 0, 0, 0, 0, 0,
36, 0, 11, 35, 0, 0, 5, 0, 0, 0,
27, 0, 0, 31, 31, 31, 31, 0, 0, 0,
0, 0, 21, 0, 0, 0, 0, 0, 6, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
44, 38, 40, 39, 42, 1, 38, 31, 2, 33,
38, 39, 36, 38, 37, 38, 37, 40, 38, 39,
38, 37, 9, 8, 9, 4, 3, 38, 0, 10,
0, 0, 0, 0, 0, 31, 31, 32, 34, 36,
38, 37, 0, 41, 37, 0, 0, 0, 0, 0,
0, 0, 0, 38, 0, 11, 37, 0, 0, 5,
0, 0, 0, 27, 0, 0, 31, 31, 31, 31,
0, 0, 0, 0, 0, 21, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 28,
29, 0, 0, 0, 0, 0, 0, 0, 22, 23,
0, 0, 0, 0, 0, 0, 0, 0, 30, 25,
0, 0, 18, 0, 0, 24, 19, 0, 0, 17,
0, 0, 16, 26, 0, 0, 15, 20, 0, 7,
33, 7, 13, 0, 12, 14, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 28, 29, 0, 0, 0, 0, 0, 0,
0, 22, 23, 0, 0, 0, 0, 0, 0, 0,
0, 30, 25, 0, 0, 18, 0, 0, 24, 19,
0, 0, 17, 0, 0, 16, 26, 0, 0, 15,
20, 0, 7, 35, 7, 13, 0, 12, 14, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@ -408,16 +408,16 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 5, 6, 7, 8, 9, 1, 10, 11, 1,
1, 12, 1, 4, 1, 1, 1, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 1, 14, 1,
15, 16, 17, 1, 18, 18, 19, 20, 21, 22,
18, 18, 23, 18, 18, 24, 18, 25, 18, 18,
18, 18, 26, 18, 27, 18, 18, 18, 18, 18,
1, 28, 1, 1, 29, 1, 18, 18, 30, 31,
1, 12, 1, 13, 1, 1, 1, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 15, 16, 1,
17, 18, 19, 1, 20, 20, 21, 22, 23, 24,
20, 20, 25, 20, 20, 26, 20, 27, 20, 20,
20, 20, 28, 20, 29, 20, 20, 20, 20, 20,
1, 30, 1, 1, 31, 1, 20, 20, 32, 33,
32, 33, 18, 18, 34, 18, 18, 35, 18, 36,
18, 18, 18, 18, 37, 18, 38, 18, 18, 18,
18, 18, 1, 1, 1, 1, 1, 1, 1, 1,
34, 35, 20, 20, 36, 20, 20, 37, 20, 38,
20, 20, 20, 20, 39, 20, 40, 20, 20, 20,
20, 20, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@ -434,180 +434,178 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
static yyconst flex_int32_t yy_meta[39] =
static yyconst flex_int32_t yy_meta[41] =
{ 0,
1, 2, 2, 3, 4, 3, 3, 1, 1, 3,
3, 1, 5, 3, 3, 1, 1, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 1, 5, 6,
6, 6, 6, 6, 6, 6, 6, 6
3, 1, 3, 5, 1, 3, 3, 1, 1, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 1,
5, 6, 6, 6, 6, 6, 6, 6, 6, 6
} ;
static yyconst flex_int16_t yy_base[166] =
static yyconst flex_int16_t yy_base[169] =
{ 0,
0, 37, 0, 38, 176, 45, 41, 51, 53, 63,
161, 0, 492, 492, 150, 492, 76, 77, 492, 492,
118, 116, 0, 66, 114, 93, 143, 123, 181, 210,
492, 115, 114, 492, 492, 0, 110, 492, 247, 70,
100, 96, 75, 144, 197, 492, 492, 135, 0, 136,
492, 0, 104, 284, 0, 136, 226, 140, 142, 89,
322, 87, 492, 0, 81, 183, 253, 158, 243, 175,
240, 234, 252, 285, 291, 307, 338, 298, 248, 286,
319, 306, 327, 327, 329, 69, 67, 357, 492, 331,
333, 340, 341, 347, 349, 346, 350, 354, 351, 354,
0, 39, 0, 40, 184, 47, 43, 53, 55, 63,
186, 0, 476, 476, 164, 476, 79, 72, 476, 476,
143, 476, 130, 126, 0, 83, 119, 85, 149, 139,
189, 220, 476, 131, 89, 476, 476, 0, 132, 476,
259, 37, 69, 76, 34, 119, 137, 476, 0, 476,
121, 0, 150, 476, 0, 154, 298, 0, 75, 138,
142, 72, 127, 338, 94, 476, 0, 84, 158, 186,
81, 145, 108, 172, 147, 173, 260, 266, 284, 299,
272, 173, 178, 286, 245, 258, 285, 285, 78, 71,
207, 476, 288, 291, 296, 304, 310, 315, 317, 326,
356, 355, 362, 366, 366, 370, 62, 50, 367, 492,
492, 371, 373, 375, 371, 377, 376, 380, 492, 492,
386, 390, 392, 387, 393, 44, 36, 396, 492, 492,
396, 400, 492, 394, 401, 492, 492, 405, 410, 492,
56, 0, 492, 492, 413, 415, 492, 492, 415, 492,
492, 492, 492, 416, 492, 492, 492, 448, 454, 459,
461, 467, 473, 479, 485
330, 330, 335, 338, 338, 341, 343, 341, 348, 62,
52, 346, 476, 476, 353, 355, 357, 352, 359, 359,
359, 476, 476, 363, 365, 370, 366, 375, 46, 38,
378, 476, 476, 378, 381, 476, 376, 384, 476, 476,
384, 387, 476, 115, 0, 476, 476, 388, 393, 476,
476, 394, 476, 476, 476, 476, 398, 476, 476, 476,
432, 438, 443, 445, 451, 457, 463, 469
} ;
static yyconst flex_int16_t yy_def[166] =
static yyconst flex_int16_t yy_def[169] =
{ 0,
157, 1, 1, 1, 1, 1, 158, 158, 158, 158,
157, 159, 157, 157, 160, 157, 157, 157, 157, 157,
157, 159, 161, 159, 161, 157, 157, 157, 162, 157,
157, 157, 157, 157, 157, 159, 160, 157, 157, 157,
157, 157, 157, 157, 163, 157, 157, 159, 161, 157,
157, 25, 157, 157, 54, 157, 157, 157, 157, 157,
162, 162, 157, 30, 157, 157, 157, 157, 157, 157,
157, 157, 157, 163, 163, 163, 163, 157, 157, 157,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
160, 1, 1, 1, 1, 1, 161, 161, 161, 161,
160, 162, 160, 160, 163, 160, 162, 160, 160, 160,
162, 160, 160, 162, 164, 162, 164, 160, 162, 160,
165, 160, 160, 160, 160, 160, 160, 162, 163, 160,
160, 160, 160, 160, 160, 160, 166, 160, 162, 160,
162, 164, 160, 160, 27, 160, 160, 57, 160, 160,
160, 160, 160, 165, 165, 160, 32, 160, 160, 160,
160, 160, 160, 160, 160, 160, 166, 166, 166, 166,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
164, 165, 157, 157, 157, 157, 157, 157, 157, 157,
157, 157, 157, 157, 157, 157, 0, 157, 157, 157,
157, 157, 157, 157, 157
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 167, 168, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 0,
160, 160, 160, 160, 160, 160, 160, 160
} ;
static yyconst flex_int16_t yy_nxt[531] =
static yyconst flex_int16_t yy_nxt[517] =
{ 0,
12, 13, 14, 13, 13, 15, 16, 12, 17, 18,
19, 12, 12, 20, 21, 12, 22, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 24, 25, 23,
23, 23, 23, 23, 23, 23, 23, 23, 26, 26,
142, 26, 26, 32, 27, 27, 26, 28, 141, 26,
33, 34, 27, 32, 127, 32, 29, 151, 151, 35,
33, 34, 33, 30, 30, 32, 126, 50, 51, 35,
50, 108, 33, 107, 30, 30, 36, 39, 44, 44,
39, 44, 45, 36, 36, 87, 46, 36, 36, 63,
68, 36, 36, 86, 53, 40, 41, 53, 42, 73,
19, 12, 20, 12, 21, 22, 23, 12, 24, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 26,
27, 25, 25, 25, 25, 25, 25, 25, 25, 25,
28, 28, 145, 28, 28, 34, 29, 29, 28, 30,
144, 28, 35, 36, 29, 34, 130, 34, 31, 71,
76, 37, 35, 36, 35, 34, 129, 32, 32, 37,
71, 76, 35, 46, 46, 111, 46, 47, 32, 32,
41, 48, 110, 41, 53, 54, 56, 53, 90, 56,
69, 70, 57, 69, 72, 73, 66, 83, 88, 74,
54, 68, 43, 36, 36, 53, 40, 41, 53, 42,
73, 54, 38, 43, 36, 66, 67, 71, 66, 65,
72, 36, 36, 69, 70, 36, 52, 60, 71, 36,
36, 72, 48, 47, 69, 70, 78, 50, 51, 78,
50, 36, 52, 36, 55, 44, 44, 55, 44, 45,
36, 36, 38, 46, 36, 36, 80, 79, 36, 36,
157, 83, 56, 57, 84, 58, 85, 80, 79, 59,
36, 36, 83, 56, 57, 84, 58, 85, 28, 90,
59, 61, 157, 63, 66, 67, 157, 66, 61, 61,
90, 157, 61, 61, 93, 157, 61, 61, 75, 44,
42, 43, 75, 44, 93, 72, 73, 45, 83, 88,
74, 42, 43, 75, 44, 93, 154, 154, 45, 38,
46, 46, 81, 46, 47, 81, 38, 38, 48, 96,
38, 89, 55, 38, 40, 68, 38, 38, 78, 46,
96, 78, 79, 63, 51, 82, 80, 50, 38, 55,
58, 53, 54, 58, 53, 56, 82, 49, 56, 69,
70, 57, 69, 84, 85, 86, 40, 99, 87, 94,
59, 60, 95, 61, 84, 85, 86, 62, 99, 87,
94, 59, 60, 95, 61, 160, 30, 91, 62, 64,
91, 66, 160, 97, 100, 92, 64, 64, 98, 101,
157, 75, 76, 157, 157, 93, 77, 157, 61, 61,
62, 62, 63, 62, 62, 62, 62, 62, 62, 62,
62, 62, 64, 62, 62, 62, 62, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 62, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 39, 81,
82, 39, 96, 157, 88, 157, 157, 88, 157, 94,
81, 82, 89, 96, 95, 91, 40, 41, 92, 42,
94, 97, 98, 43, 157, 95, 91, 40, 41, 92,
42, 157, 97, 98, 43, 55, 75, 44, 55, 75,
76, 157, 75, 44, 77, 75, 76, 157, 157, 78,
64, 102, 64, 64, 97, 100, 64, 64, 91, 98,
101, 91, 102, 160, 160, 160, 92, 160, 64, 64,
65, 65, 66, 65, 65, 65, 65, 65, 65, 65,
65, 65, 65, 67, 65, 65, 65, 65, 65, 67,
67, 67, 67, 67, 67, 67, 67, 67, 67, 65,
67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
41, 78, 46, 41, 78, 79, 105, 78, 46, 80,
78, 79, 160, 81, 160, 80, 81, 105, 160, 106,
42, 43, 160, 44, 107, 78, 46, 45, 78, 79,
106, 42, 43, 80, 44, 107, 82, 160, 45, 58,
77, 157, 78, 56, 57, 157, 58, 99, 75, 44,
59, 75, 76, 157, 56, 57, 77, 58, 99, 157,
79, 59, 61, 157, 63, 102, 157, 157, 157, 61,
61, 79, 157, 61, 61, 157, 102, 61, 61, 75,
44, 100, 75, 76, 101, 105, 103, 77, 106, 61,
61, 104, 100, 109, 110, 101, 105, 103, 88, 106,
111, 88, 104, 112, 109, 110, 89, 113, 114, 115,
116, 111, 117, 118, 112, 119, 120, 121, 113, 114,
115, 116, 122, 117, 118, 123, 119, 120, 121, 124,
125, 128, 129, 122, 130, 131, 123, 132, 133, 134,
78, 46, 58, 78, 79, 108, 109, 82, 80, 160,
103, 160, 112, 104, 113, 160, 108, 109, 114, 59,
60, 103, 61, 112, 104, 113, 62, 160, 115, 114,
59, 60, 116, 61, 160, 160, 117, 62, 64, 115,
66, 160, 118, 116, 160, 64, 64, 117, 119, 64,
120, 64, 64, 118, 121, 64, 64, 160, 122, 119,
123, 120, 124, 125, 126, 121, 127, 64, 64, 122,
128, 123, 131, 124, 125, 126, 132, 127, 133, 134,
135, 128, 136, 131, 137, 138, 139, 132, 140, 133,
134, 135, 141, 136, 142, 137, 138, 139, 143, 140,
124, 125, 128, 129, 135, 130, 131, 136, 132, 133,
134, 137, 138, 139, 140, 135, 143, 144, 136, 145,
146, 147, 137, 138, 139, 140, 148, 143, 144, 149,
145, 146, 147, 153, 154, 155, 156, 148, 157, 157,
149, 157, 157, 157, 153, 154, 155, 156, 31, 31,
31, 31, 31, 31, 36, 157, 157, 157, 36, 37,
37, 37, 37, 37, 37, 49, 49, 62, 62, 62,
62, 62, 62, 74, 74, 74, 74, 74, 74, 150,
150, 150, 157, 150, 150, 152, 157, 152, 157, 152,
152, 11, 157, 157, 157, 157, 157, 157, 157, 157,
146, 147, 148, 141, 149, 142, 150, 151, 152, 143,
156, 146, 147, 148, 157, 149, 158, 150, 151, 152,
159, 156, 160, 160, 160, 157, 160, 158, 160, 160,
160, 159, 33, 33, 33, 33, 33, 33, 38, 160,
160, 160, 38, 39, 39, 39, 39, 39, 39, 52,
52, 65, 65, 65, 65, 65, 65, 77, 77, 77,
77, 77, 77, 153, 153, 153, 160, 153, 153, 155,
160, 155, 160, 155, 155, 11, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160
} ;
static yyconst flex_int16_t yy_chk[531] =
static yyconst flex_int16_t yy_chk[517] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 2, 4,
127, 2, 4, 7, 2, 4, 6, 6, 126, 6,
7, 7, 6, 8, 108, 9, 6, 141, 141, 9,
8, 8, 9, 6, 6, 10, 107, 24, 24, 10,
24, 87, 10, 86, 6, 6, 17, 17, 18, 18,
17, 18, 18, 17, 17, 65, 18, 17, 17, 62,
40, 17, 17, 60, 26, 17, 17, 26, 17, 43,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 4, 130, 2, 4, 7, 2, 4, 6, 6,
129, 6, 7, 7, 6, 8, 111, 9, 6, 42,
45, 9, 8, 8, 9, 10, 110, 6, 6, 10,
42, 45, 10, 18, 18, 90, 18, 18, 6, 6,
17, 18, 89, 17, 26, 26, 28, 26, 68, 28,
35, 35, 28, 35, 43, 43, 65, 59, 62, 44,
26, 40, 17, 17, 17, 53, 17, 17, 53, 17,
43, 53, 37, 17, 25, 33, 33, 42, 33, 32,
42, 25, 25, 41, 41, 25, 25, 28, 42, 25,
25, 42, 22, 21, 41, 41, 48, 50, 50, 48,
50, 25, 25, 27, 27, 44, 44, 27, 44, 44,
27, 27, 15, 44, 27, 27, 56, 48, 27, 27,
11, 58, 27, 27, 58, 27, 59, 56, 48, 27,
27, 27, 58, 27, 27, 58, 27, 59, 5, 68,
27, 29, 0, 29, 66, 66, 0, 66, 29, 29,
68, 0, 29, 29, 70, 0, 29, 29, 45, 45,
17, 17, 44, 17, 71, 43, 43, 17, 59, 62,
44, 17, 17, 44, 17, 71, 144, 144, 17, 27,
46, 46, 51, 46, 46, 51, 27, 27, 46, 73,
27, 63, 27, 27, 39, 34, 27, 27, 47, 47,
73, 47, 47, 30, 24, 51, 47, 23, 27, 27,
29, 53, 53, 29, 53, 56, 51, 21, 56, 69,
69, 56, 69, 60, 60, 61, 15, 75, 61, 72,
29, 29, 72, 29, 60, 60, 61, 29, 75, 61,
72, 29, 29, 72, 29, 11, 5, 70, 29, 31,
70, 31, 0, 74, 76, 70, 31, 31, 74, 82,
0, 45, 45, 0, 0, 70, 45, 0, 29, 29,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 39, 57,
57, 39, 72, 0, 67, 0, 0, 67, 0, 71,
57, 57, 67, 72, 71, 69, 39, 39, 69, 39,
71, 73, 79, 39, 0, 71, 69, 39, 39, 69,
39, 0, 73, 79, 39, 54, 74, 74, 54, 74,
74, 0, 75, 75, 74, 75, 75, 0, 0, 78,
31, 83, 31, 31, 74, 76, 31, 31, 91, 74,
82, 91, 83, 0, 0, 0, 91, 0, 31, 31,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
41, 77, 77, 41, 77, 77, 85, 78, 78, 77,
78, 78, 0, 81, 0, 78, 81, 85, 0, 86,
41, 41, 0, 41, 86, 79, 79, 41, 79, 79,
86, 41, 41, 79, 41, 86, 81, 0, 41, 57,
75, 0, 78, 54, 54, 0, 54, 80, 76, 76,
54, 76, 76, 0, 54, 54, 76, 54, 80, 0,
78, 54, 61, 0, 61, 82, 0, 0, 0, 61,
61, 78, 0, 61, 61, 0, 82, 61, 61, 77,
77, 81, 77, 77, 81, 84, 83, 77, 85, 61,
61, 83, 81, 90, 91, 81, 84, 83, 88, 85,
92, 88, 83, 93, 90, 91, 88, 94, 95, 96,
97, 92, 98, 99, 93, 100, 101, 102, 94, 95,
96, 97, 103, 98, 99, 104, 100, 101, 102, 105,
106, 109, 112, 103, 113, 114, 104, 115, 116, 117,
80, 80, 57, 80, 80, 87, 88, 81, 80, 0,
84, 0, 93, 84, 94, 0, 87, 88, 95, 57,
57, 84, 57, 93, 84, 94, 57, 0, 96, 95,
57, 57, 97, 57, 0, 0, 98, 57, 64, 96,
64, 0, 99, 97, 0, 64, 64, 98, 100, 64,
101, 64, 64, 99, 102, 64, 64, 0, 103, 100,
104, 101, 105, 106, 107, 102, 108, 64, 64, 103,
109, 104, 112, 105, 106, 107, 115, 108, 116, 117,
118, 109, 119, 112, 120, 121, 124, 115, 125, 116,
117, 118, 126, 119, 127, 120, 121, 124, 128, 125,
105, 106, 109, 112, 118, 113, 114, 121, 115, 116,
117, 122, 123, 124, 125, 118, 128, 131, 121, 132,
134, 135, 122, 123, 124, 125, 138, 128, 131, 139,
132, 134, 135, 145, 146, 149, 154, 138, 0, 0,
139, 0, 0, 0, 145, 146, 149, 154, 158, 158,
158, 158, 158, 158, 159, 0, 0, 0, 159, 160,
160, 160, 160, 160, 160, 161, 161, 162, 162, 162,
162, 162, 162, 163, 163, 163, 163, 163, 163, 164,
164, 164, 0, 164, 164, 165, 0, 165, 0, 165,
165, 157, 157, 157, 157, 157, 157, 157, 157, 157,
131, 134, 135, 126, 137, 127, 138, 141, 142, 128,
148, 131, 134, 135, 149, 137, 152, 138, 141, 142,
157, 148, 0, 0, 0, 149, 0, 152, 0, 0,
0, 157, 161, 161, 161, 161, 161, 161, 162, 0,
0, 0, 162, 163, 163, 163, 163, 163, 163, 164,
164, 165, 165, 165, 165, 165, 165, 166, 166, 166,
166, 166, 166, 167, 167, 167, 0, 167, 167, 168,
0, 168, 0, 168, 168, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
157, 157, 157, 157, 157, 157, 157, 157, 157, 157
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 160, 160, 160, 160
} ;
/* The intent behind this definition is that it'll catch
@ -684,7 +682,7 @@ Modify cmDependsFortranLexer.h:
/*--------------------------------------------------------------------------*/
#line 672 "cmDependsFortranLexer.cxx"
#line 670 "cmDependsFortranLexer.cxx"
#define INITIAL 0
#define free_fmt 1
@ -915,7 +913,7 @@ YY_DECL
#line 75 "cmDependsFortranLexer.in.l"
#line 903 "cmDependsFortranLexer.cxx"
#line 901 "cmDependsFortranLexer.cxx"
if ( !yyg->yy_init )
{
@ -969,13 +967,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 158 )
if ( yy_current_state >= 161 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 492 );
while ( yy_base[yy_current_state] != 476 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@ -1165,51 +1163,59 @@ YY_RULE_SETUP
YY_BREAK
case 33:
/* rule 33 can match eol */
YY_RULE_SETUP
#line 150 "cmDependsFortranLexer.in.l"
{ return GARBAGE; }
{ return COMMA; }
case 34:
YY_RULE_SETUP
#line 152 "cmDependsFortranLexer.in.l"
{ return ASSIGNMENT_OP; }
{ return DCOLON; }
case 35:
/* rule 35 can match eol */
YY_RULE_SETUP
#line 154 "cmDependsFortranLexer.in.l"
{ return GARBAGE; }
case 36:
YY_RULE_SETUP
#line 156 "cmDependsFortranLexer.in.l"
{ return ASSIGNMENT_OP; }
case 37:
YY_RULE_SETUP
#line 158 "cmDependsFortranLexer.in.l"
{
yylvalp->string = strdup(yytext);
return WORD;
}
case 36:
YY_RULE_SETUP
#line 159 "cmDependsFortranLexer.in.l"
{ return GARBAGE; }
case 37:
/* rule 37 can match eol */
YY_RULE_SETUP
#line 161 "cmDependsFortranLexer.in.l"
{ return EOSTMT; }
case 38:
YY_RULE_SETUP
#line 164 "cmDependsFortranLexer.in.l"
/* Ignore */
YY_BREAK
#line 163 "cmDependsFortranLexer.in.l"
{ return GARBAGE; }
case 39:
/* rule 39 can match eol */
YY_RULE_SETUP
#line 165 "cmDependsFortranLexer.in.l"
/* Ignore line-endings preceeded by \ */
YY_BREAK
{ return EOSTMT; }
case 40:
YY_RULE_SETUP
#line 167 "cmDependsFortranLexer.in.l"
#line 168 "cmDependsFortranLexer.in.l"
/* Ignore */
YY_BREAK
case 41:
/* rule 41 can match eol */
YY_RULE_SETUP
#line 169 "cmDependsFortranLexer.in.l"
/* Ignore line-endings preceeded by \ */
YY_BREAK
case 42:
YY_RULE_SETUP
#line 171 "cmDependsFortranLexer.in.l"
{ return *yytext; }
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(free_fmt):
case YY_STATE_EOF(fixed_fmt):
case YY_STATE_EOF(str_sq):
case YY_STATE_EOF(str_dq):
#line 169 "cmDependsFortranLexer.in.l"
#line 173 "cmDependsFortranLexer.in.l"
{
if(!cmDependsFortranParser_FilePop(yyextra) )
{
@ -1217,12 +1223,12 @@ case YY_STATE_EOF(str_dq):
}
}
YY_BREAK
case 41:
case 43:
YY_RULE_SETUP
#line 176 "cmDependsFortranLexer.in.l"
#line 180 "cmDependsFortranLexer.in.l"
ECHO;
YY_BREAK
#line 1239 "cmDependsFortranLexer.cxx"
#line 1247 "cmDependsFortranLexer.cxx"
case YY_END_OF_BUFFER:
{
@ -1515,7 +1521,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 158 )
if ( yy_current_state >= 161 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@ -1544,11 +1550,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 158 )
if ( yy_current_state >= 161 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 157);
yy_is_jam = (yy_current_state == 160);
return yy_is_jam ? 0 : yy_current_state;
}
@ -2378,7 +2384,7 @@ void cmDependsFortran_yyfree (void * ptr , yyscan_t)
#define YYTABLES_NAME "yytables"
#line 176 "cmDependsFortranLexer.in.l"
#line 180 "cmDependsFortranLexer.in.l"

View File

@ -147,6 +147,10 @@ $[ \t]*endif { return F90PPR_ENDIF; }
&([ \t\n]*|!.*)*
&([ \t\n]*|!.*)*&
, { return COMMA; }
:: { return DCOLON; }
<fixed_fmt>\n[ ]{5}[^ ] { return GARBAGE; }
=|=> { return ASSIGNMENT_OP; }

View File

@ -96,10 +96,12 @@
F90PPR_ELSE = 277,
F90PPR_ELIF = 278,
F90PPR_ENDIF = 279,
CPP_TOENDL = 280,
UNTERMINATED_STRING = 281,
STRING = 282,
WORD = 283
COMMA = 280,
DCOLON = 281,
CPP_TOENDL = 282,
UNTERMINATED_STRING = 283,
STRING = 284,
WORD = 285
};
#endif
/* Tokens. */
@ -125,10 +127,12 @@
#define F90PPR_ELSE 277
#define F90PPR_ELIF 278
#define F90PPR_ENDIF 279
#define CPP_TOENDL 280
#define UNTERMINATED_STRING 281
#define STRING 282
#define WORD 283
#define COMMA 280
#define DCOLON 281
#define CPP_TOENDL 282
#define UNTERMINATED_STRING 283
#define STRING 284
#define WORD 285
@ -297,7 +301,7 @@ typedef union YYSTYPE
char* string;
}
/* Line 187 of yacc.c. */
#line 301 "cmDependsFortranParser.cxx"
#line 305 "cmDependsFortranParser.cxx"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@ -310,7 +314,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */
#line 314 "cmDependsFortranParser.cxx"
#line 318 "cmDependsFortranParser.cxx"
#ifdef short
# undef short
@ -525,20 +529,20 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 139
#define YYLAST 271
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 29
#define YYNTOKENS 31
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 16
/* YYNRULES -- Number of rules. */
#define YYNRULES 48
#define YYNRULES 52
/* YYNRULES -- Number of states. */
#define YYNSTATES 82
#define YYNSTATES 94
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 283
#define YYMAXUTOK 285
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@ -574,7 +578,7 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28
25, 26, 27, 28, 29, 30
};
#if YYDEBUG
@ -583,39 +587,43 @@ static const yytype_uint8 yytranslate[] =
static const yytype_uint8 yyprhs[] =
{
0, 0, 3, 4, 7, 9, 11, 16, 19, 24,
29, 34, 39, 44, 49, 54, 58, 62, 66, 70,
75, 79, 81, 83, 85, 87, 89, 91, 93, 95,
97, 99, 101, 103, 105, 107, 109, 111, 113, 115,
117, 119, 121, 122, 125, 127, 129, 131, 133
30, 38, 43, 48, 53, 58, 63, 68, 72, 76,
80, 84, 89, 93, 95, 97, 99, 101, 103, 105,
107, 109, 111, 113, 115, 117, 119, 121, 123, 125,
127, 129, 131, 133, 135, 136, 139, 141, 143, 145,
147, 149, 151
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
30, 0, -1, -1, 30, 31, -1, 33, -1, 32,
-1, 28, 4, 43, 3, -1, 28, 3, -1, 28,
28, 43, 3, -1, 28, 27, 43, 3, -1, 34,
27, 43, 3, -1, 35, 28, 43, 3, -1, 36,
28, 43, 3, -1, 37, 28, 43, 3, -1, 38,
28, 43, 3, -1, 39, 43, 3, -1, 40, 43,
3, -1, 41, 43, 3, -1, 42, 43, 3, -1,
28, 5, 43, 3, -1, 5, 43, 3, -1, 3,
-1, 1, -1, 6, -1, 7, -1, 8, -1, 10,
-1, 9, -1, 12, -1, 11, -1, 13, -1, 19,
-1, 14, -1, 20, -1, 15, -1, 21, -1, 17,
-1, 23, -1, 16, -1, 22, -1, 18, -1, 24,
-1, -1, 43, 44, -1, 28, -1, 27, -1, 5,
-1, 4, -1, 26, -1
32, 0, -1, -1, 32, 33, -1, 35, -1, 34,
-1, 30, 4, 45, 3, -1, 30, 3, -1, 30,
30, 45, 3, -1, 30, 26, 30, 45, 3, -1,
30, 25, 30, 26, 30, 45, 3, -1, 30, 29,
45, 3, -1, 36, 29, 45, 3, -1, 37, 30,
45, 3, -1, 38, 30, 45, 3, -1, 39, 30,
45, 3, -1, 40, 30, 45, 3, -1, 41, 45,
3, -1, 42, 45, 3, -1, 43, 45, 3, -1,
44, 45, 3, -1, 30, 5, 45, 3, -1, 5,
45, 3, -1, 3, -1, 1, -1, 6, -1, 7,
-1, 8, -1, 10, -1, 9, -1, 12, -1, 11,
-1, 13, -1, 19, -1, 14, -1, 20, -1, 15,
-1, 21, -1, 17, -1, 23, -1, 16, -1, 22,
-1, 18, -1, 24, -1, -1, 45, 46, -1, 30,
-1, 29, -1, 5, -1, 4, -1, 26, -1, 25,
-1, 28, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 161, 161, 161, 163, 163, 165, 171, 181, 211,
222, 229, 235, 241, 247, 253, 258, 263, 268, 273,
277, 278, 279, 284, 284, 284, 285, 285, 286, 286,
287, 287, 288, 288, 289, 289, 290, 290, 291, 291,
292, 292, 293, 293, 296, 297, 298, 299, 300
0, 162, 162, 162, 164, 164, 166, 172, 182, 212,
223, 236, 247, 254, 260, 266, 272, 278, 283, 288,
293, 298, 302, 303, 304, 309, 309, 309, 310, 310,
311, 311, 312, 312, 313, 313, 314, 314, 315, 315,
316, 316, 317, 317, 318, 318, 321, 322, 323, 324,
325, 326, 327
};
#endif
@ -629,10 +637,10 @@ static const char *const yytname[] =
"CPP_DEFINE", "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", "CPP_IFNDEF",
"CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", "F90PPR_IFDEF",
"F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", "F90PPR_ELIF",
"F90PPR_ENDIF", "CPP_TOENDL", "UNTERMINATED_STRING", "STRING", "WORD",
"$accept", "code", "stmt", "assignment_stmt", "keyword_stmt", "include",
"define", "undef", "ifdef", "ifndef", "if", "elif", "else", "endif",
"other", "misc_code", 0
"F90PPR_ENDIF", "COMMA", "DCOLON", "CPP_TOENDL", "UNTERMINATED_STRING",
"STRING", "WORD", "$accept", "code", "stmt", "assignment_stmt",
"keyword_stmt", "include", "define", "undef", "ifdef", "ifndef", "if",
"elif", "else", "endif", "other", "misc_code", 0
};
#endif
@ -643,28 +651,31 @@ static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
0, 29, 30, 30, 31, 31, 32, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 34, 34, 34, 35, 35, 36, 36,
37, 37, 38, 38, 39, 39, 40, 40, 41, 41,
42, 42, 43, 43, 44, 44, 44, 44, 44
0, 31, 32, 32, 33, 33, 34, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 36, 36, 36, 37, 37,
38, 38, 39, 39, 40, 40, 41, 41, 42, 42,
43, 43, 44, 44, 45, 45, 46, 46, 46, 46,
46, 46, 46
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 0, 2, 1, 1, 4, 2, 4, 4,
4, 4, 4, 4, 4, 3, 3, 3, 3, 4,
3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 2, 0, 2, 1, 1, 4, 2, 4, 5,
7, 4, 4, 4, 4, 4, 4, 3, 3, 3,
3, 4, 3, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 2, 1, 1, 1, 1, 1
1, 1, 1, 1, 0, 2, 1, 1, 1, 1,
1, 1, 1
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@ -672,45 +683,47 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
2, 0, 1, 22, 21, 42, 23, 24, 25, 27,
26, 29, 28, 30, 32, 34, 38, 36, 40, 31,
33, 35, 39, 37, 41, 0, 3, 5, 4, 0,
0, 0, 0, 0, 42, 42, 42, 42, 0, 7,
42, 42, 42, 42, 42, 42, 42, 42, 42, 0,
0, 0, 0, 20, 47, 46, 48, 45, 44, 43,
0, 0, 0, 0, 0, 0, 0, 0, 0, 15,
16, 17, 18, 6, 19, 9, 8, 10, 11, 12,
13, 14
2, 0, 1, 24, 23, 44, 25, 26, 27, 29,
28, 31, 30, 32, 34, 36, 40, 38, 42, 33,
35, 37, 41, 39, 43, 0, 3, 5, 4, 0,
0, 0, 0, 0, 44, 44, 44, 44, 0, 7,
44, 44, 0, 0, 44, 44, 44, 44, 44, 44,
44, 0, 0, 0, 0, 22, 49, 48, 51, 50,
52, 47, 46, 45, 0, 0, 0, 44, 0, 0,
0, 0, 0, 0, 0, 17, 18, 19, 20, 6,
21, 0, 0, 11, 8, 12, 13, 14, 15, 16,
44, 9, 0, 10
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
-1, 1, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 59
34, 35, 36, 37, 38, 63
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -26
static const yytype_int8 yypact[] =
#define YYPACT_NINF -35
static const yytype_int16 yypact[] =
{
-26, 0, -26, -26, -26, -26, -26, -26, -26, -26,
-26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
-26, -26, -26, -26, -26, 111, -26, -26, -26, -25,
-24, 19, 23, 63, -26, -26, -26, -26, 22, -26,
-26, -26, -26, -26, -26, -26, -26, -26, -26, 26,
29, 32, 35, -26, -26, -26, -26, -26, -26, -26,
38, 41, 67, 70, 73, 76, 79, 82, 85, -26,
-26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
-26, -26
-35, 29, -35, -35, -35, -35, -35, -35, -35, -35,
-35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
-35, -35, -35, -35, -35, 241, -35, -35, -35, -25,
-22, -21, -13, -12, -35, -35, -35, -35, 57, -35,
-35, -35, -11, -10, -35, -35, -35, -35, -35, -35,
-35, 63, 69, 75, 103, -35, -35, -35, -35, -35,
-35, -35, -35, -35, 109, 115, -5, -35, 121, 149,
155, 161, 167, 195, 201, -35, -35, -35, -35, -35,
-35, -8, 207, -35, -35, -35, -35, -35, -35, -35,
-35, -35, 213, -35
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
-26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
-26, -26, -26, -26, 83, -26
-35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
-35, -35, -35, -35, -34, -35
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@ -720,53 +733,82 @@ static const yytype_int8 yypgoto[] =
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
2, 3, 44, 4, 45, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 53, 54, 55, 25, 69,
54, 55, 70, 54, 55, 71, 54, 55, 72, 54,
55, 73, 54, 55, 74, 54, 55, 46, 56, 57,
58, 47, 56, 57, 58, 56, 57, 58, 56, 57,
58, 56, 57, 58, 56, 57, 58, 56, 57, 58,
75, 54, 55, 76, 54, 55, 77, 54, 55, 78,
54, 55, 79, 54, 55, 80, 54, 55, 81, 54,
55, 48, 0, 56, 57, 58, 56, 57, 58, 56,
57, 58, 56, 57, 58, 56, 57, 58, 56, 57,
58, 56, 57, 58, 39, 40, 41, 49, 50, 51,
52, 0, 0, 60, 61, 62, 63, 64, 65, 66,
67, 68, 0, 0, 0, 0, 0, 0, 42, 43
51, 52, 53, 54, 46, 0, 64, 65, 47, 48,
68, 69, 70, 71, 72, 73, 74, 49, 50, 66,
67, 81, 90, 0, 0, 0, 0, 0, 0, 2,
3, 0, 4, 82, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 0, 0, 92, 0, 0, 25,
55, 56, 57, 0, 0, 0, 75, 56, 57, 0,
0, 0, 76, 56, 57, 0, 0, 0, 77, 56,
57, 0, 58, 59, 0, 60, 61, 62, 58, 59,
0, 60, 61, 62, 58, 59, 0, 60, 61, 62,
58, 59, 0, 60, 61, 62, 78, 56, 57, 0,
0, 0, 79, 56, 57, 0, 0, 0, 80, 56,
57, 0, 0, 0, 83, 56, 57, 0, 58, 59,
0, 60, 61, 62, 58, 59, 0, 60, 61, 62,
58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
61, 62, 84, 56, 57, 0, 0, 0, 85, 56,
57, 0, 0, 0, 86, 56, 57, 0, 0, 0,
87, 56, 57, 0, 58, 59, 0, 60, 61, 62,
58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
61, 62, 58, 59, 0, 60, 61, 62, 88, 56,
57, 0, 0, 0, 89, 56, 57, 0, 0, 0,
91, 56, 57, 0, 0, 0, 93, 56, 57, 0,
58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
61, 62, 58, 59, 0, 60, 61, 62, 58, 59,
0, 60, 61, 62, 39, 40, 41, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 42, 43, 0, 0,
44, 45
};
static const yytype_int8 yycheck[] =
{
0, 1, 27, 3, 28, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 3, 4, 5, 28, 3,
4, 5, 3, 4, 5, 3, 4, 5, 3, 4,
5, 3, 4, 5, 3, 4, 5, 28, 26, 27,
28, 28, 26, 27, 28, 26, 27, 28, 26, 27,
28, 26, 27, 28, 26, 27, 28, 26, 27, 28,
3, 4, 5, 3, 4, 5, 3, 4, 5, 3,
4, 5, 3, 4, 5, 3, 4, 5, 3, 4,
5, 28, -1, 26, 27, 28, 26, 27, 28, 26,
27, 28, 26, 27, 28, 26, 27, 28, 26, 27,
28, 26, 27, 28, 3, 4, 5, 34, 35, 36,
37, -1, -1, 40, 41, 42, 43, 44, 45, 46,
47, 48, -1, -1, -1, -1, -1, -1, 27, 28
34, 35, 36, 37, 29, -1, 40, 41, 30, 30,
44, 45, 46, 47, 48, 49, 50, 30, 30, 30,
30, 26, 30, -1, -1, -1, -1, -1, -1, 0,
1, -1, 3, 67, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, -1, -1, 90, -1, -1, 30,
3, 4, 5, -1, -1, -1, 3, 4, 5, -1,
-1, -1, 3, 4, 5, -1, -1, -1, 3, 4,
5, -1, 25, 26, -1, 28, 29, 30, 25, 26,
-1, 28, 29, 30, 25, 26, -1, 28, 29, 30,
25, 26, -1, 28, 29, 30, 3, 4, 5, -1,
-1, -1, 3, 4, 5, -1, -1, -1, 3, 4,
5, -1, -1, -1, 3, 4, 5, -1, 25, 26,
-1, 28, 29, 30, 25, 26, -1, 28, 29, 30,
25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
29, 30, 3, 4, 5, -1, -1, -1, 3, 4,
5, -1, -1, -1, 3, 4, 5, -1, -1, -1,
3, 4, 5, -1, 25, 26, -1, 28, 29, 30,
25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
29, 30, 25, 26, -1, 28, 29, 30, 3, 4,
5, -1, -1, -1, 3, 4, 5, -1, -1, -1,
3, 4, 5, -1, -1, -1, 3, 4, 5, -1,
25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
29, 30, 25, 26, -1, 28, 29, 30, 25, 26,
-1, 28, 29, 30, 3, 4, 5, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
29, 30
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 30, 0, 1, 3, 5, 6, 7, 8, 9,
0, 32, 0, 1, 3, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 28, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 3,
4, 5, 27, 28, 27, 28, 28, 28, 28, 43,
43, 43, 43, 3, 4, 5, 26, 27, 28, 44,
43, 43, 43, 43, 43, 43, 43, 43, 43, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3
20, 21, 22, 23, 24, 30, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 3,
4, 5, 25, 26, 29, 30, 29, 30, 30, 30,
30, 45, 45, 45, 45, 3, 4, 5, 25, 26,
28, 29, 30, 46, 45, 45, 30, 30, 45, 45,
45, 45, 45, 45, 45, 3, 3, 3, 3, 3,
3, 26, 45, 3, 3, 3, 3, 3, 3, 3,
30, 3, 45, 3
};
#define yyerrok (yyerrstatus = 0)
@ -1581,14 +1623,14 @@ yyreduce:
switch (yyn)
{
case 6:
#line 166 "cmDependsFortranParser.y"
#line 167 "cmDependsFortranParser.y"
{
free((yyvsp[(1) - (4)].string));
}
break;
case 7:
#line 172 "cmDependsFortranParser.y"
#line 173 "cmDependsFortranParser.y"
{
if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (2)].string), "interface"))
{
@ -1601,7 +1643,7 @@ yyreduce:
break;
case 8:
#line 182 "cmDependsFortranParser.y"
#line 183 "cmDependsFortranParser.y"
{
if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "use"))
{
@ -1634,7 +1676,37 @@ yyreduce:
break;
case 9:
#line 212 "cmDependsFortranParser.y"
#line 213 "cmDependsFortranParser.y"
{
if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (5)].string), "use"))
{
cmDependsFortranParser* parser =
cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleUse(parser, (yyvsp[(3) - (5)].string));
}
free((yyvsp[(1) - (5)].string));
free((yyvsp[(3) - (5)].string));
}
break;
case 10:
#line 224 "cmDependsFortranParser.y"
{
if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (7)].string), "use") &&
cmDependsFortranParserIsKeyword((yyvsp[(3) - (7)].string), "non_intrinsic") )
{
cmDependsFortranParser* parser =
cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleUse(parser, (yyvsp[(5) - (7)].string));
}
free((yyvsp[(1) - (7)].string));
free((yyvsp[(3) - (7)].string));
free((yyvsp[(5) - (7)].string));
}
break;
case 11:
#line 237 "cmDependsFortranParser.y"
{
if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "include"))
{
@ -1647,8 +1719,8 @@ yyreduce:
}
break;
case 10:
#line 223 "cmDependsFortranParser.y"
case 12:
#line 248 "cmDependsFortranParser.y"
{
cmDependsFortranParser* parser =
cmDependsFortran_yyget_extra(yyscanner);
@ -1657,8 +1729,8 @@ yyreduce:
}
break;
case 11:
#line 230 "cmDependsFortranParser.y"
case 13:
#line 255 "cmDependsFortranParser.y"
{
cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleDefine(parser, (yyvsp[(2) - (4)].string));
@ -1666,8 +1738,8 @@ yyreduce:
}
break;
case 12:
#line 236 "cmDependsFortranParser.y"
case 14:
#line 261 "cmDependsFortranParser.y"
{
cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleUndef(parser, (yyvsp[(2) - (4)].string));
@ -1675,8 +1747,8 @@ yyreduce:
}
break;
case 13:
#line 242 "cmDependsFortranParser.y"
case 15:
#line 267 "cmDependsFortranParser.y"
{
cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleIfdef(parser, (yyvsp[(2) - (4)].string));
@ -1684,8 +1756,8 @@ yyreduce:
}
break;
case 14:
#line 248 "cmDependsFortranParser.y"
case 16:
#line 273 "cmDependsFortranParser.y"
{
cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleIfndef(parser, (yyvsp[(2) - (4)].string));
@ -1693,58 +1765,58 @@ yyreduce:
}
break;
case 15:
#line 254 "cmDependsFortranParser.y"
case 17:
#line 279 "cmDependsFortranParser.y"
{
cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleIf(parser);
}
break;
case 16:
#line 259 "cmDependsFortranParser.y"
case 18:
#line 284 "cmDependsFortranParser.y"
{
cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleElif(parser);
}
break;
case 17:
#line 264 "cmDependsFortranParser.y"
case 19:
#line 289 "cmDependsFortranParser.y"
{
cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleElse(parser);
}
break;
case 18:
#line 269 "cmDependsFortranParser.y"
case 20:
#line 294 "cmDependsFortranParser.y"
{
cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleEndif(parser);
}
break;
case 19:
#line 274 "cmDependsFortranParser.y"
case 21:
#line 299 "cmDependsFortranParser.y"
{
free((yyvsp[(1) - (4)].string));
}
break;
case 44:
#line 296 "cmDependsFortranParser.y"
case 46:
#line 321 "cmDependsFortranParser.y"
{ free ((yyvsp[(1) - (1)].string)); }
break;
case 45:
#line 297 "cmDependsFortranParser.y"
case 47:
#line 322 "cmDependsFortranParser.y"
{ free ((yyvsp[(1) - (1)].string)); }
break;
/* Line 1267 of yacc.c. */
#line 1748 "cmDependsFortranParser.cxx"
#line 1820 "cmDependsFortranParser.cxx"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@ -1960,7 +2032,7 @@ yyreturn:
}
#line 303 "cmDependsFortranParser.y"
#line 330 "cmDependsFortranParser.y"
/* End of grammar */

View File

@ -150,6 +150,7 @@ static bool cmDependsFortranParserIsKeyword(const char* word,
%token CPP_IFDEF CPP_IFNDEF CPP_IF CPP_ELSE CPP_ELIF CPP_ENDIF
%token F90PPR_IFDEF F90PPR_IFNDEF F90PPR_IF
%token F90PPR_ELSE F90PPR_ELIF F90PPR_ENDIF
%token COMMA DCOLON
%token <string> CPP_TOENDL
%token <number> UNTERMINATED_STRING
%token <string> STRING WORD
@ -208,6 +209,30 @@ keyword_stmt:
free($1);
free($2);
}
| WORD DCOLON WORD other EOSTMT
{
if (cmDependsFortranParserIsKeyword($1, "use"))
{
cmDependsFortranParser* parser =
cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleUse(parser, $3);
}
free($1);
free($3);
}
| WORD COMMA WORD DCOLON WORD other EOSTMT
{
if (cmDependsFortranParserIsKeyword($1, "use") &&
cmDependsFortranParserIsKeyword($3, "non_intrinsic") )
{
cmDependsFortranParser* parser =
cmDependsFortran_yyget_extra(yyscanner);
cmDependsFortranParser_RuleUse(parser, $5);
}
free($1);
free($3);
free($5);
}
| WORD STRING other EOSTMT /* Ignore */
{
if (cmDependsFortranParserIsKeyword($1, "include"))
@ -297,6 +322,8 @@ misc_code:
| STRING { free ($1); }
| GARBAGE
| ASSIGNMENT_OP
| DCOLON
| COMMA
| UNTERMINATED_STRING
;

View File

@ -61,10 +61,12 @@
F90PPR_ELSE = 277,
F90PPR_ELIF = 278,
F90PPR_ENDIF = 279,
CPP_TOENDL = 280,
UNTERMINATED_STRING = 281,
STRING = 282,
WORD = 283
COMMA = 280,
DCOLON = 281,
CPP_TOENDL = 282,
UNTERMINATED_STRING = 283,
STRING = 284,
WORD = 285
};
#endif
/* Tokens. */
@ -90,22 +92,24 @@
#define F90PPR_ELSE 277
#define F90PPR_ELIF 278
#define F90PPR_ENDIF 279
#define CPP_TOENDL 280
#define UNTERMINATED_STRING 281
#define STRING 282
#define WORD 283
#define COMMA 280
#define DCOLON 281
#define CPP_TOENDL 282
#define UNTERMINATED_STRING 283
#define STRING 284
#define WORD 285
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 81 "cmDependsFortranParser.y"
#line 141 "cmDependsFortranParser.y"
{
char* string;
}
/* Line 1489 of yacc.c. */
#line 109 "cmDependsFortranParserTokens.h"
#line 113 "cmDependsFortranParserTokens.h"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1