Commit | Line | Data |
---|---|---|
42a4f53d | 1 | /* Copyright (C) 1986-2019 Free Software Foundation, Inc. |
b3f11165 PA |
2 | |
3 | This file is part of GDB. | |
4 | ||
5 | This program is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
17 | ||
1a5c2598 TT |
18 | #ifndef YY_REMAP_H |
19 | #define YY_REMAP_H | |
20 | ||
b3f11165 PA |
21 | /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, |
22 | etc), as well as gratuitiously global symbol names, so we can have | |
23 | multiple yacc generated parsers in gdb. Note that these are only | |
24 | the variables produced by yacc. If other parser generators (bison, | |
25 | byacc, etc) produce additional global names that conflict at link | |
26 | time, then those parser generators need to be fixed instead of | |
27 | adding those names to this list. */ | |
28 | ||
29 | /* NOTE: This is clumsy since BISON and FLEX provide --prefix options. | |
30 | We are maintaining it to accommodate systems without BISON. */ | |
31 | ||
32 | /* Define GDB_YY_REMAP_PREFIX to the desired remapping prefix before | |
33 | including this file. */ | |
34 | #ifndef GDB_YY_REMAP_PREFIX | |
35 | # error "GDB_YY_REMAP_PREFIX not defined" | |
36 | #endif | |
37 | ||
38 | #define GDB_YY_REMAP_2(PREFIX, YYSYM) PREFIX ## YYSYM | |
39 | #define GDB_YY_REMAP_1(PREFIX, YYSYM) GDB_YY_REMAP_2 (PREFIX, YYSYM) | |
40 | #define GDB_YY_REMAP(YYSYM) GDB_YY_REMAP_1 (GDB_YY_REMAP_PREFIX, YYSYM) | |
41 | ||
42 | #define yymaxdepth GDB_YY_REMAP (yymaxdepth) | |
43 | #define yyparse GDB_YY_REMAP (yyparse) | |
44 | #define yylex GDB_YY_REMAP (yylex) | |
45 | #define yyerror GDB_YY_REMAP (yyerror) | |
46 | #define yylval GDB_YY_REMAP (yylval) | |
47 | #define yychar GDB_YY_REMAP (yychar) | |
48 | #define yydebug GDB_YY_REMAP (yydebug) | |
49 | #define yypact GDB_YY_REMAP (yypact) | |
50 | #define yyr1 GDB_YY_REMAP (yyr1) | |
51 | #define yyr2 GDB_YY_REMAP (yyr2) | |
52 | #define yydef GDB_YY_REMAP (yydef) | |
53 | #define yychk GDB_YY_REMAP (yychk) | |
54 | #define yypgo GDB_YY_REMAP (yypgo) | |
55 | #define yyact GDB_YY_REMAP (yyact) | |
56 | #define yyexca GDB_YY_REMAP (yyexca) | |
57 | #define yyerrflag GDB_YY_REMAP (yyerrflag) | |
58 | #define yynerrs GDB_YY_REMAP (yynerrs) | |
59 | #define yyps GDB_YY_REMAP (yyps) | |
60 | #define yypv GDB_YY_REMAP (yypv) | |
61 | #define yys GDB_YY_REMAP (yys) | |
62 | #define yy_yys GDB_YY_REMAP (yy_yys) | |
63 | #define yystate GDB_YY_REMAP (yystate) | |
64 | #define yytmp GDB_YY_REMAP (yytmp) | |
65 | #define yyv GDB_YY_REMAP (yyv) | |
66 | #define yy_yyv GDB_YY_REMAP (yy_yyv) | |
67 | #define yyval GDB_YY_REMAP (yyval) | |
68 | #define yylloc GDB_YY_REMAP (yylloc) | |
69 | #define yyreds GDB_YY_REMAP (yyreds) /* With YYDEBUG defined */ | |
70 | #define yytoks GDB_YY_REMAP (yytoks) /* With YYDEBUG defined */ | |
71 | #define yyname GDB_YY_REMAP (yyname) /* With YYDEBUG defined */ | |
72 | #define yyrule GDB_YY_REMAP (yyrule) /* With YYDEBUG defined */ | |
73 | #define yylhs GDB_YY_REMAP (yylhs) | |
74 | #define yylen GDB_YY_REMAP (yylen) | |
75 | #define yydefred GDB_YY_REMAP (yydefred) | |
76 | #define yydgoto GDB_YY_REMAP (yydgoto) | |
77 | #define yysindex GDB_YY_REMAP (yysindex) | |
78 | #define yyrindex GDB_YY_REMAP (yyrindex) | |
79 | #define yygindex GDB_YY_REMAP (yygindex) | |
80 | #define yytable GDB_YY_REMAP (yytable) | |
81 | #define yycheck GDB_YY_REMAP (yycheck) | |
82 | #define yyss GDB_YY_REMAP (yyss) | |
83 | #define yysslim GDB_YY_REMAP (yysslim) | |
84 | #define yyssp GDB_YY_REMAP (yyssp) | |
85 | #define yystacksize GDB_YY_REMAP (yystacksize) | |
86 | #define yyvs GDB_YY_REMAP (yyvs) | |
87 | #define yyvsp GDB_YY_REMAP (yyvsp) | |
88 | ||
89 | /* The following are common to all parsers. */ | |
90 | ||
91 | #ifndef YYDEBUG | |
92 | # define YYDEBUG 1 /* Default to yydebug support */ | |
93 | #endif | |
94 | ||
ec148c57 PA |
95 | #ifndef TEST_CPNAMES |
96 | # define YYFPRINTF parser_fprintf | |
97 | #endif | |
1a5c2598 TT |
98 | |
99 | #endif /* YY_REMAP_H */ |