added isvariable procedure
[unix-history] / usr / src / usr.bin / pascal / pdx / sym.h
CommitLineData
94a490d6
ML
1/* Copyright (c) 1982 Regents of the University of California */
2
6d3dd70b 3/* static char sccsid[] = "@(#)sym.h 1.3 %G%"; */
94a490d6
ML
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 */
6d3dd70b 34BOOLEAN isvariable(); /* test if a symbol is a variable */
94a490d6
ML
35BOOLEAN isambiguous(); /* test if a symbol name is not unique */
36BOOLEAN compatible(); /* test to see if two types are compatible */
37BOOLEAN should_print(); /* test if a symbol should be printed */
38
39SYM *readsym(); /* read in a symbol from object file */
40SYM *which(); /* find the appropriate symbol of given name */
41SYM *findsym(); /* find a symbol for a given block */
42SYM *findclass(); /* find symbol with given class */
43NODE *dot(); /* construct a tree for the dot operator */
44NODE *subscript(); /* construct a tree for subscripting */
45SYM *treetype(); /* return the type of a tree, checking also */
46evalindex(); /* evaluate a subscript index */
47unmkstring(); /* free a constant string type */
48chkboolean(); /* check if a tree is boolean-valued */
49printdecl(); /* print out a symbol's declaration */
50printparams(); /* print out values of a fn's parameters */
51printentry(); /* note entrance of a block */
52printexit(); /* note exiting from a block */
53printcall(); /* note call of a function */
54printval(); /* print an eval result */
55printv(); /* print the name and value of a variable */
56printwhich(); /* print the full "path" of an identifier */
57maketypes(); /* initialize basic types */
58make_keyword(); /* create a keyword in a given symbol table */