X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fc-exp.y;h=29f672f54c8a6027e60f9dff6e597c20c8b36a56;hb=ac775bf4d35b7a2d5715e0ccf3d648d4670213fd;hp=912775623f0d9ae0a98fba20dd0808cea0588923;hpb=0c801b966379f7826fdd793b26ae879c2edf78d1;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 912775623f..29f672f54c 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1,5 +1,5 @@ /* YACC parser for C expressions, for GDB. - Copyright (C) 1986-2015 Free Software Foundation, Inc. + Copyright (C) 1986-2016 Free Software Foundation, Inc. This file is part of GDB. @@ -56,65 +56,10 @@ #define parse_type(ps) builtin_type (parse_gdbarch (ps)) -/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc), - as well as gratuitiously global symbol names, so we can have multiple - yacc generated parsers in gdb. Note that these are only the variables - produced by yacc. If other parser generators (bison, byacc, etc) produce - additional global names that conflict at link time, then those parser - generators need to be fixed instead of adding those names to this list. */ - -#define yymaxdepth c_maxdepth -#define yyparse c_parse_internal -#define yylex c_lex -#define yyerror c_error -#define yylval c_lval -#define yychar c_char -#define yydebug c_debug -#define yypact c_pact -#define yyr1 c_r1 -#define yyr2 c_r2 -#define yydef c_def -#define yychk c_chk -#define yypgo c_pgo -#define yyact c_act -#define yyexca c_exca -#define yyerrflag c_errflag -#define yynerrs c_nerrs -#define yyps c_ps -#define yypv c_pv -#define yys c_s -#define yy_yys c_yys -#define yystate c_state -#define yytmp c_tmp -#define yyv c_v -#define yy_yyv c_yyv -#define yyval c_val -#define yylloc c_lloc -#define yyreds c_reds /* With YYDEBUG defined */ -#define yytoks c_toks /* With YYDEBUG defined */ -#define yyname c_name /* With YYDEBUG defined */ -#define yyrule c_rule /* With YYDEBUG defined */ -#define yylhs c_yylhs -#define yylen c_yylen -#define yydefred c_yydefred -#define yydgoto c_yydgoto -#define yysindex c_yysindex -#define yyrindex c_yyrindex -#define yygindex c_yygindex -#define yytable c_yytable -#define yycheck c_yycheck -#define yyss c_yyss -#define yysslim c_yysslim -#define yyssp c_yyssp -#define yystacksize c_yystacksize -#define yyvs c_yyvs -#define yyvsp c_yyvsp - -#ifndef YYDEBUG -#define YYDEBUG 1 /* Default to yydebug support */ -#endif - -#define YYFPRINTF parser_fprintf +/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, + etc). */ +#define GDB_YY_REMAP_PREFIX c_ +#include "yy-remap.h" /* The state of the parser, used internally when we are parsing the expression. */ @@ -2247,7 +2192,7 @@ parse_string_or_char (const char *tokptr, const char **outptr, ++tokptr; value->type = type; - value->ptr = obstack_base (&tempbuf); + value->ptr = (char *) obstack_base (&tempbuf); value->length = obstack_object_size (&tempbuf); *outptr = tokptr; @@ -3173,7 +3118,7 @@ yylex (void) obstack_grow (&name_obstack, next->value.sval.ptr, next->value.sval.length); - yylval.sval.ptr = obstack_base (&name_obstack); + yylval.sval.ptr = (const char *) obstack_base (&name_obstack); yylval.sval.length = obstack_object_size (&name_obstack); current.value = yylval; current.token = classification;