%type <bval> block
%left COLONCOLON
-\f
-%%
-
%{
/* Ensure that if the generated parser contains any calls to malloc/realloc,
that they get mapped to xmalloc/xrealloc. We have to do this here
#define realloc xrealloc
%}
+\f
+%%
+
start : exp1
| type_exp
;
struct block *modblock=0;
/* #define YYDEBUG 1 */
-
-/* !@&%ing AIX defines these! Prevent cpp complaints by undeffing them */
-#undef TRUE
-#undef FALSE
%}
/* Although the yacc "value" of an expression is not used,
%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,
/* 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,
#define realloc xrealloc
%}
+%%
+
start : exp
| type_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); }
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;
}
}