* Rename remote-es1800.c to remote-es.c
[deliverable/binutils-gdb.git] / gdb / ch-exp.y
index 2ce7286c8cdc931b5dda72146da526b3ac8e22b9..b35fe87e3aa02a4edd24c46caba633f4811d2e77 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.
 
@@ -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);
@@ -891,11 +889,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 +982,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; }
@@ -1742,8 +1739,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 +1883,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 (lexptr, "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);
This page took 0.024514 seconds and 4 git commands to generate.