Added preprocessor support for parsing the float suffix.

TRAC #23185 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2413 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 3f83e29c
...@@ -368,7 +368,7 @@ struct yy_trans_info ...@@ -368,7 +368,7 @@ struct yy_trans_info
flex_int32_t yy_verify; flex_int32_t yy_verify;
flex_int32_t yy_nxt; flex_int32_t yy_nxt;
}; };
static yyconst flex_int16_t yy_accept[93] = static yyconst flex_int16_t yy_accept[98] =
{ 0, { 0,
0, 0, 0, 0, 39, 37, 34, 35, 35, 33, 0, 0, 0, 0, 39, 37, 34, 35, 35, 33,
7, 33, 33, 33, 33, 33, 33, 33, 33, 9, 7, 33, 33, 33, 33, 33, 33, 33, 33, 9,
...@@ -377,9 +377,9 @@ static yyconst flex_int16_t yy_accept[93] = ...@@ -377,9 +377,9 @@ static yyconst flex_int16_t yy_accept[93] =
23, 13, 24, 10, 2, 1, 26, 10, 9, 11, 23, 13, 24, 10, 2, 1, 26, 10, 9, 11,
11, 11, 9, 11, 9, 9, 14, 16, 18, 17, 11, 11, 9, 11, 9, 9, 14, 16, 18, 17,
15, 8, 36, 36, 31, 21, 32, 22, 3, 5, 15, 8, 36, 36, 31, 21, 32, 22, 3, 5,
6, 11, 10, 11, 1, 10, 11, 0, 10, 9, 6, 11, 10, 11, 10, 1, 10, 11, 10, 0,
9, 9, 28, 29, 0, 10, 10, 10, 9, 10, 10, 9, 9, 9, 28, 29, 0, 10, 10, 10,
9, 0 10, 9, 10, 10, 9, 10, 0
} ; } ;
...@@ -391,14 +391,14 @@ static yyconst flex_int32_t yy_ec[256] = ...@@ -391,14 +391,14 @@ static yyconst flex_int32_t yy_ec[256] =
1, 2, 5, 1, 6, 1, 7, 8, 1, 9, 1, 2, 5, 1, 6, 1, 7, 8, 1, 9,
9, 10, 11, 9, 12, 13, 14, 15, 16, 16, 9, 10, 11, 9, 12, 13, 14, 15, 16, 16,
16, 16, 16, 16, 16, 17, 17, 9, 9, 18, 16, 16, 16, 16, 16, 17, 17, 9, 9, 18,
19, 20, 9, 1, 21, 21, 21, 21, 22, 21, 19, 20, 9, 1, 21, 21, 21, 21, 22, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
23, 23, 23, 23, 24, 23, 23, 25, 23, 23, 24, 24, 24, 24, 25, 24, 24, 26, 24, 24,
9, 26, 9, 27, 23, 1, 21, 21, 21, 21, 9, 27, 9, 28, 24, 1, 21, 21, 21, 21,
22, 21, 23, 23, 23, 23, 23, 23, 23, 23, 22, 23, 24, 24, 24, 24, 24, 24, 24, 24,
23, 23, 23, 23, 23, 23, 24, 23, 23, 25, 24, 24, 24, 24, 24, 24, 25, 24, 24, 26,
23, 23, 9, 28, 9, 9, 1, 1, 1, 1, 24, 24, 9, 29, 9, 9, 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, 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,
...@@ -415,95 +415,101 @@ static yyconst flex_int32_t yy_ec[256] = ...@@ -415,95 +415,101 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1 1, 1, 1, 1, 1
} ; } ;
static yyconst flex_int32_t yy_meta[29] = static yyconst flex_int32_t yy_meta[30] =
{ 0, { 0,
1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3,
1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, 1, 4, 1, 5, 5, 5, 1, 1, 1,
4, 4, 4, 4, 4, 1, 1, 1 5, 5, 5, 5, 5, 5, 1, 1, 1
} ; } ;
static yyconst flex_int16_t yy_base[97] = static yyconst flex_int16_t yy_base[103] =
{ 0, { 0,
0, 0, 26, 28, 174, 175, 171, 175, 167, 148, 0, 0, 27, 29, 137, 194, 133, 194, 117, 100,
175, 147, 25, 175, 113, 23, 27, 32, 31, 38, 194, 98, 26, 194, 94, 24, 28, 33, 32, 39,
51, 38, 107, 50, 0, 74, 16, 52, 0, 175, 51, 39, 80, 50, 0, 68, 25, 54, 0, 194,
118, 102, 105, 175, 175, 175, 175, 175, 175, 175, 88, 71, 80, 194, 194, 194, 194, 194, 194, 194,
175, 175, 175, 68, 175, 0, 175, 81, 76, 84, 194, 194, 194, 71, 194, 0, 194, 85, 55, 64,
95, 107, 71, 112, 0, 58, 60, 175, 175, 175, 99, 111, 53, 105, 0, 50, 55, 194, 194, 194,
46, 0, 175, 55, 175, 175, 175, 175, 0, 175, 40, 0, 194, 38, 194, 194, 194, 194, 0, 194,
175, 98, 0, 127, 0, 0, 134, 71, 119, 0, 194, 117, 0, 130, 0, 0, 0, 137, 0, 88,
28, 0, 175, 175, 137, 129, 136, 140, 16, 143, 113, 0, 131, 0, 194, 194, 143, 139, 152, 150,
0, 175, 160, 33, 164, 168 0, 13, 153, 194, 0, 194, 194, 176, 31, 181,
186, 188
} ; } ;
static yyconst flex_int16_t yy_def[97] = static yyconst flex_int16_t yy_def[103] =
{ 0, { 0,
92, 1, 93, 93, 92, 92, 92, 92, 92, 92, 97, 1, 98, 98, 97, 97, 97, 97, 97, 97,
92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
92, 92, 92, 92, 94, 92, 92, 92, 95, 92, 20, 97, 97, 97, 99, 97, 97, 97, 100, 97,
92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
92, 92, 92, 92, 92, 96, 92, 92, 20, 20, 97, 97, 97, 97, 97, 101, 97, 97, 20, 20,
48, 51, 51, 92, 21, 51, 92, 92, 92, 92, 50, 51, 51, 102, 21, 51, 97, 97, 97, 97,
92, 94, 92, 92, 92, 92, 92, 92, 95, 92, 97, 99, 97, 97, 97, 97, 97, 97, 100, 97,
92, 44, 44, 72, 96, 48, 51, 92, 52, 51, 97, 44, 44, 72, 72, 101, 48, 51, 51, 97,
54, 51, 92, 92, 92, 74, 77, 92, 51, 92, 52, 51, 102, 51, 97, 97, 97, 74, 78, 97,
51, 0, 92, 92, 92, 92 51, 51, 97, 97, 51, 97, 0, 97, 97, 97,
97, 97
} ; } ;
static yyconst flex_int16_t yy_nxt[204] = static yyconst flex_int16_t yy_nxt[224] =
{ 0, { 0,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 21, 22, 23, 24, 16, 17, 18, 19, 20, 21, 21, 22, 23, 24,
25, 25, 25, 25, 25, 26, 27, 28, 30, 31, 25, 25, 25, 25, 25, 25, 26, 27, 28, 30,
30, 31, 37, 40, 65, 32, 62, 32, 42, 91, 31, 30, 31, 37, 40, 62, 32, 95, 32, 42,
45, 41, 66, 38, 46, 43, 44, 44, 44, 47, 63, 45, 41, 65, 38, 46, 43, 44, 44, 44,
48, 89, 49, 49, 50, 57, 58, 63, 51, 52, 47, 48, 66, 49, 49, 50, 57, 58, 86, 51,
51, 53, 54, 48, 84, 55, 55, 55, 60, 61, 52, 51, 51, 53, 54, 55, 55, 55, 60, 61,
67, 51, 52, 51, 56, 51, 63, 64, 83, 68, 63, 64, 67, 85, 84, 56, 51, 82, 50, 50,
72, 82, 73, 73, 73, 88, 88, 88, 72, 74, 51, 33, 68, 72, 71, 73, 73, 73, 51, 51,
72, 72, 72, 51, 80, 76, 76, 76, 50, 50, 70, 72, 74, 75, 72, 72, 72, 51, 59, 77,
51, 51, 77, 51, 51, 51, 33, 51, 51, 51, 77, 77, 90, 90, 90, 51, 78, 79, 51, 51,
51, 51, 72, 72, 72, 71, 51, 78, 78, 72, 51, 51, 39, 51, 51, 51, 36, 51, 35, 34,
70, 79, 79, 79, 51, 59, 81, 81, 81, 92, 51, 80, 80, 97, 97, 81, 81, 81, 51, 51,
92, 39, 81, 81, 51, 51, 51, 85, 85, 92, 51, 72, 72, 72, 33, 91, 97, 97, 72, 72,
92, 86, 86, 86, 85, 85, 92, 92, 87, 87, 87, 87, 97, 51, 88, 88, 88, 87, 87, 97,
87, 90, 90, 90, 88, 88, 88, 90, 90, 90, 97, 89, 89, 89, 51, 92, 51, 93, 93, 93,
29, 29, 29, 29, 69, 36, 35, 69, 75, 34, 97, 75, 97, 97, 90, 90, 90, 93, 93, 93,
75, 75, 33, 92, 5, 92, 92, 92, 92, 92, 97, 97, 94, 97, 79, 96, 29, 29, 29, 29,
92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 29, 69, 97, 97, 69, 69, 76, 97, 76, 76,
92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 76, 83, 83, 5, 97, 97, 97, 97, 97, 97,
92, 92, 92 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97
} ; } ;
static yyconst flex_int16_t yy_chk[204] = static yyconst flex_int16_t yy_chk[224] =
{ 0, { 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, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
4, 4, 13, 16, 27, 3, 94, 4, 17, 89, 3, 4, 4, 13, 16, 99, 3, 92, 4, 17,
19, 16, 27, 13, 19, 17, 18, 18, 18, 19, 64, 19, 16, 27, 13, 19, 17, 18, 18, 18,
20, 81, 20, 20, 20, 22, 22, 64, 20, 20, 19, 20, 27, 20, 20, 20, 22, 22, 61, 20,
20, 20, 20, 21, 61, 21, 21, 21, 24, 24, 20, 20, 20, 20, 20, 21, 21, 21, 24, 24,
28, 21, 21, 21, 21, 21, 26, 26, 57, 28, 26, 26, 28, 57, 56, 21, 21, 53, 50, 50,
44, 56, 44, 44, 44, 78, 78, 78, 44, 44, 49, 33, 28, 44, 32, 44, 44, 44, 50, 50,
44, 44, 44, 48, 53, 48, 48, 48, 50, 50, 31, 44, 44, 44, 44, 44, 44, 48, 23, 48,
49, 48, 48, 48, 48, 48, 33, 50, 50, 51, 48, 48, 80, 80, 80, 48, 48, 48, 48, 48,
51, 51, 72, 72, 72, 32, 51, 52, 52, 72, 48, 51, 15, 51, 51, 51, 12, 54, 10, 9,
31, 52, 52, 52, 54, 23, 54, 54, 54, 79, 51, 52, 52, 81, 81, 52, 52, 52, 54, 54,
79, 15, 54, 54, 54, 54, 54, 74, 74, 86, 54, 72, 72, 72, 7, 81, 5, 0, 72, 72,
86, 74, 74, 74, 77, 77, 87, 87, 77, 77, 74, 74, 0, 83, 74, 74, 74, 78, 78, 88,
77, 85, 85, 85, 88, 88, 88, 90, 90, 90, 88, 78, 78, 78, 83, 83, 83, 87, 87, 87,
93, 93, 93, 93, 95, 12, 10, 95, 96, 9, 0, 88, 89, 89, 90, 90, 90, 93, 93, 93,
96, 96, 7, 5, 92, 92, 92, 92, 92, 92, 0, 0, 90, 0, 89, 93, 98, 98, 98, 98,
92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 98, 100, 0, 0, 100, 100, 101, 0, 101, 101,
92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 101, 102, 102, 97, 97, 97, 97, 97, 97, 97,
92, 92, 92 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97
} ; } ;
/* The intent behind this definition is that it'll catch /* The intent behind this definition is that it'll catch
...@@ -856,13 +862,13 @@ yy_match: ...@@ -856,13 +862,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 93 ) if ( yy_current_state >= 98 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp; ++yy_cp;
} }
while ( yy_current_state != 92 ); while ( yy_current_state != 97 );
yy_cp = yyg->yy_last_accepting_cpos; yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state; yy_current_state = yyg->yy_last_accepting_state;
...@@ -1455,7 +1461,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1455,7 +1461,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 93 ) if ( yy_current_state >= 98 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
...@@ -1484,11 +1490,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) ...@@ -1484,11 +1490,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 93 ) if ( yy_current_state >= 98 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 92); yy_is_jam = (yy_current_state == 97);
return yy_is_jam ? 0 : yy_current_state; return yy_is_jam ? 0 : yy_current_state;
} }
......
...@@ -120,7 +120,7 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".") ...@@ -120,7 +120,7 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".")
return pp::Token::CONST_INT; return pp::Token::CONST_INT;
} }
({DIGIT}+{EXPONENT_PART})|({FRACTIONAL_CONSTANT}{EXPONENT_PART}?) { ({DIGIT}+{EXPONENT_PART}[fF]?)|({FRACTIONAL_CONSTANT}{EXPONENT_PART}?[fF]?) {
yylval->assign(yytext, yyleng); yylval->assign(yytext, yyleng);
return pp::Token::CONST_FLOAT; return pp::Token::CONST_FLOAT;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment