1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
From f86c46f6403fe338a544ab134bdf563c5b0934ae Mon Sep 17 00:00:00 2001
From: Alexandre Julliard <julliard@winehq.org>
Date: Thu, 1 Aug 2013 12:00:23 +0200
Subject: [PATCH] vbscript: Use bison directives instead of defines to specify
extra lexer parameters.
---
dlls/vbscript/parser.y | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y
index 4b380ef..3c54fd8 100644
--- a/dlls/vbscript/parser.y
+++ b/dlls/vbscript/parser.y
@@ -25,10 +25,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
-#define YYLEX_PARAM ctx
-#define YYPARSE_PARAM ctx
-
-static int parser_error(const char*);
+static int parser_error(parser_ctx_t *,const char*);
static void parse_complete(parser_ctx_t*,BOOL);
@@ -82,7 +79,9 @@ static const WCHAR propertyW[] = {'p','r','o','p','e','r','t','y',0};
%}
-%pure_parser
+%lex-param { parser_ctx_t *ctx }
+%parse-param { parser_ctx_t *ctx }
+%pure-parser
%start Program
%union {
@@ -426,7 +425,7 @@ Identifier
| tPROPERTY { $$ = propertyW; }
%%
-static int parser_error(const char *str)
+static int parser_error(parser_ctx_t *ctx, const char *str)
{
return 0;
}
--
1.8.1.6
|