projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
866ecde
)
Minor changes to make these work with bison again.
author
Michael Tiemann
<tiemann@cygnus>
Thu, 9 Jul 1992 11:47:50 +0000
(11:47 +0000)
committer
Michael Tiemann
<tiemann@cygnus>
Thu, 9 Jul 1992 11:47:50 +0000
(11:47 +0000)
gdb/c-exp.y
patch
|
blob
|
history
gdb/m2-exp.y
patch
|
blob
|
history
diff --git
a/gdb/c-exp.y
b/gdb/c-exp.y
index 4416253f1ebb00723a682aa474fe30809f864f8e..793b76942895b37a8c36960c18236f08daaf1983 100644
(file)
--- a/
gdb/c-exp.y
+++ b/
gdb/c-exp.y
@@
-193,9
+193,6
@@
parse_number PARAMS ((char *, int, int, YYSTYPE *));
%type <bval> block
%left COLONCOLON
%type <bval> block
%left COLONCOLON
-
\f
-%%
-
%{
/* Ensure that if the generated parser contains any calls to malloc/realloc,
that they get mapped to xmalloc/xrealloc. We have to do this here
%{
/* Ensure that if the generated parser contains any calls to malloc/realloc,
that they get mapped to xmalloc/xrealloc. We have to do this here
@@
-208,6
+205,9
@@
parse_number PARAMS ((char *, int, int, YYSTYPE *));
#define realloc xrealloc
%}
#define realloc xrealloc
%}
+
\f
+%%
+
start : exp1
| type_exp
;
start : exp1
| type_exp
;
diff --git
a/gdb/m2-exp.y
b/gdb/m2-exp.y
index 10d9ae5d48676abc768eda22548f441e6a1cca4f..73e08553066bfeb306077c3bf7456e4ae05545b9 100644
(file)
--- 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 */
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,
%}
/* 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
%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,
%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
*/
/* 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,
%{
/* Ensure that if the generated parser contains any calls to malloc/realloc,
@@
-194,6
+189,8
@@
struct block *modblock=0;
#define realloc xrealloc
%}
#define realloc xrealloc
%}
+%%
+
start : exp
| type_exp
;
start : exp
| type_exp
;
@@
-468,13
+465,13
@@
exp : exp ASSIGN exp
/* Constants */
/* Constants */
-exp : TRUE
+exp :
M2_
TRUE
{ write_exp_elt_opcode (OP_BOOL);
write_exp_elt_longcst ((LONGEST) $1);
write_exp_elt_opcode (OP_BOOL); }
;
{ 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); }
{ 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;
if(!strncmp(tokstart,"TRUE",4))
{
yylval.ulval = 1;
- return TRUE;
+ return
M2_
TRUE;
}
else if(!strncmp(tokstart,"FALSE",5))
{
yylval.ulval = 0;
}
else if(!strncmp(tokstart,"FALSE",5))
{
yylval.ulval = 0;
- return FALSE;
+ return
M2_
FALSE;
}
}
}
}