]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/p-exp.y
Centralize yacc interface names remapping (yyparse, yylex, yyerror, etc)
[thirdparty/binutils-gdb.git] / gdb / p-exp.y
index 8cbe5de067aeca07ba6fa95121b7e662cc361d47..fa6b22c03b37993e9544701f19fbaf44dbc9ba17 100644 (file)
 
 #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 pascal_maxdepth
-#define        yyparse pascal_parse_internal
-#define        yylex   pascal_lex
-#define        yyerror pascal_error
-#define        yylval  pascal_lval
-#define        yychar  pascal_char
-#define        yydebug pascal_debug
-#define        yypact  pascal_pact
-#define        yyr1    pascal_r1
-#define        yyr2    pascal_r2
-#define        yydef   pascal_def
-#define        yychk   pascal_chk
-#define        yypgo   pascal_pgo
-#define        yyact   pascal_act
-#define        yyexca  pascal_exca
-#define yyerrflag pascal_errflag
-#define yynerrs        pascal_nerrs
-#define        yyps    pascal_ps
-#define        yypv    pascal_pv
-#define        yys     pascal_s
-#define        yy_yys  pascal_yys
-#define        yystate pascal_state
-#define        yytmp   pascal_tmp
-#define        yyv     pascal_v
-#define        yy_yyv  pascal_yyv
-#define        yyval   pascal_val
-#define        yylloc  pascal_lloc
-#define yyreds pascal_reds             /* With YYDEBUG defined */
-#define yytoks pascal_toks             /* With YYDEBUG defined */
-#define yyname pascal_name             /* With YYDEBUG defined */
-#define yyrule pascal_rule             /* With YYDEBUG defined */
-#define yylhs  pascal_yylhs
-#define yylen  pascal_yylen
-#define yydefred pascal_yydefred
-#define yydgoto        pascal_yydgoto
-#define yysindex pascal_yysindex
-#define yyrindex pascal_yyrindex
-#define yygindex pascal_yygindex
-#define yytable         pascal_yytable
-#define yycheck         pascal_yycheck
-#define yyss   pascal_yyss
-#define yysslim        pascal_yysslim
-#define yyssp  pascal_yyssp
-#define yystacksize pascal_yystacksize
-#define yyvs   pascal_yyvs
-#define yyvsp  pascal_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 pascal_
+#include "yy-remap.h"
 
 /* The state of the parser, used internally when we are parsing the
    expression.  */