2 * Copyright 2011 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include "wine/debug.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
29 #define YYLEX_PARAM ctx
30 #define YYPARSE_PARAM ctx
32 static int parser_error(const char*);
34 static void parse_complete(parser_ctx_t*,BOOL);
36 static void source_add_statement(parser_ctx_t*,statement_t*);
37 static void source_add_class(parser_ctx_t*,class_decl_t*);
39 static void *new_expression(parser_ctx_t*,expression_type_t,size_t);
40 static expression_t *new_bool_expression(parser_ctx_t*,VARIANT_BOOL);
41 static expression_t *new_string_expression(parser_ctx_t*,const WCHAR*);
42 static expression_t *new_long_expression(parser_ctx_t*,expression_type_t,LONG);
43 static expression_t *new_double_expression(parser_ctx_t*,double);
44 static expression_t *new_unary_expression(parser_ctx_t*,expression_type_t,expression_t*);
45 static expression_t *new_binary_expression(parser_ctx_t*,expression_type_t,expression_t*,expression_t*);
46 static expression_t *new_new_expression(parser_ctx_t*,const WCHAR*);
48 static member_expression_t *new_member_expression(parser_ctx_t*,expression_t*,const WCHAR*);
50 static void *new_statement(parser_ctx_t*,statement_type_t,size_t);
51 static statement_t *new_call_statement(parser_ctx_t*,member_expression_t*);
52 static statement_t *new_assign_statement(parser_ctx_t*,member_expression_t*,expression_t*);
53 static statement_t *new_set_statement(parser_ctx_t*,member_expression_t*,expression_t*);
54 static statement_t *new_dim_statement(parser_ctx_t*,dim_decl_t*);
55 static statement_t *new_if_statement(parser_ctx_t*,expression_t*,statement_t*,elseif_decl_t*,statement_t*);
56 static statement_t *new_function_statement(parser_ctx_t*,function_decl_t*);
58 static dim_decl_t *new_dim_decl(parser_ctx_t*,const WCHAR*,dim_decl_t*);
59 static elseif_decl_t *new_elseif_decl(parser_ctx_t*,expression_t*,statement_t*);
60 static function_decl_t *new_function_decl(parser_ctx_t*,const WCHAR*,function_type_t,unsigned,arg_decl_t*,statement_t*);
61 static arg_decl_t *new_argument_decl(parser_ctx_t*,const WCHAR*,BOOL);
63 static class_decl_t *new_class_decl(parser_ctx_t*);
64 static class_decl_t *add_class_function(parser_ctx_t*,class_decl_t*,function_decl_t*);
65 static class_decl_t *add_variant_prop(parser_ctx_t*,class_decl_t*,const WCHAR*,unsigned);
67 #define STORAGE_IS_PRIVATE 1
68 #define STORAGE_IS_DEFAULT 2
70 #define CHECK_ERROR if(((parser_ctx_t*)ctx)->hres != S_OK) YYABORT
79 statement_t *statement;
80 expression_t *expression;
81 member_expression_t *member;
82 elseif_decl_t *elseif;
84 function_decl_t *func_decl;
86 class_decl_t *class_decl;
93 %token tEOF tNL tREM tEMPTYBRACKETS
95 %token tNOT tAND tOR tXOR tEQV tIMP tNEQ
96 %token tIS tLTEQ tGTEQ tMOD
97 %token tCALL tDIM tSUB tFUNCTION tPROPERTY tGET tLET
98 %token tIF tELSE tELSEIF tEND tTHEN tEXIT
99 %token tWHILE tWEND tDO tLOOP tUNTIL
101 %token tOPTION tEXPLICIT
103 %token tNOTHING tEMPTY tNULL
104 %token tCLASS tSET tNEW tPUBLIC tPRIVATE tDEFAULT tME
105 %token tERROR tNEXT tON tRESUME tGOTO
106 %token <string> tIdentifier tString
107 %token <lng> tLong tShort
110 %type <statement> Statement StatementNl StatementsNl StatementsNl_opt IfStatement Else_opt
111 %type <expression> Expression LiteralExpression PrimaryExpression EqualityExpression CallExpression
112 %type <expression> ConcatExpression AdditiveExpression ModExpression IntdivExpression MultiplicativeExpression ExpExpression
113 %type <expression> NotExpression UnaryExpression AndExpression OrExpression XorExpression EqvExpression
114 %type <member> MemberExpression
115 %type <expression> Arguments_opt ArgumentList_opt ArgumentList
116 %type <bool> OptionExplicit_opt
117 %type <arg_decl> ArgumentsDecl_opt ArgumentDeclList ArgumentDecl
118 %type <func_decl> FunctionDecl PropertyDecl
119 %type <elseif> ElseIfs_opt ElseIfs ElseIf
120 %type <class_decl> ClassDeclaration ClassBody
121 %type <uint> Storage Storage_opt
122 %type <dim_decl> DimDeclList
127 : OptionExplicit_opt SourceElements tEOF { parse_complete(ctx, $1); }
130 : /* empty */ { $$ = FALSE; }
131 | tOPTION tEXPLICIT tNL { $$ = TRUE; }
135 | SourceElements StatementNl { source_add_statement(ctx, $2); }
136 | SourceElements ClassDeclaration { source_add_class(ctx, $2); }
139 : /* empty */ { $$ = NULL; }
140 | StatementsNl { $$ = $1; }
143 : StatementNl { $$ = $1; }
144 | StatementNl StatementsNl { $1->next = $2; $$ = $1; }
147 : Statement tNL { $$ = $1; }
150 : MemberExpression ArgumentList_opt { $1->args = $2; $$ = new_call_statement(ctx, $1); CHECK_ERROR; }
151 | tCALL MemberExpression Arguments_opt { $2->args = $3; $$ = new_call_statement(ctx, $2); CHECK_ERROR; }
152 | MemberExpression Arguments_opt '=' Expression
153 { $1->args = $2; $$ = new_assign_statement(ctx, $1, $4); CHECK_ERROR; }
154 | tDIM DimDeclList { $$ = new_dim_statement(ctx, $2); CHECK_ERROR; }
155 | IfStatement { $$ = $1; }
156 | FunctionDecl { $$ = new_function_statement(ctx, $1); CHECK_ERROR; }
157 | tEXIT tFUNCTION { $$ = new_statement(ctx, STAT_EXITFUNC, 0); CHECK_ERROR; }
158 | tEXIT tPROPERTY { $$ = new_statement(ctx, STAT_EXITPROP, 0); CHECK_ERROR; }
159 | tEXIT tSUB { $$ = new_statement(ctx, STAT_EXITSUB, 0); CHECK_ERROR; }
160 | tSET MemberExpression Arguments_opt '=' Expression
161 { $2->args = $3; $$ = new_set_statement(ctx, $2, $5); CHECK_ERROR; }
162 | tSTOP { $$ = new_statement(ctx, STAT_STOP, 0); CHECK_ERROR; }
165 : tIdentifier { $$ = new_member_expression(ctx, NULL, $1); CHECK_ERROR; }
166 | CallExpression '.' tIdentifier { $$ = new_member_expression(ctx, $1, $3); CHECK_ERROR; }
168 DimDeclList /* FIXME: Support arrays */
169 : tIdentifier { $$ = new_dim_decl(ctx, $1, NULL); CHECK_ERROR; }
170 | tIdentifier ',' DimDeclList { $$ = new_dim_decl(ctx, $1, $3); CHECK_ERROR; }
173 : tIF Expression tTHEN tNL StatementsNl ElseIfs_opt Else_opt tEND tIF
174 { $$ = new_if_statement(ctx, $2, $5, $6, $7); CHECK_ERROR; }
175 /* FIXME: short if statement */
178 : /* empty */ { $$ = NULL; }
179 | ElseIfs { $$ = $1; }
182 : ElseIf { $$ = $1; }
183 | ElseIf ElseIfs { $1->next = $2; $$ = $1; }
186 : tELSEIF Expression tTHEN tNL StatementsNl
187 { $$ = new_elseif_decl(ctx, $2, $5); }
190 : /* empty */ { $$ = NULL; }
191 | tELSE tNL StatementsNl { $$ = $3; }
194 : EmptyBrackets_opt { $$ = NULL; }
195 | '(' ArgumentList ')' { $$ = $2; }
198 : EmptyBrackets_opt { $$ = NULL; }
199 | ArgumentList { $$ = $1; }
202 : Expression { $$ = $1; }
203 | Expression ',' ArgumentList { $1->next = $3; $$ = $1; }
210 : EqvExpression { $$ = $1; }
211 | Expression tIMP EqvExpression { $$ = new_binary_expression(ctx, EXPR_IMP, $1, $3); CHECK_ERROR; }
214 : XorExpression { $$ = $1; }
215 | EqvExpression tEQV XorExpression { $$ = new_binary_expression(ctx, EXPR_EQV, $1, $3); CHECK_ERROR; }
218 : OrExpression { $$ = $1; }
219 | XorExpression tXOR OrExpression { $$ = new_binary_expression(ctx, EXPR_XOR, $1, $3); CHECK_ERROR; }
222 : AndExpression { $$ = $1; }
223 | OrExpression tOR AndExpression { $$ = new_binary_expression(ctx, EXPR_OR, $1, $3); CHECK_ERROR; }
226 : NotExpression { $$ = $1; }
227 | AndExpression tAND NotExpression { $$ = new_binary_expression(ctx, EXPR_AND, $1, $3); CHECK_ERROR; }
230 : EqualityExpression { $$ = $1; }
231 | tNOT NotExpression { $$ = new_unary_expression(ctx, EXPR_NOT, $2); CHECK_ERROR; }
234 : ConcatExpression { $$ = $1; }
235 | EqualityExpression '=' ConcatExpression { $$ = new_binary_expression(ctx, EXPR_EQUAL, $1, $3); CHECK_ERROR; }
236 | EqualityExpression tNEQ ConcatExpression { $$ = new_binary_expression(ctx, EXPR_NEQUAL, $1, $3); CHECK_ERROR; }
239 : AdditiveExpression { $$ = $1; }
240 | ConcatExpression '&' AdditiveExpression { $$ = new_binary_expression(ctx, EXPR_CONCAT, $1, $3); CHECK_ERROR; }
243 : ModExpression { $$ = $1; }
244 | AdditiveExpression '+' ModExpression { $$ = new_binary_expression(ctx, EXPR_ADD, $1, $3); CHECK_ERROR; }
245 | AdditiveExpression '-' ModExpression { $$ = new_binary_expression(ctx, EXPR_SUB, $1, $3); CHECK_ERROR; }
248 : IntdivExpression { $$ = $1; }
249 | ModExpression tMOD IntdivExpression { $$ = new_binary_expression(ctx, EXPR_MOD, $1, $3); CHECK_ERROR; }
252 : MultiplicativeExpression { $$ = $1; }
253 | IntdivExpression '\\' MultiplicativeExpression
254 { $$ = new_binary_expression(ctx, EXPR_IDIV, $1, $3); CHECK_ERROR; }
256 MultiplicativeExpression
257 : ExpExpression { $$ = $1; }
258 | MultiplicativeExpression '*' ExpExpression
259 { $$ = new_binary_expression(ctx, EXPR_MUL, $1, $3); CHECK_ERROR; }
260 | MultiplicativeExpression '/' ExpExpression
261 { $$ = new_binary_expression(ctx, EXPR_DIV, $1, $3); CHECK_ERROR; }
264 : UnaryExpression { $$ = $1; }
265 | ExpExpression '^' UnaryExpression { $$ = new_binary_expression(ctx, EXPR_EXP, $1, $3); CHECK_ERROR; }
268 : LiteralExpression { $$ = $1; }
269 | CallExpression { $$ = $1; }
270 | tNEW tIdentifier { $$ = new_new_expression(ctx, $2); CHECK_ERROR; }
271 | '-' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_NEG, $2); CHECK_ERROR; }
274 : PrimaryExpression { $$ = $1; }
275 | MemberExpression Arguments_opt { $1->args = $2; $$ = &$1->expr; }
278 : tTRUE { $$ = new_bool_expression(ctx, VARIANT_TRUE); CHECK_ERROR; }
279 | tFALSE { $$ = new_bool_expression(ctx, VARIANT_FALSE); CHECK_ERROR; }
280 | tString { $$ = new_string_expression(ctx, $1); CHECK_ERROR; }
281 | tShort { $$ = new_long_expression(ctx, EXPR_USHORT, $1); CHECK_ERROR; }
282 | '0' { $$ = new_long_expression(ctx, EXPR_USHORT, 0); CHECK_ERROR; }
283 | tLong { $$ = new_long_expression(ctx, EXPR_ULONG, $1); CHECK_ERROR; }
284 | tDouble { $$ = new_double_expression(ctx, $1); CHECK_ERROR; }
285 | tEMPTY { $$ = new_expression(ctx, EXPR_EMPTY, 0); CHECK_ERROR; }
286 | tNULL { $$ = new_expression(ctx, EXPR_NULL, 0); CHECK_ERROR; }
287 | tNOTHING { $$ = new_expression(ctx, EXPR_NOTHING, 0); CHECK_ERROR; }
290 : '(' Expression ')' { $$ = $2; }
293 : tCLASS tIdentifier tNL ClassBody tEND tCLASS tNL { $4->name = $2; $$ = $4; }
296 : /* empty */ { $$ = new_class_decl(ctx); }
297 | FunctionDecl tNL ClassBody { $$ = add_class_function(ctx, $3, $1); CHECK_ERROR; }
298 | Storage tIdentifier tNL ClassBody { $$ = add_variant_prop(ctx, $4, $2, $1); CHECK_ERROR; }
299 | PropertyDecl tNL ClassBody { $$ = add_class_function(ctx, $3, $1); CHECK_ERROR; }
302 : Storage_opt tPROPERTY tGET tIdentifier EmptyBrackets_opt tNL StatementsNl_opt tEND tPROPERTY
303 { $$ = new_function_decl(ctx, $4, FUNC_PROPGET, $1, NULL, $7); CHECK_ERROR; }
304 | Storage_opt tPROPERTY tLET tIdentifier '(' ArgumentDecl ')' tNL StatementsNl_opt tEND tPROPERTY
305 { $$ = new_function_decl(ctx, $4, FUNC_PROPLET, $1, $6, $9); CHECK_ERROR; }
306 | Storage_opt tPROPERTY tSET tIdentifier '(' ArgumentDecl ')' tNL StatementsNl_opt tEND tPROPERTY
307 { $$ = new_function_decl(ctx, $4, FUNC_PROPSET, $1, $6, $9); CHECK_ERROR; }
310 : Storage_opt tSUB tIdentifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tSUB
311 { $$ = new_function_decl(ctx, $3, FUNC_SUB, $1, $4, $6); CHECK_ERROR; }
312 | Storage_opt tFUNCTION tIdentifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tFUNCTION
313 { $$ = new_function_decl(ctx, $3, FUNC_FUNCTION, $1, $4, $6); CHECK_ERROR; }
316 : /* empty*/ { $$ = 0; }
317 | Storage { $$ = $1; }
320 : tPUBLIC tDEFAULT { $$ = STORAGE_IS_DEFAULT; }
321 | tPUBLIC { $$ = 0; }
322 | tPRIVATE { $$ = STORAGE_IS_PRIVATE; }
325 : EmptyBrackets_opt { $$ = NULL; }
326 | '(' ArgumentDeclList ')' { $$ = $2; }
329 : ArgumentDecl { $$ = $1; }
330 | ArgumentDecl ',' ArgumentDeclList { $1->next = $3; $$ = $1; }
333 : tIdentifier { $$ = new_argument_decl(ctx, $1, TRUE); }
334 | tBYREF tIdentifier { $$ = new_argument_decl(ctx, $2, TRUE); }
335 | tBYVAL tIdentifier { $$ = new_argument_decl(ctx, $2, FALSE); }
339 static int parser_error(const char *str)
344 static void source_add_statement(parser_ctx_t *ctx, statement_t *stat)
347 ctx->stats_tail->next = stat;
348 ctx->stats_tail = stat;
350 ctx->stats = ctx->stats_tail = stat;
354 static void source_add_class(parser_ctx_t *ctx, class_decl_t *class_decl)
356 class_decl->next = ctx->class_decls;
357 ctx->class_decls = class_decl;
360 static void parse_complete(parser_ctx_t *ctx, BOOL option_explicit)
362 ctx->parse_complete = TRUE;
363 ctx->option_explicit = option_explicit;
366 static void *new_expression(parser_ctx_t *ctx, expression_type_t type, size_t size)
370 expr = parser_alloc(ctx, size ? size : sizeof(*expr));
379 static expression_t *new_bool_expression(parser_ctx_t *ctx, VARIANT_BOOL value)
381 bool_expression_t *expr;
383 expr = new_expression(ctx, EXPR_BOOL, sizeof(*expr));
391 static expression_t *new_string_expression(parser_ctx_t *ctx, const WCHAR *value)
393 string_expression_t *expr;
395 expr = new_expression(ctx, EXPR_STRING, sizeof(*expr));
403 static expression_t *new_long_expression(parser_ctx_t *ctx, expression_type_t type, LONG value)
405 int_expression_t *expr;
407 expr = new_expression(ctx, type, sizeof(*expr));
415 static expression_t *new_double_expression(parser_ctx_t *ctx, double value)
417 double_expression_t *expr;
419 expr = new_expression(ctx, EXPR_DOUBLE, sizeof(*expr));
427 static expression_t *new_unary_expression(parser_ctx_t *ctx, expression_type_t type, expression_t *subexpr)
429 unary_expression_t *expr;
431 expr = new_expression(ctx, type, sizeof(*expr));
435 expr->subexpr = subexpr;
439 static expression_t *new_binary_expression(parser_ctx_t *ctx, expression_type_t type, expression_t *left, expression_t *right)
441 binary_expression_t *expr;
443 expr = new_expression(ctx, type, sizeof(*expr));
452 static member_expression_t *new_member_expression(parser_ctx_t *ctx, expression_t *obj_expr, const WCHAR *identifier)
454 member_expression_t *expr;
456 expr = new_expression(ctx, EXPR_MEMBER, sizeof(*expr));
460 expr->obj_expr = obj_expr;
461 expr->identifier = identifier;
466 static expression_t *new_new_expression(parser_ctx_t *ctx, const WCHAR *identifier)
468 string_expression_t *expr;
470 expr = new_expression(ctx, EXPR_NEW, sizeof(*expr));
474 expr->value = identifier;
478 static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size)
482 stat = parser_alloc(ctx, size ? size : sizeof(*stat));
491 static statement_t *new_call_statement(parser_ctx_t *ctx, member_expression_t *expr)
493 call_statement_t *stat;
495 stat = new_statement(ctx, STAT_CALL, sizeof(*stat));
503 static statement_t *new_assign_statement(parser_ctx_t *ctx, member_expression_t *left, expression_t *right)
505 assign_statement_t *stat;
507 stat = new_statement(ctx, STAT_ASSIGN, sizeof(*stat));
511 stat->member_expr = left;
512 stat->value_expr = right;
516 static statement_t *new_set_statement(parser_ctx_t *ctx, member_expression_t *left, expression_t *right)
518 assign_statement_t *stat;
520 stat = new_statement(ctx, STAT_SET, sizeof(*stat));
524 stat->member_expr = left;
525 stat->value_expr = right;
529 static dim_decl_t *new_dim_decl(parser_ctx_t *ctx, const WCHAR *name, dim_decl_t *next)
533 decl = parser_alloc(ctx, sizeof(*decl));
542 static statement_t *new_dim_statement(parser_ctx_t *ctx, dim_decl_t *decls)
544 dim_statement_t *stat;
546 stat = new_statement(ctx, STAT_DIM, sizeof(*stat));
550 stat->dim_decls = decls;
554 static elseif_decl_t *new_elseif_decl(parser_ctx_t *ctx, expression_t *expr, statement_t *stat)
558 decl = parser_alloc(ctx, sizeof(*decl));
568 static statement_t *new_if_statement(parser_ctx_t *ctx, expression_t *expr, statement_t *if_stat, elseif_decl_t *elseif_decl,
569 statement_t *else_stat)
571 if_statement_t *stat;
573 stat = new_statement(ctx, STAT_IF, sizeof(*stat));
578 stat->if_stat = if_stat;
579 stat->elseifs = elseif_decl;
580 stat->else_stat = else_stat;
584 static arg_decl_t *new_argument_decl(parser_ctx_t *ctx, const WCHAR *name, BOOL by_ref)
586 arg_decl_t *arg_decl;
588 arg_decl = parser_alloc(ctx, sizeof(*arg_decl));
592 arg_decl->name = name;
593 arg_decl->by_ref = by_ref;
594 arg_decl->next = NULL;
598 static function_decl_t *new_function_decl(parser_ctx_t *ctx, const WCHAR *name, function_type_t type,
599 unsigned storage_flags, arg_decl_t *arg_decl, statement_t *body)
601 function_decl_t *decl;
603 if(storage_flags & STORAGE_IS_DEFAULT) {
604 if(type == FUNC_PROPGET) {
607 FIXME("Invalid default property\n");
613 decl = parser_alloc(ctx, sizeof(*decl));
619 decl->is_public = !(storage_flags & STORAGE_IS_PRIVATE);
620 decl->args = arg_decl;
623 decl->next_prop_func = NULL;
627 static statement_t *new_function_statement(parser_ctx_t *ctx, function_decl_t *decl)
629 function_statement_t *stat;
631 stat = new_statement(ctx, STAT_FUNC, sizeof(*stat));
635 stat->func_decl = decl;
639 static class_decl_t *new_class_decl(parser_ctx_t *ctx)
641 class_decl_t *class_decl;
643 class_decl = parser_alloc(ctx, sizeof(*class_decl));
647 class_decl->funcs = NULL;
648 class_decl->props = NULL;
649 class_decl->next = NULL;
653 static class_decl_t *add_class_function(parser_ctx_t *ctx, class_decl_t *class_decl, function_decl_t *decl)
655 function_decl_t *iter;
657 for(iter = class_decl->funcs; iter; iter = iter->next) {
658 if(!strcmpiW(iter->name, decl->name)) {
659 if(decl->type == FUNC_SUB || decl->type == FUNC_FUNCTION) {
660 FIXME("Redefinition of %s::%s\n", debugstr_w(class_decl->name), debugstr_w(decl->name));
666 if(iter->type == decl->type) {
667 FIXME("Redefinition of %s::%s\n", debugstr_w(class_decl->name), debugstr_w(decl->name));
671 if(!iter->next_prop_func)
673 iter = iter->next_prop_func;
676 iter->next_prop_func = decl;
681 decl->next = class_decl->funcs;
682 class_decl->funcs = decl;
686 static class_decl_t *add_variant_prop(parser_ctx_t *ctx, class_decl_t *class_decl, const WCHAR *identifier, unsigned storage_flags)
688 class_prop_decl_t *prop;
690 if(storage_flags & STORAGE_IS_DEFAULT) {
691 FIXME("variant prop van't be default value\n");
696 prop = parser_alloc(ctx, sizeof(*prop));
700 prop->name = identifier;
701 prop->is_public = !(storage_flags & STORAGE_IS_PRIVATE);
702 prop->next = class_decl->props;
703 class_decl->props = prop;
707 void *parser_alloc(parser_ctx_t *ctx, size_t size)
711 ret = vbsheap_alloc(&ctx->heap, size);
713 ctx->hres = E_OUTOFMEMORY;
717 HRESULT parse_script(parser_ctx_t *ctx, const WCHAR *code)
719 ctx->code = ctx->ptr = code;
720 ctx->end = ctx->code + strlenW(ctx->code);
722 vbsheap_init(&ctx->heap);
724 ctx->parse_complete = FALSE;
727 ctx->last_token = tNL;
729 ctx->stats = ctx->stats_tail = NULL;
730 ctx->class_decls = NULL;
731 ctx->option_explicit = FALSE;
735 if(FAILED(ctx->hres))
737 if(!ctx->parse_complete) {
738 FIXME("parser failed on parsing %s\n", debugstr_w(ctx->ptr));
745 void parser_release(parser_ctx_t *ctx)
747 vbsheap_free(&ctx->heap);