Remove building with NOCRYPTO option
[minix3.git] / external / bsd / byacc / dist / test / inherit0.y
blob538cd09b14a06f199f89e5a8a10a201cc29b0a82
1 /* $NetBSD: inherit0.y,v 1.1.1.1 2015/01/03 22:58:23 christos Exp $ */
3 %{
4 extern void mksymbol(int t, int c, int id);
6 #ifdef YYBISON
7 #define YYLEX_DECL() yylex(void)
8 #define YYERROR_DECL() yyerror(const char *s)
9 extern int YYLEX_DECL();
10 extern void YYERROR_DECL();
11 #endif
14 %token GLOBAL LOCAL
15 %token REAL INTEGER
16 %token NAME
18 %start declaration
21 declaration: class type namelist
22 { $$ = $3; }
23 | type locnamelist
24 { $$ = $2; }
27 class : GLOBAL { $$ = 1; }
28 | LOCAL { $$ = 2; }
31 type : REAL { $$ = 1; }
32 | INTEGER { $$ = 2; }
35 namelist: namelist NAME
36 { mksymbol($0, $-1, $2); }
37 | NAME
38 { mksymbol($0, $-1, $1); }
41 locnamelist:
42 { $$ = 2; } /* set up semantic stack for <class>: LOCAL */
43 { $$ = $-1; } /* copy <type> to where <namelist> expects it */
44 namelist
45 { $$ = $3; }
49 extern int YYLEX_DECL();
50 extern void YYERROR_DECL();