mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:56:05 +00:00
[WIDL]
- Sync to Wine-1.1.39 svn path=/trunk/; revision=45833
This commit is contained in:
parent
71c6a8c283
commit
7473d1aab3
14 changed files with 1832 additions and 1770 deletions
|
@ -22,7 +22,7 @@ When porting a new DLL from Wine to ReactOS, please do the following steps
|
||||||
The following build tools are shared with Wine.
|
The following build tools are shared with Wine.
|
||||||
|
|
||||||
reactos/tools/unicode # Synced to Wine-20081105 (~Wine-1.1.7)
|
reactos/tools/unicode # Synced to Wine-20081105 (~Wine-1.1.7)
|
||||||
reactos/tools/widl # Synced to Wine-1_1_32
|
reactos/tools/widl # Synced to Wine-1_1_39
|
||||||
reactos/tools/winebuild # Synced to Wine-1_1_13
|
reactos/tools/winebuild # Synced to Wine-1_1_13
|
||||||
reactos/tools/wmc # Synced to Wine-20081105 (~Wine-1.1.7)
|
reactos/tools/wmc # Synced to Wine-20081105 (~Wine-1.1.7)
|
||||||
reactos/tools/wpp # Synced to Wine-20081105 (~Wine-1.1.7)
|
reactos/tools/wpp # Synced to Wine-20081105 (~Wine-1.1.7)
|
||||||
|
|
|
@ -87,7 +87,9 @@ expr_t *make_exprs(enum expr_type type, char *val)
|
||||||
e->u.sval = val;
|
e->u.sval = val;
|
||||||
e->is_const = FALSE;
|
e->is_const = FALSE;
|
||||||
/* check for predefined constants */
|
/* check for predefined constants */
|
||||||
if (type == EXPR_IDENTIFIER)
|
switch (type)
|
||||||
|
{
|
||||||
|
case EXPR_IDENTIFIER:
|
||||||
{
|
{
|
||||||
var_t *c = find_const(val, 0);
|
var_t *c = find_const(val, 0);
|
||||||
if (c)
|
if (c)
|
||||||
|
@ -97,6 +99,21 @@ expr_t *make_exprs(enum expr_type type, char *val)
|
||||||
e->is_const = TRUE;
|
e->is_const = TRUE;
|
||||||
e->cval = c->eval->cval;
|
e->cval = c->eval->cval;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case EXPR_CHARCONST:
|
||||||
|
if (!val[0])
|
||||||
|
error_loc("empty character constant\n");
|
||||||
|
else if (val[1])
|
||||||
|
error_loc("multi-character constants are endian dependent\n");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
e->is_const = TRUE;
|
||||||
|
e->cval = *val;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
@ -457,6 +474,11 @@ static struct expression_type resolve_expression(const struct expr_loc *expr_loc
|
||||||
result.is_temporary = TRUE;
|
result.is_temporary = TRUE;
|
||||||
result.type = type_new_pointer(RPC_FC_UP, type_new_int(TYPE_BASIC_WCHAR, 0), NULL);
|
result.type = type_new_pointer(RPC_FC_UP, type_new_int(TYPE_BASIC_WCHAR, 0), NULL);
|
||||||
break;
|
break;
|
||||||
|
case EXPR_CHARCONST:
|
||||||
|
result.is_variable = FALSE;
|
||||||
|
result.is_temporary = TRUE;
|
||||||
|
result.type = type_new_int(TYPE_BASIC_CHAR, 0);
|
||||||
|
break;
|
||||||
case EXPR_DOUBLE:
|
case EXPR_DOUBLE:
|
||||||
result.is_variable = FALSE;
|
result.is_variable = FALSE;
|
||||||
result.is_temporary = TRUE;
|
result.is_temporary = TRUE;
|
||||||
|
@ -655,6 +677,9 @@ void write_expr(FILE *h, const expr_t *e, int brackets,
|
||||||
case EXPR_WSTRLIT:
|
case EXPR_WSTRLIT:
|
||||||
fprintf(h, "L\"%s\"", e->u.sval);
|
fprintf(h, "L\"%s\"", e->u.sval);
|
||||||
break;
|
break;
|
||||||
|
case EXPR_CHARCONST:
|
||||||
|
fprintf(h, "'%s'", e->u.sval);
|
||||||
|
break;
|
||||||
case EXPR_LOGNOT:
|
case EXPR_LOGNOT:
|
||||||
fprintf(h, "!");
|
fprintf(h, "!");
|
||||||
write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix);
|
write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix);
|
||||||
|
@ -804,6 +829,7 @@ int compare_expr(const expr_t *a, const expr_t *b)
|
||||||
case EXPR_IDENTIFIER:
|
case EXPR_IDENTIFIER:
|
||||||
case EXPR_STRLIT:
|
case EXPR_STRLIT:
|
||||||
case EXPR_WSTRLIT:
|
case EXPR_WSTRLIT:
|
||||||
|
case EXPR_CHARCONST:
|
||||||
return strcmp(a->u.sval, b->u.sval);
|
return strcmp(a->u.sval, b->u.sval);
|
||||||
case EXPR_COND:
|
case EXPR_COND:
|
||||||
ret = compare_expr(a->ref, b->ref);
|
ret = compare_expr(a->ref, b->ref);
|
||||||
|
|
|
@ -254,6 +254,7 @@ void write_type_left(FILE *h, type_t *t, int declonly)
|
||||||
break;
|
break;
|
||||||
case TYPE_BASIC:
|
case TYPE_BASIC:
|
||||||
if (type_basic_get_type(t) != TYPE_BASIC_INT32 &&
|
if (type_basic_get_type(t) != TYPE_BASIC_INT32 &&
|
||||||
|
type_basic_get_type(t) != TYPE_BASIC_INT64 &&
|
||||||
type_basic_get_type(t) != TYPE_BASIC_HYPER)
|
type_basic_get_type(t) != TYPE_BASIC_HYPER)
|
||||||
{
|
{
|
||||||
if (type_basic_get_sign(t) < 0) fprintf(h, "signed ");
|
if (type_basic_get_sign(t) < 0) fprintf(h, "signed ");
|
||||||
|
@ -264,7 +265,6 @@ void write_type_left(FILE *h, type_t *t, int declonly)
|
||||||
case TYPE_BASIC_INT8: fprintf(h, "small"); break;
|
case TYPE_BASIC_INT8: fprintf(h, "small"); break;
|
||||||
case TYPE_BASIC_INT16: fprintf(h, "short"); break;
|
case TYPE_BASIC_INT16: fprintf(h, "short"); break;
|
||||||
case TYPE_BASIC_INT: fprintf(h, "int"); break;
|
case TYPE_BASIC_INT: fprintf(h, "int"); break;
|
||||||
case TYPE_BASIC_INT64: fprintf(h, "__int64"); break;
|
|
||||||
case TYPE_BASIC_INT3264: fprintf(h, "__int3264"); break;
|
case TYPE_BASIC_INT3264: fprintf(h, "__int3264"); break;
|
||||||
case TYPE_BASIC_BYTE: fprintf(h, "byte"); break;
|
case TYPE_BASIC_BYTE: fprintf(h, "byte"); break;
|
||||||
case TYPE_BASIC_CHAR: fprintf(h, "char"); break;
|
case TYPE_BASIC_CHAR: fprintf(h, "char"); break;
|
||||||
|
@ -279,6 +279,12 @@ void write_type_left(FILE *h, type_t *t, int declonly)
|
||||||
else
|
else
|
||||||
fprintf(h, "LONG");
|
fprintf(h, "LONG");
|
||||||
break;
|
break;
|
||||||
|
case TYPE_BASIC_INT64:
|
||||||
|
if (type_basic_get_sign(t) > 0)
|
||||||
|
fprintf(h, "UINT64");
|
||||||
|
else
|
||||||
|
fprintf(h, "INT64");
|
||||||
|
break;
|
||||||
case TYPE_BASIC_HYPER:
|
case TYPE_BASIC_HYPER:
|
||||||
if (type_basic_get_sign(t) > 0)
|
if (type_basic_get_sign(t) > 0)
|
||||||
fprintf(h, "MIDL_uhyper");
|
fprintf(h, "MIDL_uhyper");
|
||||||
|
@ -685,10 +691,12 @@ int has_out_arg_or_return(const var_t *func)
|
||||||
|
|
||||||
/********** INTERFACES **********/
|
/********** INTERFACES **********/
|
||||||
|
|
||||||
int is_object(const attr_list_t *list)
|
int is_object(const type_t *iface)
|
||||||
{
|
{
|
||||||
const attr_t *attr;
|
const attr_t *attr;
|
||||||
if (list) LIST_FOR_EACH_ENTRY( attr, list, const attr_t, entry )
|
if (type_is_defined(iface) && type_iface_get_inherit(iface))
|
||||||
|
return 1;
|
||||||
|
if (iface->attrs) LIST_FOR_EACH_ENTRY( attr, iface->attrs, const attr_t, entry )
|
||||||
if (attr->type == ATTR_OBJECT || attr->type == ATTR_ODL) return 1;
|
if (attr->type == ATTR_OBJECT || attr->type == ATTR_ODL) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -860,7 +868,7 @@ static void write_locals(FILE *fp, const type_t *iface, int body)
|
||||||
= "/* WIDL-generated stub. You must provide an implementation for this. */";
|
= "/* WIDL-generated stub. You must provide an implementation for this. */";
|
||||||
const statement_t *stmt;
|
const statement_t *stmt;
|
||||||
|
|
||||||
if (!is_object(iface->attrs))
|
if (!is_object(iface))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) {
|
STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) {
|
||||||
|
@ -1174,7 +1182,7 @@ static void write_forward_decls(FILE *header, const statement_list_t *stmts)
|
||||||
case STMT_TYPE:
|
case STMT_TYPE:
|
||||||
if (type_get_type(stmt->u.type) == TYPE_INTERFACE)
|
if (type_get_type(stmt->u.type) == TYPE_INTERFACE)
|
||||||
{
|
{
|
||||||
if (is_object(stmt->u.type->attrs) || is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE))
|
if (is_object(stmt->u.type) || is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE))
|
||||||
write_forward(header, stmt->u.type);
|
write_forward(header, stmt->u.type);
|
||||||
}
|
}
|
||||||
else if (type_get_type(stmt->u.type) == TYPE_COCLASS)
|
else if (type_get_type(stmt->u.type) == TYPE_COCLASS)
|
||||||
|
@ -1209,7 +1217,7 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons
|
||||||
if (type_get_type(stmt->u.type) == TYPE_INTERFACE)
|
if (type_get_type(stmt->u.type) == TYPE_INTERFACE)
|
||||||
{
|
{
|
||||||
type_t *iface = stmt->u.type;
|
type_t *iface = stmt->u.type;
|
||||||
if (is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE) || is_object(stmt->u.type->attrs))
|
if (is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE) || is_object(stmt->u.type))
|
||||||
{
|
{
|
||||||
write_com_interface_start(header, iface);
|
write_com_interface_start(header, iface);
|
||||||
write_header_stmts(header, type_iface_get_stmts(iface), stmt->u.type, TRUE);
|
write_header_stmts(header, type_iface_get_stmts(iface), stmt->u.type, TRUE);
|
||||||
|
|
|
@ -38,7 +38,7 @@ extern void write_type_def_or_decl(FILE *h, type_t *t, int is_field, const char
|
||||||
extern void write_type_decl(FILE *f, type_t *t, const char *name);
|
extern void write_type_decl(FILE *f, type_t *t, const char *name);
|
||||||
extern void write_type_decl_left(FILE *f, type_t *t);
|
extern void write_type_decl_left(FILE *f, type_t *t);
|
||||||
extern int needs_space_after(type_t *t);
|
extern int needs_space_after(type_t *t);
|
||||||
extern int is_object(const attr_list_t *list);
|
extern int is_object(const type_t *iface);
|
||||||
extern int is_local(const attr_list_t *list);
|
extern int is_local(const attr_list_t *list);
|
||||||
extern int need_stub(const type_t *iface);
|
extern int need_stub(const type_t *iface);
|
||||||
extern int need_proxy(const type_t *iface);
|
extern int need_proxy(const type_t *iface);
|
||||||
|
|
|
@ -45,4 +45,6 @@ void pop_import(void);
|
||||||
|
|
||||||
int is_type(const char *name);
|
int is_type(const char *name);
|
||||||
|
|
||||||
|
extern char *temp_name;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,6 +37,7 @@ double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)*
|
||||||
%x WSTRQUOTE
|
%x WSTRQUOTE
|
||||||
%x ATTR
|
%x ATTR
|
||||||
%x PP_LINE
|
%x PP_LINE
|
||||||
|
%x SQUOTE
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
||||||
|
@ -63,8 +64,6 @@ double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)*
|
||||||
|
|
||||||
#include "parser.tab.h"
|
#include "parser.tab.h"
|
||||||
|
|
||||||
extern char *temp_name;
|
|
||||||
|
|
||||||
static void addcchar(char c);
|
static void addcchar(char c);
|
||||||
static char *get_buffered_cstring(void);
|
static char *get_buffered_cstring(void);
|
||||||
|
|
||||||
|
@ -157,10 +156,17 @@ UUID *parse_uuid(const char *u)
|
||||||
parser_lval.str = get_buffered_cstring();
|
parser_lval.str = get_buffered_cstring();
|
||||||
return aWSTRING;
|
return aWSTRING;
|
||||||
}
|
}
|
||||||
<QUOTE,WSTRQUOTE>\\\\ |
|
<INITIAL,ATTR>\' yy_push_state(SQUOTE); cbufidx = 0;
|
||||||
|
<SQUOTE>\' {
|
||||||
|
yy_pop_state();
|
||||||
|
parser_lval.str = get_buffered_cstring();
|
||||||
|
return aSQSTRING;
|
||||||
|
}
|
||||||
|
<QUOTE,WSTRQUOTE,SQUOTE>\\\\ |
|
||||||
<QUOTE,WSTRQUOTE>\\\" addcchar(yytext[1]);
|
<QUOTE,WSTRQUOTE>\\\" addcchar(yytext[1]);
|
||||||
<QUOTE,WSTRQUOTE>\\. addcchar('\\'); addcchar(yytext[1]);
|
<SQUOTE>\\\' addcchar(yytext[1]);
|
||||||
<QUOTE,WSTRQUOTE>. addcchar(yytext[0]);
|
<QUOTE,WSTRQUOTE,SQUOTE>\\. addcchar('\\'); addcchar(yytext[1]);
|
||||||
|
<QUOTE,WSTRQUOTE,SQUOTE>. addcchar(yytext[0]);
|
||||||
<INITIAL,ATTR>\[ yy_push_state(ATTR); return '[';
|
<INITIAL,ATTR>\[ yy_push_state(ATTR); return '[';
|
||||||
<ATTR>\] yy_pop_state(); return ']';
|
<ATTR>\] yy_pop_state(); return ']';
|
||||||
<ATTR>{cident} return attr_token(yytext);
|
<ATTR>{cident} return attr_token(yytext);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -46,150 +46,151 @@
|
||||||
aDOUBLE = 262,
|
aDOUBLE = 262,
|
||||||
aSTRING = 263,
|
aSTRING = 263,
|
||||||
aWSTRING = 264,
|
aWSTRING = 264,
|
||||||
aUUID = 265,
|
aSQSTRING = 265,
|
||||||
aEOF = 266,
|
aUUID = 266,
|
||||||
SHL = 267,
|
aEOF = 267,
|
||||||
SHR = 268,
|
SHL = 268,
|
||||||
MEMBERPTR = 269,
|
SHR = 269,
|
||||||
EQUALITY = 270,
|
MEMBERPTR = 270,
|
||||||
INEQUALITY = 271,
|
EQUALITY = 271,
|
||||||
GREATEREQUAL = 272,
|
INEQUALITY = 272,
|
||||||
LESSEQUAL = 273,
|
GREATEREQUAL = 273,
|
||||||
LOGICALOR = 274,
|
LESSEQUAL = 274,
|
||||||
LOGICALAND = 275,
|
LOGICALOR = 275,
|
||||||
ELLIPSIS = 276,
|
LOGICALAND = 276,
|
||||||
tAGGREGATABLE = 277,
|
ELLIPSIS = 277,
|
||||||
tALLOCATE = 278,
|
tAGGREGATABLE = 278,
|
||||||
tANNOTATION = 279,
|
tALLOCATE = 279,
|
||||||
tAPPOBJECT = 280,
|
tANNOTATION = 280,
|
||||||
tASYNC = 281,
|
tAPPOBJECT = 281,
|
||||||
tASYNCUUID = 282,
|
tASYNC = 282,
|
||||||
tAUTOHANDLE = 283,
|
tASYNCUUID = 283,
|
||||||
tBINDABLE = 284,
|
tAUTOHANDLE = 284,
|
||||||
tBOOLEAN = 285,
|
tBINDABLE = 285,
|
||||||
tBROADCAST = 286,
|
tBOOLEAN = 286,
|
||||||
tBYTE = 287,
|
tBROADCAST = 287,
|
||||||
tBYTECOUNT = 288,
|
tBYTE = 288,
|
||||||
tCALLAS = 289,
|
tBYTECOUNT = 289,
|
||||||
tCALLBACK = 290,
|
tCALLAS = 290,
|
||||||
tCASE = 291,
|
tCALLBACK = 291,
|
||||||
tCDECL = 292,
|
tCASE = 292,
|
||||||
tCHAR = 293,
|
tCDECL = 293,
|
||||||
tCOCLASS = 294,
|
tCHAR = 294,
|
||||||
tCODE = 295,
|
tCOCLASS = 295,
|
||||||
tCOMMSTATUS = 296,
|
tCODE = 296,
|
||||||
tCONST = 297,
|
tCOMMSTATUS = 297,
|
||||||
tCONTEXTHANDLE = 298,
|
tCONST = 298,
|
||||||
tCONTEXTHANDLENOSERIALIZE = 299,
|
tCONTEXTHANDLE = 299,
|
||||||
tCONTEXTHANDLESERIALIZE = 300,
|
tCONTEXTHANDLENOSERIALIZE = 300,
|
||||||
tCONTROL = 301,
|
tCONTEXTHANDLESERIALIZE = 301,
|
||||||
tCPPQUOTE = 302,
|
tCONTROL = 302,
|
||||||
tDEFAULT = 303,
|
tCPPQUOTE = 303,
|
||||||
tDEFAULTCOLLELEM = 304,
|
tDEFAULT = 304,
|
||||||
tDEFAULTVALUE = 305,
|
tDEFAULTCOLLELEM = 305,
|
||||||
tDEFAULTVTABLE = 306,
|
tDEFAULTVALUE = 306,
|
||||||
tDISPLAYBIND = 307,
|
tDEFAULTVTABLE = 307,
|
||||||
tDISPINTERFACE = 308,
|
tDISPLAYBIND = 308,
|
||||||
tDLLNAME = 309,
|
tDISPINTERFACE = 309,
|
||||||
tDOUBLE = 310,
|
tDLLNAME = 310,
|
||||||
tDUAL = 311,
|
tDOUBLE = 311,
|
||||||
tENDPOINT = 312,
|
tDUAL = 312,
|
||||||
tENTRY = 313,
|
tENDPOINT = 313,
|
||||||
tENUM = 314,
|
tENTRY = 314,
|
||||||
tERRORSTATUST = 315,
|
tENUM = 315,
|
||||||
tEXPLICITHANDLE = 316,
|
tERRORSTATUST = 316,
|
||||||
tEXTERN = 317,
|
tEXPLICITHANDLE = 317,
|
||||||
tFALSE = 318,
|
tEXTERN = 318,
|
||||||
tFASTCALL = 319,
|
tFALSE = 319,
|
||||||
tFLOAT = 320,
|
tFASTCALL = 320,
|
||||||
tHANDLE = 321,
|
tFLOAT = 321,
|
||||||
tHANDLET = 322,
|
tHANDLE = 322,
|
||||||
tHELPCONTEXT = 323,
|
tHANDLET = 323,
|
||||||
tHELPFILE = 324,
|
tHELPCONTEXT = 324,
|
||||||
tHELPSTRING = 325,
|
tHELPFILE = 325,
|
||||||
tHELPSTRINGCONTEXT = 326,
|
tHELPSTRING = 326,
|
||||||
tHELPSTRINGDLL = 327,
|
tHELPSTRINGCONTEXT = 327,
|
||||||
tHIDDEN = 328,
|
tHELPSTRINGDLL = 328,
|
||||||
tHYPER = 329,
|
tHIDDEN = 329,
|
||||||
tID = 330,
|
tHYPER = 330,
|
||||||
tIDEMPOTENT = 331,
|
tID = 331,
|
||||||
tIIDIS = 332,
|
tIDEMPOTENT = 332,
|
||||||
tIMMEDIATEBIND = 333,
|
tIIDIS = 333,
|
||||||
tIMPLICITHANDLE = 334,
|
tIMMEDIATEBIND = 334,
|
||||||
tIMPORT = 335,
|
tIMPLICITHANDLE = 335,
|
||||||
tIMPORTLIB = 336,
|
tIMPORT = 336,
|
||||||
tIN = 337,
|
tIMPORTLIB = 337,
|
||||||
tIN_LINE = 338,
|
tIN = 338,
|
||||||
tINLINE = 339,
|
tIN_LINE = 339,
|
||||||
tINPUTSYNC = 340,
|
tINLINE = 340,
|
||||||
tINT = 341,
|
tINPUTSYNC = 341,
|
||||||
tINT3264 = 342,
|
tINT = 342,
|
||||||
tINT64 = 343,
|
tINT3264 = 343,
|
||||||
tINTERFACE = 344,
|
tINT64 = 344,
|
||||||
tLCID = 345,
|
tINTERFACE = 345,
|
||||||
tLENGTHIS = 346,
|
tLCID = 346,
|
||||||
tLIBRARY = 347,
|
tLENGTHIS = 347,
|
||||||
tLOCAL = 348,
|
tLIBRARY = 348,
|
||||||
tLONG = 349,
|
tLOCAL = 349,
|
||||||
tMETHODS = 350,
|
tLONG = 350,
|
||||||
tMODULE = 351,
|
tMETHODS = 351,
|
||||||
tNONBROWSABLE = 352,
|
tMODULE = 352,
|
||||||
tNONCREATABLE = 353,
|
tNONBROWSABLE = 353,
|
||||||
tNONEXTENSIBLE = 354,
|
tNONCREATABLE = 354,
|
||||||
tNULL = 355,
|
tNONEXTENSIBLE = 355,
|
||||||
tOBJECT = 356,
|
tNULL = 356,
|
||||||
tODL = 357,
|
tOBJECT = 357,
|
||||||
tOLEAUTOMATION = 358,
|
tODL = 358,
|
||||||
tOPTIONAL = 359,
|
tOLEAUTOMATION = 359,
|
||||||
tOUT = 360,
|
tOPTIONAL = 360,
|
||||||
tPASCAL = 361,
|
tOUT = 361,
|
||||||
tPOINTERDEFAULT = 362,
|
tPASCAL = 362,
|
||||||
tPROPERTIES = 363,
|
tPOINTERDEFAULT = 363,
|
||||||
tPROPGET = 364,
|
tPROPERTIES = 364,
|
||||||
tPROPPUT = 365,
|
tPROPGET = 365,
|
||||||
tPROPPUTREF = 366,
|
tPROPPUT = 366,
|
||||||
tPTR = 367,
|
tPROPPUTREF = 367,
|
||||||
tPUBLIC = 368,
|
tPTR = 368,
|
||||||
tRANGE = 369,
|
tPUBLIC = 369,
|
||||||
tREADONLY = 370,
|
tRANGE = 370,
|
||||||
tREF = 371,
|
tREADONLY = 371,
|
||||||
tREGISTER = 372,
|
tREF = 372,
|
||||||
tREQUESTEDIT = 373,
|
tREGISTER = 373,
|
||||||
tRESTRICTED = 374,
|
tREQUESTEDIT = 374,
|
||||||
tRETVAL = 375,
|
tRESTRICTED = 375,
|
||||||
tSAFEARRAY = 376,
|
tRETVAL = 376,
|
||||||
tSHORT = 377,
|
tSAFEARRAY = 377,
|
||||||
tSIGNED = 378,
|
tSHORT = 378,
|
||||||
tSIZEIS = 379,
|
tSIGNED = 379,
|
||||||
tSIZEOF = 380,
|
tSIZEIS = 380,
|
||||||
tSMALL = 381,
|
tSIZEOF = 381,
|
||||||
tSOURCE = 382,
|
tSMALL = 382,
|
||||||
tSTATIC = 383,
|
tSOURCE = 383,
|
||||||
tSTDCALL = 384,
|
tSTATIC = 384,
|
||||||
tSTRICTCONTEXTHANDLE = 385,
|
tSTDCALL = 385,
|
||||||
tSTRING = 386,
|
tSTRICTCONTEXTHANDLE = 386,
|
||||||
tSTRUCT = 387,
|
tSTRING = 387,
|
||||||
tSWITCH = 388,
|
tSTRUCT = 388,
|
||||||
tSWITCHIS = 389,
|
tSWITCH = 389,
|
||||||
tSWITCHTYPE = 390,
|
tSWITCHIS = 390,
|
||||||
tTRANSMITAS = 391,
|
tSWITCHTYPE = 391,
|
||||||
tTRUE = 392,
|
tTRANSMITAS = 392,
|
||||||
tTYPEDEF = 393,
|
tTRUE = 393,
|
||||||
tUNION = 394,
|
tTYPEDEF = 394,
|
||||||
tUNIQUE = 395,
|
tUNION = 395,
|
||||||
tUNSIGNED = 396,
|
tUNIQUE = 396,
|
||||||
tUUID = 397,
|
tUNSIGNED = 397,
|
||||||
tV1ENUM = 398,
|
tUUID = 398,
|
||||||
tVARARG = 399,
|
tV1ENUM = 399,
|
||||||
tVERSION = 400,
|
tVARARG = 400,
|
||||||
tVOID = 401,
|
tVERSION = 401,
|
||||||
tWCHAR = 402,
|
tVOID = 402,
|
||||||
tWIREMARSHAL = 403,
|
tWCHAR = 403,
|
||||||
ADDRESSOF = 404,
|
tWIREMARSHAL = 404,
|
||||||
NEG = 405,
|
ADDRESSOF = 405,
|
||||||
POS = 406,
|
NEG = 406,
|
||||||
PPTR = 407,
|
POS = 407,
|
||||||
CAST = 408
|
PPTR = 408,
|
||||||
|
CAST = 409
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -232,7 +233,7 @@ typedef union YYSTYPE
|
||||||
|
|
||||||
|
|
||||||
/* Line 1676 of yacc.c */
|
/* Line 1676 of yacc.c */
|
||||||
#line 236 "parser.tab.h"
|
#line 237 "parser.tab.h"
|
||||||
} YYSTYPE;
|
} YYSTYPE;
|
||||||
# define YYSTYPE_IS_TRIVIAL 1
|
# define YYSTYPE_IS_TRIVIAL 1
|
||||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||||
|
|
|
@ -186,7 +186,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
|
||||||
%token <str> aKNOWNTYPE
|
%token <str> aKNOWNTYPE
|
||||||
%token <num> aNUM aHEXNUM
|
%token <num> aNUM aHEXNUM
|
||||||
%token <dbl> aDOUBLE
|
%token <dbl> aDOUBLE
|
||||||
%token <str> aSTRING aWSTRING
|
%token <str> aSTRING aWSTRING aSQSTRING
|
||||||
%token <uuid> aUUID
|
%token <uuid> aUUID
|
||||||
%token aEOF
|
%token aEOF
|
||||||
%token SHL SHR
|
%token SHL SHR
|
||||||
|
@ -632,6 +632,7 @@ expr: aNUM { $$ = make_exprl(EXPR_NUM, $1); }
|
||||||
| tTRUE { $$ = make_exprl(EXPR_TRUEFALSE, 1); }
|
| tTRUE { $$ = make_exprl(EXPR_TRUEFALSE, 1); }
|
||||||
| aSTRING { $$ = make_exprs(EXPR_STRLIT, $1); }
|
| aSTRING { $$ = make_exprs(EXPR_STRLIT, $1); }
|
||||||
| aWSTRING { $$ = make_exprs(EXPR_WSTRLIT, $1); }
|
| aWSTRING { $$ = make_exprs(EXPR_WSTRLIT, $1); }
|
||||||
|
| aSQSTRING { $$ = make_exprs(EXPR_CHARCONST, $1); }
|
||||||
| aIDENTIFIER { $$ = make_exprs(EXPR_IDENTIFIER, $1); }
|
| aIDENTIFIER { $$ = make_exprs(EXPR_IDENTIFIER, $1); }
|
||||||
| expr '?' expr ':' expr { $$ = make_expr3(EXPR_COND, $1, $3, $5); }
|
| expr '?' expr ':' expr { $$ = make_expr3(EXPR_COND, $1, $3, $5); }
|
||||||
| expr LOGICALOR expr { $$ = make_expr2(EXPR_LOGOR, $1, $3); }
|
| expr LOGICALOR expr { $$ = make_expr2(EXPR_LOGOR, $1, $3); }
|
||||||
|
@ -841,7 +842,7 @@ dispinterfacedef: dispinterfacehdr '{'
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit: { $$ = NULL; }
|
inherit: { $$ = NULL; }
|
||||||
| ':' aKNOWNTYPE { $$ = find_type_or_error2($2, 0); }
|
| ':' aKNOWNTYPE { $$ = find_type_or_error2($2, 0); is_object_interface = 1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
interface: tINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, 0); }
|
interface: tINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, 0); }
|
||||||
|
@ -852,9 +853,9 @@ interfacehdr: attributes interface { $$.interface = $2;
|
||||||
$$.old_pointer_default = pointer_default;
|
$$.old_pointer_default = pointer_default;
|
||||||
if (is_attr($1, ATTR_POINTERDEFAULT))
|
if (is_attr($1, ATTR_POINTERDEFAULT))
|
||||||
pointer_default = get_attrv($1, ATTR_POINTERDEFAULT);
|
pointer_default = get_attrv($1, ATTR_POINTERDEFAULT);
|
||||||
is_object_interface = is_object($1);
|
|
||||||
check_def($2);
|
check_def($2);
|
||||||
$2->attrs = check_iface_attrs($2->name, $1);
|
$2->attrs = check_iface_attrs($2->name, $1);
|
||||||
|
is_object_interface = is_object($2);
|
||||||
$2->defined = TRUE;
|
$2->defined = TRUE;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
@ -1033,7 +1034,7 @@ m_bitfield: { $$ = NULL; }
|
||||||
|
|
||||||
struct_declarator: any_declarator m_bitfield { $$ = $1; $$->bits = $2;
|
struct_declarator: any_declarator m_bitfield { $$ = $1; $$->bits = $2;
|
||||||
if (!$$->bits && !$$->var->name)
|
if (!$$->bits && !$$->var->name)
|
||||||
error_loc("unnamed fields are not allowed");
|
error_loc("unnamed fields are not allowed\n");
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
@ -301,26 +301,26 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
|
||||||
*yy_cp = '\0'; \
|
*yy_cp = '\0'; \
|
||||||
yy_c_buf_p = yy_cp;
|
yy_c_buf_p = yy_cp;
|
||||||
|
|
||||||
#define YY_NUM_RULES 33
|
#define YY_NUM_RULES 36
|
||||||
#define YY_END_OF_BUFFER 34
|
#define YY_END_OF_BUFFER 37
|
||||||
static yyconst short int yy_accept[142] =
|
static yyconst short int yy_accept[148] =
|
||||||
{ 0,
|
{ 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 2, 2,
|
0, 0, 0, 0, 0, 0, 0, 0, 2, 2,
|
||||||
34, 32, 21, 20, 32, 3, 32, 32, 32, 16,
|
0, 0, 37, 35, 24, 23, 35, 3, 35, 7,
|
||||||
16, 32, 32, 32, 19, 19, 19, 11, 32, 21,
|
35, 35, 19, 19, 35, 35, 35, 22, 22, 22,
|
||||||
1, 10, 33, 4, 10, 6, 16, 16, 13, 13,
|
14, 35, 24, 1, 13, 36, 4, 13, 6, 19,
|
||||||
13, 12, 2, 26, 30, 24, 0, 0, 16, 16,
|
19, 16, 16, 16, 15, 2, 8, 13, 29, 33,
|
||||||
16, 0, 22, 28, 25, 27, 23, 19, 5, 19,
|
27, 0, 0, 19, 19, 19, 0, 25, 31, 28,
|
||||||
29, 0, 1, 1, 9, 8, 7, 16, 0, 13,
|
30, 26, 22, 5, 22, 32, 0, 1, 1, 12,
|
||||||
13, 2, 31, 17, 16, 16, 15, 19, 16, 0,
|
10, 9, 19, 0, 16, 16, 2, 11, 34, 20,
|
||||||
13, 0, 15, 15, 19, 16, 0, 13, 0, 17,
|
19, 19, 18, 22, 19, 0, 16, 0, 18, 18,
|
||||||
15, 15, 19, 16, 0, 13, 19, 16, 0, 13,
|
22, 19, 0, 16, 0, 20, 18, 18, 22, 19,
|
||||||
|
|
||||||
19, 16, 0, 13, 19, 16, 0, 13, 19, 0,
|
0, 16, 22, 19, 0, 16, 22, 19, 0, 16,
|
||||||
16, 0, 18, 0, 0, 0, 0, 0, 0, 0,
|
22, 19, 0, 16, 22, 0, 19, 0, 21, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 14,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0
|
0, 0, 0, 0, 0, 17, 0
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst int yy_ec[256] =
|
static yyconst int yy_ec[256] =
|
||||||
|
@ -328,17 +328,17 @@ static yyconst int yy_ec[256] =
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
||||||
1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
|
1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 2, 4, 5, 6, 1, 1, 7, 1, 8,
|
1, 2, 4, 5, 6, 1, 1, 7, 8, 9,
|
||||||
1, 1, 9, 1, 10, 11, 1, 12, 13, 13,
|
1, 1, 10, 1, 11, 12, 1, 13, 14, 14,
|
||||||
13, 13, 13, 13, 13, 13, 13, 1, 1, 14,
|
14, 14, 14, 14, 14, 14, 14, 1, 1, 15,
|
||||||
15, 16, 1, 1, 17, 18, 18, 18, 19, 20,
|
16, 17, 1, 1, 18, 19, 19, 19, 20, 21,
|
||||||
21, 21, 21, 21, 21, 22, 21, 21, 21, 21,
|
22, 22, 22, 22, 22, 23, 22, 22, 22, 22,
|
||||||
21, 23, 24, 21, 25, 21, 21, 26, 27, 21,
|
22, 24, 25, 22, 26, 22, 22, 27, 28, 22,
|
||||||
28, 29, 30, 1, 21, 1, 18, 18, 18, 18,
|
29, 30, 31, 1, 22, 1, 19, 19, 19, 19,
|
||||||
|
|
||||||
31, 18, 21, 21, 21, 21, 21, 32, 21, 21,
|
32, 19, 22, 22, 22, 22, 22, 33, 22, 22,
|
||||||
21, 21, 21, 21, 21, 21, 33, 21, 21, 34,
|
22, 22, 22, 22, 22, 22, 34, 22, 22, 35,
|
||||||
21, 21, 1, 35, 1, 1, 1, 1, 1, 1,
|
22, 22, 1, 36, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
@ -355,182 +355,182 @@ static yyconst int yy_ec[256] =
|
||||||
1, 1, 1, 1, 1
|
1, 1, 1, 1, 1
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst int yy_meta[36] =
|
static yyconst int yy_meta[37] =
|
||||||
{ 0,
|
{ 0,
|
||||||
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 3, 3, 1, 1, 1, 3, 3, 3, 3,
|
1, 1, 3, 3, 1, 1, 1, 3, 3, 3,
|
||||||
4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
|
3, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||||
3, 4, 4, 4, 1
|
1, 3, 4, 4, 4, 1
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst short int yy_base[178] =
|
static yyconst short int yy_base[184] =
|
||||||
{ 0,
|
{ 0,
|
||||||
0, 34, 34, 38, 39, 42, 71, 44, 270, 269,
|
0, 35, 35, 39, 40, 43, 61, 45, 262, 261,
|
||||||
271, 491, 491, 491, 255, 491, 258, 248, 252, 96,
|
46, 47, 263, 481, 481, 481, 246, 481, 254, 481,
|
||||||
22, 37, 242, 38, 0, 251, 238, 491, 219, 53,
|
243, 243, 85, 25, 41, 238, 42, 0, 248, 229,
|
||||||
251, 491, 491, 491, 33, 491, 119, 23, 142, 165,
|
481, 210, 60, 243, 481, 481, 481, 34, 481, 108,
|
||||||
246, 491, 0, 491, 491, 491, 239, 48, 0, 33,
|
26, 131, 154, 239, 481, 0, 481, 60, 481, 481,
|
||||||
88, 0, 491, 491, 491, 491, 491, 0, 491, 228,
|
481, 231, 58, 0, 75, 77, 0, 481, 481, 481,
|
||||||
491, 63, 241, 240, 491, 491, 491, 185, 0, 207,
|
481, 481, 0, 481, 220, 481, 61, 238, 236, 481,
|
||||||
0, 0, 491, 104, 491, 491, 124, 222, 227, 0,
|
481, 481, 174, 0, 196, 0, 0, 481, 481, 93,
|
||||||
249, 102, 94, 102, 220, 269, 0, 291, 113, 168,
|
481, 481, 113, 213, 216, 0, 238, 166, 89, 81,
|
||||||
491, 491, 213, 311, 0, 333, 212, 353, 0, 375,
|
214, 258, 0, 280, 89, 169, 481, 481, 207, 300,
|
||||||
|
|
||||||
217, 395, 0, 417, 206, 439, 222, 221, 62, 0,
|
0, 322, 203, 342, 0, 364, 208, 384, 0, 406,
|
||||||
220, 140, 491, 0, 0, 0, 219, 0, 0, 0,
|
197, 428, 213, 212, 115, 0, 211, 128, 481, 0,
|
||||||
0, 218, 0, 0, 0, 0, 213, 0, 0, 0,
|
0, 0, 210, 0, 0, 0, 0, 209, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 491,
|
0, 0, 208, 0, 0, 0, 0, 0, 0, 0,
|
||||||
491, 472, 476, 478, 482, 486, 219, 218, 212, 211,
|
0, 0, 0, 0, 0, 481, 481, 462, 466, 468,
|
||||||
210, 209, 208, 206, 205, 203, 198, 197, 192, 191,
|
472, 476, 215, 210, 209, 208, 202, 201, 200, 199,
|
||||||
190, 189, 188, 187, 186, 185, 183, 176, 169, 168,
|
196, 195, 193, 188, 187, 182, 181, 178, 175, 168,
|
||||||
167, 155, 144, 140, 137, 130, 110
|
167, 166, 159, 158, 157, 145, 135, 130, 129, 113,
|
||||||
|
102, 88, 75
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst short int yy_def[178] =
|
static yyconst short int yy_def[184] =
|
||||||
{ 0,
|
{ 0,
|
||||||
141, 1, 142, 142, 142, 142, 141, 7, 143, 143,
|
147, 1, 148, 148, 148, 148, 1, 7, 149, 149,
|
||||||
141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
148, 148, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
20, 141, 141, 141, 144, 144, 144, 141, 141, 141,
|
147, 147, 147, 23, 147, 147, 147, 150, 150, 150,
|
||||||
141, 141, 141, 141, 145, 141, 141, 37, 141, 39,
|
147, 147, 147, 147, 147, 147, 147, 151, 147, 147,
|
||||||
40, 141, 146, 141, 141, 141, 141, 141, 21, 141,
|
40, 147, 42, 43, 147, 152, 147, 151, 147, 147,
|
||||||
141, 147, 141, 141, 141, 141, 141, 144, 141, 144,
|
147, 147, 147, 24, 147, 147, 153, 147, 147, 147,
|
||||||
141, 141, 141, 141, 141, 141, 141, 141, 148, 40,
|
147, 147, 150, 147, 150, 147, 147, 147, 147, 147,
|
||||||
40, 146, 141, 141, 141, 141, 147, 144, 141, 149,
|
147, 147, 147, 154, 43, 43, 152, 147, 147, 147,
|
||||||
40, 141, 141, 141, 144, 141, 150, 40, 141, 141,
|
147, 147, 153, 150, 147, 155, 43, 147, 147, 147,
|
||||||
141, 141, 144, 141, 151, 40, 144, 141, 152, 40,
|
150, 147, 156, 43, 147, 147, 147, 147, 150, 147,
|
||||||
|
|
||||||
144, 141, 153, 40, 144, 141, 141, 40, 144, 154,
|
157, 43, 150, 147, 158, 43, 150, 147, 159, 43,
|
||||||
106, 141, 141, 155, 156, 157, 141, 158, 159, 160,
|
150, 147, 147, 43, 150, 160, 112, 147, 147, 161,
|
||||||
161, 141, 162, 163, 164, 165, 141, 166, 167, 168,
|
162, 163, 147, 164, 165, 166, 167, 147, 168, 169,
|
||||||
169, 170, 171, 172, 173, 174, 175, 176, 177, 141,
|
170, 171, 147, 172, 173, 174, 175, 176, 177, 178,
|
||||||
0, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
179, 180, 181, 182, 183, 147, 0, 147, 147, 147,
|
||||||
141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
141, 141, 141, 141, 141, 141, 141
|
147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
|
147, 147, 147
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst short int yy_nxt[527] =
|
static yyconst short int yy_nxt[518] =
|
||||||
{ 0,
|
{ 0,
|
||||||
12, 13, 14, 15, 16, 12, 17, 12, 12, 18,
|
14, 15, 16, 17, 18, 14, 19, 20, 14, 14,
|
||||||
19, 20, 21, 22, 23, 24, 25, 25, 25, 25,
|
21, 22, 23, 24, 25, 26, 27, 28, 28, 28,
|
||||||
25, 26, 25, 27, 25, 25, 25, 28, 12, 12,
|
28, 28, 29, 28, 30, 28, 28, 28, 31, 14,
|
||||||
25, 25, 25, 25, 29, 30, 33, 66, 34, 31,
|
14, 28, 28, 28, 28, 32, 33, 36, 71, 37,
|
||||||
33, 33, 34, 36, 33, 30, 36, 141, 141, 31,
|
34, 36, 36, 37, 39, 36, 33, 39, 36, 36,
|
||||||
53, 54, 56, 57, 62, 141, 141, 75, 63, 74,
|
34, 147, 147, 47, 47, 58, 59, 61, 62, 147,
|
||||||
74, 67, 35, 112, 62, 75, 35, 35, 63, 113,
|
147, 67, 67, 72, 38, 68, 68, 78, 38, 38,
|
||||||
35, 12, 13, 14, 15, 16, 12, 17, 12, 12,
|
80, 80, 38, 40, 41, 48, 48, 146, 42, 42,
|
||||||
18, 19, 37, 38, 22, 23, 24, 39, 39, 39,
|
42, 42, 43, 44, 43, 43, 43, 43, 43, 72,
|
||||||
39, 40, 41, 40, 40, 40, 40, 40, 28, 12,
|
145, 45, 42, 43, 43, 43, 53, 54, 54, 82,
|
||||||
|
|
||||||
42, 39, 40, 40, 40, 29, 48, 49, 49, 76,
|
81, 96, 96, 98, 144, 80, 80, 55, 81, 82,
|
||||||
89, 89, 140, 90, 90, 74, 74, 50, 91, 76,
|
56, 57, 88, 98, 97, 143, 118, 55, 56, 57,
|
||||||
51, 52, 82, 92, 90, 90, 91, 50, 51, 52,
|
73, 73, 97, 119, 88, 74, 74, 74, 74, 118,
|
||||||
68, 68, 139, 92, 82, 69, 69, 69, 69, 138,
|
55, 142, 141, 56, 57, 89, 119, 140, 90, 74,
|
||||||
50, 112, 137, 51, 52, 83, 136, 113, 84, 69,
|
55, 56, 57, 75, 75, 89, 90, 139, 75, 75,
|
||||||
50, 51, 52, 70, 70, 83, 84, 135, 70, 70,
|
75, 75, 76, 76, 76, 76, 76, 76, 76, 138,
|
||||||
70, 70, 71, 71, 71, 71, 71, 71, 71, 134,
|
137, 136, 75, 76, 76, 76, 76, 76, 135, 133,
|
||||||
133, 132, 70, 71, 71, 71, 71, 71, 131, 90,
|
132, 76, 76, 76, 76, 95, 95, 131, 96, 96,
|
||||||
90, 71, 71, 71, 71, 130, 82, 129, 127, 126,
|
130, 96, 96, 128, 127, 76, 85, 85, 88, 126,
|
||||||
125, 124, 122, 121, 120, 71, 79, 79, 82, 119,
|
125, 86, 86, 86, 86, 123, 55, 122, 121, 56,
|
||||||
|
|
||||||
117, 80, 80, 80, 80, 116, 50, 115, 114, 51,
|
88, 120, 113, 109, 105, 86, 55, 56, 87, 87,
|
||||||
107, 103, 99, 95, 87, 80, 50, 51, 81, 81,
|
101, 93, 86, 87, 87, 87, 87, 83, 134, 129,
|
||||||
80, 77, 128, 81, 81, 81, 81, 123, 118, 141,
|
124, 147, 116, 116, 115, 111, 107, 87, 92, 92,
|
||||||
110, 110, 109, 105, 101, 97, 93, 81, 86, 86,
|
103, 99, 91, 93, 93, 93, 93, 69, 55, 69,
|
||||||
85, 64, 64, 87, 87, 87, 87, 78, 50, 73,
|
84, 56, 79, 64, 69, 66, 65, 93, 55, 56,
|
||||||
59, 51, 64, 61, 60, 59, 55, 87, 50, 51,
|
94, 94, 64, 60, 52, 94, 94, 94, 94, 51,
|
||||||
88, 88, 47, 46, 45, 88, 88, 88, 88, 44,
|
50, 49, 147, 36, 36, 147, 147, 147, 147, 94,
|
||||||
141, 33, 33, 141, 141, 141, 141, 141, 141, 88,
|
100, 100, 147, 147, 147, 101, 101, 101, 101, 147,
|
||||||
94, 94, 141, 141, 141, 95, 95, 95, 95, 141,
|
55, 147, 147, 56, 147, 147, 147, 147, 147, 101,
|
||||||
50, 141, 141, 51, 141, 141, 141, 141, 141, 95,
|
55, 56, 102, 102, 147, 147, 147, 102, 102, 102,
|
||||||
|
|
||||||
50, 51, 96, 96, 141, 141, 141, 96, 96, 96,
|
102, 147, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
96, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
147, 102, 104, 104, 147, 147, 147, 105, 105, 105,
|
||||||
141, 96, 98, 98, 141, 141, 141, 99, 99, 99,
|
105, 147, 55, 147, 147, 56, 147, 147, 147, 147,
|
||||||
99, 141, 50, 141, 141, 51, 141, 141, 141, 141,
|
147, 105, 55, 56, 106, 106, 147, 147, 147, 106,
|
||||||
141, 99, 50, 51, 100, 100, 141, 141, 141, 100,
|
106, 106, 106, 147, 147, 147, 147, 147, 147, 147,
|
||||||
100, 100, 100, 141, 141, 141, 141, 141, 141, 141,
|
147, 147, 147, 106, 108, 108, 147, 147, 147, 109,
|
||||||
141, 141, 141, 100, 102, 102, 141, 141, 141, 103,
|
109, 109, 109, 147, 55, 147, 147, 56, 147, 147,
|
||||||
103, 103, 103, 141, 50, 141, 141, 51, 141, 141,
|
147, 147, 147, 109, 55, 56, 110, 110, 147, 147,
|
||||||
141, 141, 141, 103, 50, 51, 104, 104, 141, 141,
|
147, 110, 110, 110, 110, 147, 147, 147, 147, 147,
|
||||||
141, 104, 104, 104, 104, 141, 141, 141, 141, 141,
|
147, 147, 147, 147, 147, 110, 112, 112, 147, 147,
|
||||||
|
|
||||||
141, 141, 141, 141, 141, 104, 106, 106, 141, 141,
|
147, 113, 113, 113, 113, 147, 55, 147, 147, 56,
|
||||||
141, 107, 107, 107, 107, 141, 50, 141, 141, 51,
|
147, 147, 147, 147, 147, 113, 55, 56, 114, 114,
|
||||||
141, 141, 141, 141, 141, 107, 50, 51, 108, 108,
|
147, 147, 147, 114, 114, 114, 114, 147, 147, 147,
|
||||||
141, 141, 141, 108, 108, 108, 108, 141, 141, 141,
|
147, 147, 147, 147, 147, 147, 147, 114, 116, 147,
|
||||||
141, 141, 141, 141, 141, 141, 141, 108, 110, 141,
|
117, 117, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
111, 111, 141, 141, 141, 141, 141, 141, 141, 141,
|
55, 147, 147, 56, 147, 147, 147, 147, 147, 147,
|
||||||
50, 141, 141, 51, 141, 141, 141, 141, 141, 141,
|
55, 56, 35, 35, 35, 35, 46, 46, 46, 46,
|
||||||
50, 51, 32, 32, 32, 32, 43, 43, 43, 43,
|
63, 63, 70, 147, 70, 70, 77, 147, 77, 77,
|
||||||
58, 58, 65, 141, 65, 65, 72, 141, 72, 72,
|
13, 147, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
11, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
|
|
||||||
141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
147, 147, 147, 147, 147, 147, 147
|
||||||
141, 141, 141, 141, 141, 141
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst short int yy_chk[527] =
|
static yyconst short int yy_chk[518] =
|
||||||
{ 0,
|
{ 0,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 2, 3, 35, 3, 2,
|
1, 1, 1, 1, 1, 1, 2, 3, 38, 3,
|
||||||
4, 5, 4, 5, 6, 8, 6, 21, 38, 8,
|
2, 4, 5, 4, 5, 6, 8, 6, 11, 12,
|
||||||
22, 22, 24, 24, 30, 21, 38, 50, 30, 48,
|
8, 24, 41, 11, 12, 25, 25, 27, 27, 24,
|
||||||
48, 35, 3, 109, 62, 50, 4, 5, 62, 109,
|
41, 33, 67, 38, 3, 33, 67, 48, 4, 5,
|
||||||
6, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
53, 53, 6, 7, 7, 11, 12, 183, 7, 7,
|
||||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 48,
|
||||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
182, 7, 7, 7, 7, 7, 23, 23, 23, 56,
|
||||||
|
|
||||||
7, 7, 7, 7, 7, 7, 20, 20, 20, 51,
|
55, 95, 95, 90, 181, 80, 80, 23, 55, 56,
|
||||||
82, 82, 177, 82, 82, 74, 74, 20, 83, 51,
|
23, 23, 80, 90, 89, 180, 115, 23, 23, 23,
|
||||||
20, 20, 74, 84, 89, 89, 83, 20, 20, 20,
|
40, 40, 89, 115, 80, 40, 40, 40, 40, 118,
|
||||||
37, 37, 176, 84, 74, 37, 37, 37, 37, 175,
|
40, 179, 178, 40, 40, 83, 118, 177, 83, 40,
|
||||||
37, 112, 174, 37, 37, 77, 173, 112, 77, 37,
|
40, 40, 40, 42, 42, 83, 83, 176, 42, 42,
|
||||||
37, 37, 37, 39, 39, 77, 77, 172, 39, 39,
|
42, 42, 42, 42, 42, 42, 42, 42, 42, 175,
|
||||||
39, 39, 39, 39, 39, 39, 39, 39, 39, 171,
|
174, 173, 42, 42, 42, 42, 43, 43, 172, 171,
|
||||||
170, 169, 39, 39, 39, 39, 40, 40, 168, 90,
|
170, 43, 43, 43, 43, 88, 88, 169, 88, 88,
|
||||||
90, 40, 40, 40, 40, 167, 90, 166, 165, 164,
|
168, 96, 96, 167, 166, 43, 73, 73, 96, 165,
|
||||||
163, 162, 161, 160, 159, 40, 68, 68, 90, 158,
|
164, 73, 73, 73, 73, 163, 73, 162, 161, 73,
|
||||||
|
|
||||||
157, 68, 68, 68, 68, 156, 68, 155, 154, 68,
|
96, 160, 159, 158, 157, 73, 73, 73, 75, 75,
|
||||||
153, 152, 151, 150, 149, 68, 68, 68, 70, 70,
|
156, 155, 154, 75, 75, 75, 75, 153, 133, 128,
|
||||||
148, 147, 127, 70, 70, 70, 70, 122, 117, 111,
|
123, 117, 114, 113, 111, 107, 103, 75, 85, 85,
|
||||||
108, 107, 105, 101, 97, 93, 85, 70, 79, 79,
|
99, 91, 84, 85, 85, 85, 85, 69, 85, 68,
|
||||||
78, 64, 63, 79, 79, 79, 79, 60, 79, 47,
|
65, 85, 52, 44, 34, 32, 30, 85, 85, 85,
|
||||||
41, 79, 31, 29, 27, 26, 23, 79, 79, 79,
|
87, 87, 29, 26, 22, 87, 87, 87, 87, 21,
|
||||||
81, 81, 19, 18, 17, 81, 81, 81, 81, 15,
|
19, 17, 13, 10, 9, 0, 0, 0, 0, 87,
|
||||||
11, 10, 9, 0, 0, 0, 0, 0, 0, 81,
|
92, 92, 0, 0, 0, 92, 92, 92, 92, 0,
|
||||||
86, 86, 0, 0, 0, 86, 86, 86, 86, 0,
|
92, 0, 0, 92, 0, 0, 0, 0, 0, 92,
|
||||||
86, 0, 0, 86, 0, 0, 0, 0, 0, 86,
|
92, 92, 94, 94, 0, 0, 0, 94, 94, 94,
|
||||||
|
|
||||||
86, 86, 88, 88, 0, 0, 0, 88, 88, 88,
|
94, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
88, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 94, 100, 100, 0, 0, 0, 100, 100, 100,
|
||||||
0, 88, 94, 94, 0, 0, 0, 94, 94, 94,
|
100, 0, 100, 0, 0, 100, 0, 0, 0, 0,
|
||||||
94, 0, 94, 0, 0, 94, 0, 0, 0, 0,
|
0, 100, 100, 100, 102, 102, 0, 0, 0, 102,
|
||||||
0, 94, 94, 94, 96, 96, 0, 0, 0, 96,
|
102, 102, 102, 0, 0, 0, 0, 0, 0, 0,
|
||||||
96, 96, 96, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 102, 104, 104, 0, 0, 0, 104,
|
||||||
0, 0, 0, 96, 98, 98, 0, 0, 0, 98,
|
104, 104, 104, 0, 104, 0, 0, 104, 0, 0,
|
||||||
98, 98, 98, 0, 98, 0, 0, 98, 0, 0,
|
0, 0, 0, 104, 104, 104, 106, 106, 0, 0,
|
||||||
0, 0, 0, 98, 98, 98, 100, 100, 0, 0,
|
0, 106, 106, 106, 106, 0, 0, 0, 0, 0,
|
||||||
0, 100, 100, 100, 100, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 106, 108, 108, 0, 0,
|
||||||
|
|
||||||
0, 0, 0, 0, 0, 100, 102, 102, 0, 0,
|
0, 108, 108, 108, 108, 0, 108, 0, 0, 108,
|
||||||
0, 102, 102, 102, 102, 0, 102, 0, 0, 102,
|
0, 0, 0, 0, 0, 108, 108, 108, 110, 110,
|
||||||
0, 0, 0, 0, 0, 102, 102, 102, 104, 104,
|
0, 0, 0, 110, 110, 110, 110, 0, 0, 0,
|
||||||
0, 0, 0, 104, 104, 104, 104, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 110, 112, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 104, 106, 0,
|
112, 112, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
106, 106, 0, 0, 0, 0, 0, 0, 0, 0,
|
112, 0, 0, 112, 0, 0, 0, 0, 0, 0,
|
||||||
106, 0, 0, 106, 0, 0, 0, 0, 0, 0,
|
112, 112, 148, 148, 148, 148, 149, 149, 149, 149,
|
||||||
106, 106, 142, 142, 142, 142, 143, 143, 143, 143,
|
150, 150, 151, 0, 151, 151, 152, 0, 152, 152,
|
||||||
144, 144, 145, 0, 145, 145, 146, 0, 146, 146,
|
147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
|
|
||||||
141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
|
||||||
141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
|
147, 147, 147, 147, 147, 147, 147
|
||||||
141, 141, 141, 141, 141, 141
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yy_state_type yy_last_accepting_state;
|
static yy_state_type yy_last_accepting_state;
|
||||||
|
@ -578,7 +578,9 @@ char *yytext;
|
||||||
|
|
||||||
#define PP_LINE 4
|
#define PP_LINE 4
|
||||||
|
|
||||||
#line 42 "parser.l"
|
#define SQUOTE 5
|
||||||
|
|
||||||
|
#line 43 "parser.l"
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
@ -603,8 +605,6 @@ char *yytext;
|
||||||
|
|
||||||
#include "parser.tab.h"
|
#include "parser.tab.h"
|
||||||
|
|
||||||
extern char *temp_name;
|
|
||||||
|
|
||||||
static void addcchar(char c);
|
static void addcchar(char c);
|
||||||
static char *get_buffered_cstring(void);
|
static char *get_buffered_cstring(void);
|
||||||
|
|
||||||
|
@ -816,7 +816,7 @@ YY_DECL
|
||||||
register char *yy_cp, *yy_bp;
|
register char *yy_cp, *yy_bp;
|
||||||
register int yy_act;
|
register int yy_act;
|
||||||
|
|
||||||
#line 127 "parser.l"
|
#line 126 "parser.l"
|
||||||
|
|
||||||
#line 822 "parser.yy.c"
|
#line 822 "parser.yy.c"
|
||||||
|
|
||||||
|
@ -870,13 +870,13 @@ yy_match:
|
||||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||||
{
|
{
|
||||||
yy_current_state = (int) yy_def[yy_current_state];
|
yy_current_state = (int) yy_def[yy_current_state];
|
||||||
if ( yy_current_state >= 142 )
|
if ( yy_current_state >= 148 )
|
||||||
yy_c = yy_meta[(unsigned int) yy_c];
|
yy_c = yy_meta[(unsigned int) yy_c];
|
||||||
}
|
}
|
||||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||||
++yy_cp;
|
++yy_cp;
|
||||||
}
|
}
|
||||||
while ( yy_base[yy_current_state] != 491 );
|
while ( yy_base[yy_current_state] != 481 );
|
||||||
|
|
||||||
yy_find_action:
|
yy_find_action:
|
||||||
yy_act = yy_accept[yy_current_state];
|
yy_act = yy_accept[yy_current_state];
|
||||||
|
@ -904,12 +904,12 @@ do_action: /* This label is used only to access EOF actions. */
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 128 "parser.l"
|
#line 127 "parser.l"
|
||||||
yy_push_state(PP_LINE);
|
yy_push_state(PP_LINE);
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 2:
|
case 2:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 129 "parser.l"
|
#line 128 "parser.l"
|
||||||
{
|
{
|
||||||
int lineno;
|
int lineno;
|
||||||
char *cptr, *fname;
|
char *cptr, *fname;
|
||||||
|
@ -932,12 +932,12 @@ YY_RULE_SETUP
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 3:
|
case 3:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 148 "parser.l"
|
#line 147 "parser.l"
|
||||||
yy_push_state(QUOTE); cbufidx = 0;
|
yy_push_state(QUOTE); cbufidx = 0;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 4:
|
case 4:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 149 "parser.l"
|
#line 148 "parser.l"
|
||||||
{
|
{
|
||||||
yy_pop_state();
|
yy_pop_state();
|
||||||
parser_lval.str = get_buffered_cstring();
|
parser_lval.str = get_buffered_cstring();
|
||||||
|
@ -946,12 +946,12 @@ YY_RULE_SETUP
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 5:
|
case 5:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 154 "parser.l"
|
#line 153 "parser.l"
|
||||||
yy_push_state(WSTRQUOTE);
|
yy_push_state(WSTRQUOTE);
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 6:
|
case 6:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 155 "parser.l"
|
#line 154 "parser.l"
|
||||||
{
|
{
|
||||||
yy_pop_state();
|
yy_pop_state();
|
||||||
parser_lval.str = get_buffered_cstring();
|
parser_lval.str = get_buffered_cstring();
|
||||||
|
@ -959,145 +959,164 @@ YY_RULE_SETUP
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 7:
|
case 7:
|
||||||
#line 161 "parser.l"
|
YY_RULE_SETUP
|
||||||
|
#line 159 "parser.l"
|
||||||
|
yy_push_state(SQUOTE); cbufidx = 0;
|
||||||
|
YY_BREAK
|
||||||
case 8:
|
case 8:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 161 "parser.l"
|
#line 160 "parser.l"
|
||||||
addcchar(yytext[1]);
|
{
|
||||||
|
yy_pop_state();
|
||||||
|
parser_lval.str = get_buffered_cstring();
|
||||||
|
return aSQSTRING;
|
||||||
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 9:
|
case 9:
|
||||||
YY_RULE_SETUP
|
#line 166 "parser.l"
|
||||||
#line 162 "parser.l"
|
|
||||||
addcchar('\\'); addcchar(yytext[1]);
|
|
||||||
YY_BREAK
|
|
||||||
case 10:
|
case 10:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 163 "parser.l"
|
#line 166 "parser.l"
|
||||||
addcchar(yytext[0]);
|
addcchar(yytext[1]);
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 11:
|
case 11:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 164 "parser.l"
|
#line 167 "parser.l"
|
||||||
yy_push_state(ATTR); return '[';
|
addcchar(yytext[1]);
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 12:
|
case 12:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 165 "parser.l"
|
#line 168 "parser.l"
|
||||||
yy_pop_state(); return ']';
|
addcchar('\\'); addcchar(yytext[1]);
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 13:
|
case 13:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 166 "parser.l"
|
#line 169 "parser.l"
|
||||||
return attr_token(yytext);
|
addcchar(yytext[0]);
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 14:
|
case 14:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 167 "parser.l"
|
#line 170 "parser.l"
|
||||||
|
yy_push_state(ATTR); return '[';
|
||||||
|
YY_BREAK
|
||||||
|
case 15:
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 171 "parser.l"
|
||||||
|
yy_pop_state(); return ']';
|
||||||
|
YY_BREAK
|
||||||
|
case 16:
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 172 "parser.l"
|
||||||
|
return attr_token(yytext);
|
||||||
|
YY_BREAK
|
||||||
|
case 17:
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 173 "parser.l"
|
||||||
{
|
{
|
||||||
parser_lval.uuid = parse_uuid(yytext);
|
parser_lval.uuid = parse_uuid(yytext);
|
||||||
return aUUID;
|
return aUUID;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 15:
|
case 18:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 171 "parser.l"
|
#line 177 "parser.l"
|
||||||
{
|
{
|
||||||
parser_lval.num = xstrtoul(yytext, NULL, 0);
|
parser_lval.num = xstrtoul(yytext, NULL, 0);
|
||||||
return aHEXNUM;
|
return aHEXNUM;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 16:
|
case 19:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 175 "parser.l"
|
#line 181 "parser.l"
|
||||||
{
|
{
|
||||||
parser_lval.num = xstrtoul(yytext, NULL, 0);
|
parser_lval.num = xstrtoul(yytext, NULL, 0);
|
||||||
return aNUM;
|
return aNUM;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 17:
|
case 20:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 179 "parser.l"
|
#line 185 "parser.l"
|
||||||
{
|
{
|
||||||
parser_lval.dbl = strtod(yytext, NULL);
|
parser_lval.dbl = strtod(yytext, NULL);
|
||||||
return aDOUBLE;
|
return aDOUBLE;
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 18:
|
case 21:
|
||||||
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
|
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
|
||||||
yy_c_buf_p = yy_cp -= 1;
|
yy_c_buf_p = yy_cp -= 1;
|
||||||
YY_DO_BEFORE_ACTION; /* set up yytext again */
|
YY_DO_BEFORE_ACTION; /* set up yytext again */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 183 "parser.l"
|
#line 189 "parser.l"
|
||||||
return tSAFEARRAY;
|
return tSAFEARRAY;
|
||||||
YY_BREAK
|
|
||||||
case 19:
|
|
||||||
YY_RULE_SETUP
|
|
||||||
#line 184 "parser.l"
|
|
||||||
return kw_token(yytext);
|
|
||||||
YY_BREAK
|
|
||||||
case 20:
|
|
||||||
YY_RULE_SETUP
|
|
||||||
#line 185 "parser.l"
|
|
||||||
line_number++;
|
|
||||||
YY_BREAK
|
|
||||||
case 21:
|
|
||||||
YY_RULE_SETUP
|
|
||||||
#line 186 "parser.l"
|
|
||||||
|
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 22:
|
case 22:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 187 "parser.l"
|
#line 190 "parser.l"
|
||||||
return SHL;
|
return kw_token(yytext);
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 23:
|
case 23:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 188 "parser.l"
|
#line 191 "parser.l"
|
||||||
return SHR;
|
line_number++;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 24:
|
case 24:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 189 "parser.l"
|
#line 192 "parser.l"
|
||||||
return MEMBERPTR;
|
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 25:
|
case 25:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 190 "parser.l"
|
#line 193 "parser.l"
|
||||||
return EQUALITY;
|
return SHL;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 26:
|
case 26:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 191 "parser.l"
|
#line 194 "parser.l"
|
||||||
return INEQUALITY;
|
return SHR;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 27:
|
case 27:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 192 "parser.l"
|
#line 195 "parser.l"
|
||||||
return GREATEREQUAL;
|
return MEMBERPTR;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 28:
|
case 28:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 193 "parser.l"
|
#line 196 "parser.l"
|
||||||
return LESSEQUAL;
|
return EQUALITY;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 29:
|
case 29:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 194 "parser.l"
|
#line 197 "parser.l"
|
||||||
return LOGICALOR;
|
return INEQUALITY;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 30:
|
case 30:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 195 "parser.l"
|
#line 198 "parser.l"
|
||||||
return LOGICALAND;
|
return GREATEREQUAL;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 31:
|
case 31:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 196 "parser.l"
|
#line 199 "parser.l"
|
||||||
return ELLIPSIS;
|
return LESSEQUAL;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 32:
|
case 32:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 197 "parser.l"
|
#line 200 "parser.l"
|
||||||
|
return LOGICALOR;
|
||||||
|
YY_BREAK
|
||||||
|
case 33:
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 201 "parser.l"
|
||||||
|
return LOGICALAND;
|
||||||
|
YY_BREAK
|
||||||
|
case 34:
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 202 "parser.l"
|
||||||
|
return ELLIPSIS;
|
||||||
|
YY_BREAK
|
||||||
|
case 35:
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 203 "parser.l"
|
||||||
return yytext[0];
|
return yytext[0];
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case YY_STATE_EOF(INITIAL):
|
case YY_STATE_EOF(INITIAL):
|
||||||
|
@ -1105,19 +1124,20 @@ case YY_STATE_EOF(QUOTE):
|
||||||
case YY_STATE_EOF(WSTRQUOTE):
|
case YY_STATE_EOF(WSTRQUOTE):
|
||||||
case YY_STATE_EOF(ATTR):
|
case YY_STATE_EOF(ATTR):
|
||||||
case YY_STATE_EOF(PP_LINE):
|
case YY_STATE_EOF(PP_LINE):
|
||||||
#line 198 "parser.l"
|
case YY_STATE_EOF(SQUOTE):
|
||||||
|
#line 204 "parser.l"
|
||||||
{
|
{
|
||||||
if (import_stack_ptr)
|
if (import_stack_ptr)
|
||||||
return aEOF;
|
return aEOF;
|
||||||
else yyterminate();
|
else yyterminate();
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 33:
|
case 36:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 203 "parser.l"
|
#line 209 "parser.l"
|
||||||
ECHO;
|
ECHO;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
#line 1121 "parser.yy.c"
|
#line 1141 "parser.yy.c"
|
||||||
|
|
||||||
case YY_END_OF_BUFFER:
|
case YY_END_OF_BUFFER:
|
||||||
{
|
{
|
||||||
|
@ -1408,7 +1428,7 @@ static yy_state_type yy_get_previous_state()
|
||||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||||
{
|
{
|
||||||
yy_current_state = (int) yy_def[yy_current_state];
|
yy_current_state = (int) yy_def[yy_current_state];
|
||||||
if ( yy_current_state >= 142 )
|
if ( yy_current_state >= 148 )
|
||||||
yy_c = yy_meta[(unsigned int) yy_c];
|
yy_c = yy_meta[(unsigned int) yy_c];
|
||||||
}
|
}
|
||||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||||
|
@ -1443,11 +1463,11 @@ yy_state_type yy_current_state;
|
||||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||||
{
|
{
|
||||||
yy_current_state = (int) yy_def[yy_current_state];
|
yy_current_state = (int) yy_def[yy_current_state];
|
||||||
if ( yy_current_state >= 142 )
|
if ( yy_current_state >= 148 )
|
||||||
yy_c = yy_meta[(unsigned int) yy_c];
|
yy_c = yy_meta[(unsigned int) yy_c];
|
||||||
}
|
}
|
||||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||||
yy_is_jam = (yy_current_state == 141);
|
yy_is_jam = (yy_current_state == 147);
|
||||||
|
|
||||||
return yy_is_jam ? 0 : yy_current_state;
|
return yy_is_jam ? 0 : yy_current_state;
|
||||||
}
|
}
|
||||||
|
@ -2003,7 +2023,7 @@ int main()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#line 203 "parser.l"
|
#line 209 "parser.l"
|
||||||
|
|
||||||
|
|
||||||
#ifndef parser_wrap
|
#ifndef parser_wrap
|
||||||
|
|
|
@ -698,12 +698,12 @@ static int does_any_iface(const statement_list_t *stmts, type_pred_t pred)
|
||||||
|
|
||||||
int need_proxy(const type_t *iface)
|
int need_proxy(const type_t *iface)
|
||||||
{
|
{
|
||||||
return is_object(iface->attrs) && !is_local(iface->attrs);
|
return is_object(iface) && !is_local(iface->attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
int need_stub(const type_t *iface)
|
int need_stub(const type_t *iface)
|
||||||
{
|
{
|
||||||
return !is_object(iface->attrs) && !is_local(iface->attrs);
|
return !is_object(iface) && !is_local(iface->attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
int need_proxy_file(const statement_list_t *stmts)
|
int need_proxy_file(const statement_list_t *stmts)
|
||||||
|
@ -754,7 +754,7 @@ static void build_iface_list( const statement_list_t *stmts, type_t **ifaces[],
|
||||||
type_t *iface = stmt->u.type;
|
type_t *iface = stmt->u.type;
|
||||||
if (type_iface_get_inherit(iface) && need_proxy(iface))
|
if (type_iface_get_inherit(iface) && need_proxy(iface))
|
||||||
{
|
{
|
||||||
*ifaces = xrealloc( *ifaces, (*count + 1) * sizeof(*ifaces) );
|
*ifaces = xrealloc( *ifaces, (*count + 1) * sizeof(**ifaces) );
|
||||||
(*ifaces)[(*count)++] = iface;
|
(*ifaces)[(*count)++] = iface;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs,
|
||||||
type_t *type, int toplevel_param,
|
type_t *type, int toplevel_param,
|
||||||
const char *name, unsigned int *typestring_offset);
|
const char *name, unsigned int *typestring_offset);
|
||||||
|
|
||||||
const char *string_of_type(unsigned char type)
|
static const char *string_of_type(unsigned char type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
@ -133,7 +133,7 @@ static void *get_aliaschain_attrp(const type_t *type, enum attr_type attr)
|
||||||
return get_attrp(t->attrs, attr);
|
return get_attrp(t->attrs, attr);
|
||||||
else if (type_is_alias(t))
|
else if (type_is_alias(t))
|
||||||
t = type_alias_get_aliasee(t);
|
t = type_alias_get_aliasee(t);
|
||||||
else return 0;
|
else return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ unsigned char get_struct_fc(const type_t *type)
|
||||||
return RPC_FC_STRUCT;
|
return RPC_FC_STRUCT;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char get_array_fc(const type_t *type)
|
static unsigned char get_array_fc(const type_t *type)
|
||||||
{
|
{
|
||||||
unsigned char fc;
|
unsigned char fc;
|
||||||
const expr_t *size_is;
|
const expr_t *size_is;
|
||||||
|
@ -641,7 +641,7 @@ static type_t *get_user_type(const type_t *t, const char **pname)
|
||||||
if (type_is_alias(t))
|
if (type_is_alias(t))
|
||||||
t = type_alias_get_aliasee(t);
|
t = type_alias_get_aliasee(t);
|
||||||
else
|
else
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3298,7 +3298,7 @@ void print_phase_basetype(FILE *file, int indent, const char *local_var_prefix,
|
||||||
size = 0;
|
size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phase == PHASE_MARSHAL)
|
if (phase == PHASE_MARSHAL && alignment > 1)
|
||||||
print_file(file, indent, "MIDL_memset(__frame->_StubMsg.Buffer, 0, (0x%x - (ULONG_PTR)__frame->_StubMsg.Buffer) & 0x%x);\n", alignment, alignment - 1);
|
print_file(file, indent, "MIDL_memset(__frame->_StubMsg.Buffer, 0, (0x%x - (ULONG_PTR)__frame->_StubMsg.Buffer) & 0x%x);\n", alignment, alignment - 1);
|
||||||
print_file(file, indent, "__frame->_StubMsg.Buffer = (unsigned char *)(((ULONG_PTR)__frame->_StubMsg.Buffer + %u) & ~0x%x);\n",
|
print_file(file, indent, "__frame->_StubMsg.Buffer = (unsigned char *)(((ULONG_PTR)__frame->_StubMsg.Buffer + %u) & ~0x%x);\n",
|
||||||
alignment - 1, alignment - 1);
|
alignment - 1, alignment - 1);
|
||||||
|
|
|
@ -100,7 +100,7 @@ int parser_debug, yy_flex_debug;
|
||||||
|
|
||||||
int pedantic = 0;
|
int pedantic = 0;
|
||||||
int do_everything = 1;
|
int do_everything = 1;
|
||||||
int preprocess_only = 0;
|
static int preprocess_only = 0;
|
||||||
int do_header = 0;
|
int do_header = 0;
|
||||||
int do_typelib = 0;
|
int do_typelib = 0;
|
||||||
int do_proxies = 0;
|
int do_proxies = 0;
|
||||||
|
@ -108,7 +108,7 @@ int do_client = 0;
|
||||||
int do_server = 0;
|
int do_server = 0;
|
||||||
int do_idfile = 0;
|
int do_idfile = 0;
|
||||||
int do_dlldata = 0;
|
int do_dlldata = 0;
|
||||||
int no_preprocess = 0;
|
static int no_preprocess = 0;
|
||||||
int old_names = 0;
|
int old_names = 0;
|
||||||
int do_win32 = 1;
|
int do_win32 = 1;
|
||||||
int do_win64 = 1;
|
int do_win64 = 1;
|
||||||
|
@ -127,16 +127,15 @@ char *client_name;
|
||||||
char *client_token;
|
char *client_token;
|
||||||
char *server_name;
|
char *server_name;
|
||||||
char *server_token;
|
char *server_token;
|
||||||
char *idfile_name;
|
static char *idfile_name;
|
||||||
char *idfile_token;
|
static char *idfile_token;
|
||||||
char *temp_name;
|
char *temp_name;
|
||||||
const char *prefix_client = "";
|
const char *prefix_client = "";
|
||||||
const char *prefix_server = "";
|
const char *prefix_server = "";
|
||||||
|
|
||||||
int line_number = 1;
|
int line_number = 1;
|
||||||
|
|
||||||
FILE *header;
|
static FILE *idfile;
|
||||||
FILE *idfile;
|
|
||||||
|
|
||||||
size_t pointer_size = 0;
|
size_t pointer_size = 0;
|
||||||
syskind_t typelib_kind = sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32;
|
syskind_t typelib_kind = sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32;
|
||||||
|
@ -160,18 +159,18 @@ enum {
|
||||||
static const char short_options[] =
|
static const char short_options[] =
|
||||||
"b:cC:d:D:EhH:I:m:NpP:sS:tT:uU:VW";
|
"b:cC:d:D:EhH:I:m:NpP:sS:tT:uU:VW";
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
{ "dlldata", 1, 0, DLLDATA_OPTION },
|
{ "dlldata", 1, NULL, DLLDATA_OPTION },
|
||||||
{ "dlldata-only", 0, 0, DLLDATA_ONLY_OPTION },
|
{ "dlldata-only", 0, NULL, DLLDATA_ONLY_OPTION },
|
||||||
{ "local-stubs", 1, 0, LOCAL_STUBS_OPTION },
|
{ "local-stubs", 1, NULL, LOCAL_STUBS_OPTION },
|
||||||
{ "oldnames", 0, 0, OLDNAMES_OPTION },
|
{ "oldnames", 0, NULL, OLDNAMES_OPTION },
|
||||||
{ "prefix-all", 1, 0, PREFIX_ALL_OPTION },
|
{ "prefix-all", 1, NULL, PREFIX_ALL_OPTION },
|
||||||
{ "prefix-client", 1, 0, PREFIX_CLIENT_OPTION },
|
{ "prefix-client", 1, NULL, PREFIX_CLIENT_OPTION },
|
||||||
{ "prefix-server", 1, 0, PREFIX_SERVER_OPTION },
|
{ "prefix-server", 1, NULL, PREFIX_SERVER_OPTION },
|
||||||
{ "win32", 0, 0, WIN32_OPTION },
|
{ "win32", 0, NULL, WIN32_OPTION },
|
||||||
{ "win64", 0, 0, WIN64_OPTION },
|
{ "win64", 0, NULL, WIN64_OPTION },
|
||||||
{ "win32-align", 1, 0, WIN32_ALIGN_OPTION },
|
{ "win32-align", 1, NULL, WIN32_ALIGN_OPTION },
|
||||||
{ "win64-align", 1, 0, WIN64_ALIGN_OPTION },
|
{ "win64-align", 1, NULL, WIN64_ALIGN_OPTION },
|
||||||
{ 0, 0, 0, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static void rm_tempfile(void);
|
static void rm_tempfile(void);
|
||||||
|
@ -431,7 +430,7 @@ static void write_id_data_stmts(const statement_list_t *stmts)
|
||||||
if (type_get_type(type) == TYPE_INTERFACE)
|
if (type_get_type(type) == TYPE_INTERFACE)
|
||||||
{
|
{
|
||||||
const UUID *uuid;
|
const UUID *uuid;
|
||||||
if (!is_object(type->attrs) && !is_attr(type->attrs, ATTR_DISPINTERFACE))
|
if (!is_object(type) && !is_attr(type->attrs, ATTR_DISPINTERFACE))
|
||||||
continue;
|
continue;
|
||||||
uuid = get_attrp(type->attrs, ATTR_UUID);
|
uuid = get_attrp(type->attrs, ATTR_UUID);
|
||||||
write_guid(idfile, is_attr(type->attrs, ATTR_DISPINTERFACE) ? "DIID" : "IID",
|
write_guid(idfile, is_attr(type->attrs, ATTR_DISPINTERFACE) ? "DIID" : "IID",
|
||||||
|
@ -648,8 +647,8 @@ int main(int argc,char *argv[])
|
||||||
|
|
||||||
if(debuglevel)
|
if(debuglevel)
|
||||||
{
|
{
|
||||||
setbuf(stdout,0);
|
setbuf(stdout, NULL);
|
||||||
setbuf(stderr,0);
|
setbuf(stderr, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
parser_debug = debuglevel & DEBUGLEVEL_TRACE ? 1 : 0;
|
parser_debug = debuglevel & DEBUGLEVEL_TRACE ? 1 : 0;
|
||||||
|
|
|
@ -195,6 +195,7 @@ enum expr_type
|
||||||
EXPR_POS,
|
EXPR_POS,
|
||||||
EXPR_STRLIT,
|
EXPR_STRLIT,
|
||||||
EXPR_WSTRLIT,
|
EXPR_WSTRLIT,
|
||||||
|
EXPR_CHARCONST,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum type_kind
|
enum type_kind
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue