xref: /original-bsd/usr.bin/pascal/pdx/sym/sym.rep (revision c3e32dec)
1/*-
2 * Copyright (c) 1982, 1993
3 *	The Regents of the University of California.  All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 *
7 *	@(#)sym.rep	8.1 (Berkeley) 06/06/93
8 */
9
10/*
11 * This file contains the definition of the representation of the SYM type.
12 */
13
14struct sym {
15	char *symbol;
16	char class;
17	char blkno;
18	SYM *type;
19	SYM *chain;
20	union {
21		int offset;		/* variable address */
22		long iconval;		/* integer constant value */
23		double fconval;		/* floating constant value */
24		struct {		/* range bounds */
25			long lower;
26			long upper;
27		} rangev;
28		struct {		/* address of function value, code */
29			int offset;
30			ADDRESS codeloc;
31		} funcv;
32		struct {		/* variant record info */
33			int size;
34			SYM *vtorec;
35			SYM *vtag;
36		} varnt;
37		struct {		/* information for reserved words */
38			int toknum;
39			int tokval;
40		} token;
41	} symvalue;
42	SYM *func;
43	SYM *next_sym;
44};
45