Oops! Retract last change. Didn't mean to pollute things with energize just
[deliverable/binutils-gdb.git] / gdb / m2-exp.y
index 850019e15c01974a29e00b5877ce3e763d3244d5..73e08553066bfeb306077c3bf7456e4ae05545b9 100644 (file)
@@ -103,7 +103,6 @@ int number_sign = 1;
 struct block *modblock=0;
 
 /* #define     YYDEBUG 1 */
-
 %}
 
 /* Although the yacc "value" of an expression is not used,
@@ -134,7 +133,7 @@ struct block *modblock=0;
 %type <sym> fblock 
 
 %token <lval> INT HEX ERROR
-%token <ulval> UINT TRUE FALSE CHAR
+%token <ulval> UINT M2_TRUE M2_FALSE CHAR
 %token <dval> FLOAT
 
 /* Both NAME and TYPENAME tokens represent symbols in the input,
@@ -177,7 +176,6 @@ struct block *modblock=0;
 /* This is not an actual token ; it is used for precedence. 
 %right QID
 */
-%%
 
 %{
 /* Ensure that if the generated parser contains any calls to malloc/realloc,
@@ -191,6 +189,8 @@ struct block *modblock=0;
 #define realloc        xrealloc
 %}
 
+%%
+
 start   :      exp
        |       type_exp
        ;
@@ -465,13 +465,13 @@ exp       :       exp ASSIGN exp
 
 /* Constants */
 
-exp    :       TRUE
+exp    :       M2_TRUE
                        { write_exp_elt_opcode (OP_BOOL);
                          write_exp_elt_longcst ((LONGEST) $1);
                          write_exp_elt_opcode (OP_BOOL); }
        ;
 
-exp    :       FALSE
+exp    :       M2_FALSE
                        { write_exp_elt_opcode (OP_BOOL);
                          write_exp_elt_longcst ((LONGEST) $1);
                          write_exp_elt_opcode (OP_BOOL); }
@@ -984,7 +984,7 @@ yylex ()
          {
            char *err_copy = (char *) alloca (p - tokstart + 1);
 
-           bcopy (tokstart, err_copy, p - tokstart);
+           memcpy (err_copy, tokstart, p - tokstart);
            err_copy[p - tokstart] = 0;
            error ("Invalid number \"%s\".", err_copy);
          }
@@ -1140,12 +1140,12 @@ yylex ()
        if(!strncmp(tokstart,"TRUE",4))
        {
          yylval.ulval = 1;
-         return TRUE;
+         return M2_TRUE;
        }
        else if(!strncmp(tokstart,"FALSE",5))
        {
          yylval.ulval = 0;
-         return FALSE;
+         return M2_FALSE;
        }
     }
 
This page took 0.024857 seconds and 4 git commands to generate.