diff options
author | Per Bothner <per@bothner.com> | 1997-04-19 19:11:28 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1997-04-19 19:11:28 +0000 |
commit | 75a947c66bfb69704a2114da55143870cdb24398 (patch) | |
tree | 32a5e43ea52c8bfa77e9f144b9421699fa2a5a54 /gdb | |
parent | 64e6335a657599a9bca4704cafa0c507dd30e475 (diff) | |
download | gdb-75a947c66bfb69704a2114da55143870cdb24398.zip gdb-75a947c66bfb69704a2114da55143870cdb24398.tar.gz gdb-75a947c66bfb69704a2114da55143870cdb24398.tar.bz2 |
* java-exp.y: Combine TRUE and FALSE into BOOLEAN_LITERAL.
(Avoids name clash with broken AIX header files.)
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/java-exp.y | 24 |
2 files changed, 17 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6c217cf..40c47f3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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) * serial.c (serial_log_command): Fix fputs_unfiltered calls. diff --git a/gdb/java-exp.y b/gdb/java-exp.y index 3d810a9..0f27cbd 100644 --- a/gdb/java-exp.y +++ b/gdb/java-exp.y @@ -145,7 +145,7 @@ static int 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> IntegralType FloatingPointType NumericType PrimitiveType @@ -154,6 +154,7 @@ parse_number PARAMS ((char *, int, int, YYSTYPE *)); %token <sval> IDENTIFIER %token <sval> STRING_LITERAL +%token <lval> BOOLEAN_LITERAL %token <tsym> TYPENAME %type <sval> Name SimpleName QualifiedName ForcedName @@ -174,7 +175,7 @@ parse_number PARAMS ((char *, int, int, YYSTYPE *)); %token <opcode> ASSIGN_MODIFY -%token THIS SUPER TRUE FALSE NEW +%token THIS SUPER NEW %left ',' %right '=' ASSIGN_MODIFY @@ -208,13 +209,6 @@ StringLiteral: } ; -BooleanLiteral: - FALSE - { $$ = 0; } -| TRUE - { $$ = 1; } -; - Literal : INTEGER_LITERAL { write_exp_elt_opcode (OP_LONG); @@ -234,7 +228,7 @@ Literal : write_exp_elt_type ($1.type); write_exp_elt_dblcst ($1.dval); write_exp_elt_opcode (OP_DOUBLE); } -| BooleanLiteral +| BOOLEAN_LITERAL { write_exp_elt_opcode (OP_LONG); write_exp_elt_type (java_boolean_type); write_exp_elt_longcst ((LONGEST)$1); @@ -1079,7 +1073,10 @@ yylex () if (STREQN (tokstart, "short", 5)) return SHORT; if (STREQN (tokstart, "false", 5)) - return FALSE; + { + yylval.lval = 0; + return BOOLEAN_LITERAL; + } if (STREQN (tokstart, "super", 5)) return SUPER; if (STREQN (tokstart, "float", 5)) @@ -1093,7 +1090,10 @@ yylex () if (STREQN (tokstart, "char", 4)) return CHAR; if (STREQN (tokstart, "true", 4)) - return TRUE; + { + yylval.lval = 1; + return BOOLEAN_LITERAL; + } if (current_language->la_language == language_cplus && STREQN (tokstart, "this", 4)) { |