Commit 832d6985 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

widl: Group <INITIAL> tokens together.

parent 2b3a9101
...@@ -139,7 +139,6 @@ struct uuid *parse_uuid(const char *u) ...@@ -139,7 +139,6 @@ struct uuid *parse_uuid(const char *u)
************************************************************************** **************************************************************************
*/ */
%% %%
<INITIAL>^{ws}*\#{ws}*pragma{ws}+ yy_push_state(PP_PRAGMA);
<PP_LINE>[^\n]* { <PP_LINE>[^\n]* {
int lineno; int lineno;
char *cptr, *fname; char *cptr, *fname;
...@@ -177,7 +176,6 @@ struct uuid *parse_uuid(const char *u) ...@@ -177,7 +176,6 @@ struct uuid *parse_uuid(const char *u)
yy_pop_state(); yy_pop_state();
} }
<PP_PRAGMA>[^\n]* yylval->str = xstrdup(yytext); yy_pop_state(); return aPRAGMA; <PP_PRAGMA>[^\n]* yylval->str = xstrdup(yytext); yy_pop_state(); return aPRAGMA;
<INITIAL>^{ws}*midl_pragma{ws}+warning return tPRAGMA_WARNING;
<INITIAL,ATTR>\" yy_push_state(QUOTE); cbufidx = 0; <INITIAL,ATTR>\" yy_push_state(QUOTE); cbufidx = 0;
<QUOTE>\" { <QUOTE>\" {
yy_pop_state(); yy_pop_state();
...@@ -207,10 +205,17 @@ struct uuid *parse_uuid(const char *u) ...@@ -207,10 +205,17 @@ struct uuid *parse_uuid(const char *u)
yylval->uuid = parse_uuid(yytext); yylval->uuid = parse_uuid(yytext);
return aUUID; return aUUID;
} }
<INITIAL>{double} {
yylval->dbl = strtod(yytext, NULL); <INITIAL>{
return aDOUBLE; ^{ws}*\#{ws}*pragma{ws}+ { yy_push_state( PP_PRAGMA ); }
} ^{ws}*midl_pragma{ws}+warning { return tPRAGMA_WARNING; }
{double} {
yylval->dbl = strtod( yytext, NULL );
return aDOUBLE;
}
}
SAFEARRAY{ws}*/\( return tSAFEARRAY; SAFEARRAY{ws}*/\( return tSAFEARRAY;
{cident} return kw_token(yytext, yylval); {cident} return kw_token(yytext, yylval);
......
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