home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adaptor.zip / adapt.zip / adaptor / src / definiti.c < prev    next >
Text File  |  1994-01-03  |  33KB  |  1,193 lines

  1. # include "Definiti.h"
  2. # define yyALLOC(ptr, size)    if ((ptr = (tDefinitions) Definitions_PoolFreePtr) >= (tDefinitions) Definitions_PoolMaxPtr) \
  3.   ptr = Definitions_Alloc (); \
  4.   Definitions_PoolFreePtr += size;
  5. # define yyFREE(ptr, size)    
  6. # ifdef __cplusplus
  7. extern "C" {
  8. # include <stdio.h>
  9. # include "yyDefini.w"
  10. # include "General.h"
  11. # include "Memory.h"
  12. # include "DynArray.h"
  13. # include "StringMe.h"
  14. # include "Idents.h"
  15. # include "Sets.h"
  16. }
  17. # else
  18. # include <stdio.h>
  19. # include "yyDefini.w"
  20. # include "General.h"
  21. # include "Memory.h"
  22. # include "DynArray.h"
  23. # include "StringMe.h"
  24. # include "Idents.h"
  25. # include "Sets.h"
  26. # endif
  27.  
  28. /* line 129 "definitions.cg" */
  29.  
  30. #include "Idents.h"
  31. #include "Tree.h"
  32.  
  33. #define TRACE_DEF 0    /* 0 : no output, 1 : traces calls */
  34.  
  35. tScopes ScopeList;
  36. tScopes EmptyScopeList;        /* used for comparison */
  37.  
  38. tEntries  UnitEntries;         /* tEntries form one Scope */
  39. tEntries  IntrinsicEntries;
  40. tEntries  ExternalEntries;
  41. tEntries  CommonEntries;
  42.  
  43. /**************************************************************************
  44. *                                                                         *
  45. *    Intrinsic Functions / Subroutines of FORTRAN                         *
  46. *                                                                         *
  47. **************************************************************************/
  48.  
  49. void MakeIntrProcEntry (Entries, Name, LocalEntries)
  50. tEntries *Entries, LocalEntries;
  51. char * Name;
  52. { tIdent Id;
  53.   tTree Decl;
  54.   tObject Object;
  55.  
  56.   Id = MakeIdent (Name, strlen (Name));
  57.   Decl = mINTRINSIC_DECL (Id, 0);
  58.   Object = mProcObject (Id, Decl, 0, LocalEntries);
  59.   *Entries = mENTRY_LIST (Object, *Entries);
  60. }
  61.  
  62. void MakeIntrFuncEntry (Entries, Name, LocalEntries)
  63. tEntries *Entries, LocalEntries;
  64. char * Name;
  65. { tIdent Id;
  66.   tTree Decl;
  67.   tObject Object;
  68.  
  69.   Id = MakeIdent (Name, strlen (Name));
  70.   Decl = mINTRINSIC_DECL (Id, 0);
  71.   Object = mFuncObject (Id, Decl, 0, LocalEntries);
  72.   *Entries = mENTRY_LIST (Object, *Entries);
  73. }
  74.  
  75. tEntries InitEntries ()
  76. { tObject Object;
  77.   tEntries Entries;
  78.   tEntries NoOne;
  79.   tTree   Decl;
  80.   char * Word;
  81.   tIdent Id;
  82.  
  83.   Entries = mENTRY_EMPTY();
  84.   NoOne   = mENTRY_EMPTY();
  85.  
  86.   MakeIntrFuncEntry (&Entries, "ABS", NoOne);       /* generic */
  87.   MakeIntrFuncEntry (&Entries, "IABS", NoOne);      /* I4 - I */
  88.   MakeIntrFuncEntry (&Entries, "DABS", NoOne);      /* r8 - r8 */
  89.   MakeIntrFuncEntry (&Entries, "CABS", NoOne);      /* c8 - c8 */
  90.   MakeIntrFuncEntry (&Entries, "CDABS", NoOne);     /* c16 - c16 */
  91.  
  92.   MakeIntrFuncEntry (&Entries, "AIMAG", NoOne);     /* imag(c8)-r4 */
  93.   MakeIntrFuncEntry (&Entries, "DIMAG", NoOne);     /* imag(c16)-r8 */
  94.  
  95.   MakeIntrFuncEntry (&Entries, "COS", NoOne);
  96.   MakeIntrFuncEntry (&Entries, "DCOS", NoOne);
  97.   MakeIntrFuncEntry (&Entries, "CCOS", NoOne);
  98.   MakeIntrFuncEntry (&Entries, "CDCOS", NoOne);
  99.   MakeIntrFuncEntry (&Entries, "ACOS", NoOne);
  100.   MakeIntrFuncEntry (&Entries, "DACOS", NoOne);
  101.  
  102.   MakeIntrFuncEntry (&Entries, "COSH", NoOne);
  103.   MakeIntrFuncEntry (&Entries, "DCOSH", NoOne);
  104.  
  105.   MakeIntrFuncEntry (&Entries, "CMPLX", NoOne);    /* one or two parameters */
  106.   MakeIntrFuncEntry (&Entries, "DCMPLX", NoOne);
  107.  
  108.   MakeIntrFuncEntry (&Entries, "CONJG", NoOne);
  109.  
  110.   MakeIntrFuncEntry (&Entries, "EXP", NoOne);
  111.   MakeIntrFuncEntry (&Entries, "DEXP", NoOne);
  112.  
  113.   MakeIntrFuncEntry (&Entries, "DBLE", NoOne);
  114.  
  115.   MakeIntrFuncEntry (&Entries, "FLOAT", NoOne);
  116.   MakeIntrFuncEntry (&Entries, "DFLOAT", NoOne);
  117.  
  118.   MakeIntrFuncEntry (&Entries, "IFIX", NoOne);
  119.  
  120.   MakeIntrFuncEntry (&Entries, "INT", NoOne);
  121.   MakeIntrFuncEntry (&Entries, "IDINT", NoOne);
  122.   MakeIntrFuncEntry (&Entries, "NINT", NoOne);
  123.  
  124.   MakeIntrFuncEntry (&Entries, "LOG", NoOne);
  125.   MakeIntrFuncEntry (&Entries, "ALOG", NoOne);
  126.   MakeIntrFuncEntry (&Entries, "CLOG", NoOne);
  127.   MakeIntrFuncEntry (&Entries, "DLOG", NoOne);
  128.   MakeIntrFuncEntry (&Entries, "CDLOG", NoOne);
  129.  
  130.   MakeIntrFuncEntry (&Entries, "LOG10", NoOne);
  131.   MakeIntrFuncEntry (&Entries, "ALOG10", NoOne);
  132.   MakeIntrFuncEntry (&Entries, "DLOG10", NoOne);
  133.  
  134.   MakeIntrFuncEntry (&Entries, "MAX", NoOne);
  135.   MakeIntrFuncEntry (&Entries, "MAX0", NoOne);
  136.   MakeIntrFuncEntry (&Entries, "AMAX1", NoOne); /* specific MAX for real*4 */
  137.   MakeIntrFuncEntry (&Entries, "DMAX1", NoOne); /* specific MAX for real*8 */
  138.  
  139.   MakeIntrFuncEntry (&Entries, "MIN", NoOne);
  140.   MakeIntrFuncEntry (&Entries, "MIN0", NoOne);
  141.   MakeIntrFuncEntry (&Entries, "AMIN1", NoOne); /* specific MIN for real*4 */
  142.   MakeIntrFuncEntry (&Entries, "DMIN1", NoOne); /* specific MIN for real*8 */
  143.  
  144.   MakeIntrFuncEntry (&Entries, "MOD", NoOne);
  145.   MakeIntrFuncEntry (&Entries, "DMOD", NoOne);
  146.   MakeIntrFuncEntry (&Entries, "AMOD", NoOne);
  147.   MakeIntrFuncEntry (&Entries, "ODD", NoOne);
  148.  
  149.   MakeIntrFuncEntry (&Entries, "REAL", NoOne);
  150.   MakeIntrFuncEntry (&Entries, "DREAL", NoOne);
  151.  
  152.   MakeIntrFuncEntry (&Entries, "ROUND", NoOne);
  153.  
  154.   MakeIntrFuncEntry (&Entries, "SIGN", NoOne);
  155.   MakeIntrFuncEntry (&Entries, "ISIGN", NoOne);
  156.   MakeIntrFuncEntry (&Entries, "DSIGN", NoOne);
  157.  
  158.   MakeIntrFuncEntry (&Entries, "SIN", NoOne);
  159.   MakeIntrFuncEntry (&Entries, "DSIN", NoOne);
  160.   MakeIntrFuncEntry (&Entries, "CSIN", NoOne);
  161.   MakeIntrFuncEntry (&Entries, "CDSIN", NoOne);
  162.   MakeIntrFuncEntry (&Entries, "ASIN", NoOne);
  163.   MakeIntrFuncEntry (&Entries, "DASIN", NoOne);
  164.  
  165.   MakeIntrFuncEntry (&Entries, "SINH", NoOne);
  166.   MakeIntrFuncEntry (&Entries, "DSINH", NoOne);
  167.  
  168.   MakeIntrFuncEntry (&Entries, "SQR", NoOne);
  169.   MakeIntrFuncEntry (&Entries, "SQRT", NoOne);
  170.   MakeIntrFuncEntry (&Entries, "DSQRT", NoOne);
  171.  
  172.   MakeIntrFuncEntry (&Entries, "TAN", NoOne);     /* tangent */
  173.   MakeIntrFuncEntry (&Entries, "DTAN", NoOne);    /* tangent, real*8 */
  174.   MakeIntrFuncEntry (&Entries, "ATAN", NoOne);    /* arc tangent */
  175.   MakeIntrFuncEntry (&Entries, "DATAN", NoOne);   /* arc tangent, real*8 */
  176.   MakeIntrFuncEntry (&Entries, "ATAN2", NoOne);    /* arc tangent */
  177.   MakeIntrFuncEntry (&Entries, "DATAN2", NoOne);   /* arc tangent, real*8 */
  178.  
  179.   /* char intrinsics */
  180.  
  181.   MakeIntrFuncEntry (&Entries, "ICHAR", NoOne);
  182.   MakeIntrFuncEntry (&Entries, "CHAR", NoOne);
  183.   MakeIntrFuncEntry (&Entries, "LEN", NoOne);
  184.  
  185.   MakeIntrFuncEntry (&Entries, "LGT", NoOne);
  186.   MakeIntrFuncEntry (&Entries, "LGE", NoOne);
  187.   MakeIntrFuncEntry (&Entries, "LLT", NoOne);
  188.   MakeIntrFuncEntry (&Entries, "LLE", NoOne);
  189.  
  190.   /* bit intrinsics */
  191.  
  192.   MakeIntrFuncEntry (&Entries, "IBSET", NoOne);
  193.   MakeIntrFuncEntry (&Entries, "IBCLR", NoOne);
  194.   MakeIntrFuncEntry (&Entries, "IAND", NoOne);
  195.   MakeIntrFuncEntry (&Entries, "IOR", NoOne);
  196.   MakeIntrFuncEntry (&Entries, "IEOR", NoOne);
  197.   MakeIntrFuncEntry (&Entries, "NOT", NoOne);
  198.   MakeIntrFuncEntry (&Entries, "ISHFT", NoOne);
  199.   MakeIntrFuncEntry (&Entries, "ISHFTC", NoOne);
  200.   MakeIntrFuncEntry (&Entries, "BTEST", NoOne);
  201.  
  202.   /* inquiry functions */
  203.  
  204.   MakeIntrFuncEntry (&Entries, "SIZE", NoOne);
  205.   MakeIntrFuncEntry (&Entries, "SHAPE", NoOne);
  206.   MakeIntrFuncEntry (&Entries, "UBOUND", NoOne);
  207.   MakeIntrFuncEntry (&Entries, "LBOUND", NoOne);
  208.  
  209.   /* array intrinsics */
  210.  
  211.   MakeIntrFuncEntry (&Entries, "PACK", NoOne);
  212.   MakeIntrFuncEntry (&Entries, "UNPACK", NoOne);
  213.   MakeIntrFuncEntry (&Entries, "ALL", NoOne);
  214.   MakeIntrFuncEntry (&Entries, "ANY", NoOne);
  215.   MakeIntrFuncEntry (&Entries, "COUNT", NoOne);
  216.   MakeIntrFuncEntry (&Entries, "MAXVAL", NoOne);
  217.   MakeIntrFuncEntry (&Entries, "MINVAL", NoOne);
  218.   MakeIntrFuncEntry (&Entries, "SPREAD", NoOne);
  219.   MakeIntrFuncEntry (&Entries, "CSHIFT", NoOne);
  220.   MakeIntrFuncEntry (&Entries, "SUM", NoOne);
  221.   MakeIntrFuncEntry (&Entries, "PRODUCT", NoOne);
  222.   MakeIntrFuncEntry (&Entries, "DOTPRODUCT", NoOne);
  223.   MakeIntrFuncEntry (&Entries, "MATMUL", NoOne);
  224.   MakeIntrFuncEntry (&Entries, "MERGE", NoOne);
  225.  
  226.   /* HPF intrinsic functions */
  227.  
  228.   MakeIntrFuncEntry (&Entries, "IALL", NoOne);
  229.   MakeIntrFuncEntry (&Entries, "IANY", NoOne);
  230.   MakeIntrFuncEntry (&Entries, "IPARITY", NoOne);
  231.   MakeIntrFuncEntry (&Entries, "PARITY", NoOne);
  232.  
  233.   /* some newer one */
  234.  
  235.   MakeIntrFuncEntry (&Entries, "TRANSPOSE", NoOne);
  236.   MakeIntrFuncEntry (&Entries, "EOSHIFT", NoOne);
  237.   MakeIntrFuncEntry (&Entries, "MINLOC", NoOne);
  238.   MakeIntrFuncEntry (&Entries, "MAXLOC", NoOne);
  239.   MakeIntrFuncEntry (&Entries, "DIAGONAL", NoOne);
  240.   MakeIntrFuncEntry (&Entries, "REPLICATE", NoOne);
  241.   MakeIntrFuncEntry (&Entries, "RESHAPE", NoOne);
  242.  
  243.   MakeIntrProcEntry (&Entries, "CMF_RANDOM", NoOne);
  244.   MakeIntrProcEntry (&Entries, "CMF_RANDOMIZE", NoOne);
  245.  
  246.   MakeIntrProcEntry (&Entries, "GLOBAL_GET", NoOne);
  247.   MakeIntrProcEntry (&Entries, "GLOBAL_SEND", NoOne);
  248.  
  249.   MakeIntrProcEntry (&Entries, "CM_TIMER_CLEAR", NoOne);
  250.   MakeIntrProcEntry (&Entries, "CM_TIMER_START", NoOne);
  251.   MakeIntrProcEntry (&Entries, "CM_TIMER_STOP", NoOne);
  252.   MakeIntrProcEntry (&Entries, "CM_TIMER_PRINT", NoOne);
  253.   MakeIntrProcEntry (&Entries, "WALLTIME", NoOne);
  254.  
  255.   return (Entries);
  256.   /* merge, diagonal,
  257.      replicate, reshape, lbound, ubound, rank,
  258.      shape, size, eoshift, transpose,
  259.      firstloc, lastloc, project,
  260.      nil,
  261.      input, output,
  262.   */
  263. }
  264.  
  265.     /*******************************************************
  266.     *                                                      *
  267.     *     Searching in a local Table                       *
  268.     *                                                      *
  269.     ********************************************************/
  270.  
  271. tObject GetDeclEntry (Ident,Decls)
  272.   register tIdent Ident;
  273.   register tEntries Decls;
  274.   {
  275.      char Word [256];
  276.      tObject Obj;
  277.      GetString (Ident, Word);
  278.      /* printf ("GetDeclEntry : Searching for %s\\n", Word); */
  279.      while (Decls->Kind != kENTRY_EMPTY)
  280.       { if (Decls->Kind != kENTRY_LIST)
  281.            printf ("Error : GetDeclEntry - Illegal Entry-List\\n");
  282.         Obj = Decls->ENTRY_LIST.Elem;
  283.         if (Obj->Object.ident == Ident)
  284.            { return Obj; }
  285.           else Decls = Decls->ENTRY_LIST.Next;
  286.       }
  287.      return NoObject;
  288.   }
  289.  
  290.     /*******************************************************
  291.     *                                                      *
  292.     *     Searching in a List of Tables                    *
  293.     *                                                      *
  294.     ********************************************************/
  295.  
  296. tObject GetDecl (Ident, Scopes)
  297.   register tIdent Ident;
  298.   tScopes Scopes;
  299.   { tObject Obj;
  300.     tEntries Scope;
  301.     char Word [256];
  302.  
  303.     GetString (Ident, Word);
  304.     Obj = NoObject;
  305.     /* printf ("GetDecl: Searching for %s\\n", Word); */
  306.     while (Scopes->Kind != kSCOPE_EMPTY)
  307.       { if (Scopes->Kind != kSCOPE_LIST)
  308.            printf ("Error : GetDecl - Illegal Scopes-List\\n");
  309.         Scope = Scopes->SCOPE_LIST.Table;
  310.         Obj = GetDeclEntry (Ident, Scope);
  311.         if (Obj != NoObject)
  312.            return Obj;
  313.          else Scopes = Scopes->SCOPE_LIST.Hidden;
  314.        }
  315.     return NoObject;
  316.   }
  317.  
  318.     /*******************************************************
  319.     *                                                      *
  320.     *  Searching an Entry: LOCAL and GLOBAL                *
  321.     *                                                      *
  322.     ********************************************************/
  323.  
  324. void CheckOpenScope ()
  325. { if (ScopeList == EmptyScopeList)
  326.      { printf ("definitions: internal error, no open scope\n");
  327.        exit (-1);
  328.      }
  329. }  /* CheckOpenScope */
  330.  
  331. tObject GetLocalDecl (Ident)
  332. tIdent Ident;
  333. { CheckOpenScope ();
  334.   return GetDeclEntry (Ident, ScopeList->SCOPE_LIST.Table);
  335. } /* GetLocalDecl */
  336.  
  337. tObject GetGlobalDecl (Ident)
  338. tIdent Ident;
  339. { return GetDecl (Ident, ScopeList);
  340. } /* GetGlobalDecl */
  341.  
  342. tObject GetOtherDecl (Ident)
  343. tIdent Ident;
  344. {  tObject obj;
  345.    obj = GetDeclEntry (Ident, IntrinsicEntries); /* intrinsics first */
  346.    if (obj == NoObject)
  347.      obj = GetDeclEntry (Ident, UnitEntries);
  348.    if (obj == NoObject)
  349.      obj = GetDeclEntry (Ident, ExternalEntries);
  350.    return (obj);
  351. } /* GetOtherDecl */
  352.  
  353.     /*******************************************************
  354.     *                                                      *
  355.     *    Insert an Entry in the local unit Table           *
  356.     *                                                      *
  357.     ********************************************************/
  358.  
  359. void InsertUnitEntry (Obj)
  360.   tObject Obj;
  361.   {  UnitEntries = mENTRY_LIST (Obj, UnitEntries);
  362.   }
  363.  
  364. void InsertExternalEntry (Obj)
  365.   tObject Obj;
  366.   {  ExternalEntries = mENTRY_LIST (Obj, ExternalEntries);
  367.   }
  368.  
  369. void InsertCommonEntry (Obj)
  370.   tObject Obj;
  371.   {  CommonEntries = mENTRY_LIST (Obj, CommonEntries);
  372.   }
  373.  
  374. void InsertEntry (Obj)
  375.   tObject Obj;
  376.   {  CheckOpenScope ();
  377.      ScopeList->SCOPE_LIST.Table =
  378.           mENTRY_LIST (Obj, ScopeList->SCOPE_LIST.Table);
  379.   }
  380.  
  381.     /*******************************************************
  382.     *                                                      *
  383.     *    Replacing an entry in a Scope                     *
  384.     *                                                      *
  385.     ********************************************************/
  386.  
  387. void ChangeEntry (Name, Obj)
  388.   tIdent  Name;
  389.   tObject Obj;    /* replaces the old object */
  390.  
  391.   {  tEntries CurrentScope;
  392.      bool found;
  393.      tObject oldobj;
  394.  
  395.      CheckOpenScope ();
  396.      CurrentScope = ScopeList->SCOPE_LIST.Table;
  397.      found = false;
  398.      while (!found && (CurrentScope->Kind == kENTRY_LIST))
  399.        { oldobj = CurrentScope->ENTRY_LIST.Elem;
  400.          found = (oldobj->Object.ident == Name);
  401.          if (found)
  402.             CurrentScope->ENTRY_LIST.Elem = Obj;
  403.           else
  404.             CurrentScope = CurrentScope->ENTRY_LIST.Next;
  405.        }
  406.      if (!found)
  407.         { printf ("Internal Error for Change Entry: old object not found\n");
  408.           exit (-1);
  409.         }
  410.  
  411.   } /* ChangeEntry */
  412.  
  413.     /*******************************************************
  414.     *                                                      *
  415.     *   Functions/Routines for SCOPE Handling              *
  416.     *                                                      *
  417.     ********************************************************/
  418.  
  419. void NewScope ()  /* opening new empty scope */
  420. { ScopeList = mSCOPE_LIST (mENTRY_EMPTY (), ScopeList); }
  421.  
  422. void OpenScope (Entries)   /* open given scope */
  423. tEntries Entries;
  424. { if (  (Entries->Kind == kENTRY_LIST)
  425.      || (Entries->Kind == kENTRY_EMPTY))
  426.       ScopeList = mSCOPE_LIST (Entries, ScopeList);
  427.    else
  428.      printf ("Internal Error Definitios - OpenScope\n"); }
  429.  
  430. void CloseScope () /* close last scope */
  431. {  CheckOpenScope ();
  432.    ScopeList = ScopeList->SCOPE_LIST.Hidden; }
  433.  
  434. tEntries GetCurrentScope () /* get the current Scope */
  435. {  CheckOpenScope ();
  436.    return (ScopeList->SCOPE_LIST.Table); }
  437.  
  438. tEntries GetExternalEntries () /* get Scope with Externals */
  439. { return (ExternalEntries); }
  440.  
  441. tEntries GetIntrinsicEntries () /* get Scope with Intrinsics */
  442. { return (IntrinsicEntries); }
  443.  
  444. tEntries GetUnitEntries () /* get Scope with Units */
  445. { return (UnitEntries); }
  446.  
  447. tEntries GetCommonEntries () /* get Scope with Commons */
  448. { return (CommonEntries); }
  449.  
  450.  
  451.  
  452. # define yyBlockSize 20480
  453.  
  454. typedef struct yysBlock {
  455.  char yyBlock [yyBlockSize];
  456.  struct yysBlock * yySuccessor;
  457. } yytBlock, * yytBlockPtr;
  458.  
  459. tDefinitions DefinitionsRoot;
  460. unsigned long Definitions_HeapUsed = 0;
  461.  
  462. static yytBlockPtr yyBlockList    = (yytBlockPtr) NoDefinitions;
  463. char * Definitions_PoolFreePtr    = (char *) NoDefinitions;
  464. char * Definitions_PoolMaxPtr    = (char *) NoDefinitions;
  465. static unsigned short yyMaxSize    = 0;
  466. unsigned short Definitions_NodeSize [29 + 1] = { 0,
  467.  sizeof (yScopes),
  468.  sizeof (ySCOPE_LIST),
  469.  sizeof (ySCOPE_EMPTY),
  470.  sizeof (yEntries),
  471.  sizeof (yENTRY_LIST),
  472.  sizeof (yENTRY_EMPTY),
  473.  sizeof (yObject),
  474.  sizeof (yVarObject),
  475.  sizeof (yTemplateObject),
  476.  sizeof (yProcessorsObject),
  477.  sizeof (yTypeObject),
  478.  sizeof (yProcObject),
  479.  sizeof (yFuncObject),
  480.  sizeof (yBlockObject),
  481.  sizeof (yModuleObject),
  482.  sizeof (yCommonObject),
  483.  sizeof (yNameListObject),
  484.  sizeof (yDistribution),
  485.  sizeof (yDefaultDistribution),
  486.  sizeof (yArrayUseDistribution),
  487.  sizeof (ySerialDistribution),
  488.  sizeof (yHostDistribution),
  489.  sizeof (yNodeDistribution),
  490.  sizeof (yAlignDistribution),
  491.  sizeof (yVarDescription),
  492.  sizeof (yVarDummy),
  493.  sizeof (yVarConstant),
  494.  sizeof (yVarLocal),
  495.  sizeof (yVarCommon),
  496. };
  497. char * Definitions_NodeName [29 + 1] = {
  498.  "NoDefinitions",
  499.  "Scopes",
  500.  "SCOPE_LIST",
  501.  "SCOPE_EMPTY",
  502.  "Entries",
  503.  "ENTRY_LIST",
  504.  "ENTRY_EMPTY",
  505.  "Object",
  506.  "VarObject",
  507.  "TemplateObject",
  508.  "ProcessorsObject",
  509.  "TypeObject",
  510.  "ProcObject",
  511.  "FuncObject",
  512.  "BlockObject",
  513.  "ModuleObject",
  514.  "CommonObject",
  515.  "NameListObject",
  516.  "Distribution",
  517.  "DefaultDistribution",
  518.  "ArrayUseDistribution",
  519.  "SerialDistribution",
  520.  "HostDistribution",
  521.  "NodeDistribution",
  522.  "AlignDistribution",
  523.  "VarDescription",
  524.  "VarDummy",
  525.  "VarConstant",
  526.  "VarLocal",
  527.  "VarCommon",
  528. };
  529. static Definitions_tKind yyTypeRange [29 + 1] = { 0,
  530.  kSCOPE_EMPTY,
  531.  kSCOPE_LIST,
  532.  kSCOPE_EMPTY,
  533.  kENTRY_EMPTY,
  534.  kENTRY_LIST,
  535.  kENTRY_EMPTY,
  536.  kNameListObject,
  537.  kVarObject,
  538.  kTemplateObject,
  539.  kProcessorsObject,
  540.  kTypeObject,
  541.  kProcObject,
  542.  kFuncObject,
  543.  kBlockObject,
  544.  kModuleObject,
  545.  kCommonObject,
  546.  kNameListObject,
  547.  kAlignDistribution,
  548.  kDefaultDistribution,
  549.  kArrayUseDistribution,
  550.  kSerialDistribution,
  551.  kHostDistribution,
  552.  kNodeDistribution,
  553.  kAlignDistribution,
  554.  kVarCommon,
  555.  kVarDummy,
  556.  kVarConstant,
  557.  kVarLocal,
  558.  kVarCommon,
  559. };
  560.  
  561. tDefinitions Definitions_Alloc ()
  562. {
  563.  register yytBlockPtr yyBlockPtr = yyBlockList;
  564.  register int i;
  565.  
  566.  if (yyMaxSize == 0)
  567.   for (i = 1; i <= 29; i ++) {
  568.    Definitions_NodeSize [i] = (Definitions_NodeSize [i] + yyMaxAlign - 1) & yyAlignMasks [yyMaxAlign];
  569.    yyMaxSize = Max (Definitions_NodeSize [i], yyMaxSize);
  570.   }
  571.  yyBlockList = (yytBlockPtr) Alloc (sizeof (yytBlock));
  572.  yyBlockList->yySuccessor = yyBlockPtr;
  573.  Definitions_PoolFreePtr = yyBlockList->yyBlock;
  574.  Definitions_PoolMaxPtr = Definitions_PoolFreePtr + yyBlockSize - yyMaxSize + 1;
  575.  Definitions_HeapUsed += yyBlockSize;
  576.  return (tDefinitions) Definitions_PoolFreePtr;
  577. }
  578.  
  579. tDefinitions MakeDefinitions
  580. # if defined __STDC__ | defined __cplusplus
  581.  (Definitions_tKind yyKind)
  582. # else
  583.  (yyKind) Definitions_tKind yyKind;
  584. # endif
  585. {
  586.  register tDefinitions yyt;
  587.  yyALLOC (yyt, Definitions_NodeSize [yyKind])
  588.  yyt->Kind = yyKind;
  589.  yyt->yyHead.yyMark = 0;
  590.  return yyt;
  591. }
  592.  
  593. bool Definitions_IsType
  594. # if defined __STDC__ | defined __cplusplus
  595.  (register tDefinitions yyt, register Definitions_tKind yyKind)
  596. # else
  597.  (yyt, yyKind) register tDefinitions yyt; register Definitions_tKind yyKind;
  598. # endif
  599. {
  600.  return yyt != NoDefinitions && yyKind <= yyt->Kind && yyt->Kind <= yyTypeRange [yyKind];
  601. }
  602.  
  603.  
  604. tDefinitions mScopes
  605. # if defined __STDC__ | defined __cplusplus
  606. ()
  607. # else
  608. ()
  609. # endif
  610. {
  611.  register tDefinitions yyt;
  612.  yyALLOC (yyt, Definitions_NodeSize [kScopes])
  613.  yyt->Kind = kScopes;
  614.  yyt->yyHead.yyMark = 0;
  615.  return yyt;
  616. }
  617.  
  618. tDefinitions mSCOPE_LIST
  619. # if defined __STDC__ | defined __cplusplus
  620. (tDefinitions pTable, tDefinitions pHidden)
  621. # else
  622. (pTable, pHidden)
  623. tDefinitions pTable;
  624. tDefinitions pHidden;
  625. # endif
  626. {
  627.  register tDefinitions yyt;
  628.  yyALLOC (yyt, Definitions_NodeSize [kSCOPE_LIST])
  629.  yyt->Kind = kSCOPE_LIST;
  630.  yyt->yyHead.yyMark = 0;
  631.  yyt->SCOPE_LIST.Table = pTable;
  632.  yyt->SCOPE_LIST.Hidden = pHidden;
  633.  return yyt;
  634. }
  635.  
  636. tDefinitions mSCOPE_EMPTY
  637. # if defined __STDC__ | defined __cplusplus
  638. ()
  639. # else
  640. ()
  641. # endif
  642. {
  643.  register tDefinitions yyt;
  644.  yyALLOC (yyt, Definitions_NodeSize [kSCOPE_EMPTY])
  645.  yyt->Kind = kSCOPE_EMPTY;
  646.  yyt->yyHead.yyMark = 0;
  647.  return yyt;
  648. }
  649.  
  650. tDefinitions mEntries
  651. # if defined __STDC__ | defined __cplusplus
  652. ()
  653. # else
  654. ()
  655. # endif
  656. {
  657.  register tDefinitions yyt;
  658.  yyALLOC (yyt, Definitions_NodeSize [kEntries])
  659.  yyt->Kind = kEntries;
  660.  yyt->yyHead.yyMark = 0;
  661.  return yyt;
  662. }
  663.  
  664. tDefinitions mENTRY_LIST
  665. # if defined __STDC__ | defined __cplusplus
  666. (tDefinitions pElem, tDefinitions pNext)
  667. # else
  668. (pElem, pNext)
  669. tDefinitions pElem;
  670. tDefinitions pNext;
  671. # endif
  672. {
  673.  register tDefinitions yyt;
  674.  yyALLOC (yyt, Definitions_NodeSize [kENTRY_LIST])
  675.  yyt->Kind = kENTRY_LIST;
  676.  yyt->yyHead.yyMark = 0;
  677.  yyt->ENTRY_LIST.Elem = pElem;
  678.  yyt->ENTRY_LIST.Next = pNext;
  679.  return yyt;
  680. }
  681.  
  682. tDefinitions mENTRY_EMPTY
  683. # if defined __STDC__ | defined __cplusplus
  684. ()
  685. # else
  686. ()
  687. # endif
  688. {
  689.  register tDefinitions yyt;
  690.  yyALLOC (yyt, Definitions_NodeSize [kENTRY_EMPTY])
  691.  yyt->Kind = kENTRY_EMPTY;
  692.  yyt->yyHead.yyMark = 0;
  693.  return yyt;
  694. }
  695.  
  696. tDefinitions mObject
  697. # if defined __STDC__ | defined __cplusplus
  698. (tIdent pident, tTree pdecl)
  699. # else
  700. (pident, pdecl)
  701. tIdent pident;
  702. tTree pdecl;
  703. # endif
  704. {
  705.  register tDefinitions yyt;
  706.  yyALLOC (yyt, Definitions_NodeSize [kObject])
  707.  yyt->Kind = kObject;
  708.  yyt->yyHead.yyMark = 0;
  709.  yyt->Object.ident = pident;
  710.  yyt->Object.decl = pdecl;
  711.  return yyt;
  712. }
  713.  
  714. tDefinitions mVarObject
  715. # if defined __STDC__ | defined __cplusplus
  716. (tIdent pident, tTree pdecl, tDefinitions pKind, int puses, tDefinitions pDist)
  717. # else
  718. (pident, pdecl, pKind, puses, pDist)
  719. tIdent pident;
  720. tTree pdecl;
  721. tDefinitions pKind;
  722. int puses;
  723. tDefinitions pDist;
  724. # endif
  725. {
  726.  register tDefinitions yyt;
  727.  yyALLOC (yyt, Definitions_NodeSize [kVarObject])
  728.  yyt->Kind = kVarObject;
  729.  yyt->yyHead.yyMark = 0;
  730.  yyt->VarObject.ident = pident;
  731.  yyt->VarObject.decl = pdecl;
  732.  yyt->VarObject.Kind = pKind;
  733.  yyt->VarObject.uses = puses;
  734.  yyt->VarObject.Dist = pDist;
  735.  return yyt;
  736. }
  737.  
  738. tDefinitions mTemplateObject
  739. # if defined __STDC__ | defined __cplusplus
  740. (tIdent pident, tTree pdecl, tDefinitions pDist)
  741. # else
  742. (pident, pdecl, pDist)
  743. tIdent pident;
  744. tTree pdecl;
  745. tDefinitions pDist;
  746. # endif
  747. {
  748.  register tDefinitions yyt;
  749.  yyALLOC (yyt, Definitions_NodeSize [kTemplateObject])
  750.  yyt->Kind = kTemplateObject;
  751.  yyt->yyHead.yyMark = 0;
  752.  yyt->TemplateObject.ident = pident;
  753.  yyt->TemplateObject.decl = pdecl;
  754.  yyt->TemplateObject.Dist = pDist;
  755.  return yyt;
  756. }
  757.  
  758. tDefinitions mProcessorsObject
  759. # if defined __STDC__ | defined __cplusplus
  760. (tIdent pident, tTree pdecl)
  761. # else
  762. (pident, pdecl)
  763. tIdent pident;
  764. tTree pdecl;
  765. # endif
  766. {
  767.  register tDefinitions yyt;
  768.  yyALLOC (yyt, Definitions_NodeSize [kProcessorsObject])
  769.  yyt->Kind = kProcessorsObject;
  770.  yyt->yyHead.yyMark = 0;
  771.  yyt->ProcessorsObject.ident = pident;
  772.  yyt->ProcessorsObject.decl = pdecl;
  773.  return yyt;
  774. }
  775.  
  776. tDefinitions mTypeObject
  777. # if defined __STDC__ | defined __cplusplus
  778. (tIdent pident, tTree pdecl, tDefinitions pComponents)
  779. # else
  780. (pident, pdecl, pComponents)
  781. tIdent pident;
  782. tTree pdecl;
  783. tDefinitions pComponents;
  784. # endif
  785. {
  786.  register tDefinitions yyt;
  787.  yyALLOC (yyt, Definitions_NodeSize [kTypeObject])
  788.  yyt->Kind = kTypeObject;
  789.  yyt->yyHead.yyMark = 0;
  790.  yyt->TypeObject.ident = pident;
  791.  yyt->TypeObject.decl = pdecl;
  792.  yyt->TypeObject.Components = pComponents;
  793.  return yyt;
  794. }
  795.  
  796. tDefinitions mProcObject
  797. # if defined __STDC__ | defined __cplusplus
  798. (tIdent pident, tTree pdecl, int pcalls, tDefinitions pDeclarations)
  799. # else
  800. (pident, pdecl, pcalls, pDeclarations)
  801. tIdent pident;
  802. tTree pdecl;
  803. int pcalls;
  804. tDefinitions pDeclarations;
  805. # endif
  806. {
  807.  register tDefinitions yyt;
  808.  yyALLOC (yyt, Definitions_NodeSize [kProcObject])
  809.  yyt->Kind = kProcObject;
  810.  yyt->yyHead.yyMark = 0;
  811.  yyt->ProcObject.ident = pident;
  812.  yyt->ProcObject.decl = pdecl;
  813.  yyt->ProcObject.calls = pcalls;
  814.  yyt->ProcObject.Declarations = pDeclarations;
  815.  return yyt;
  816. }
  817.  
  818. tDefinitions mFuncObject
  819. # if defined __STDC__ | defined __cplusplus
  820. (tIdent pident, tTree pdecl, int pcalls, tDefinitions pDeclarations)
  821. # else
  822. (pident, pdecl, pcalls, pDeclarations)
  823. tIdent pident;
  824. tTree pdecl;
  825. int pcalls;
  826. tDefinitions pDeclarations;
  827. # endif
  828. {
  829.  register tDefinitions yyt;
  830.  yyALLOC (yyt, Definitions_NodeSize [kFuncObject])
  831.  yyt->Kind = kFuncObject;
  832.  yyt->yyHead.yyMark = 0;
  833.  yyt->FuncObject.ident = pident;
  834.  yyt->FuncObject.decl = pdecl;
  835.  yyt->FuncObject.calls = pcalls;
  836.  yyt->FuncObject.Declarations = pDeclarations;
  837.  return yyt;
  838. }
  839.  
  840. tDefinitions mBlockObject
  841. # if defined __STDC__ | defined __cplusplus
  842. (tIdent pident, tTree pdecl, tDefinitions pDeclarations)
  843. # else
  844. (pident, pdecl, pDeclarations)
  845. tIdent pident;
  846. tTree pdecl;
  847. tDefinitions pDeclarations;
  848. # endif
  849. {
  850.  register tDefinitions yyt;
  851.  yyALLOC (yyt, Definitions_NodeSize [kBlockObject])
  852.  yyt->Kind = kBlockObject;
  853.  yyt->yyHead.yyMark = 0;
  854.  yyt->BlockObject.ident = pident;
  855.  yyt->BlockObject.decl = pdecl;
  856.  yyt->BlockObject.Declarations = pDeclarations;
  857.  return yyt;
  858. }
  859.  
  860. tDefinitions mModuleObject
  861. # if defined __STDC__ | defined __cplusplus
  862. (tIdent pident, tTree pdecl, int puses, tDefinitions pDeclarations)
  863. # else
  864. (pident, pdecl, puses, pDeclarations)
  865. tIdent pident;
  866. tTree pdecl;
  867. int puses;
  868. tDefinitions pDeclarations;
  869. # endif
  870. {
  871.  register tDefinitions yyt;
  872.  yyALLOC (yyt, Definitions_NodeSize [kModuleObject])
  873.  yyt->Kind = kModuleObject;
  874.  yyt->yyHead.yyMark = 0;
  875.  yyt->ModuleObject.ident = pident;
  876.  yyt->ModuleObject.decl = pdecl;
  877.  yyt->ModuleObject.uses = puses;
  878.  yyt->ModuleObject.Declarations = pDeclarations;
  879.  return yyt;
  880. }
  881.  
  882. tDefinitions mCommonObject
  883. # if defined __STDC__ | defined __cplusplus
  884. (tIdent pident, tTree pdecl, int psize, int pmain, int pdistributed_vars, int psequence)
  885. # else
  886. (pident, pdecl, psize, pmain, pdistributed_vars, psequence)
  887. tIdent pident;
  888. tTree pdecl;
  889. int psize;
  890. int pmain;
  891. int pdistributed_vars;
  892. int psequence;
  893. # endif
  894. {
  895.  register tDefinitions yyt;
  896.  yyALLOC (yyt, Definitions_NodeSize [kCommonObject])
  897.  yyt->Kind = kCommonObject;
  898.  yyt->yyHead.yyMark = 0;
  899.  yyt->CommonObject.ident = pident;
  900.  yyt->CommonObject.decl = pdecl;
  901.  yyt->CommonObject.size = psize;
  902.  yyt->CommonObject.main = pmain;
  903.  yyt->CommonObject.distributed_vars = pdistributed_vars;
  904.  yyt->CommonObject.sequence = psequence;
  905.  return yyt;
  906. }
  907.  
  908. tDefinitions mNameListObject
  909. # if defined __STDC__ | defined __cplusplus
  910. (tIdent pident, tTree pdecl)
  911. # else
  912. (pident, pdecl)
  913. tIdent pident;
  914. tTree pdecl;
  915. # endif
  916. {
  917.  register tDefinitions yyt;
  918.  yyALLOC (yyt, Definitions_NodeSize [kNameListObject])
  919.  yyt->Kind = kNameListObject;
  920.  yyt->yyHead.yyMark = 0;
  921.  yyt->NameListObject.ident = pident;
  922.  yyt->NameListObject.decl = pdecl;
  923.  return yyt;
  924. }
  925.  
  926. tDefinitions mDistribution
  927. # if defined __STDC__ | defined __cplusplus
  928. (int psize, int phelpvars)
  929. # else
  930. (psize, phelpvars)
  931. int psize;
  932. int phelpvars;
  933. # endif
  934. {
  935.  register tDefinitions yyt;
  936.  yyALLOC (yyt, Definitions_NodeSize [kDistribution])
  937.  yyt->Kind = kDistribution;
  938.  yyt->yyHead.yyMark = 0;
  939.  yyt->Distribution.size = psize;
  940.  yyt->Distribution.helpvars = phelpvars;
  941.  return yyt;
  942. }
  943.  
  944. tDefinitions mDefaultDistribution
  945. # if defined __STDC__ | defined __cplusplus
  946. (int psize, int phelpvars)
  947. # else
  948. (psize, phelpvars)
  949. int psize;
  950. int phelpvars;
  951. # endif
  952. {
  953.  register tDefinitions yyt;
  954.  yyALLOC (yyt, Definitions_NodeSize [kDefaultDistribution])
  955.  yyt->Kind = kDefaultDistribution;
  956.  yyt->yyHead.yyMark = 0;
  957.  yyt->DefaultDistribution.size = psize;
  958.  yyt->DefaultDistribution.helpvars = phelpvars;
  959.  return yyt;
  960. }
  961.  
  962. tDefinitions mArrayUseDistribution
  963. # if defined __STDC__ | defined __cplusplus
  964. (int psize, int phelpvars)
  965. # else
  966. (psize, phelpvars)
  967. int psize;
  968. int phelpvars;
  969. # endif
  970. {
  971.  register tDefinitions yyt;
  972.  yyALLOC (yyt, Definitions_NodeSize [kArrayUseDistribution])
  973.  yyt->Kind = kArrayUseDistribution;
  974.  yyt->yyHead.yyMark = 0;
  975.  yyt->ArrayUseDistribution.size = psize;
  976.  yyt->ArrayUseDistribution.helpvars = phelpvars;
  977.  return yyt;
  978. }
  979.  
  980. tDefinitions mSerialDistribution
  981. # if defined __STDC__ | defined __cplusplus
  982. (int psize, int phelpvars)
  983. # else
  984. (psize, phelpvars)
  985. int psize;
  986. int phelpvars;
  987. # endif
  988. {
  989.  register tDefinitions yyt;
  990.  yyALLOC (yyt, Definitions_NodeSize [kSerialDistribution])
  991.  yyt->Kind = kSerialDistribution;
  992.  yyt->yyHead.yyMark = 0;
  993.  yyt->SerialDistribution.size = psize;
  994.  yyt->SerialDistribution.helpvars = phelpvars;
  995.  return yyt;
  996. }
  997.  
  998. tDefinitions mHostDistribution
  999. # if defined __STDC__ | defined __cplusplus
  1000. (int psize, int phelpvars, tIdent phostdist_id)
  1001. # else
  1002. (psize, phelpvars, phostdist_id)
  1003. int psize;
  1004. int phelpvars;
  1005. tIdent phostdist_id;
  1006. # endif
  1007. {
  1008.  register tDefinitions yyt;
  1009.  yyALLOC (yyt, Definitions_NodeSize [kHostDistribution])
  1010.  yyt->Kind = kHostDistribution;
  1011.  yyt->yyHead.yyMark = 0;
  1012.  yyt->HostDistribution.size = psize;
  1013.  yyt->HostDistribution.helpvars = phelpvars;
  1014.  yyt->HostDistribution.hostdist_id = phostdist_id;
  1015.  return yyt;
  1016. }
  1017.  
  1018. tDefinitions mNodeDistribution
  1019. # if defined __STDC__ | defined __cplusplus
  1020. (int psize, int phelpvars, tIdent pnodedist_id, DistributedDimensions pdims)
  1021. # else
  1022. (psize, phelpvars, pnodedist_id, pdims)
  1023. int psize;
  1024. int phelpvars;
  1025. tIdent pnodedist_id;
  1026. DistributedDimensions pdims;
  1027. # endif
  1028. {
  1029.  register tDefinitions yyt;
  1030.  yyALLOC (yyt, Definitions_NodeSize [kNodeDistribution])
  1031.  yyt->Kind = kNodeDistribution;
  1032.  yyt->yyHead.yyMark = 0;
  1033.  yyt->NodeDistribution.size = psize;
  1034.  yyt->NodeDistribution.helpvars = phelpvars;
  1035.  yyt->NodeDistribution.nodedist_id = pnodedist_id;
  1036.  yyt->NodeDistribution.dims = pdims;
  1037.  return yyt;
  1038. }
  1039.  
  1040. tDefinitions mAlignDistribution
  1041. # if defined __STDC__ | defined __cplusplus
  1042. (int psize, int phelpvars, tObject ptemplate, DistributedDimensions pdims)
  1043. # else
  1044. (psize, phelpvars, ptemplate, pdims)
  1045. int psize;
  1046. int phelpvars;
  1047. tObject ptemplate;
  1048. DistributedDimensions pdims;
  1049. # endif
  1050. {
  1051.  register tDefinitions yyt;
  1052.  yyALLOC (yyt, Definitions_NodeSize [kAlignDistribution])
  1053.  yyt->Kind = kAlignDistribution;
  1054.  yyt->yyHead.yyMark = 0;
  1055.  yyt->AlignDistribution.size = psize;
  1056.  yyt->AlignDistribution.helpvars = phelpvars;
  1057.  yyt->AlignDistribution.template = ptemplate;
  1058.  yyt->AlignDistribution.dims = pdims;
  1059.  return yyt;
  1060. }
  1061.  
  1062. tDefinitions mVarDescription
  1063. # if defined __STDC__ | defined __cplusplus
  1064. ()
  1065. # else
  1066. ()
  1067. # endif
  1068. {
  1069.  register tDefinitions yyt;
  1070.  yyALLOC (yyt, Definitions_NodeSize [kVarDescription])
  1071.  yyt->Kind = kVarDescription;
  1072.  yyt->yyHead.yyMark = 0;
  1073.  return yyt;
  1074. }
  1075.  
  1076. tDefinitions mVarDummy
  1077. # if defined __STDC__ | defined __cplusplus
  1078. (int pIntent, int pdynamic, bool poptional)
  1079. # else
  1080. (pIntent, pdynamic, poptional)
  1081. int pIntent;
  1082. int pdynamic;
  1083. bool poptional;
  1084. # endif
  1085. {
  1086.  register tDefinitions yyt;
  1087.  yyALLOC (yyt, Definitions_NodeSize [kVarDummy])
  1088.  yyt->Kind = kVarDummy;
  1089.  yyt->yyHead.yyMark = 0;
  1090.  yyt->VarDummy.Intent = pIntent;
  1091.  yyt->VarDummy.dynamic = pdynamic;
  1092.  yyt->VarDummy.optional = poptional;
  1093.  return yyt;
  1094. }
  1095.  
  1096. tDefinitions mVarConstant
  1097. # if defined __STDC__ | defined __cplusplus
  1098. (tTree pVal, tTree pType)
  1099. # else
  1100. (pVal, pType)
  1101. tTree pVal;
  1102. tTree pType;
  1103. # endif
  1104. {
  1105.  register tDefinitions yyt;
  1106.  yyALLOC (yyt, Definitions_NodeSize [kVarConstant])
  1107.  yyt->Kind = kVarConstant;
  1108.  yyt->yyHead.yyMark = 0;
  1109.  yyt->VarConstant.Val = pVal;
  1110.  yyt->VarConstant.Type = pType;
  1111.  return yyt;
  1112. }
  1113.  
  1114. tDefinitions mVarLocal
  1115. # if defined __STDC__ | defined __cplusplus
  1116. (int pIsSave, int pdynamic)
  1117. # else
  1118. (pIsSave, pdynamic)
  1119. int pIsSave;
  1120. int pdynamic;
  1121. # endif
  1122. {
  1123.  register tDefinitions yyt;
  1124.  yyALLOC (yyt, Definitions_NodeSize [kVarLocal])
  1125.  yyt->Kind = kVarLocal;
  1126.  yyt->yyHead.yyMark = 0;
  1127.  yyt->VarLocal.IsSave = pIsSave;
  1128.  yyt->VarLocal.dynamic = pdynamic;
  1129.  return yyt;
  1130. }
  1131.  
  1132. tDefinitions mVarCommon
  1133. # if defined __STDC__ | defined __cplusplus
  1134. (tIdent pBlock)
  1135. # else
  1136. (pBlock)
  1137. tIdent pBlock;
  1138. # endif
  1139. {
  1140.  register tDefinitions yyt;
  1141.  yyALLOC (yyt, Definitions_NodeSize [kVarCommon])
  1142.  yyt->Kind = kVarCommon;
  1143.  yyt->yyHead.yyMark = 0;
  1144.  yyt->VarCommon.Block = pBlock;
  1145.  return yyt;
  1146. }
  1147.  
  1148. typedef tDefinitions * yyPtrtTree;
  1149.  
  1150. static FILE * yyf;
  1151.  
  1152. # define yyNil    0374
  1153. # define yyNoLabel    0375
  1154. # define yyLabelDef    0376
  1155. # define yyLabelUse    0377
  1156.  
  1157. void BeginDefinitions ()
  1158. {
  1159. /* line 552 "definitions.cg" */
  1160.  
  1161.  
  1162. if (TRACE_DEF)
  1163.    printf ("Initialization Declaration Table \\n");
  1164.  
  1165. UnitEntries      = mENTRY_EMPTY();
  1166.  
  1167. # ifdef FORTRAN
  1168.   IntrinsicEntries = InitEntries ();
  1169. # endif
  1170.  
  1171. # ifdef C
  1172.   IntrinsicEntries = mENTRY_EMPTY();
  1173. # endif
  1174.  
  1175. ExternalEntries  = mENTRY_EMPTY();
  1176. CommonEntries    = mENTRY_EMPTY();
  1177.  
  1178. ScopeList = mSCOPE_EMPTY ();
  1179. EmptyScopeList = ScopeList;    /* used for comparisons */
  1180.  
  1181. }
  1182.  
  1183. void CloseDefinitions ()
  1184. {
  1185. /* line 574 "definitions.cg" */
  1186.  
  1187. if (ScopeList != EmptyScopeList)
  1188.    { printf ("Scopes not properly closed\n");
  1189.      exit (-1);
  1190.    }
  1191.  
  1192. }
  1193.