widl: Support WinRT marshaling_behavior attribute parsing.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d90dc11d1a
commit
2129e335f2
|
@ -320,6 +320,7 @@ static const struct keyword keywords[] = {
|
||||||
static const struct keyword attr_keywords[] =
|
static const struct keyword attr_keywords[] =
|
||||||
{
|
{
|
||||||
{"aggregatable", tAGGREGATABLE, 0},
|
{"aggregatable", tAGGREGATABLE, 0},
|
||||||
|
{"agile", tAGILE, 1},
|
||||||
{"all_nodes", tALLNODES, 0},
|
{"all_nodes", tALLNODES, 0},
|
||||||
{"allocate", tALLOCATE, 0},
|
{"allocate", tALLOCATE, 0},
|
||||||
{"annotation", tANNOTATION, 0},
|
{"annotation", tANNOTATION, 0},
|
||||||
|
@ -381,12 +382,14 @@ static const struct keyword attr_keywords[] =
|
||||||
{"length_is", tLENGTHIS, 0},
|
{"length_is", tLENGTHIS, 0},
|
||||||
{"licensed", tLICENSED, 0},
|
{"licensed", tLICENSED, 0},
|
||||||
{"local", tLOCAL, 0},
|
{"local", tLOCAL, 0},
|
||||||
|
{"marshaling_behavior", tMARSHALINGBEHAVIOR, 1},
|
||||||
{"maybe", tMAYBE, 0},
|
{"maybe", tMAYBE, 0},
|
||||||
{"message", tMESSAGE, 0},
|
{"message", tMESSAGE, 0},
|
||||||
{"neutral", tNEUTRAL, 0},
|
{"neutral", tNEUTRAL, 0},
|
||||||
{"nocode", tNOCODE, 0},
|
{"nocode", tNOCODE, 0},
|
||||||
{"nonbrowsable", tNONBROWSABLE, 0},
|
{"nonbrowsable", tNONBROWSABLE, 0},
|
||||||
{"noncreatable", tNONCREATABLE, 0},
|
{"noncreatable", tNONCREATABLE, 0},
|
||||||
|
{"none", tNONE, 1},
|
||||||
{"nonextensible", tNONEXTENSIBLE, 0},
|
{"nonextensible", tNONEXTENSIBLE, 0},
|
||||||
{"notify", tNOTIFY, 0},
|
{"notify", tNOTIFY, 0},
|
||||||
{"notify_flag", tNOTIFYFLAG, 0},
|
{"notify_flag", tNOTIFYFLAG, 0},
|
||||||
|
@ -416,6 +419,7 @@ static const struct keyword attr_keywords[] =
|
||||||
{"single_node", tSINGLENODE, 0},
|
{"single_node", tSINGLENODE, 0},
|
||||||
{"size_is", tSIZEIS, 0},
|
{"size_is", tSIZEIS, 0},
|
||||||
{"source", tSOURCE, 0},
|
{"source", tSOURCE, 0},
|
||||||
|
{"standard", tSTANDARD, 1},
|
||||||
{"strict_context_handle", tSTRICTCONTEXTHANDLE, 0},
|
{"strict_context_handle", tSTRICTCONTEXTHANDLE, 0},
|
||||||
{"string", tSTRING, 0},
|
{"string", tSTRING, 0},
|
||||||
{"switch_is", tSWITCHIS, 0},
|
{"switch_is", tSWITCHIS, 0},
|
||||||
|
|
|
@ -174,7 +174,9 @@ static typelib_t *current_typelib;
|
||||||
%token GREATEREQUAL LESSEQUAL
|
%token GREATEREQUAL LESSEQUAL
|
||||||
%token LOGICALOR LOGICALAND
|
%token LOGICALOR LOGICALAND
|
||||||
%token ELLIPSIS
|
%token ELLIPSIS
|
||||||
%token tAGGREGATABLE tALLNODES tALLOCATE tANNOTATION
|
%token tAGGREGATABLE
|
||||||
|
%token tAGILE
|
||||||
|
%token tALLNODES tALLOCATE tANNOTATION
|
||||||
%token tAPICONTRACT
|
%token tAPICONTRACT
|
||||||
%token tAPPOBJECT tASYNC tASYNCUUID
|
%token tAPPOBJECT tASYNC tASYNCUUID
|
||||||
%token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT
|
%token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT
|
||||||
|
@ -216,12 +218,14 @@ static typelib_t *current_typelib;
|
||||||
%token tLENGTHIS tLIBRARY
|
%token tLENGTHIS tLIBRARY
|
||||||
%token tLICENSED tLOCAL
|
%token tLICENSED tLOCAL
|
||||||
%token tLONG
|
%token tLONG
|
||||||
|
%token tMARSHALINGBEHAVIOR
|
||||||
%token tMAYBE tMESSAGE
|
%token tMAYBE tMESSAGE
|
||||||
%token tMETHODS
|
%token tMETHODS
|
||||||
%token tMODULE
|
%token tMODULE
|
||||||
%token tNAMESPACE
|
%token tNAMESPACE
|
||||||
%token tNOCODE tNONBROWSABLE
|
%token tNOCODE tNONBROWSABLE
|
||||||
%token tNONCREATABLE
|
%token tNONCREATABLE
|
||||||
|
%token tNONE
|
||||||
%token tNONEXTENSIBLE
|
%token tNONEXTENSIBLE
|
||||||
%token tNOTIFY tNOTIFYFLAG
|
%token tNOTIFY tNOTIFYFLAG
|
||||||
%token tNULL
|
%token tNULL
|
||||||
|
@ -247,6 +251,7 @@ static typelib_t *current_typelib;
|
||||||
%token tSIZEIS tSIZEOF
|
%token tSIZEIS tSIZEOF
|
||||||
%token tSMALL
|
%token tSMALL
|
||||||
%token tSOURCE
|
%token tSOURCE
|
||||||
|
%token tSTANDARD
|
||||||
%token tSTATIC
|
%token tSTATIC
|
||||||
%token tSTDCALL
|
%token tSTDCALL
|
||||||
%token tSTRICTCONTEXTHANDLE
|
%token tSTRICTCONTEXTHANDLE
|
||||||
|
@ -299,7 +304,7 @@ static typelib_t *current_typelib;
|
||||||
%type <type> coclass coclasshdr coclassdef
|
%type <type> coclass coclasshdr coclassdef
|
||||||
%type <type> apicontract
|
%type <type> apicontract
|
||||||
%type <num> contract_ver
|
%type <num> contract_ver
|
||||||
%type <num> pointer_type threading_type version
|
%type <num> pointer_type threading_type marshaling_behavior version
|
||||||
%type <str> libraryhdr callconv cppquote importlib import t_ident
|
%type <str> libraryhdr callconv cppquote importlib import t_ident
|
||||||
%type <uuid> uuid_string
|
%type <uuid> uuid_string
|
||||||
%type <import> import_start
|
%type <import> import_start
|
||||||
|
@ -505,6 +510,12 @@ str_list: aSTRING { $$ = append_str( NULL, $1 ); }
|
||||||
| str_list ',' aSTRING { $$ = append_str( $1, $3 ); }
|
| str_list ',' aSTRING { $$ = append_str( $1, $3 ); }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
marshaling_behavior:
|
||||||
|
tAGILE { $$ = MARSHALING_AGILE; }
|
||||||
|
| tNONE { $$ = MARSHALING_NONE; }
|
||||||
|
| tSTANDARD { $$ = MARSHALING_STANDARD; }
|
||||||
|
;
|
||||||
|
|
||||||
contract_ver:
|
contract_ver:
|
||||||
aNUM { $$ = MAKEVERSION(0, $1); }
|
aNUM { $$ = MAKEVERSION(0, $1); }
|
||||||
| aNUM '.' aNUM { $$ = MAKEVERSION($3, $1); }
|
| aNUM '.' aNUM { $$ = MAKEVERSION($3, $1); }
|
||||||
|
@ -572,6 +583,8 @@ attribute: { $$ = NULL; }
|
||||||
| tLCID { $$ = make_attr(ATTR_PARAMLCID); }
|
| tLCID { $$ = make_attr(ATTR_PARAMLCID); }
|
||||||
| tLICENSED { $$ = make_attr(ATTR_LICENSED); }
|
| tLICENSED { $$ = make_attr(ATTR_LICENSED); }
|
||||||
| tLOCAL { $$ = make_attr(ATTR_LOCAL); }
|
| tLOCAL { $$ = make_attr(ATTR_LOCAL); }
|
||||||
|
| tMARSHALINGBEHAVIOR '(' marshaling_behavior ')'
|
||||||
|
{ $$ = make_attrv(ATTR_MARSHALING_BEHAVIOR, $3); }
|
||||||
| tMAYBE { $$ = make_attr(ATTR_MAYBE); }
|
| tMAYBE { $$ = make_attr(ATTR_MAYBE); }
|
||||||
| tMESSAGE { $$ = make_attr(ATTR_MESSAGE); }
|
| tMESSAGE { $$ = make_attr(ATTR_MESSAGE); }
|
||||||
| tNOCODE { $$ = make_attr(ATTR_NOCODE); }
|
| tNOCODE { $$ = make_attr(ATTR_NOCODE); }
|
||||||
|
@ -2230,6 +2243,7 @@ struct allowed_attr allowed_attr[] =
|
||||||
/* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "lcid" },
|
/* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "lcid" },
|
||||||
/* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "licensed" },
|
/* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "licensed" },
|
||||||
/* ATTR_LOCAL */ { 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "local" },
|
/* ATTR_LOCAL */ { 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "local" },
|
||||||
|
/* ATTR_MARSHALING_BEHAVIOR */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "marshaling_behavior" },
|
||||||
/* ATTR_MAYBE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "maybe" },
|
/* ATTR_MAYBE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "maybe" },
|
||||||
/* ATTR_MESSAGE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "message" },
|
/* ATTR_MESSAGE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "message" },
|
||||||
/* ATTR_NOCODE */ { 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nocode" },
|
/* ATTR_NOCODE */ { 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nocode" },
|
||||||
|
|
|
@ -125,6 +125,7 @@ enum attr_type
|
||||||
ATTR_LIBLCID,
|
ATTR_LIBLCID,
|
||||||
ATTR_LICENSED,
|
ATTR_LICENSED,
|
||||||
ATTR_LOCAL,
|
ATTR_LOCAL,
|
||||||
|
ATTR_MARSHALING_BEHAVIOR,
|
||||||
ATTR_MAYBE,
|
ATTR_MAYBE,
|
||||||
ATTR_MESSAGE,
|
ATTR_MESSAGE,
|
||||||
ATTR_NOCODE,
|
ATTR_NOCODE,
|
||||||
|
@ -271,6 +272,14 @@ enum threading_type
|
||||||
THREADING_BOTH
|
THREADING_BOTH
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum marshaling_type
|
||||||
|
{
|
||||||
|
MARSHALING_INVALID = 0,
|
||||||
|
MARSHALING_NONE,
|
||||||
|
MARSHALING_AGILE,
|
||||||
|
MARSHALING_STANDARD,
|
||||||
|
};
|
||||||
|
|
||||||
enum type_basic_type
|
enum type_basic_type
|
||||||
{
|
{
|
||||||
TYPE_BASIC_INT8 = 1,
|
TYPE_BASIC_INT8 = 1,
|
||||||
|
|
Loading…
Reference in New Issue