1 |
/* |
2 |
* parpend.h |
3 |
* by Ben Allan |
4 |
* Jan 5, 1998 |
5 |
* Part of ASCEND |
6 |
* Version: $Revision: 1.2 $ |
7 |
* Version control file: $RCSfile: parpend.h,v $ |
8 |
* Date last modified: $Date: 1998/06/16 16:38:46 $ |
9 |
* Last modified by: $Author: mthomas $ |
10 |
* |
11 |
* This file is part of the Ascend Language Interpreter. |
12 |
* |
13 |
* Copyright (C) 1998 Carnegie Mellon University |
14 |
* |
15 |
* The Ascend Language Interpreter is free software; you can |
16 |
* redistribute it and/or modify it under the terms of the GNU |
17 |
* General Public License as published by the Free Software |
18 |
* Foundation; either version 2 of the License, or (at your option) |
19 |
* any later version. |
20 |
* |
21 |
* The Ascend Language Interpreter is distributed in hope that it |
22 |
* will be useful, but WITHOUT ANY WARRANTY; without even the implied |
23 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
24 |
* See the GNU General Public License for more details. |
25 |
* |
26 |
* You should have received a copy of the GNU General Public License |
27 |
* along with the program; if not, write to the Free Software |
28 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check |
29 |
* the file named COPYING. |
30 |
*/ |
31 |
|
32 |
/** @file |
33 |
* Pending parameter management? |
34 |
* <pre> |
35 |
* When #including parpend.h, make sure these files are #included first: |
36 |
* #include "utilities/ascConfig.h" |
37 |
* </pre> |
38 |
* |
39 |
* @todo This file should be resorbed into the parameter list processing |
40 |
* code that results when instantiate.c is split up. |
41 |
* In the meanwhile... |
42 |
*/ |
43 |
|
44 |
#ifndef ASC_PARPEND_H |
45 |
#define ASC_PARPEND_H |
46 |
|
47 |
/** addtogroup compiler Compiler |
48 |
@{ |
49 |
*/ |
50 |
|
51 |
enum ppstatus { |
52 |
pp_ERR =0, |
53 |
pp_ISA, /**< IS_A of simple to be done, from absorbed. */ |
54 |
pp_ISAARR, /**< IS_A of array to do, from absorbed and |
55 |
gets converted to asar during processing. */ |
56 |
pp_ARR, /**< array that's constructed but requires range checking */ |
57 |
pp_ASGN, /**< assignment to do in absorbed objects */ |
58 |
pp_ASSC, /**< scalar assignment to check in absorbed objects */ |
59 |
pp_ASAR, /**< Array to be checked for being completely assigned, |
60 |
but its subscript range is presumed right. */ |
61 |
pp_WV, /**< WITH_VALUE to be checked */ |
62 |
pp_DONE /**< finished statement */ |
63 |
}; |
64 |
|
65 |
struct parpendingentry { |
66 |
struct Set *arg; /**< parameter given in user's IS_A statement */ |
67 |
struct Statement *s; |
68 |
struct Instance *inst; |
69 |
struct parpendingentry *next; |
70 |
enum ppstatus status; |
71 |
int argn; /**< the psl position if >0, |
72 |
or -(the absorbed position) if <0. |
73 |
argn==0 is an error */ |
74 |
}; |
75 |
|
76 |
/** Allocate a parpending entry. */ |
77 |
extern struct parpendingentry *CreatePPE(void); |
78 |
|
79 |
/** Destroy a parpending entry. */ |
80 |
extern void DestroyPPE(struct parpendingentry *ppe); |
81 |
|
82 |
/** Starts memory recycle. Do not call twice before stopping recycle. */ |
83 |
extern void ppe_init_pool(void); |
84 |
|
85 |
/** Stops memory recycle. Do not call while ANY parpending are outstanding. */ |
86 |
extern void ppe_destroy_pool(void); |
87 |
|
88 |
/** Write the pool report to ASCERR for the ppe pool. */ |
89 |
extern void ppe_report_pool(void); |
90 |
|
91 |
/* @} */ |
92 |
|
93 |
#endif /* ASC_PARPEND_H */ |
94 |
|