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