home *** CD-ROM | disk | FTP | other *** search
/ ftptest.leeds.ac.uk / 2015.02.ftptest.leeds.ac.uk.tar / ftptest.leeds.ac.uk / bionet / CAE-GROUP / SCL-WIN3x / FED_PLUS.EXE / RESOLVE.H < prev    next >
C/C++ Source or Header  |  1994-07-21  |  3KB  |  90 lines

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