Commit f4af3134 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Specify the bison prefix directly in the source files.

parent 363d078f
......@@ -65,6 +65,8 @@ int asmshader_lex(void);
%}
%define api.prefix {asmshader_}
%union {
struct {
float val;
......
......@@ -225,7 +225,7 @@ typedef struct macexpstackentry {
* Prototypes
*/
static void newline(int);
static int make_number(int radix, YYSTYPE *val, const char *str, int len);
static int make_number(int radix, PPY_STYPE *val, const char *str, int len);
static void put_buffer(const char *s, int len);
/* Buffer management */
static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop);
......@@ -829,7 +829,7 @@ static void newline(int dowrite)
*
*-------------------------------------------------------------------------
*/
static int make_number(int radix, YYSTYPE *val, const char *str, int len)
static int make_number(int radix, PPY_STYPE *val, const char *str, int len)
{
int is_l = 0;
int is_ll = 0;
......
......@@ -111,6 +111,8 @@ static int nmacro_args;
%}
%define api.prefix {ppy_}
%union{
int sint;
unsigned int uint;
......
......@@ -30,6 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(jscript);
%lex-param { parser_ctx_t *ctx }
%parse-param { parser_ctx_t *ctx }
%define api.prefix {cc_parser_}
%define api.pure
%start CCExpr
......
......@@ -128,13 +128,14 @@ static expression_t *new_literal_expression(parser_ctx_t*,literal_t*);
static expression_t *new_array_literal_expression(parser_ctx_t*,element_list_t*,int);
static expression_t *new_prop_and_value_expression(parser_ctx_t*,property_list_t*);
#define YYLTYPE unsigned
#define PARSER_LTYPE unsigned
#define YYLLOC_DEFAULT(Cur, Rhs, N) Cur = YYRHSLOC((Rhs), (N) ? 1 : 0)
%}
%lex-param { parser_ctx_t *ctx }
%parse-param { parser_ctx_t *ctx }
%define api.prefix {parser_}
%define api.pure
%start Script
......
......@@ -114,6 +114,7 @@ static void value_free( struct value val )
%lex-param { COND_input *info }
%parse-param { COND_input *info }
%define api.prefix {cond_}
%define api.pure
%union
......@@ -125,7 +126,7 @@ static void value_free( struct value val )
BOOL bool;
}
%token COND_SPACE COND_EOF
%token COND_SPACE
%token COND_OR COND_AND COND_NOT COND_XOR COND_IMP COND_EQV
%token COND_LT COND_GT COND_EQ COND_NE COND_GE COND_LE
%token COND_ILT COND_IGT COND_IEQ COND_INE COND_IGE COND_ILE
......@@ -134,7 +135,7 @@ static void value_free( struct value val )
%token COND_PERCENT COND_DOLLARS COND_QUESTION COND_AMPER COND_EXCLAM
%token <str> COND_IDENT <str> COND_NUMBER <str> COND_LITER
%nonassoc COND_ERROR COND_EOF
%nonassoc COND_ERROR
%type <bool> expression boolean_term boolean_factor
%type <value> value
......
......@@ -58,6 +58,7 @@ static struct expr * EXPR_wildcard( void *info );
%lex-param { SQL_input *info }
%parse-param { SQL_input *info }
%define api.prefix {sql_}
%define api.pure
%union
......
......@@ -38,7 +38,7 @@ typedef struct _parser_param {
int err;
} parser_param;
#define YYSTYPE xmlChar*
#define XSLPATTERN_STYPE xmlChar*
#define YY_EXTRA_TYPE parser_param*
int xslpattern_lex(xmlChar**, void*) DECLSPEC_HIDDEN;
......
......@@ -26,6 +26,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
#define SCAN xslpattern_get_extra(yyscanner)
#define YYSTYPE XSLPATTERN_STYPE
#define YY_INPUT(tok_buf, tok_len, max) \
do { \
......
......@@ -66,6 +66,7 @@ static void xslpattern_error(parser_param* param, void const* scanner, char cons
%start XSLPattern
%define api.prefix {xslpattern_}
%define api.pure
%parse-param {parser_param* p}
%parse-param {void* scanner}
......
......@@ -81,13 +81,14 @@ static statement_t *link_statements(statement_t*,statement_t*);
#define CHECK_ERROR if(((parser_ctx_t*)ctx)->hres != S_OK) YYABORT
#define YYLTYPE unsigned
#define PARSER_LTYPE unsigned
#define YYLLOC_DEFAULT(Cur, Rhs, N) Cur = YYRHSLOC((Rhs), (N) ? 1 : 0)
%}
%lex-param { parser_ctx_t *ctx }
%parse-param { parser_ctx_t *ctx }
%define api.prefix {parser_}
%define api.pure
%start Program
......
......@@ -217,6 +217,7 @@ static int wql_lex( void *val, struct parser *parser );
%lex-param { struct parser *ctx }
%parse-param { struct parser *ctx }
%define parse.error verbose
%define api.prefix {wql_}
%define api.pure
%union
......
......@@ -35,6 +35,8 @@ static void parser(const char*);
%}
%define api.prefix {dbg_}
%union
{
struct dbg_lvalue lvalue;
......
......@@ -2622,15 +2622,15 @@ static void output_source_y( struct makefile *make, struct incl_file *source, co
if (find_include_file( make, header ))
{
output( "%s: %s\n", obj_dir_path( make, header ), source->filename );
output( "\t%s%s -p %s_ -o %s.tab.c -d %s\n",
cmd_prefix( "BISON" ), bison, obj, obj_dir_path( make, obj ), source->filename );
output( "\t%s%s -o %s.tab.c -d %s\n",
cmd_prefix( "BISON" ), bison, obj_dir_path( make, obj ), source->filename );
output( "%s.tab.c: %s %s\n", obj_dir_path( make, obj ),
source->filename, obj_dir_path( make, header ));
strarray_add( &make->clean_files, header );
}
else output( "%s.tab.c: %s\n", obj_dir_path( make, obj ), source->filename );
output( "\t%s%s -p %s_ -o $@ %s\n", cmd_prefix( "BISON" ), bison, obj, source->filename );
output( "\t%s%s -o $@ %s\n", cmd_prefix( "BISON" ), bison, source->filename );
}
......
......@@ -120,6 +120,9 @@ static statement_list_t *parameterized_type_stmts = NULL;
static typelib_t *current_typelib;
%}
%define api.prefix {parser_}
%union {
attr_t *attr;
attr_list_t *attr_list;
......@@ -480,7 +483,7 @@ typedecl:
cppquote: tCPPQUOTE '(' aSTRING ')' { $$ = $3; }
;
import_start: tIMPORT aSTRING ';' { assert(yychar == YYEMPTY);
import_start: tIMPORT aSTRING ';' { assert(yychar == PARSER_EMPTY);
$$ = xmalloc(sizeof(struct _import_t));
$$->name = $2;
$$->import_performed = do_import($2);
......
......@@ -95,6 +95,8 @@ static struct cp_xlat *find_cpxlat(int lan);
%}
%define api.prefix {mcy_}
%union {
WCHAR *str;
unsigned num;
......
......@@ -200,6 +200,9 @@ static resource_t *build_fontdir(resource_t **fnt, int nfnt);
static int rsrcid_to_token(int lookahead);
%}
%define api.prefix {parser_}
%union{
string_t *str;
int num;
......@@ -487,11 +490,11 @@ resource
* want_id because we already have a lookahead that
* cannot be undone.
*/
if(yychar != YYEMPTY && yychar != tNL)
if(yychar != PARSER_EMPTY && yychar != tNL)
dont_want_id = 1;
if(yychar == tNL)
yychar = YYEMPTY; /* Could use 'yyclearin', but we already need the*/
yychar = PARSER_EMPTY; /* Could use 'yyclearin', but we already need the*/
/* direct access to yychar in rule 'usrcvt' below. */
else if(yychar == tIDENT)
parser_warning("LANGUAGE statement not delimited with newline; next identifier might be wrong\n");
......@@ -2722,7 +2725,7 @@ static int rsrcid_to_token(int lookahead)
int token;
/* Get a token if we don't have one yet */
if(lookahead == YYEMPTY)
if(lookahead == PARSER_EMPTY)
lookahead = yylex();
/* Only numbers are possibly interesting */
......
......@@ -240,7 +240,7 @@ typedef struct macexpstackentry {
* Prototypes
*/
static void newline(int);
static int make_number(int radix, YYSTYPE *val, const char *str, int len);
static int make_number(int radix, PPY_STYPE *val, const char *str, int len);
static void put_buffer(const char *s, int len);
/* Buffer management */
static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop);
......@@ -796,7 +796,7 @@ static void newline(int dowrite)
*
*-------------------------------------------------------------------------
*/
static int make_number(int radix, YYSTYPE *val, const char *str, int len)
static int make_number(int radix, PPY_STYPE *val, const char *str, int len)
{
int is_l = 0;
int is_ll = 0;
......
......@@ -115,6 +115,8 @@ static int nmacro_args;
%}
%define api.prefix {ppy_}
%union{
int sint;
unsigned int uint;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment