Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2b3a9101
Commit
2b3a9101
authored
Jan 24, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Group <INITIAL,ATTR> tokens together.
parent
88fa3459
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
23 deletions
+29
-23
parser.l
tools/widl/parser.l
+29
-23
No files found.
tools/widl/parser.l
View file @
2b3a9101
...
...
@@ -140,7 +140,6 @@ struct uuid *parse_uuid(const char *u)
*/
%%
<INITIAL>^{ws}*\#{ws}*pragma{ws}+ yy_push_state(PP_PRAGMA);
<INITIAL,ATTR>^{ws}*\#{ws}* yy_push_state(PP_LINE);
<PP_LINE>[^\n]* {
int lineno;
char *cptr, *fname;
...
...
@@ -202,40 +201,47 @@ struct uuid *parse_uuid(const char *u)
<SQUOTE>\\\' addcchar(yytext[1]);
<QUOTE,WSTRQUOTE,SQUOTE>\\. addcchar('\\'); addcchar(yytext[1]);
<QUOTE,WSTRQUOTE,SQUOTE>. addcchar(yytext[0]);
<INITIAL,ATTR>\[ yy_push_state(ATTR); return '[';
<ATTR>\] yy_pop_state(); return ']';
<ATTR>{cident} return attr_token(yytext, yylval);
<ATTR>{uuid} {
yylval->uuid = parse_uuid(yytext);
return aUUID;
}
<INITIAL,ATTR>{hex} {
yylval->num = xstrtoul(yytext, NULL, 0);
return aHEXNUM;
}
<INITIAL,ATTR>{int} {
yylval->num = xstrtoul(yytext, NULL, 0);
return aNUM;
}
<INITIAL>{double} {
yylval->dbl = strtod(yytext, NULL);
return aDOUBLE;
}
SAFEARRAY{ws}*/\( return tSAFEARRAY;
{cident} return kw_token(yytext, yylval);
<INITIAL,ATTR>\n line_number++;
<INITIAL,ATTR>{ws}
<INITIAL,ATTR>\<\< return SHL;
<INITIAL,ATTR>\>\> return SHR;
<INITIAL,ATTR>\-\> return MEMBERPTR;
<INITIAL,ATTR>== return EQUALITY;
<INITIAL,ATTR>!= return INEQUALITY;
<INITIAL,ATTR>\>= return GREATEREQUAL;
<INITIAL,ATTR>\<= return LESSEQUAL;
<INITIAL,ATTR>\|\| return LOGICALOR;
<INITIAL,ATTR>&& return LOGICALAND;
<INITIAL,ATTR>\.\.\. return ELLIPSIS;
<INITIAL,ATTR>. return yytext[0];
<INITIAL,ATTR>{
^{ws}*\#{ws}* { yy_push_state(PP_LINE); }
\[ { yy_push_state(ATTR); return '['; }
{hex} {
yylval->num = xstrtoul(yytext, NULL, 0);
return aHEXNUM;
}
{int} {
yylval->num = xstrtoul(yytext, NULL, 0);
return aNUM;
}
\n { line_number++; }
{ws} {}
\<\< { return SHL; }
\>\> { return SHR; }
\-\> { return MEMBERPTR; }
== { return EQUALITY; }
!= { return INEQUALITY; }
\>= { return GREATEREQUAL; }
\<= { return LESSEQUAL; }
\|\| { return LOGICALOR; }
&& { return LOGICALAND; }
\.\.\. { return ELLIPSIS; }
. { return yytext[0]; }
}
<<EOF>> {
if (!list_empty( &import_stack ))
return aEOF;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment