new copyright; att/bsd/shared
[unix-history] / usr / src / usr.bin / pascal / pdx / sym.h
CommitLineData
505bf312
KB
1/*-
2 * Copyright (c) 1980 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
f9e58c14 6 *
505bf312 7 * @(#)sym.h 5.4 (Berkeley) %G%
f9e58c14 8 */
94a490d6
ML
9
10/*
11 * This header file declares the variables and routines that
12 * are defined within the "sym" subdirectory and that can be
13 * accessed from outside.
14 */
15
16SYM *program;
17
18/*
19 * attributes
20 */
21
22char *name(); /* symbol string name */
23char *classname(); /* class name of a symbol */
24int toknum(); /* token number of reserved word */
25int tokval(); /* associated token value */
26int size(); /* size in bytes of a type */
27SYM *rtype(); /* the reduced type, i.e. no type names */
28SYM *container(); /* symbol (block) that contains given symbol */
29ADDRESS codeloc(); /* address of the beginning of a function */
30
31/*
32 * predicates
33 */
34
35BOOLEAN isblock(); /* test if a symbol is a block name */
36BOOLEAN isbuiltin(); /* test if a symbol is a builtin type */
37BOOLEAN isparam(); /* test if a symbol is a parameter */
38BOOLEAN isvarparam(); /* test if a symbol is a var parameter */
6d3dd70b 39BOOLEAN isvariable(); /* test if a symbol is a variable */
94a490d6
ML
40BOOLEAN isambiguous(); /* test if a symbol name is not unique */
41BOOLEAN compatible(); /* test to see if two types are compatible */
42BOOLEAN should_print(); /* test if a symbol should be printed */
43
44SYM *readsym(); /* read in a symbol from object file */
45SYM *which(); /* find the appropriate symbol of given name */
46SYM *findsym(); /* find a symbol for a given block */
47SYM *findclass(); /* find symbol with given class */
48NODE *dot(); /* construct a tree for the dot operator */
49NODE *subscript(); /* construct a tree for subscripting */
50SYM *treetype(); /* return the type of a tree, checking also */
35bf0218 51long evalindex(); /* evaluate a subscript index */
7d4de299
KB
52int unmkstring(); /* free a constant string type */
53int chkboolean(); /* check if a tree is boolean-valued */
54int printdecl(); /* print out a symbol's declaration */
55int printparams(); /* print out values of a fn's parameters */
56int printentry(); /* note entrance of a block */
57int printexit(); /* note exiting from a block */
58int printcall(); /* note call of a function */
59int printval(); /* print an eval result */
60int printv(); /* print the name and value of a variable */
61int printwhich(); /* print the full "path" of an identifier */
62int maketypes(); /* initialize basic types */
63int make_keyword(); /* create a keyword in a given symbol table */