1 #ifndef RESOLVE_H
2 #define RESOLVE_H
3 
4 /*
5  * This software was developed by U.S. Government employees as part of
6  * their official duties and is not subject to copyright.
7  *
8  * $Log: resolve.h,v $
9  * Revision 1.6  1994/11/10 19:20:03  clark
10  * Update to IS
11  *
12  * Revision 1.5  1993/10/15  18:48:24  libes
13  * CADDETC certified
14  *
15  * Revision 1.3  1993/01/19  22:17:27  libes
16  * *** empty log message ***
17  *
18  * Revision 1.2  1992/09/16  18:23:08  libes
19  * fixed bug in TYPEresolve connecting reference types back to using types
20  *
21  * Revision 1.1  1992/08/18  17:12:41  libes
22  * Initial revision
23  *
24  * Revision 1.2  1992/06/08  18:06:24  libes
25  * prettied up interface to print_objects_when_running
26  *
27  * Revision 1.1  1992/05/28  03:54:00  libes
28  * Initial revision
29  */
30 
31 #include <sc_export.h>
32 #include "expbasic.h"   /* get basic definitions */
33 #include "type.h"
34 #include "variable.h"
35 #include "expr.h"
36 #include "entity.h"
37 #include "caseitem.h"
38 #include "stmt.h"
39 #include "alg.h"
40 #include "scope.h"
41 #include "schema.h"
42 #include "object.h"
43 
44 /********************/
45 /* global variables */
46 /********************/
47 
48 extern SC_EXPRESS_EXPORT int print_objects_while_running;
49 
50 extern SC_EXPRESS_EXPORT Error ERROR_undefined_attribute;
51 extern SC_EXPRESS_EXPORT Error ERROR_undefined_type;
52 extern SC_EXPRESS_EXPORT Error ERROR_undefined_schema;
53 extern SC_EXPRESS_EXPORT Error ERROR_unknown_attr_in_entity;
54 extern SC_EXPRESS_EXPORT Error ERROR_unknown_subtype;
55 extern SC_EXPRESS_EXPORT Error ERROR_unknown_supertype;
56 extern SC_EXPRESS_EXPORT Error ERROR_circular_reference;
57 extern SC_EXPRESS_EXPORT Error ERROR_ambiguous_attribute;
58 extern SC_EXPRESS_EXPORT Error ERROR_ambiguous_group;
59 
60 extern SC_EXPRESS_EXPORT Error WARNING_case_skip_label;
61 extern SC_EXPRESS_EXPORT Error WARNING_fn_skip_branch;
62 
63 /* macros */
64 
65 /* cheaper doing the check here, then inside the function call.  Return */
66 /* immediately for RESOLVED, FAILED_TO_RESOLVE, and RESOLVE_IN_PROGRESS */
67 #define TYPEresolve(t)        if (is_resolvable((*(t)))) TYPE_resolve((t))
68 #define VARresolve_types(v)       if (is_resolvable((v)->name)) VAR_resolve_types((v))
69 #define VARresolve_expressions(v,s) if (is_resolvable((v)->name)) VAR_resolve_expressions((v),(s))
70 #define EXPresolve(expr,scope,type) if (!is_resolved(expr)) EXP_resolve(expr,scope,type)
71 
72 /***********************/
73 /* function prototypes */
74 /***********************/
75 
76 extern SC_EXPRESS_EXPORT void RESOLVEinitialize PROTO( ( void ) );
77 extern SC_EXPRESS_EXPORT void RESOLVEcleanup PROTO( ( void ) );
78 extern SC_EXPRESS_EXPORT void SCOPEresolve_expressions_statements PROTO( ( Scope ) );
79 extern SC_EXPRESS_EXPORT void SCOPEresolve_subsupers PROTO( ( Scope ) );
80 extern SC_EXPRESS_EXPORT void SCOPEresolve_types PROTO( ( Scope ) );
81 extern SC_EXPRESS_EXPORT void TYPE_resolve PROTO( ( Type * ) );
82 extern SC_EXPRESS_EXPORT void EXP_resolve PROTO( ( Expression, Scope, Type ) );
83 extern SC_EXPRESS_EXPORT void ALGresolve PROTO( ( Scope ) );
84 extern SC_EXPRESS_EXPORT void SCHEMAresolve PROTO( ( Scope ) );
85 
86 #endif /*RESOLVE_H*/
87