* config/m68k/monitor.mt (TDEPFILE): Add remote-es.o.
[deliverable/binutils-gdb.git] / gdb / ch-exp.y
index 76eb91382f47ec506a6e2120c34dce3abc79b3a6..ebef81326e3b877a39551351a2ddd60b8599acb0 100644 (file)
@@ -60,6 +60,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "value.h"
 #include "parser-defs.h"
 #include "ch-lang.h"
+#include "bfd.h" /* Required by objfiles.h.  */
+#include "symfile.h" /* Required by objfiles.h.  */
+#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
 
 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
    as well as gratuitiously global symbol names, so we can have multiple
@@ -74,16 +77,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define        yyerror chill_error
 #define        yylval  chill_lval
 #define        yychar  chill_char
-#define        yycheck chill_yycheck
 #define        yydebug chill_debug
-#define        yydefred chill_yydefred
-#define        yydgoto chill_yydgoto
-#define        yygindex chill_yygindex
-#define        yylen   chill_yylen
-#define        yylhs   chill_yylhs
-#define        yyrindex chill_yyrindex
-#define        yysccsid chill_yysccsid
-#define        yysindex chill_yysindex
 #define        yypact  chill_pact
 #define        yyr1    chill_r1
 #define        yyr2    chill_r2
@@ -97,15 +91,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define        yyps    chill_ps
 #define        yypv    chill_pv
 #define        yys     chill_s
-#define        yyss    chill_yyss
-#define        yyssp   chill_yyssp
 #define        yy_yys  chill_yys
 #define        yystate chill_state
-#define        yytable chill_yytable
 #define        yytmp   chill_tmp
 #define        yyv     chill_v
-#define        yyvs    chill_vs
-#define        yyvss   chill_vss
 #define        yy_yyv  chill_yyv
 #define        yyval   chill_val
 #define        yylloc  chill_lloc
@@ -360,6 +349,7 @@ location    :       access_name
 access_name    :       LOCATION_NAME
                        {
                          write_exp_elt_opcode (OP_VAR_VALUE);
+                         write_exp_elt_block (NULL);
                          write_exp_elt_sym ($1.sym);
                          write_exp_elt_opcode (OP_VAR_VALUE);
                        }
@@ -491,6 +481,7 @@ value_name  :       synonym_name
                |       GENERAL_PROCEDURE_NAME
                        {
                          write_exp_elt_opcode (OP_VAR_VALUE);
+                         write_exp_elt_block (NULL);
                          write_exp_elt_sym ($1.sym);
                          write_exp_elt_opcode (OP_VAR_VALUE);
                        }
@@ -783,7 +774,7 @@ operand_2   :       operand_3
                        }
                |       operand_2 IN operand_3
                        {
-                         $$ = 0;       /* FIXME */
+                         write_exp_elt_opcode (BINOP_IN);
                        }
                ;
 
@@ -1226,7 +1217,6 @@ match_float_literal ()
   char *tokptr = lexptr;
   char *buf;
   char *copy;
-  char ch;
   double dval;
   extern double strtod ();
   
@@ -1345,7 +1335,7 @@ match_float_literal ()
   return (0);
 }
 
-/* Recognize a string literal.  A string literal is a nonzero sequence
+/* Recognize a string literal.  A string literal is a sequence
    of characters enclosed in matching single or double quotes, except that
    a single character inside single quotes is a character literal, which
    we reject as a string literal.  To embed the terminator character inside
@@ -1373,7 +1363,6 @@ match_string_literal ()
       tempbuf[tempbufindex++] = *tokptr;
     }
   if (*tokptr == '\0'                                  /* no terminator */
-      || tempbufindex == 0                             /* no string */
       || (tempbufindex == 1 && *tokptr == '\''))       /* char literal */
     {
       return (0);
@@ -1667,7 +1656,7 @@ match_dollar_tokens ()
              && !isalnum (tokptr[namelength]))
            {
              yylval.lval = regno;
-             lexptr += namelength + 1;
+             lexptr += namelength;
              return (GDB_REGNAME);
            }
        }
@@ -1816,7 +1805,7 @@ yylex ()
       {
        case '\'':
        case '\"':
-         /* First try to match a string literal, which is any nonzero
+         /* First try to match a string literal, which is any
             sequence of characters enclosed in matching single or double
             quotes, except that a single character inside single quotes
             is a character literal, so we have to catch that case also. */
@@ -1941,8 +1930,11 @@ yylex ()
              case LOC_ARG:
              case LOC_REF_ARG:
              case LOC_REGPARM:
+             case LOC_REGPARM_ADDR:
              case LOC_LOCAL:
              case LOC_LOCAL_ARG:
+             case LOC_BASEREG:
+             case LOC_BASEREG_ARG:
                if (innermost_block == NULL
                    || contained_in (block_found, innermost_block))
                  {
@@ -1995,7 +1987,7 @@ void
 yyerror (msg)
      char *msg;        /* unused */
 {
-  printf ("Parsing:  %s\n", lexptr);
+  printf_unfiltered ("Parsing:  %s\n", lexptr);
   if (yychar < 256)
     {
       error ("Invalid syntax in expression near character '%c'.", yychar);
This page took 0.024736 seconds and 4 git commands to generate.