aboutsummaryrefslogtreecommitdiff
path: root/gdb/ch-exp.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ch-exp.y')
-rw-r--r--gdb/ch-exp.y30
1 files changed, 14 insertions, 16 deletions
diff --git a/gdb/ch-exp.y b/gdb/ch-exp.y
index 5e677bb..7987113 100644
--- a/gdb/ch-exp.y
+++ b/gdb/ch-exp.y
@@ -60,9 +60,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "parser-defs.h"
#include "ch-lang.h"
-/* These MUST be included in any grammar file!!!! Please choose unique names!
- Note that this are a combined list of variables that can be produced
- by any one of bison, byacc, or yacc. */
+/* 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 chill_maxdepth
#define yyparse chill_parse
#define yylex chill_lex
@@ -90,14 +94,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define yy_yyv chill_yyv
#define yyval chill_val
#define yylloc chill_lloc
-#define yyrule chill_rule /* With YYDEBUG defined, byacc */
-#define yyname chill_name /* With YYDEBUG defined, byacc */
#define yyreds chill_reds /* With YYDEBUG defined */
#define yytoks chill_toks /* With YYDEBUG defined */
-#define yyss chill_yyss /* byacc */
-#define yyssp chill_yysp /* byacc */
-#define yyvs chill_yyvs /* byacc */
-#define yyvsp chill_yyvsp /* byacc */
+
+#ifndef YYDEBUG
+#define YYDEBUG 0 /* Default to no yydebug support */
+#endif
+
+int
+yyparse PARAMS ((void));
static int
yylex PARAMS ((void));
@@ -105,13 +110,6 @@ yylex PARAMS ((void));
void
yyerror PARAMS ((char *));
-int
-yyparse PARAMS ((void));
-
-#if MAINTENANCE_CMDS
-#define YYDEBUG 1
-#endif
-
%}
/* Although the yacc "value" of an expression is not used,