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
f869c8e7
Commit
f869c8e7
authored
Jan 24, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Lex calling convention variations toghether.
parent
53ae787d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
19 deletions
+15
-19
parser.l
tools/widl/parser.l
+4
-11
parser.y
tools/widl/parser.y
+11
-8
No files found.
tools/widl/parser.l
View file @
f869c8e7
...
...
@@ -356,22 +356,17 @@ SAFEARRAY{ws}*/\( return tSAFEARRAY;
FALSE { return tFALSE; }
NULL { return tNULL; }
TRUE { return tTRUE; }
__cdecl { return tCDECL; }
__fastcall { return tFASTCALL; }
_?_?cdecl { return token_str( tCDECL, "__cdecl", yylval ); }
_?_?pascal { return token_str( tPASCAL, "__pascal", yylval ); }
_?_?stdcall { return token_str( tSTDCALL, "__stdcall", yylval ); }
__?fastcall { return token_str( tFASTCALL, "__fastcall", yylval ); }
__int32 { return tINT32; }
__int3264 { return tINT3264; }
__int64 { return tINT64; }
__pascal { return tPASCAL; }
__stdcall { return tSTDCALL; }
_cdecl { return tCDECL; }
_fastcall { return tFASTCALL; }
_pascal { return tPASCAL; }
_stdcall { return tSTDCALL; }
apicontract { return token_winrt( tAPICONTRACT, yytext, yylval ); }
boolean { return tBOOLEAN; }
byte { return tBYTE; }
case { return tCASE; }
cdecl { return tCDECL; }
char { return tCHAR; }
coclass { return tCOCLASS; }
const { return tCONST; }
...
...
@@ -397,7 +392,6 @@ SAFEARRAY{ws}*/\( return tSAFEARRAY;
methods { return tMETHODS; }
module { return tMODULE; }
namespace { return token_winrt( tNAMESPACE, yytext, yylval ); }
pascal { return tPASCAL; }
properties { return tPROPERTIES; }
register { return tREGISTER; }
requires { return token_winrt( tREQUIRES, yytext, yylval ); }
...
...
@@ -407,7 +401,6 @@ SAFEARRAY{ws}*/\( return tSAFEARRAY;
sizeof { return tSIZEOF; }
small { return tSMALL; }
static { return tSTATIC; }
stdcall { return tSTDCALL; }
struct { return tSTRUCT; }
switch { return tSWITCH; }
typedef { return tTYPEDEF; }
...
...
tools/widl/parser.y
View file @
f869c8e7
...
...
@@ -167,6 +167,10 @@ int parser_lex( PARSER_STYPE *yylval );
%token <num> aNUM aHEXNUM
%token <dbl> aDOUBLE
%token <str> aSTRING aWSTRING aSQSTRING
%token <str> tCDECL
%token <str> tFASTCALL
%token <str> tPASCAL
%token <str> tSTDCALL
%token <uuid> aUUID
%token aEOF aACF
%token SHL SHR
...
...
@@ -182,7 +186,7 @@ int parser_lex( PARSER_STYPE *yylval );
%token tAPICONTRACT
%token tAPPOBJECT tASYNC tASYNCUUID
%token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT
%token tCALLAS tCALLBACK tCASE tC
DECL tC
HAR tCOCLASS tCODE tCOMMSTATUS
%token tCALLAS tCALLBACK tCASE tCHAR tCOCLASS tCODE tCOMMSTATUS
%token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE
%token tCONTEXTHANDLESERIALIZE
%token tCONTRACT
...
...
@@ -204,7 +208,7 @@ int parser_lex( PARSER_STYPE *yylval );
%token tEXCLUSIVETO
%token tEXPLICITHANDLE tEXTERN
%token tFALSE
%token tFA
STCALL tFA
ULTSTATUS
%token tFAULTSTATUS
%token tFLAGS
%token tFLOAT tFORCEALLOCATE
%token tHANDLE
...
...
@@ -241,7 +245,7 @@ int parser_lex( PARSER_STYPE *yylval );
%token tOPTIMIZE tOPTIONAL
%token tOUT
%token tOVERLOAD
%token tPARTIALIGNORE
tPASCAL
%token tPARTIALIGNORE
%token tPOINTERDEFAULT
%token tPRAGMA_WARNING
%token tPROGID tPROPERTIES
...
...
@@ -264,7 +268,6 @@ int parser_lex( PARSER_STYPE *yylval );
%token tSOURCE
%token tSTANDARD
%token tSTATIC
%token tSTDCALL
%token tSTRICTCONTEXTHANDLE
%token tSTRING tSTRUCT
%token tSWITCH tSWITCHIS tSWITCHTYPE
...
...
@@ -729,10 +732,10 @@ attribute
| pointer_type { $$ = make_attrv(ATTR_POINTERTYPE, $1); }
;
callconv: tCDECL
{ $$ = xstrdup("__cdecl"); }
| tFASTCALL
{ $$ = xstrdup("__fastcall"); }
| tPASCAL
{ $$ = xstrdup("__pascal"); }
| tSTDCALL
{ $$ = xstrdup("__stdcall"); }
callconv: tCDECL
| tFASTCALL
| tPASCAL
| tSTDCALL
;
cases
...
...
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