$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 #include -#include +#include #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");