2016-11-18 22:39:22 +01:00

43 lines
1.1 KiB
Plaintext

$NetBSD: patch-ad,v 1.3 2015/12/29 23:34:49 dholland Exp $
Use standard headers.
Fix yacc syntax errors.
--- A+/joos.y.orig 1999-08-05 16:42:37.000000000 +0000
+++ A+/joos.y
@@ -14,7 +14,7 @@
#include <stdio.h>
#include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
#include "tree.h"
extern CLASSFILE *theclassfile;
@@ -347,7 +347,7 @@ forstatement : tFOR '(' statementexpress
makeSTATEMENTexp($7)
)
)
- )
+ );
}
;
@@ -361,7 +361,7 @@ forstatementnoshortif : tFOR '(' stateme
makeSTATEMENTexp($7)
)
)
- )
+ );
}
;
@@ -469,6 +469,7 @@ unaryexpressionnotminus :
{$$ = makeEXPnot($2);}
| castexpression
{$$ = $1;}
+;
castexpression : '(' expression ')' unaryexpressionnotminus
{if ($2->kind!=idK) yyerror("identifier expected");