Commit 36dd2f45 authored by Andreas Pakulat's avatar Andreas Pakulat

Recognize whispace followed by newline as newline when parsing a value list.

BUG:150466
parent d49a4630
......@@ -179,6 +179,14 @@ cont \\{ws}*{newline}
return Parser::token::token::COLON;
}
<vallist>{ws}{newline} {
BEGIN(INITIAL);
mylval->value = QString::fromLocal8Bit( YYText(), YYLeng() );
setLineEndingFromString( mylval->value );
return Parser::token::token::NEWLINE;
}
<vallist,INITIAL>{newline} {
BEGIN(INITIAL);
mylval->value = QString::fromLocal8Bit( YYText(), YYLeng() );
......
......@@ -416,8 +416,8 @@ int yyFlexLexer::yylex()
(yy_c_buf_p) = yy_cp;
/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
#define YY_NUM_RULES 22
#define YY_END_OF_BUFFER 23
#define YY_NUM_RULES 23
#define YY_END_OF_BUFFER 24
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
......@@ -425,16 +425,16 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[74] =
static yyconst flex_int16_t yy_accept[76] =
{ 0,
0, 0, 0, 0, 0, 0, 23, 22, 1, 20,
20, 5, 22, 17, 18, 5, 22, 5, 19, 9,
22, 14, 16, 22, 7, 2, 7, 7, 22, 22,
6, 1, 20, 5, 0, 21, 21, 0, 12, 10,
0, 0, 0, 0, 0, 0, 24, 23, 1, 21,
21, 5, 23, 17, 18, 5, 23, 5, 19, 9,
23, 14, 16, 23, 7, 2, 7, 7, 23, 23,
6, 1, 21, 5, 0, 22, 22, 0, 12, 10,
11, 0, 15, 0, 3, 3, 0, 13, 7, 7,
0, 2, 7, 0, 7, 0, 7, 0, 6, 4,
4, 0, 4, 4, 7, 0, 7, 7, 0, 0,
8, 0, 0
0, 2, 20, 20, 7, 0, 7, 0, 7, 0,
6, 4, 4, 0, 4, 4, 7, 0, 7, 7,
0, 0, 8, 0, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
......@@ -476,121 +476,121 @@ static yyconst flex_int32_t yy_meta[25] =
1, 1, 1, 1
} ;
static yyconst flex_int16_t yy_base[83] =
static yyconst flex_int16_t yy_base[85] =
{ 0,
0, 0, 23, 41, 28, 30, 122, 288, 119, 288,
117, 56, 32, 288, 288, 101, 100, 99, 35, 288,
77, 288, 288, 98, 34, 110, 47, 54, 83, 98,
97, 75, 288, 0, 79, 288, 72, 85, 288, 288,
288, 44, 288, 0, 288, 69, 59, 288, 84, 288,
86, 57, 104, 122, 140, 90, 91, 45, 42, 288,
47, 96, 288, 36, 158, 176, 194, 212, 94, 230,
248, 112, 288, 267, 270, 273, 27, 276, 278, 280,
283, 285
0, 0, 23, 41, 28, 30, 132, 289, 126, 289,
123, 56, 32, 289, 289, 106, 105, 104, 35, 289,
77, 289, 289, 103, 34, 55, 47, 69, 87, 108,
106, 111, 289, 0, 79, 289, 96, 82, 289, 289,
289, 44, 289, 0, 289, 90, 59, 289, 68, 289,
85, 93, 289, 74, 105, 123, 141, 98, 99, 45,
42, 289, 47, 105, 289, 36, 159, 177, 195, 213,
108, 231, 249, 112, 289, 268, 271, 274, 27, 277,
279, 281, 284, 286
} ;
static yyconst flex_int16_t yy_def[83] =
static yyconst flex_int16_t yy_def[85] =
{ 0,
73, 1, 74, 74, 75, 75, 73, 73, 73, 73,
73, 73, 76, 73, 73, 12, 73, 12, 73, 73,
73, 73, 73, 73, 77, 73, 78, 76, 77, 79,
79, 73, 73, 12, 76, 73, 73, 76, 73, 73,
73, 73, 73, 21, 73, 73, 80, 73, 77, 73,
77, 73, 81, 82, 82, 78, 80, 79, 79, 73,
73, 80, 73, 73, 81, 82, 81, 82, 81, 82,
82, 82, 0, 73, 73, 73, 73, 73, 73, 73,
73, 73
75, 1, 76, 76, 77, 77, 75, 75, 75, 75,
75, 75, 78, 75, 75, 12, 75, 12, 75, 75,
75, 75, 75, 75, 79, 75, 80, 78, 79, 81,
81, 75, 75, 12, 78, 75, 75, 78, 75, 75,
75, 75, 75, 21, 75, 75, 82, 75, 79, 75,
79, 75, 75, 75, 83, 84, 84, 80, 82, 81,
81, 75, 75, 82, 75, 75, 83, 84, 83, 84,
83, 84, 84, 84, 0, 75, 75, 75, 75, 75,
75, 75, 75, 75
} ;
static yyconst flex_int16_t yy_nxt[313] =
static yyconst flex_int16_t yy_nxt[314] =
{ 0,
8, 9, 10, 11, 12, 8, 13, 12, 14, 15,
16, 17, 18, 8, 12, 19, 20, 12, 21, 12,
22, 8, 23, 24, 26, 10, 11, 49, 27, 28,
8, 8, 8, 8, 36, 37, 42, 31, 63, 31,
50, 29, 26, 10, 11, 42, 27, 28, 54, 60,
38, 59, 51, 55, 59, 43, 36, 37, 52, 29,
34, 63, 64, 34, 43, 56, 34, 34, 34, 34,
34, 45, 38, 34, 36, 34, 32, 34, 44, 45,
46, 36, 37, 47, 44, 45, 46, 60, 61, 57,
50, 73, 50, 63, 64, 73, 55, 38, 63, 64,
68, 51, 51, 38, 51, 66, 59, 59, 56, 67,
68, 52, 69, 73, 48, 41, 40, 39, 66, 33,
32, 73, 69, 66, 73, 73, 73, 71, 66, 73,
72, 73, 73, 73, 73, 73, 73, 73, 73, 73,
72, 66, 73, 73, 73, 71, 66, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 72, 66,
73, 73, 73, 67, 68, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 69, 66, 73, 73,
73, 71, 66, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 72, 66, 73, 73, 73, 67,
68, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 69, 66, 73, 73, 73, 71, 66, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
72, 66, 73, 73, 73, 71, 66, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 72, 66,
73, 73, 73, 71, 66, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 72, 25, 25, 25,
30, 30, 30, 35, 35, 35, 53, 53, 58, 58,
62, 62, 62, 65, 65, 70, 70, 7, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73
8, 8, 8, 8, 36, 37, 42, 31, 65, 31,
50, 29, 26, 10, 11, 42, 27, 28, 56, 62,
38, 61, 51, 57, 61, 43, 52, 53, 54, 29,
34, 65, 66, 34, 43, 58, 34, 34, 34, 34,
34, 36, 37, 34, 50, 34, 53, 34, 44, 45,
46, 36, 37, 47, 62, 63, 51, 38, 44, 45,
46, 50, 45, 59, 52, 53, 54, 38, 36, 75,
38, 65, 66, 51, 57, 51, 68, 65, 66, 75,
69, 70, 32, 75, 70, 61, 58, 61, 68, 48,
41, 40, 39, 71, 68, 33, 71, 32, 73, 68,
74, 75, 75, 75, 75, 75, 75, 75, 75, 75,
75, 74, 68, 75, 75, 75, 73, 68, 75, 75,
75, 75, 75, 75, 75, 75, 75, 75, 75, 74,
68, 75, 75, 75, 69, 70, 75, 75, 75, 75,
75, 75, 75, 75, 75, 75, 75, 71, 68, 75,
75, 75, 73, 68, 75, 75, 75, 75, 75, 75,
75, 75, 75, 75, 75, 74, 68, 75, 75, 75,
69, 70, 75, 75, 75, 75, 75, 75, 75, 75,
75, 75, 75, 71, 68, 75, 75, 75, 73, 68,
75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
75, 74, 68, 75, 75, 75, 73, 68, 75, 75,
75, 75, 75, 75, 75, 75, 75, 75, 75, 74,
68, 75, 75, 75, 73, 68, 75, 75, 75, 75,
75, 75, 75, 75, 75, 75, 75, 74, 25, 25,
25, 30, 30, 30, 35, 35, 35, 55, 55, 60,
60, 64, 64, 64, 67, 67, 72, 72, 7, 75,
75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
75, 75, 75
} ;
static yyconst flex_int16_t yy_chk[313] =
static yyconst flex_int16_t yy_chk[314] =
{ 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, 3, 3, 3, 77, 3, 3,
5, 5, 6, 6, 13, 13, 19, 5, 64, 6,
25, 3, 4, 4, 4, 42, 4, 4, 27, 61,
13, 59, 25, 27, 58, 19, 28, 28, 52, 4,
1, 1, 1, 1, 3, 3, 3, 79, 3, 3,
5, 5, 6, 6, 13, 13, 19, 5, 66, 6,
25, 3, 4, 4, 4, 42, 4, 4, 27, 63,
13, 61, 25, 27, 60, 19, 26, 26, 26, 4,
12, 47, 47, 12, 42, 27, 12, 12, 12, 12,
12, 46, 28, 12, 37, 12, 32, 12, 21, 21,
21, 35, 35, 21, 29, 29, 29, 38, 38, 29,
49, 56, 51, 57, 57, 69, 56, 35, 62, 62,
69, 29, 49, 38, 51, 53, 31, 30, 56, 53,
53, 26, 69, 72, 24, 18, 17, 16, 72, 11,
9, 7, 53, 54, 0, 0, 0, 54, 54, 0,
72, 0, 0, 0, 0, 0, 0, 0, 0, 0,
54, 55, 0, 0, 0, 55, 55, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 55, 65,
0, 0, 0, 65, 65, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 65, 66, 0, 0,
0, 66, 66, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 66, 67, 0, 0, 0, 67,
67, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 67, 68, 0, 0, 0, 68, 68, 0,
12, 28, 28, 12, 49, 12, 54, 12, 21, 21,
21, 35, 35, 21, 38, 38, 49, 28, 29, 29,
29, 51, 46, 29, 52, 52, 52, 35, 37, 58,
38, 59, 59, 51, 58, 29, 55, 64, 64, 71,
55, 55, 32, 74, 71, 31, 58, 30, 74, 24,
18, 17, 16, 55, 56, 11, 71, 9, 56, 56,
74, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 56, 57, 0, 0, 0, 57, 57, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 57,
67, 0, 0, 0, 67, 67, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 67, 68, 0,
0, 0, 68, 68, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 68, 69, 0, 0, 0,
69, 69, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 69, 70, 0, 0, 0, 70, 70,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
68, 70, 0, 0, 0, 70, 70, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 70, 71,
0, 0, 0, 71, 71, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 71, 74, 74, 74,
75, 75, 75, 76, 76, 76, 78, 78, 79, 79,
80, 80, 80, 81, 81, 82, 82, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73
0, 70, 72, 0, 0, 0, 72, 72, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 72,
73, 0, 0, 0, 73, 73, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 73, 76, 76,
76, 77, 77, 77, 78, 78, 78, 80, 80, 81,
81, 82, 82, 82, 83, 83, 84, 84, 75, 75,
75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
75, 75, 75
} ;
/* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[23] =
static yyconst flex_int32_t yy_rule_can_match_eol[24] =
{ 0,
0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 0, };
1, 1, 1, 0, };
static yyconst flex_int16_t yy_rule_linenum[22] =
static yyconst flex_int16_t yy_rule_linenum[23] =
{ 0,
81, 83, 88, 94, 100, 105, 113, 119, 125, 131,
137, 143, 149, 155, 159, 163, 167, 172, 177, 182,
189
137, 143, 149, 155, 159, 163, 167, 172, 177, 183,
190, 197
} ;
/* The intent behind this definition is that it'll catch
......@@ -877,13 +877,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 >= 74 )
if ( yy_current_state >= 76 )
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] != 288 );
while ( yy_base[yy_current_state] != 289 );
yy_find_action:
/* %% [10.0] code to find the action number goes here */
......@@ -916,12 +916,12 @@ do_action: /* This label is used only to access EOF actions. */
{
if ( yy_act == 0 )
std::cerr << "--scanner backing up\n";
else if ( yy_act < 22 )
else if ( yy_act < 23 )
std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] <<
"(\"" << yytext << "\")\n";
else if ( yy_act == 22 )
std::cerr << "--accepting default rule (\"" << yytext << "\")\n";
else if ( yy_act == 23 )
std::cerr << "--accepting default rule (\"" << yytext << "\")\n";
else if ( yy_act == 24 )
std::cerr << "--(end of buffer or a NUL)\n";
else
std::cerr << "--EOF (start condition " << YY_START << ")\n";
......@@ -1107,7 +1107,7 @@ YY_RULE_SETUP
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
#line 182 "qmake.ll"
#line 183 "qmake.ll"
{
BEGIN(INITIAL);
mylval->value = QString::fromLocal8Bit( YYText(), YYLeng() );
......@@ -1118,19 +1118,30 @@ YY_RULE_SETUP
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
#line 189 "qmake.ll"
#line 190 "qmake.ll"
{
BEGIN(INITIAL);
mylval->value = QString::fromLocal8Bit( YYText(), YYLeng() );
return (Parser::token::token::COMMENT);
setLineEndingFromString( mylval->value );
return Parser::token::token::NEWLINE;
}
YY_BREAK
case 22:
/* rule 22 can match eol */
YY_RULE_SETUP
#line 197 "qmake.ll"
{
BEGIN(INITIAL);
mylval->value = QString::fromLocal8Bit( YYText(), YYLeng() );
return (Parser::token::token::COMMENT);
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 195 "qmake.ll"
#line 203 "qmake.ll"
ECHO;
YY_BREAK
#line 1134 "qmake_lex.cpp"
#line 1145 "qmake_lex.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(funcargs):
yyterminate();
......@@ -1510,7 +1521,7 @@ int yyFlexLexer::yy_get_next_buffer()
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 >= 74 )
if ( yy_current_state >= 76 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
......@@ -1543,11 +1554,11 @@ int yyFlexLexer::yy_get_next_buffer()
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 >= 74 )
if ( yy_current_state >= 76 )
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 == 73);
yy_is_jam = (yy_current_state == 75);
return yy_is_jam ? 0 : yy_current_state;
}
......@@ -2188,7 +2199,7 @@ void yyfree (void * ptr )
/* %ok-for-header */
#line 195 "qmake.ll"
#line 203 "qmake.ll"
namespace QMake
......
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