widl: Support __fastcall and __pascal calling conventions.
authorRob Shearman <rob@codeweavers.com>
Wed, 2 Apr 2008 11:56:21 +0000 (12:56 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 2 Apr 2008 17:53:42 +0000 (19:53 +0200)
Support the synonyms for these and existing calling conventions.

tools/widl/parser.l
tools/widl/parser.y

index 3bcdc261c16359eff0dbc06e857664fa53c828a3..66110b608935bf3009eed54e982d71b1ec32e1fd 100644 (file)
@@ -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},
index 685322a6acd8b4787624c40bba3413246fed090d..155e0263b3f5f7d78cdd0fc9b88a39d2765cff15 100644 (file)
@@ -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                               { $$ = $<str>1; }
+       | tFASTCALL                             { $$ = $<str>1; }
+       | tPASCAL                               { $$ = $<str>1; }
        | tSTDCALL                              { $$ = $<str>1; }
        ;