summaryrefslogtreecommitdiffstats
path: root/gdb/m2-exp.y
diff options
context:
space:
mode:
authorMichael Tiemann <tiemann@cygnus>1992-07-09 11:47:50 +0000
committerMichael Tiemann <tiemann@cygnus>1992-07-09 11:47:50 +0000
commit368c8614bcd91f301888ee8541df5e1c48998bde (patch)
tree3718727bc32ae0d43fe4be229c6ec495d09bcf68 /gdb/m2-exp.y
parent866ecded64f95d14bfc4ac313211a5cb9a289afa (diff)
downloadppe42-binutils-368c8614bcd91f301888ee8541df5e1c48998bde.tar.gz
ppe42-binutils-368c8614bcd91f301888ee8541df5e1c48998bde.zip
Minor changes to make these work with bison again.
Diffstat (limited to 'gdb/m2-exp.y')
-rw-r--r--gdb/m2-exp.y17
1 files changed, 7 insertions, 10 deletions
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index 10d9ae5d48..73e0855306 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -103,10 +103,6 @@ int number_sign = 1;
struct block *modblock=0;
/* #define YYDEBUG 1 */
-
-/* !@&%ing AIX defines these! Prevent cpp complaints by undeffing them */
-#undef TRUE
-#undef FALSE
%}
/* Although the yacc "value" of an expression is not used,
@@ -137,7 +133,7 @@ struct block *modblock=0;
%type <sym> fblock
%token <lval> INT HEX ERROR
-%token <ulval> UINT TRUE FALSE CHAR
+%token <ulval> UINT M2_TRUE M2_FALSE CHAR
%token <dval> FLOAT
/* Both NAME and TYPENAME tokens represent symbols in the input,
@@ -180,7 +176,6 @@ struct block *modblock=0;
/* This is not an actual token ; it is used for precedence.
%right QID
*/
-%%
%{
/* Ensure that if the generated parser contains any calls to malloc/realloc,
@@ -194,6 +189,8 @@ struct block *modblock=0;
#define realloc xrealloc
%}
+%%
+
start : exp
| type_exp
;
@@ -468,13 +465,13 @@ exp : exp ASSIGN exp
/* Constants */
-exp : TRUE
+exp : M2_TRUE
{ write_exp_elt_opcode (OP_BOOL);
write_exp_elt_longcst ((LONGEST) $1);
write_exp_elt_opcode (OP_BOOL); }
;
-exp : FALSE
+exp : M2_FALSE
{ write_exp_elt_opcode (OP_BOOL);
write_exp_elt_longcst ((LONGEST) $1);
write_exp_elt_opcode (OP_BOOL); }
@@ -1143,12 +1140,12 @@ yylex ()
if(!strncmp(tokstart,"TRUE",4))
{
yylval.ulval = 1;
- return TRUE;
+ return M2_TRUE;
}
else if(!strncmp(tokstart,"FALSE",5))
{
yylval.ulval = 0;
- return FALSE;
+ return M2_FALSE;
}
}
OpenPOWER on IntegriCloud