]> git.pld-linux.org Git - packages/wine.git/blob - wine-bison3.patch
- up to 7.6, adapterize
[packages/wine.git] / wine-bison3.patch
1
2 patch from: http://bugs.winehq.org/show_bug.cgi?id=34329
3
4
5 From: Alexandre Julliard <julliard@winehq.org>
6 Date: Thu, 1 Aug 2013 09:59:12 +0000 (+0200)
7 Subject: jscript: Use bison directives instead of defines to specify extra lexer parameters.
8 X-Git-Tag: wine-1.7.0~38
9 X-Git-Url: http://source.winehq.org/git
10
11 jscript: Use bison directives instead of defines to specify extra lexer parameters.
12 ---
13
14 diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y
15 index f5a2e72..327366a 100644
16 --- a/dlls/jscript/parser.y
17 +++ b/dlls/jscript/parser.y
18 @@ -25,10 +25,7 @@
19  
20  WINE_DEFAULT_DEBUG_CHANNEL(jscript);
21  
22 -#define YYLEX_PARAM ctx
23 -#define YYPARSE_PARAM ctx
24 -
25 -static int parser_error(const char*);
26 +static int parser_error(parser_ctx_t*,const char*);
27  static void set_error(parser_ctx_t*,UINT);
28  static BOOL explicit_error(parser_ctx_t*,void*,WCHAR);
29  static BOOL allow_auto_semicolon(parser_ctx_t*);
30 @@ -139,7 +136,9 @@ static source_elements_t *source_elements_add_statement(source_elements_t*,state
31  
32  %}
33  
34 -%pure_parser
35 +%lex-param { parser_ctx_t *ctx }
36 +%parse-param { parser_ctx_t *ctx }
37 +%pure-parser
38  %start Program
39  
40  %union {
41 @@ -1386,7 +1385,7 @@ static expression_t *new_call_expression(parser_ctx_t *ctx, expression_t *expres
42      return &ret->expr;
43  }
44  
45 -static int parser_error(const char *str)
46 +static int parser_error(parser_ctx_t *ctx, const char *str)
47  {
48      return 0;
49  }
50 From: Alexandre Julliard <julliard@winehq.org>
51 Date: Thu, 1 Aug 2013 10:00:04 +0000 (+0200)
52 Subject: msi: Use bison directives instead of defines to specify extra lexer parameters.
53 X-Git-Tag: wine-1.7.0~37
54 X-Git-Url: http://source.winehq.org/git
55
56 msi: Use bison directives instead of defines to specify extra lexer parameters.
57 ---
58
59 diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y
60 index 97bb002..fa55825 100644
61 --- a/dlls/msi/cond.y
62 +++ b/dlls/msi/cond.y
63 @@ -42,11 +42,6 @@
64  #include "wine/unicode.h"
65  #include "wine/list.h"
66  
67 -#define YYLEX_PARAM info
68 -#define YYPARSE_PARAM info
69 -
70 -static int cond_error(const char *str);
71 -
72  WINE_DEFAULT_DEBUG_CHANNEL(msi);
73  
74  typedef struct tag_yyinput
75 @@ -66,6 +61,7 @@ struct cond_str {
76  static LPWSTR COND_GetString( COND_input *info, const struct cond_str *str );
77  static LPWSTR COND_GetLiteral( COND_input *info, const struct cond_str *str );
78  static int cond_lex( void *COND_lval, COND_input *info);
79 +static int cond_error( COND_input *info, const char *str);
80  
81  static void *cond_alloc( COND_input *cond, unsigned int sz );
82  static void *cond_track_mem( COND_input *cond, void *ptr, unsigned int sz );
83 @@ -110,6 +106,8 @@ static BOOL num_from_prop( LPCWSTR p, INT *val )
84  
85  %}
86  
87 +%lex-param { COND_input *info }
88 +%parse-param { COND_input *info }
89  %pure-parser
90  
91  %union
92 @@ -798,7 +796,7 @@ static void cond_free( void *ptr )
93      }
94  }
95  
96 -static int cond_error(const char *str)
97 +static int cond_error( COND_input *info, const char *str )
98  {
99      TRACE("%s\n", str );
100      return 0;
101 diff --git a/dlls/msi/query.h b/dlls/msi/query.h
102 index ca34b4c..063fbb9 100644
103 --- a/dlls/msi/query.h
104 +++ b/dlls/msi/query.h
105 @@ -96,6 +96,19 @@ struct expr
106      } u;
107  };
108  
109 +typedef struct
110 +{
111 +    MSIDATABASE *db;
112 +    LPCWSTR command;
113 +    DWORD n, len;
114 +    UINT r;
115 +    MSIVIEW **view;  /* View structure for the resulting query.  This value
116 +                      * tracks the view currently being created so we can free
117 +                      * this view on syntax error.
118 +                      */
119 +    struct list *mem;
120 +} SQL_input;
121 +
122  UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview,
123                     struct list *mem ) DECLSPEC_HIDDEN;
124  
125 diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y
126 index ead7743..fa54741 100644
127 --- a/dlls/msi/sql.y
128 +++ b/dlls/msi/sql.y
129 @@ -34,29 +34,12 @@
130  #include "wine/debug.h"
131  #include "wine/unicode.h"
132  
133 -#define YYLEX_PARAM info
134 -#define YYPARSE_PARAM info
135 -
136 -static int sql_error(const char *str);
137 -
138  WINE_DEFAULT_DEBUG_CHANNEL(msi);
139  
140 -typedef struct tag_SQL_input
141 -{
142 -    MSIDATABASE *db;
143 -    LPCWSTR command;
144 -    DWORD n, len;
145 -    UINT r;
146 -    MSIVIEW **view;  /* View structure for the resulting query.  This value
147 -                      * tracks the view currently being created so we can free
148 -                      * this view on syntax error.
149 -                      */
150 -    struct list *mem;
151 -} SQL_input;
152 -
153  static UINT SQL_getstring( void *info, const struct sql_str *strdata, LPWSTR *str );
154  static INT SQL_getint( void *info );
155  static int sql_lex( void *SQL_lval, SQL_input *info );
156 +static int sql_error( SQL_input *info, const char *str);
157  
158  static LPWSTR parser_add_table( void *info, LPCWSTR list, LPCWSTR table );
159  static void *parser_alloc( void *info, unsigned int sz );
160 @@ -77,6 +60,8 @@ static struct expr * EXPR_wildcard( void *info );
161  
162  %}
163  
164 +%lex-param { SQL_input *info }
165 +%parse-param { SQL_input *info }
166  %pure-parser
167  
168  %union
169 @@ -866,7 +851,7 @@ INT SQL_getint( void *info )
170      return r;
171  }
172  
173 -static int sql_error( const char *str )
174 +static int sql_error( SQL_input *info, const char *str )
175  {
176      return 0;
177  }
178 From: Alexandre Julliard <julliard@winehq.org>
179 Date: Thu, 1 Aug 2013 10:00:23 +0000 (+0200)
180 Subject: vbscript: Use bison directives instead of defines to specify extra lexer parameters.
181 X-Git-Tag: wine-1.7.0~36
182 X-Git-Url: http://source.winehq.org/git
183
184 vbscript: Use bison directives instead of defines to specify extra lexer parameters.
185 ---
186
187 diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y
188 index 4b380ef..3c54fd8 100644
189 --- a/dlls/vbscript/parser.y
190 +++ b/dlls/vbscript/parser.y
191 @@ -25,10 +25,7 @@
192  
193  WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
194  
195 -#define YYLEX_PARAM ctx
196 -#define YYPARSE_PARAM ctx
197 -
198 -static int parser_error(const char*);
199 +static int parser_error(parser_ctx_t *,const char*);
200  
201  static void parse_complete(parser_ctx_t*,BOOL);
202  
203 @@ -82,7 +79,9 @@ static const WCHAR propertyW[] = {'p','r','o','p','e','r','t','y',0};
204  
205  %}
206  
207 -%pure_parser
208 +%lex-param { parser_ctx_t *ctx }
209 +%parse-param { parser_ctx_t *ctx }
210 +%pure-parser
211  %start Program
212  
213  %union {
214 @@ -426,7 +425,7 @@ Identifier
215      | tPROPERTY      { $$ = propertyW; }
216  %%
217  
218 -static int parser_error(const char *str)
219 +static int parser_error(parser_ctx_t *ctx, const char *str)
220  {
221      return 0;
222  }
223 From: Alexandre Julliard <julliard@winehq.org>
224 Date: Thu, 1 Aug 2013 10:00:44 +0000 (+0200)
225 Subject: wbemprox: Use bison directives instead of defines to specify extra lexer parameters.
226 X-Git-Tag: wine-1.7.0~35
227 X-Git-Url: http://source.winehq.org/git
228
229 wbemprox: Use bison directives instead of defines to specify extra lexer parameters.
230 ---
231
232 diff --git a/dlls/wbemprox/wql.y b/dlls/wbemprox/wql.y
233 index 8e347c2..58663d0 100644
234 --- a/dlls/wbemprox/wql.y
235 +++ b/dlls/wbemprox/wql.y
236 @@ -30,11 +30,6 @@
237  #include "wine/debug.h"
238  #include "wine/unicode.h"
239  
240 -#define YYLEX_PARAM ctx
241 -#define YYPARSE_PARAM ctx
242 -#define YYERROR_DEBUG 1
243 -#define YYERROR_VERBOSE 1
244 -
245  WINE_DEFAULT_DEBUG_CHANNEL(wbemprox);
246  
247  struct parser
248 @@ -181,7 +176,7 @@ static struct expr *expr_propval( struct parser *parser, const struct property *
249      return e;
250  }
251  
252 -static int wql_error( const char *str );
253 +static int wql_error( struct parser *parser, const char *str );
254  static int wql_lex( void *val, struct parser *parser );
255  
256  #define PARSER_BUBBLE_UP_VIEW( parser, result, current_view ) \
257 @@ -190,6 +185,9 @@ static int wql_lex( void *val, struct parser *parser );
258  
259  %}
260  
261 +%lex-param { struct parser *ctx }
262 +%parse-param { struct parser *ctx }
263 +%error-verbose
264  %pure-parser
265  
266  %union
267 @@ -691,7 +689,7 @@ static int wql_lex( void *p, struct parser *parser )
268      return token;
269  }
270  
271 -static int wql_error( const char *str )
272 +static int wql_error( struct parser *parser, const char *str )
273  {
274      ERR("%s\n", str);
275      return 0;
276 From: Alexandre Julliard <julliard@winehq.org>
277 Date: Thu, 1 Aug 2013 10:04:24 +0000 (+0200)
278 Subject: widl: Remove non-bison compatibility code.
279 X-Git-Tag: wine-1.7.0~34
280 X-Git-Url: http://source.winehq.org/git
281
282 widl: Remove non-bison compatibility code.
283 ---
284
285 diff --git a/tools/widl/parser.y b/tools/widl/parser.y
286 index b7fa2f6..579cbc6 100644
287 --- a/tools/widl/parser.y
288 +++ b/tools/widl/parser.y
289 @@ -38,33 +38,6 @@
290  #include "expr.h"
291  #include "typetree.h"
292  
293 -#if defined(YYBYACC)
294 -       /* Berkeley yacc (byacc) doesn't seem to know about these */
295 -       /* Some *BSD supplied versions do define these though */
296 -# ifndef YYEMPTY
297 -#  define YYEMPTY      (-1)    /* Empty lookahead value of yychar */
298 -# endif
299 -# ifndef YYLEX
300 -#  define YYLEX                yylex()
301 -# endif
302 -
303 -#elif defined(YYBISON)
304 -       /* Bison was used for original development */
305 -       /* #define YYEMPTY -2 */
306 -       /* #define YYLEX   yylex() */
307 -
308 -#else
309 -       /* No yacc we know yet */
310 -# if !defined(YYEMPTY) || !defined(YYLEX)
311 -#  error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX.
312 -# elif defined(__GNUC__)       /* gcc defines the #warning directive */
313 -#  warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested
314 -  /* #else we just take a chance that it works... */
315 -# endif
316 -#endif
317 -
318 -#define YYERROR_VERBOSE
319 -
320  static unsigned char pointer_default = RPC_FC_UP;
321  
322  typedef struct list typelist_t;
323 @@ -323,6 +296,8 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
324  %right '!' '~' CAST PPTR POS NEG ADDRESSOF tSIZEOF
325  %left '.' MEMBERPTR '[' ']'
326  
327 +%error-verbose
328 +
329  %%
330  
331  input:   gbl_statements                                { fix_incomplete();
332 From: Alexandre Julliard <julliard@winehq.org>
333 Date: Thu, 1 Aug 2013 10:04:29 +0000 (+0200)
334 Subject: wrc: Remove non-bison compatibility code.
335 X-Git-Tag: wine-1.7.0~33
336 X-Git-Url: http://source.winehq.org/git
337
338 wrc: Remove non-bison compatibility code.
339 ---
340
341 diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y
342 index ad5fb98..ff59327 100644
343 --- a/tools/wrc/parser.y
344 +++ b/tools/wrc/parser.y
345 @@ -142,31 +142,6 @@
346  #include "wingdi.h"
347  #include "winuser.h"
348  
349 -#if defined(YYBYACC)
350 -       /* Berkeley yacc (byacc) doesn't seem to know about these */
351 -       /* Some *BSD supplied versions do define these though */
352 -# ifndef YYEMPTY
353 -#  define YYEMPTY      (-1)    /* Empty lookahead value of yychar */
354 -# endif
355 -# ifndef YYLEX
356 -#  define YYLEX                yylex()
357 -# endif
358 -
359 -#elif defined(YYBISON)
360 -       /* Bison was used for original development */
361 -       /* #define YYEMPTY -2 */
362 -       /* #define YYLEX   yylex() */
363 -
364 -#else
365 -       /* No yacc we know yet */
366 -# if !defined(YYEMPTY) || !defined(YYLEX)
367 -#  error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX.
368 -# elif defined(__GNUC__)       /* gcc defines the #warning directive */
369 -#  warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested
370 -  /* #else we just take a chance that it works... */
371 -# endif
372 -#endif
373 -
374  int want_nl = 0;       /* Signal flex that we need the next newline */
375  int want_id = 0;       /* Signal flex that we need the next identifier */
376  static stringtable_t *tagstt;  /* Stringtable tag.
377 @@ -2837,7 +2812,7 @@ static int rsrcid_to_token(int lookahead)
378  
379         /* Get a token if we don't have one yet */
380         if(lookahead == YYEMPTY)
381 -               lookahead = YYLEX;
382 +               lookahead = yylex();
383  
384         /* Only numbers are possibly interesting */
385         switch(lookahead)
This page took 0.057028 seconds and 3 git commands to generate.