
This brings our tree to NetBSD 7.0, as found on -current on the 10-10-2015. This updates: - LLVM to 3.6.1 - GCC to GCC 5.1 - Replace minix/commands/zdump with usr.bin/zdump - external/bsd/libelf has moved to /external/bsd/elftoolchain/ - Import ctwm - Drop sprintf from libminc Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
51 lines
869 B
Plaintext
51 lines
869 B
Plaintext
/* $NetBSD: inherit0.y,v 1.1.1.1 2015/01/03 22:58:23 christos Exp $ */
|
|
|
|
%{
|
|
extern void mksymbol(int t, int c, int id);
|
|
|
|
#ifdef YYBISON
|
|
#define YYLEX_DECL() yylex(void)
|
|
#define YYERROR_DECL() yyerror(const char *s)
|
|
extern int YYLEX_DECL();
|
|
extern void YYERROR_DECL();
|
|
#endif
|
|
%}
|
|
|
|
%token GLOBAL LOCAL
|
|
%token REAL INTEGER
|
|
%token NAME
|
|
|
|
%start declaration
|
|
|
|
%%
|
|
declaration: class type namelist
|
|
{ $$ = $3; }
|
|
| type locnamelist
|
|
{ $$ = $2; }
|
|
;
|
|
|
|
class : GLOBAL { $$ = 1; }
|
|
| LOCAL { $$ = 2; }
|
|
;
|
|
|
|
type : REAL { $$ = 1; }
|
|
| INTEGER { $$ = 2; }
|
|
;
|
|
|
|
namelist: namelist NAME
|
|
{ mksymbol($0, $-1, $2); }
|
|
| NAME
|
|
{ mksymbol($0, $-1, $1); }
|
|
;
|
|
|
|
locnamelist:
|
|
{ $$ = 2; } /* set up semantic stack for <class>: LOCAL */
|
|
{ $$ = $-1; } /* copy <type> to where <namelist> expects it */
|
|
namelist
|
|
{ $$ = $3; }
|
|
;
|
|
%%
|
|
|
|
extern int YYLEX_DECL();
|
|
extern void YYERROR_DECL();
|