aboutsummaryrefslogtreecommitdiffstats
path: root/main/wine/wbemprox-Use-bison-directives-instead-of-defines.patch
blob: 2ad146c0cd3f1682f693f39084ecee4025ac0446 (plain)
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
50
51
52
53
54
55
56
57
From c14e322a92a24e704836c5c12207c694a30e805f Mon Sep 17 00:00:00 2001
From: Alexandre Julliard <julliard@winehq.org>
Date: Thu, 1 Aug 2013 12:00:44 +0200
Subject: [PATCH] wbemprox: Use bison directives instead of defines to specify
 extra lexer parameters.

---
 dlls/wbemprox/wql.y | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/dlls/wbemprox/wql.y b/dlls/wbemprox/wql.y
index 8e347c2..58663d0 100644
--- a/dlls/wbemprox/wql.y
+++ b/dlls/wbemprox/wql.y
@@ -30,11 +30,6 @@
 #include "wine/debug.h"
 #include "wine/unicode.h"
 
-#define YYLEX_PARAM ctx
-#define YYPARSE_PARAM ctx
-#define YYERROR_DEBUG 1
-#define YYERROR_VERBOSE 1
-
 WINE_DEFAULT_DEBUG_CHANNEL(wbemprox);
 
 struct parser
@@ -181,7 +176,7 @@ static struct expr *expr_propval( struct parser *parser, const struct property *
     return e;
 }
 
-static int wql_error( const char *str );
+static int wql_error( struct parser *parser, const char *str );
 static int wql_lex( void *val, struct parser *parser );
 
 #define PARSER_BUBBLE_UP_VIEW( parser, result, current_view ) \
@@ -190,6 +185,9 @@ static int wql_lex( void *val, struct parser *parser );
 
 %}
 
+%lex-param { struct parser *ctx }
+%parse-param { struct parser *ctx }
+%error-verbose
 %pure-parser
 
 %union
@@ -691,7 +689,7 @@ static int wql_lex( void *p, struct parser *parser )
     return token;
 }
 
-static int wql_error( const char *str )
+static int wql_error( struct parser *parser, const char *str )
 {
     ERR("%s\n", str);
     return 0;
-- 
1.8.1.6