* breakpoint.c, breakpoint.h (breakpoint_init_inferior): New function
[deliverable/binutils-gdb.git] / gdb / ch-exp.y
index 9d961bd1fb18b13537bee986cf0d0a79fbafc030..b6370f3241f035ac0198163dc75a232092fb043f 100644 (file)
@@ -1,5 +1,5 @@
 /* YACC grammar for Chill expressions, for GDB.
-   Copyright (C) 1992 Free Software Foundation, Inc.
+   Copyright 1992, 1993 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -83,8 +83,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define        yypgo   chill_pgo
 #define        yyact   chill_act
 #define        yyexca  chill_exca
-#define yyerrflag chill_errflag
-#define yynerrs        chill_nerrs
+#define        yyerrflag chill_errflag
+#define        yynerrs chill_nerrs
 #define        yyps    chill_ps
 #define        yypv    chill_pv
 #define        yys     chill_s
@@ -95,8 +95,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define        yy_yyv  chill_yyv
 #define        yyval   chill_val
 #define        yylloc  chill_lloc
-#define yyreds chill_reds              /* With YYDEBUG defined */
-#define yytoks chill_toks              /* With YYDEBUG defined */
+#define        yyreds  chill_reds              /* With YYDEBUG defined */
+#define        yytoks  chill_toks              /* With YYDEBUG defined */
 
 #ifndef YYDEBUG
 #define        YYDEBUG 0               /* Default to no yydebug support */
@@ -162,7 +162,6 @@ yyerror PARAMS ((char *));
 %token <voidval> FIXME_20
 %token <voidval> FIXME_21
 %token <voidval> FIXME_22
-%token <voidval> FIXME_23
 %token <voidval> FIXME_24
 %token <voidval> FIXME_25
 %token <voidval> FIXME_26
@@ -228,8 +227,8 @@ yyerror PARAMS ((char *));
 %token <voidval>       SUCC
 %token <voidval>       ABS
 %token <voidval>       CARD
-%token <voidval>       MAX
-%token <voidval>       MIN
+%token <voidval>       MAX_TOKEN
+%token <voidval>       MIN_TOKEN
 %token <voidval>       SIZE
 %token <voidval>       UPPER
 %token <voidval>       LOWER
@@ -292,7 +291,6 @@ yyerror PARAMS ((char *));
 %type <voidval>                lower_element
 %type <voidval>                upper_element
 %type <voidval>                first_element
-%type <voidval>                structure_primitive_value
 %type <voidval>                mode_argument
 %type <voidval>                upper_lower_argument
 %type <voidval>                length_argument
@@ -311,7 +309,7 @@ yyerror PARAMS ((char *));
 
 /* Z.200, 5.3.1 */
 
-start  :       value
+start  :       value { }
        |       mode_name
                        { write_exp_elt_opcode(OP_TYPE);
                          write_exp_elt_type($1.type);
@@ -348,6 +346,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);
                        }
@@ -479,6 +478,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);
                        }
@@ -891,11 +891,11 @@ chill_value_built_in_routine_call :
                        {
                          $$ = 0;       /* FIXME */
                        }
-               |       MAX '(' expression ')'
+               |       MAX_TOKEN '(' expression ')'
                        {
                          $$ = 0;       /* FIXME */
                        }
-               |       MIN '(' expression ')'
+               |       MIN_TOKEN '(' expression ')'
                        {
                          $$ = 0;       /* FIXME */
                        }
@@ -984,7 +984,6 @@ slice_size          :       FIXME_19 { $$ = 0; }
 lower_element          :       FIXME_20 { $$ = 0; }
 upper_element          :       FIXME_21 { $$ = 0; }
 first_element          :       FIXME_22 { $$ = 0; }
-structure_primitive_value:     FIXME_23 { $$ = 0; }
 boolean_expression     :       FIXME_26 { $$ = 0; }
 case_selector_list     :       FIXME_27 { $$ = 0; }
 subexpression          :       FIXME_28 { $$ = 0; }
@@ -1215,7 +1214,6 @@ match_float_literal ()
   char *tokptr = lexptr;
   char *buf;
   char *copy;
-  char ch;
   double dval;
   extern double strtod ();
   
@@ -1742,8 +1740,8 @@ static const struct token idtokentab[] =
     { "orif", ORIF },
     { "num", NUM },
     { "abs", ABS },
-    { "max", MAX },
-    { "min", MIN },
+    { "max", MAX_TOKEN },
+    { "min", MIN_TOKEN },
     { "mod", MOD },
     { "rem", REM },
     { "not", NOT },
@@ -1886,29 +1884,29 @@ yylex ()
 
     simplename = match_simple_name_string ();
 
-    /* See if it is a reserved identifier. */
-    for (i = 0; i < sizeof (idtokentab) / sizeof (idtokentab[0]); i++)
-       {
-           if (STREQ (simplename, idtokentab[i].operator))
-               {
-                   return (idtokentab[i].token);
-               }
-       }
-
-    /* Look for other special tokens. */
-    if (STREQ (simplename, "true"))
-       {
-           yylval.ulval = 1;
-           return (BOOLEAN_LITERAL);
-       }
-    if (STREQ (simplename, "false"))
-       {
-           yylval.ulval = 0;
-           return (BOOLEAN_LITERAL);
-       }
-
     if (simplename != NULL)
       {
+       /* See if it is a reserved identifier. */
+       for (i = 0; i < sizeof (idtokentab) / sizeof (idtokentab[0]); i++)
+           {
+               if (STREQ (simplename, idtokentab[i].operator))
+                   {
+                       return (idtokentab[i].token);
+                   }
+           }
+
+       /* Look for other special tokens. */
+       if (STREQ (simplename, "true"))
+           {
+               yylval.ulval = 1;
+               return (BOOLEAN_LITERAL);
+           }
+       if (STREQ (simplename, "false"))
+           {
+               yylval.ulval = 0;
+               return (BOOLEAN_LITERAL);
+           }
+
        sym = lookup_symbol (simplename, expression_context_block,
                             VAR_NAMESPACE, (int *) NULL,
                             (struct symtab **) NULL);
@@ -1930,8 +1928,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))
                  {
This page took 0.025469 seconds and 4 git commands to generate.