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

widl: Lex calling convention variations toghether.

parent 53ae787d
......@@ -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; }
......
......@@ -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 tCDECL tCHAR 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 tFASTCALL tFAULTSTATUS
%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
......
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