From 6b808bafe043a0f762a686ce995ac3eb996f009c Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 8 Feb 2007 11:55:35 +0100 Subject: [PATCH] widl: Rename parser states to uppercase to avoid conflicts. --- tools/widl/parser.l | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/widl/parser.l b/tools/widl/parser.l index e7caf155c86..0dfe3018ef6 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -31,8 +31,8 @@ hex 0x{hexd}+ uuid {hexd}{8}-{hexd}{4}-{hexd}{4}-{hexd}{4}-{hexd}{12} %x QUOTE -%x attr -%x pp_line +%x ATTR +%x PP_LINE %{ @@ -105,8 +105,8 @@ static UUID* parse_uuid(const char*u) ************************************************************************** */ %% -^{ws}*\#{ws}* yy_push_state(pp_line); -[^\n]* { +^{ws}*\#{ws}* yy_push_state(PP_LINE); +[^\n]* { int lineno; char *cptr, *fname; yy_pop_state(); @@ -125,7 +125,7 @@ static UUID* parse_uuid(const char*u) free( input_name ); input_name = xstrdup(fname); } -\" yy_push_state(QUOTE); cbufidx = 0; +\" yy_push_state(QUOTE); cbufidx = 0; \" { yy_pop_state(); parser_lval.str = get_buffered_cstring(); @@ -135,28 +135,28 @@ static UUID* parse_uuid(const char*u) \\\" addcchar(yytext[1]); \\. addcchar('\\'); addcchar(yytext[1]); . addcchar(yytext[0]); -\[ yy_push_state(attr); return '['; -\] yy_pop_state(); return ']'; -{cident} return attr_token(yytext); -{uuid} { +\[ yy_push_state(ATTR); return '['; +\] yy_pop_state(); return ']'; +{cident} return attr_token(yytext); +{uuid} { parser_lval.uuid = parse_uuid(yytext); return aUUID; } -{hex} { +{hex} { parser_lval.num = strtoul(yytext, NULL, 0); return aHEXNUM; } -{int} { +{int} { parser_lval.num = strtoul(yytext, NULL, 0); return aNUM; } SAFEARRAY{ws}*/\( return tSAFEARRAY; {cident} return kw_token(yytext); -\n line_number++; -{ws} -\<\< return SHL; -\>\> return SHR; -. return yytext[0]; +\n line_number++; +{ws} +\<\< return SHL; +\>\> return SHR; +. return yytext[0]; <> { if (import_stack_ptr) { pop_import();