blob: 5c122e15d19782d01e03d835ce836fce6d0df9d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
$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");
|