mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 02:50:08 +08:00
* java-exp.y: Combine TRUE and FALSE into BOOLEAN_LITERAL.
(Avoids name clash with broken AIX header files.)
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Sat Apr 19 11:56:10 1997 Per Bothner <bothner@deneb.cygnus.com>
|
||||||
|
|
||||||
|
* java-exp.y: Combine TRUE and FALSE into BOOLEAN_LITERAL.
|
||||||
|
(Avoids name clash with broken AIX header files.)
|
||||||
|
|
||||||
Sat Apr 19 01:49:37 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
Sat Apr 19 01:49:37 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||||
|
|
||||||
* serial.c (serial_log_command): Fix fputs_unfiltered calls.
|
* serial.c (serial_log_command): Fix fputs_unfiltered calls.
|
||||||
|
@ -145,7 +145,7 @@ static int
|
|||||||
parse_number PARAMS ((char *, int, int, YYSTYPE *));
|
parse_number PARAMS ((char *, int, int, YYSTYPE *));
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%type <lval> rcurly BooleanLiteral Dims Dims_opt
|
%type <lval> rcurly Dims Dims_opt
|
||||||
%type <tval> ClassOrInterfaceType ClassType /* ReferenceType Type ArrayType */
|
%type <tval> ClassOrInterfaceType ClassType /* ReferenceType Type ArrayType */
|
||||||
%type <tval> IntegralType FloatingPointType NumericType PrimitiveType
|
%type <tval> IntegralType FloatingPointType NumericType PrimitiveType
|
||||||
|
|
||||||
@ -154,6 +154,7 @@ parse_number PARAMS ((char *, int, int, YYSTYPE *));
|
|||||||
|
|
||||||
%token <sval> IDENTIFIER
|
%token <sval> IDENTIFIER
|
||||||
%token <sval> STRING_LITERAL
|
%token <sval> STRING_LITERAL
|
||||||
|
%token <lval> BOOLEAN_LITERAL
|
||||||
%token <tsym> TYPENAME
|
%token <tsym> TYPENAME
|
||||||
%type <sval> Name SimpleName QualifiedName ForcedName
|
%type <sval> Name SimpleName QualifiedName ForcedName
|
||||||
|
|
||||||
@ -174,7 +175,7 @@ parse_number PARAMS ((char *, int, int, YYSTYPE *));
|
|||||||
|
|
||||||
%token <opcode> ASSIGN_MODIFY
|
%token <opcode> ASSIGN_MODIFY
|
||||||
|
|
||||||
%token THIS SUPER TRUE FALSE NEW
|
%token THIS SUPER NEW
|
||||||
|
|
||||||
%left ','
|
%left ','
|
||||||
%right '=' ASSIGN_MODIFY
|
%right '=' ASSIGN_MODIFY
|
||||||
@ -208,13 +209,6 @@ StringLiteral:
|
|||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
BooleanLiteral:
|
|
||||||
FALSE
|
|
||||||
{ $$ = 0; }
|
|
||||||
| TRUE
|
|
||||||
{ $$ = 1; }
|
|
||||||
;
|
|
||||||
|
|
||||||
Literal :
|
Literal :
|
||||||
INTEGER_LITERAL
|
INTEGER_LITERAL
|
||||||
{ write_exp_elt_opcode (OP_LONG);
|
{ write_exp_elt_opcode (OP_LONG);
|
||||||
@ -234,7 +228,7 @@ Literal :
|
|||||||
write_exp_elt_type ($1.type);
|
write_exp_elt_type ($1.type);
|
||||||
write_exp_elt_dblcst ($1.dval);
|
write_exp_elt_dblcst ($1.dval);
|
||||||
write_exp_elt_opcode (OP_DOUBLE); }
|
write_exp_elt_opcode (OP_DOUBLE); }
|
||||||
| BooleanLiteral
|
| BOOLEAN_LITERAL
|
||||||
{ write_exp_elt_opcode (OP_LONG);
|
{ write_exp_elt_opcode (OP_LONG);
|
||||||
write_exp_elt_type (java_boolean_type);
|
write_exp_elt_type (java_boolean_type);
|
||||||
write_exp_elt_longcst ((LONGEST)$1);
|
write_exp_elt_longcst ((LONGEST)$1);
|
||||||
@ -1079,7 +1073,10 @@ yylex ()
|
|||||||
if (STREQN (tokstart, "short", 5))
|
if (STREQN (tokstart, "short", 5))
|
||||||
return SHORT;
|
return SHORT;
|
||||||
if (STREQN (tokstart, "false", 5))
|
if (STREQN (tokstart, "false", 5))
|
||||||
return FALSE;
|
{
|
||||||
|
yylval.lval = 0;
|
||||||
|
return BOOLEAN_LITERAL;
|
||||||
|
}
|
||||||
if (STREQN (tokstart, "super", 5))
|
if (STREQN (tokstart, "super", 5))
|
||||||
return SUPER;
|
return SUPER;
|
||||||
if (STREQN (tokstart, "float", 5))
|
if (STREQN (tokstart, "float", 5))
|
||||||
@ -1093,7 +1090,10 @@ yylex ()
|
|||||||
if (STREQN (tokstart, "char", 4))
|
if (STREQN (tokstart, "char", 4))
|
||||||
return CHAR;
|
return CHAR;
|
||||||
if (STREQN (tokstart, "true", 4))
|
if (STREQN (tokstart, "true", 4))
|
||||||
return TRUE;
|
{
|
||||||
|
yylval.lval = 1;
|
||||||
|
return BOOLEAN_LITERAL;
|
||||||
|
}
|
||||||
if (current_language->la_language == language_cplus
|
if (current_language->la_language == language_cplus
|
||||||
&& STREQN (tokstart, "this", 4))
|
&& STREQN (tokstart, "this", 4))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user