From 35ba23bd48b718c22dec69e047405d6156d875dd Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Wed, 2 Apr 2008 12:56:21 +0100 Subject: [PATCH] widl: Support __fastcall and __pascal calling conventions. Support the synonyms for these and existing calling conventions. --- tools/widl/parser.l | 8 ++++++++ tools/widl/parser.y | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 3bcdc261c16..66110b60893 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -186,13 +186,19 @@ static const struct keyword keywords[] = { {"FALSE", tFALSE}, {"TRUE", tTRUE}, {"__cdecl", tCDECL}, + {"__fastcall", tFASTCALL}, + {"__pascal", tPASCAL}, {"__int64", tINT64}, {"__stdcall", tSTDCALL}, + {"_cdecl", tCDECL}, + {"_fastcall", tFASTCALL}, + {"_pascal", tPASCAL}, {"_stdcall", tSTDCALL}, {"boolean", tBOOLEAN}, {"byte", tBYTE}, {"callback", tCALLBACK}, {"case", tCASE}, + {"cdecl", tCDECL}, {"char", tCHAR}, {"coclass", tCOCLASS}, {"code", tCODE}, @@ -217,11 +223,13 @@ static const struct keyword keywords[] = { {"long", tLONG}, {"methods", tMETHODS}, {"module", tMODULE}, + {"pascal", tPASCAL}, {"properties", tPROPERTIES}, {"short", tSHORT}, {"signed", tSIGNED}, {"sizeof", tSIZEOF}, {"small", tSMALL}, + {"stdcall", tSTDCALL}, {"struct", tSTRUCT}, {"switch", tSWITCH}, {"typedef", tTYPEDEF}, diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 685322a6acd..155e0263b3f 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -181,6 +181,7 @@ static void check_all_user_types(ifref_list_t *ifaces); %token tENTRY tENUM tERRORSTATUST %token tEXPLICITHANDLE tEXTERN %token tFALSE +%token tFASTCALL %token tFLOAT %token tHANDLE %token tHANDLET @@ -208,6 +209,7 @@ static void check_all_user_types(ifref_list_t *ifaces); %token tOBJECT tODL tOLEAUTOMATION %token tOPTIONAL %token tOUT +%token tPASCAL %token tPOINTERDEFAULT %token tPROPERTIES %token tPROPGET tPROPPUT tPROPPUTREF @@ -520,6 +522,8 @@ uuid_string: ; callconv: tCDECL { $$ = $1; } + | tFASTCALL { $$ = $1; } + | tPASCAL { $$ = $1; } | tSTDCALL { $$ = $1; } ;