2 patch from: http://bugs.winehq.org/show_bug.cgi?id=34329
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
11 jscript: Use bison directives instead of defines to specify extra lexer parameters.
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
20 WINE_DEFAULT_DEBUG_CHANNEL(jscript);
22 -#define YYLEX_PARAM ctx
23 -#define YYPARSE_PARAM ctx
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
35 +%lex-param { parser_ctx_t *ctx }
36 +%parse-param { parser_ctx_t *ctx }
41 @@ -1386,7 +1385,7 @@ static expression_t *new_call_expression(parser_ctx_t *ctx, expression_t *expres
45 -static int parser_error(const char *str)
46 +static int parser_error(parser_ctx_t *ctx, const char *str)
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
56 msi: Use bison directives instead of defines to specify extra lexer parameters.
59 diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y
60 index 97bb002..fa55825 100644
64 #include "wine/unicode.h"
65 #include "wine/list.h"
67 -#define YYLEX_PARAM info
68 -#define YYPARSE_PARAM info
70 -static int cond_error(const char *str);
72 WINE_DEFAULT_DEBUG_CHANNEL(msi);
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);
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 )
87 +%lex-param { COND_input *info }
88 +%parse-param { COND_input *info }
92 @@ -798,7 +796,7 @@ static void cond_free( void *ptr )
96 -static int cond_error(const char *str)
97 +static int cond_error( COND_input *info, const char *str )
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
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.
122 UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview,
123 struct list *mem ) DECLSPEC_HIDDEN;
125 diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y
126 index ead7743..fa54741 100644
130 #include "wine/debug.h"
131 #include "wine/unicode.h"
133 -#define YYLEX_PARAM info
134 -#define YYPARSE_PARAM info
136 -static int sql_error(const char *str);
138 WINE_DEFAULT_DEBUG_CHANNEL(msi);
140 -typedef struct tag_SQL_input
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.
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);
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 );
164 +%lex-param { SQL_input *info }
165 +%parse-param { SQL_input *info }
169 @@ -866,7 +851,7 @@ INT SQL_getint( void *info )
173 -static int sql_error( const char *str )
174 +static int sql_error( SQL_input *info, const char *str )
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
184 vbscript: Use bison directives instead of defines to specify extra lexer parameters.
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
193 WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
195 -#define YYLEX_PARAM ctx
196 -#define YYPARSE_PARAM ctx
198 -static int parser_error(const char*);
199 +static int parser_error(parser_ctx_t *,const char*);
201 static void parse_complete(parser_ctx_t*,BOOL);
203 @@ -82,7 +79,9 @@ static const WCHAR propertyW[] = {'p','r','o','p','e','r','t','y',0};
208 +%lex-param { parser_ctx_t *ctx }
209 +%parse-param { parser_ctx_t *ctx }
214 @@ -426,7 +425,7 @@ Identifier
215 | tPROPERTY { $$ = propertyW; }
218 -static int parser_error(const char *str)
219 +static int parser_error(parser_ctx_t *ctx, const char *str)
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
229 wbemprox: Use bison directives instead of defines to specify extra lexer parameters.
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
237 #include "wine/debug.h"
238 #include "wine/unicode.h"
240 -#define YYLEX_PARAM ctx
241 -#define YYPARSE_PARAM ctx
242 -#define YYERROR_DEBUG 1
243 -#define YYERROR_VERBOSE 1
245 WINE_DEFAULT_DEBUG_CHANNEL(wbemprox);
248 @@ -181,7 +176,7 @@ static struct expr *expr_propval( struct parser *parser, const struct property *
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 );
256 #define PARSER_BUBBLE_UP_VIEW( parser, result, current_view ) \
257 @@ -190,6 +185,9 @@ static int wql_lex( void *val, struct parser *parser );
261 +%lex-param { struct parser *ctx }
262 +%parse-param { struct parser *ctx }
267 @@ -691,7 +689,7 @@ static int wql_lex( void *p, struct parser *parser )
271 -static int wql_error( const char *str )
272 +static int wql_error( struct parser *parser, const char *str )
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
282 widl: Remove non-bison compatibility code.
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
291 #include "typetree.h"
293 -#if defined(YYBYACC)
294 - /* Berkeley yacc (byacc) doesn't seem to know about these */
295 - /* Some *BSD supplied versions do define these though */
297 -# define YYEMPTY (-1) /* Empty lookahead value of yychar */
300 -# define YYLEX yylex()
303 -#elif defined(YYBISON)
304 - /* Bison was used for original development */
305 - /* #define YYEMPTY -2 */
306 - /* #define YYLEX yylex() */
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... */
318 -#define YYERROR_VERBOSE
320 static unsigned char pointer_default = RPC_FC_UP;
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 '[' ']'
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
338 wrc: Remove non-bison compatibility code.
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
349 -#if defined(YYBYACC)
350 - /* Berkeley yacc (byacc) doesn't seem to know about these */
351 - /* Some *BSD supplied versions do define these though */
353 -# define YYEMPTY (-1) /* Empty lookahead value of yychar */
356 -# define YYLEX yylex()
359 -#elif defined(YYBISON)
360 - /* Bison was used for original development */
361 - /* #define YYEMPTY -2 */
362 - /* #define YYLEX yylex() */
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... */
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)
379 /* Get a token if we don't have one yet */
380 if(lookahead == YYEMPTY)
382 + lookahead = yylex();
384 /* Only numbers are possibly interesting */