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