#include "value.h"
#include "parser-defs.h"
-/* In case the system defines these as macros, get rid of them; we use
- them as tokens. */
-#undef MAX
-#undef MIN
-
/* These MUST be included in any grammar file!!!!
Please choose unique names! */
#define yymaxdepth m2_maxdepth
%token <sval> NAME BLOCKNAME IDENT CONST VARNAME
%token <sval> TYPENAME
-%token SIZE CAP ORD HIGH ABS MIN MAX FLOAT_FUNC VAL CHR ODD TRUNC
+%token SIZE CAP ORD HIGH ABS MIN_FUNC MAX_FUNC FLOAT_FUNC VAL CHR ODD TRUNC
%token INC DEC INCL EXCL
/* The GDB scope operator */
{ write_exp_elt_opcode (UNOP_HIGH); }
;
-exp : MIN '(' type ')'
+exp : MIN_FUNC '(' type ')'
{ write_exp_elt_opcode (UNOP_MIN);
write_exp_elt_type ($3);
write_exp_elt_opcode (UNOP_MIN); }
;
-exp : MAX '(' type ')'
+exp : MAX_FUNC '(' type ')'
{ write_exp_elt_opcode (UNOP_MAX);
write_exp_elt_type ($3);
write_exp_elt_opcode (UNOP_MIN); }
{"NOT", NOT },
{"DIV", DIV },
{"INC", INC },
- {"MAX", MAX },
- {"MIN", MIN },
+ {"MAX", MAX_FUNC },
+ {"MIN", MIN_FUNC },
{"MOD", MOD },
{"ODD", ODD },
{"CAP", CAP },