/[ascend]/trunk/base/generic/compiler/exprs.h
ViewVC logotype

Diff of /trunk/base/generic/compiler/exprs.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 202 by jds, Tue Aug 2 11:20:09 2005 UTC revision 203 by johnpye, Mon Jan 23 04:13:17 2006 UTC
# Line 9  Line 9 
9   *  This file is part of the Ascend Language Interpreter.   *  This file is part of the Ascend Language Interpreter.
10   *   *
11   *  Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly   *  Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly
12     *  Copyright (C) 2006 Carnegie Mellon University
13   *   *
14   *  The Ascend Language Interpreter is free software; you can redistribute   *  The Ascend Language Interpreter is free software; you can redistribute
15   *  it and/or modify it under the terms of the GNU General Public License as   *  it and/or modify it under the terms of the GNU General Public License as
# Line 38  Line 39 
39   *  </pre>   *  </pre>
40   */   */
41    
42  #ifndef __EXPRS_H_SEEN__  #ifndef ASC_EXPRS_H
43  #define __EXPRS_H_SEEN__  #define ASC_EXPRS_H
44    
45  extern struct Expr *CreateVarExpr(struct Name *n);  extern struct Expr *CreateVarExpr(struct Name *n);
46  /**<  /**<
  *  <!--  struct Expr *CreateVarExpr(n)                                -->  
  *  <!--  struct Name *n;                                              -->  
47   *  Create a name type expr node.   *  Create a name type expr node.
48   */   */
49    
50  extern void InitVarExpr(struct Expr *e, CONST struct Name *n);  extern void InitVarExpr(struct Expr *e, CONST struct Name *n);
51  /**<  /**<
  *  <!--  struct Expr *InitVarExpr(e,n)                                -->  
  *  <!--  struct Expr *e;                                              -->  
  *  <!--  CONST struct Name *n;                                        -->  
52   *  Given an empty expr node, initialize it to contain the name.   *  Given an empty expr node, initialize it to contain the name.
53   *  Generally this is only used to init a temporary expr node   *  Generally this is only used to init a temporary expr node
54   *  that you want to be able to destroy later (or forget later)   *  that you want to be able to destroy later (or forget later)
# Line 66  extern void InitVarExpr(struct Expr *e, Line 62  extern void InitVarExpr(struct Expr *e,
62    
63  extern struct Expr *CreateOpExpr(enum Expr_enum t);  extern struct Expr *CreateOpExpr(enum Expr_enum t);
64  /**<  /**<
  *  <!--  struct Expr *CreateOpExpr(t)                                 -->  
  *  <!--  enum Expr_enum t;                                            -->  
65   *  Create an operator node.   *  Create an operator node.
66   */   */
67    
# Line 75  extern struct Expr *CreateSatisfiedExpr( Line 69  extern struct Expr *CreateSatisfiedExpr(
69                                          double tol,                                          double tol,
70                                          CONST dim_type *dims);                                          CONST dim_type *dims);
71  /**<  /**<
  *  <!--  struct Expr *CreateSatisfiedExpr(n,tol,dims)                 -->  
  *  <!--  struct Name *n;                                              -->  
  *  <!--  double tol;                                                  -->  
  *  <!--  const dim_type *dims;                                        -->  
72   *  Create an satisfied operator node.   *  Create an satisfied operator node.
73   */   */
74    
75  extern struct Expr *CreateFuncExpr(CONST struct Func *f);  extern struct Expr *CreateFuncExpr(CONST struct Func *f);
76  /**<  /**<
  *  <!--  struct Expr *CreateFuncExpr(f)                               -->  
  *  <!--  const struct Func *f;                                        -->  
77   *  Create a function node.   *  Create a function node.
78   */   */
79    
80  extern struct Expr *CreateIntExpr(long i);  extern struct Expr *CreateIntExpr(long i);
81  /**<  /**<
  *  <!--  struct Expr *CreateIntExpr(i)                                -->  
  *  <!--  long i;                                                      -->  
82   *  Create an integer node.   *  Create an integer node.
83   */   */
84    
85  extern struct Expr *CreateRealExpr(double r, CONST dim_type *dims);  extern struct Expr *CreateRealExpr(double r, CONST dim_type *dims);
86  /**<  /**<
  *  <!--  struct Expr *CreateRealExpr(r,dims)                          -->  
  *  <!--  double r;                                                    -->  
  *  <!--  const dim_type *dims;                                        -->  
87   *  Create a real node with value r and dimensions "dims".   *  Create a real node with value r and dimensions "dims".
88   */   */
89    
90  extern struct Expr *CreateTrueExpr(void);  extern struct Expr *CreateTrueExpr(void);
91  /**<  /**<
  *  <!--  struct Expr *CreateTrueExpr();                               -->  
92   *  Create a boolean node with value TRUE.   *  Create a boolean node with value TRUE.
93   */   */
94    
95  extern struct Expr *CreateFalseExpr(void);  extern struct Expr *CreateFalseExpr(void);
96  /**<  /**<
  *  <!--  struct Expr *CreateFalseExpr();                              -->  
97   *  Create a boolean node with value FALSE.   *  Create a boolean node with value FALSE.
98   */   */
99    
100  extern struct Expr *CreateAnyExpr(void);  extern struct Expr *CreateAnyExpr(void);
101  /**<  /**<
  *  <!--  struct Expr *CreateAnyExpr();                                -->  
102   *  Create a boolean node with undefined value. b_value will be 2.   *  Create a boolean node with undefined value. b_value will be 2.
103   */   */
104    
105  extern struct Expr *CreateSetExpr(struct Set *set);  extern struct Expr *CreateSetExpr(struct Set *set);
106  /**<  /**<
  *  <!--  struct Expr *CreateSetExpr(set)                              -->  
  *  <!--  struct Set *set.                                             -->  
107   *  Create a set node.   *  Create a set node.
108   */   */
109    
110  extern struct Expr *CreateSymbolExpr(symchar *sym);  extern struct Expr *CreateSymbolExpr(symchar *sym);
111  /**<  /**<
  *  <!--  struct Expr *CreateSymbolExpr(sym)                           -->  
  *  <!--  const char *sym;                                             -->  
112   *  Create a symbol node.   *  Create a symbol node.
113   */   */
114    
115  extern struct Expr *CreateQStringExpr(CONST char *qstring);  extern struct Expr *CreateQStringExpr(CONST char *qstring);
116  /**<  /**<
  *  <!--  struct Expr *CreateQStringExpr(qstring)                      -->  
  *  <!--  const char *qstring;                                         -->  
117   *  Create a string node. The difference is that string may contain   *  Create a string node. The difference is that string may contain
118   *  anything and are quoted as "qstring is string", whereas symbols   *  anything and are quoted as "qstring is string", whereas symbols
119   *  are of the form 'symbol' and may have content restrictions.   *  are of the form 'symbol' and may have content restrictions.
# Line 147  extern struct Expr *CreateQStringExpr(CO Line 121  extern struct Expr *CreateQStringExpr(CO
121    
122  extern struct Expr *CreateBuiltin(enum Expr_enum t, struct Set *set);  extern struct Expr *CreateBuiltin(enum Expr_enum t, struct Set *set);
123  /**<  /**<
  *  <!--  struct Expr *CreateBuiltin(t,set)                            -->  
  *  <!--  enum Expr_enum t;                                            -->  
  *  <!--  struct Set *set;                                             -->  
124   *  Create a node for SUM, PROD, UNION, etc....   *  Create a node for SUM, PROD, UNION, etc....
125   */   */
126    
127  extern void LinkExprs(struct Expr *cur, struct Expr *next);  extern void LinkExprs(struct Expr *cur, struct Expr *next);
128  /**<  /**<
  *  <!--  void LinkExprs(cur,next)                                     -->  
  *  <!--  struct Expr *cur, *next;                                     -->  
129   *  Link cur to next.   *  Link cur to next.
130   */   */
131    
132  extern unsigned long ExprListLength(CONST struct Expr *e);  extern unsigned long ExprListLength(CONST struct Expr *e);
133  /**<  /**<
  *  <!--  unsigned long ExprListLength(e);                             -->  
  *  <!--  CONST struct Expr *e;                                        -->  
134   *  Traverse list to the end to find the length.   *  Traverse list to the end to find the length.
135   *  Sometimes one would like to know the length a priori.   *  Sometimes one would like to know the length a priori.
136   */   */
# Line 174  extern unsigned long ExprListLength(CONS Line 141  extern unsigned long ExprListLength(CONS
141  #define NextExpr(e) NextExprF(e)  #define NextExpr(e) NextExprF(e)
142  #endif  #endif
143  /**<  /**<
  *  <!--  macro NextExpr(e)                                            -->  
144   *  Return the expr node linked to e.   *  Return the expr node linked to e.
145   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
146   *  @return Returns the linked node as type <code>struct Expr*</code>.   *  @return Returns the linked node as type <code>struct Expr*</code>.
# Line 182  extern unsigned long ExprListLength(CONS Line 148  extern unsigned long ExprListLength(CONS
148   */   */
149  extern struct Expr *NextExprF(CONST struct Expr *e);  extern struct Expr *NextExprF(CONST struct Expr *e);
150  /**<  /**<
151   *  <!--  macro NextExpr(e)                                            -->   *  Return the expr node linked to e.
  *  <!--  struct Expr *NextExprF(e)                                    -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the expr node linked to e.                            -->  
152   *  Implementation function for NextExpr().  Do not use this function   *  Implementation function for NextExpr().  Do not use this function
153   *  directly - use NextExpr() instead.   *  directly - use NextExpr() instead.
154   */   */
# Line 196  extern struct Expr *NextExprF(CONST stru Line 159  extern struct Expr *NextExprF(CONST stru
159  #define ExprType(e) ExprTypeF(e)  #define ExprType(e) ExprTypeF(e)
160  #endif  #endif
161  /**<  /**<
  *  <!--  macro ExprType(e)                                            -->  
162   *  Return the type of e.   *  Return the type of e.
163   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
164   *  @return Returns the type as a <code>enum Expr_enum</code>.   *  @return Returns the type as a <code>enum Expr_enum</code>.
# Line 204  extern struct Expr *NextExprF(CONST stru Line 166  extern struct Expr *NextExprF(CONST stru
166   */   */
167  extern enum Expr_enum ExprTypeF(CONST struct Expr *e);  extern enum Expr_enum ExprTypeF(CONST struct Expr *e);
168  /**<  /**<
169   *  <!--  macro ExprType(e)                                            -->   *  Return the type of e.
  *  <!--  enum Expr_enum ExprTypeF(e)                                  -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the type of e.                                        -->  
170   *  Implementation function for ExprType().  Do not use this function   *  Implementation function for ExprType().  Do not use this function
171   *  directly - use ExprType() instead.   *  directly - use ExprType() instead.
172   */   */
# Line 218  extern enum Expr_enum ExprTypeF(CONST st Line 177  extern enum Expr_enum ExprTypeF(CONST st
177  #define ExprName(e) ExprNameF(e)  #define ExprName(e) ExprNameF(e)
178  #endif  #endif
179  /**<  /**<
  *  <!--  macro ExprName(e)                                            -->  
180   *  Return the name field of a var type expr node.   *  Return the name field of a var type expr node.
181   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
182   *  @return Returns the name as a <code>CONST struct Name*</code>.   *  @return Returns the name as a <code>CONST struct Name*</code>.
# Line 226  extern enum Expr_enum ExprTypeF(CONST st Line 184  extern enum Expr_enum ExprTypeF(CONST st
184   */   */
185  extern CONST struct Name *ExprNameF(CONST struct Expr *e);  extern CONST struct Name *ExprNameF(CONST struct Expr *e);
186  /**<  /**<
187   *  <!--  macro ExprName(e)                                            -->   *  Return the name field of a var type expr node.
  *  <!--  const struct Name *ExprNameF(e)                              -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the name field of a var type expr node.               -->  
188   *  Implementation function for ExprName().  Do not use this function   *  Implementation function for ExprName().  Do not use this function
189   *  directly - use ExprName() instead.   *  directly - use ExprName() instead.
190   */   */
# Line 240  extern CONST struct Name *ExprNameF(CONS Line 195  extern CONST struct Name *ExprNameF(CONS
195  #define ExprFunc(e) ExprFuncF(e)  #define ExprFunc(e) ExprFuncF(e)
196  #endif  #endif
197  /**<  /**<
  *  <!--  macro ExprFunc(e)                                            -->  
198   *  Return the func field of a function type expr node.   *  Return the func field of a function type expr node.
199   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
200   *  @return Returns the func as a <code>CONST struct Func*</code>.   *  @return Returns the func as a <code>CONST struct Func*</code>.
# Line 248  extern CONST struct Name *ExprNameF(CONS Line 202  extern CONST struct Name *ExprNameF(CONS
202   */   */
203  extern CONST struct Func *ExprFuncF(CONST struct Expr *e);  extern CONST struct Func *ExprFuncF(CONST struct Expr *e);
204  /**<  /**<
205   *  <!--  macro ExprFunc(e)                                            -->   *  Return the func field of a function type expr node.
  *  <!--  const struct Func *ExprFuncF(e)                              -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the func field of a function type expr node.          -->  
206   *  Implementation function for ExprFunc().  Do not use this function   *  Implementation function for ExprFunc().  Do not use this function
207   *  directly - use ExprFunc() instead.   *  directly - use ExprFunc() instead.
208   */   */
# Line 262  extern CONST struct Func *ExprFuncF(CONS Line 213  extern CONST struct Func *ExprFuncF(CONS
213  #define ExprIValue(e) ExprIValueF(e)  #define ExprIValue(e) ExprIValueF(e)
214  #endif  #endif
215  /**<  /**<
  *  <!--  macro ExprIValue(e)                                          -->  
216   *  Return the integer value of a integer type expr node.   *  Return the integer value of a integer type expr node.
217   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
218   *  @return Returns the value as a <code>long</code>.   *  @return Returns the value as a <code>long</code>.
# Line 270  extern CONST struct Func *ExprFuncF(CONS Line 220  extern CONST struct Func *ExprFuncF(CONS
220   */   */
221  extern long ExprIValueF(CONST struct Expr *e);  extern long ExprIValueF(CONST struct Expr *e);
222  /**<  /**<
223   *  <!--  macro ExprIValue(e)                                          -->   *  Return the integer value of a integer type expr node.
  *  <!--  long ExprIValueF(e)                                          -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the integer value of a integer type expr node.        -->  
224   *  Implementation function for ExprIValue().  Do not use this function   *  Implementation function for ExprIValue().  Do not use this function
225   *  directly - use ExprIValue() instead.   *  directly - use ExprIValue() instead.
226   */   */
# Line 284  extern long ExprIValueF(CONST struct Exp Line 231  extern long ExprIValueF(CONST struct Exp
231  #define ExprRValue(e) ExprRValueF(e)  #define ExprRValue(e) ExprRValueF(e)
232  #endif  #endif
233  /**<  /**<
  *  <!--  macro ExprRValue(e)                                          -->  
234   *  Return the real value of a real type expr node.   *  Return the real value of a real type expr node.
235   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
236   *  @return Returns the value as a <code>double</code>.   *  @return Returns the value as a <code>double</code>.
# Line 292  extern long ExprIValueF(CONST struct Exp Line 238  extern long ExprIValueF(CONST struct Exp
238   */   */
239  extern double ExprRValueF(CONST struct Expr *e);  extern double ExprRValueF(CONST struct Expr *e);
240  /**<  /**<
  *  macro ExprRValue(e)  
  *  double ExprRValueF(e)  
  *  const struct Expr *e;  
241   *  Return the real value of a real type expr node.   *  Return the real value of a real type expr node.
242   *  Implementation function for ExprRValue().  Do not use this function   *  Implementation function for ExprRValue().  Do not use this function
243   *  directly - use ExprRValue() instead.   *  directly - use ExprRValue() instead.
# Line 306  extern double ExprRValueF(CONST struct E Line 249  extern double ExprRValueF(CONST struct E
249  #define ExprRDimensions(e) ExprRDimensionsF(e)  #define ExprRDimensions(e) ExprRDimensionsF(e)
250  #endif  #endif
251  /**<  /**<
  *  <!--  macro ExprRDimensions(e)                                     -->  
252   *  Return the dimensions of a real type expr node.   *  Return the dimensions of a real type expr node.
253   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
254   *  @return Returns the value as a <code>CONST dim_type*</code>.   *  @return Returns the value as a <code>CONST dim_type*</code>.
# Line 314  extern double ExprRValueF(CONST struct E Line 256  extern double ExprRValueF(CONST struct E
256   */   */
257  extern CONST dim_type *ExprRDimensionsF(CONST struct Expr *e);  extern CONST dim_type *ExprRDimensionsF(CONST struct Expr *e);
258  /**<  /**<
259   *  <!--  macro ExprRDimensions(e)                                     -->   *  Return the dimensions of a real type expr node.
  *  <!--  const dim_type *ExprRDimensionsF(e)                          -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the dimensions of a real type expr node.              -->  
260   *  Implementation function for ExprRDimensions().  Do not use this function   *  Implementation function for ExprRDimensions().  Do not use this function
261   *  directly - use ExprRDimensions() instead.   *  directly - use ExprRDimensions() instead.
262   */   */
# Line 328  extern CONST dim_type *ExprRDimensionsF( Line 267  extern CONST dim_type *ExprRDimensionsF(
267  #define SatisfiedExprName(e) SatisfiedExprNameF(e)  #define SatisfiedExprName(e) SatisfiedExprNameF(e)
268  #endif  #endif
269  /**<  /**<
  *  <!--  macro SatisfiedExprName(e)                                   -->  
270   *  Return the name field of a var type satisfied expr node.   *  Return the name field of a var type satisfied expr node.
271   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
272   *  @return Returns the name as a <code>CONST struct Name*</code>.   *  @return Returns the name as a <code>CONST struct Name*</code>.
# Line 336  extern CONST dim_type *ExprRDimensionsF( Line 274  extern CONST dim_type *ExprRDimensionsF(
274   */   */
275  extern CONST struct Name *SatisfiedExprNameF(CONST struct Expr *e);  extern CONST struct Name *SatisfiedExprNameF(CONST struct Expr *e);
276  /**<  /**<
277   *  <!--  macro SatisfiedExprName(e)                                   -->   *  Return the name field of a var type satisfied expr node.
  *  <!--  const struct Name *SatisfiedExprNameF(e)                     -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the name field of a var type satisfied expr node.     -->  
278   *  Implementation function for SatisfiedExprName().  Do not use this function   *  Implementation function for SatisfiedExprName().  Do not use this function
279   *  directly - use SatisfiedExprName() instead.   *  directly - use SatisfiedExprName() instead.
280   */   */
# Line 350  extern CONST struct Name *SatisfiedExprN Line 285  extern CONST struct Name *SatisfiedExprN
285  #define SatisfiedExprRValue(e) SatisfiedExprRValueF(e)  #define SatisfiedExprRValue(e) SatisfiedExprRValueF(e)
286  #endif  #endif
287  /**<  /**<
  *  <!--  macro SatisfiedExprRValue(e)                                 -->  
288   *  Return the real value of a real type satisfied expr node.   *  Return the real value of a real type satisfied expr node.
289   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
290   *  @return Returns the value as a <code>double</code>.   *  @return Returns the value as a <code>double</code>.
# Line 358  extern CONST struct Name *SatisfiedExprN Line 292  extern CONST struct Name *SatisfiedExprN
292   */   */
293  extern double SatisfiedExprRValueF(CONST struct Expr *e);  extern double SatisfiedExprRValueF(CONST struct Expr *e);
294  /**<  /**<
295   *  <!--  macro SatisfiedExprRValue(e)                                 -->   *  Return the real value of a real type satisfied expr node.
  *  <!--  double SatisfiedExprRValueF(e)                               -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the real value of a real type satisfied expr node.    -->  
296   *  Implementation function for SatisfiedExprRValue().  Do not use this function   *  Implementation function for SatisfiedExprRValue().  Do not use this function
297   *  directly - use SatisfiedExprRValue() instead.   *  directly - use SatisfiedExprRValue() instead.
298   */   */
# Line 372  extern double SatisfiedExprRValueF(CONST Line 303  extern double SatisfiedExprRValueF(CONST
303  #define SatisfiedExprRDimensions(e) SatisfiedExprRDimensionsF(e)  #define SatisfiedExprRDimensions(e) SatisfiedExprRDimensionsF(e)
304  #endif  #endif
305  /**<  /**<
  *  <!--  macro SatisfiedExprRDimensions(e)                            -->  
306   *  Return the dimensions of a real type satisfied expr node.   *  Return the dimensions of a real type satisfied expr node.
307   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
308   *  @return Returns the dimension as a <code>CONST dim_type*</code>.   *  @return Returns the dimension as a <code>CONST dim_type*</code>.
# Line 380  extern double SatisfiedExprRValueF(CONST Line 310  extern double SatisfiedExprRValueF(CONST
310   */   */
311  extern CONST dim_type *SatisfiedExprRDimensionsF(CONST struct Expr *e);  extern CONST dim_type *SatisfiedExprRDimensionsF(CONST struct Expr *e);
312  /**<  /**<
313   *  <!--  macro SatisfiedExprRDimensions(e)                            -->   *  Return the dimensions of a real type satisfied expr node.
  *  <!--  const dim_type *SatisfiedExprRDimensionsF(e)                 -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the dimensions of a real type satisfied expr node.    -->  
314   *  Implementation function for SatisfiedExprRDimensions().  Do not use this function   *  Implementation function for SatisfiedExprRDimensions().  Do not use this function
315   *  directly - use SatisfiedExprRDimensions() instead.   *  directly - use SatisfiedExprRDimensions() instead.
316   */   */
# Line 394  extern CONST dim_type *SatisfiedExprRDim Line 321  extern CONST dim_type *SatisfiedExprRDim
321  #define ExprBValue(e) ExprBValueF(e)  #define ExprBValue(e) ExprBValueF(e)
322  #endif  #endif
323  /**<  /**<
  *  <!--  macro ExprBValue(e)                                          -->  
324   *  Return the boolean value of a boolean type satisfied expr node.   *  Return the boolean value of a boolean type satisfied expr node.
325   *  Returns 1 if e is TRUE, 0 if e is FALSE, 2 if e is ANY.   *  Returns 1 if e is TRUE, 0 if e is FALSE, 2 if e is ANY.
326   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
# Line 403  extern CONST dim_type *SatisfiedExprRDim Line 329  extern CONST dim_type *SatisfiedExprRDim
329   */   */
330  extern int ExprBValueF(CONST struct Expr *e);  extern int ExprBValueF(CONST struct Expr *e);
331  /**<  /**<
332   *  <!--  macro ExprBValue(e)                                          -->   *  Return 1 if e is TRUE, 0 if e is FALSE, 2 if e is ANY.
  *  <!--  int ExprBValue(e)                                            -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return 1 if e is TRUE, 0 if e is FALSE, 2 if e is ANY.       -->  
333   *  Implementation function for ExprBValue().  Do not use this function   *  Implementation function for ExprBValue().  Do not use this function
334   *  directly - use ExprBValue() instead.   *  directly - use ExprBValue() instead.
335   */   */
# Line 417  extern int ExprBValueF(CONST struct Expr Line 340  extern int ExprBValueF(CONST struct Expr
340  #define ExprSValue(e) ExprSValueF(e)  #define ExprSValue(e) ExprSValueF(e)
341  #endif  #endif
342  /**<  /**<
  *  macro ExprSValue(e)  
343   *  Return the set value of a set node type.   *  Return the set value of a set node type.
344   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
345   *  @return Returns the value as an <code>struct Set*</code>.   *  @return Returns the value as an <code>struct Set*</code>.
# Line 425  extern int ExprBValueF(CONST struct Expr Line 347  extern int ExprBValueF(CONST struct Expr
347   */   */
348  extern struct Set *ExprSValueF(CONST struct Expr *e);  extern struct Set *ExprSValueF(CONST struct Expr *e);
349  /**<  /**<
350   *  <!--  macro ExprSValue(e)                                          -->   *  Return the set value of a set node type.
  *  <!--  struct Set *ExprSValueF(e)                                   -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the set value of a set node type.                     -->  
351   *  Implementation function for ExprSValue().  Do not use this function   *  Implementation function for ExprSValue().  Do not use this function
352   *  directly - use ExprSValue() instead.   *  directly - use ExprSValue() instead.
353   */   */
# Line 439  extern struct Set *ExprSValueF(CONST str Line 358  extern struct Set *ExprSValueF(CONST str
358  #define ExprSymValue(e) ExprSymValueF(e)  #define ExprSymValue(e) ExprSymValueF(e)
359  #endif  #endif
360  /**<  /**<
  *  <!--  macro ExprSymValue(e)                                        -->  
361   *  Return the symbol pointer value from a symbol node type.   *  Return the symbol pointer value from a symbol node type.
362   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
363   *  @return Returns the value as an <code>symchar*</code>.   *  @return Returns the value as an <code>symchar*</code>.
# Line 447  extern struct Set *ExprSValueF(CONST str Line 365  extern struct Set *ExprSValueF(CONST str
365   */   */
366  extern symchar *ExprSymValueF(CONST struct Expr *e);  extern symchar *ExprSymValueF(CONST struct Expr *e);
367  /**<  /**<
368   *  <!--  macro ExprSymValue(e)                                        -->   *  Return the symbol pointer value from a symbol node type.
  *  <!--  symchar *ExprSymValueF(e)                                    -->  
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the symbol pointer value from a symbol node type.     -->  
369   *  Implementation function for ExprSymValue().  Do not use this function   *  Implementation function for ExprSymValue().  Do not use this function
370   *  directly - use ExprSymValue() instead.   *  directly - use ExprSymValue() instead.
371   */   */
# Line 461  extern symchar *ExprSymValueF(CONST stru Line 376  extern symchar *ExprSymValueF(CONST stru
376  #define ExprQStrValue(e) ExprQStrValueF(e)  #define ExprQStrValue(e) ExprQStrValueF(e)
377  #endif  #endif
378  /**<  /**<
  *  <!--  macro ExprQStrValue(e)                                       -->  
379   *  Return the string pointer value from a string node type.   *  Return the string pointer value from a string node type.
380   *  The difference between a string and a symbol, is that the former   *  The difference between a string and a symbol, is that the former
381   *  may contain whitespace. The type is called e_qstring   *  may contain whitespace. The type is called e_qstring
# Line 471  extern symchar *ExprSymValueF(CONST stru Line 385  extern symchar *ExprSymValueF(CONST stru
385   */   */
386  extern CONST char *ExprQStrValueF(CONST struct Expr *e);  extern CONST char *ExprQStrValueF(CONST struct Expr *e);
387  /**<  /**<
388   *  <!--  macro ExprQStrValue(e)                                       -->   *  Return the string pointer value from a string node type.
389   *  <!--  const char *ExprQStrValueF(e)                                -->   *  The difference between a string and a symbol, is that the former
390   *  <!--  const struct Expr *e;                                        -->   *  may contain whitespace. The type is called e_qstring
  *  <!--  Return the string pointer value from a string node type.     -->  
  *  <!--  The difference between a string and a symbol, is that the former -->  
  *  <!--  may contain whitespace. The type is called e_qstring         -->  
391   *  Implementation function for ExprQStrValue().  Do not use this function   *  Implementation function for ExprQStrValue().  Do not use this function
392   *  directly - use ExprQStrValue() instead.   *  directly - use ExprQStrValue() instead.
393   */   */
# Line 487  extern CONST char *ExprQStrValueF(CONST Line 398  extern CONST char *ExprQStrValueF(CONST
398  #define ExprBuiltinSet(e) ExprBuiltinSetF(e)  #define ExprBuiltinSet(e) ExprBuiltinSetF(e)
399  #endif  #endif
400  /**<  /**<
  *  <!--  macro ExprBuiltinSet(e)                                      -->  
401   *  Return the set argument for one of the builtin operations.     *  Return the set argument for one of the builtin operations.  
402   *  SUM, PROD, CARD, etc..   *  SUM, PROD, CARD, etc..
403   *  @param e <code>CONST struct Expr*</code>, the expr to query.   *  @param e <code>CONST struct Expr*</code>, the expr to query.
# Line 496  extern CONST char *ExprQStrValueF(CONST Line 406  extern CONST char *ExprQStrValueF(CONST
406   */   */
407  extern CONST struct Set *ExprBuiltinSetF(CONST struct Expr *e);  extern CONST struct Set *ExprBuiltinSetF(CONST struct Expr *e);
408  /**<  /**<
409   *  <!--  macro ExprBuiltinSet(e)                                      -->   *  Return the set argument for one of the builtin operations.
410   *  <!--  const struct Set *ExprBuiltinSetF(e)                         -->   *  SUM, PROD, CARD, etc.
  *  <!--  const struct Expr *e;                                        -->  
  *  <!--  Return the set argument for one of the builtin operations.   -->  
  *  <!--   SUM, PROD, CARD, etc..                                      -->  
411   *  Implementation function for ExprBuiltinSet().  Do not use this function   *  Implementation function for ExprBuiltinSet().  Do not use this function
412   *  directly - use ExprBuiltinSet() instead.   *  directly - use ExprBuiltinSet() instead.
413   */   */
414    
415  extern struct Expr *CopyExprList(CONST struct Expr *e);  extern struct Expr *CopyExprList(CONST struct Expr *e);
416  /**<  /**<
  *  <!--  struct Expr *CopyExprList(e)                                 -->  
  *  <!--  struct Expr *e;                                              -->  
417   *  Make and return a copy of e.   *  Make and return a copy of e.
418   */   */
419    
420  extern void DestroyExprList(struct Expr *e);  extern void DestroyExprList(struct Expr *e);
421  /**<  /**<
  *  <!--  void DestroyExprList(e)                                      -->  
  *  <!--  struct Expr *e;                                              -->  
422   *  Deallocate all the memory associated with e.   *  Deallocate all the memory associated with e.
423   *  Handles NULL input gracefully.   *  Handles NULL input gracefully.
424   */   */
425    
426  extern struct Expr *JoinExprLists(struct Expr *e1, struct Expr *e2);  extern struct Expr *JoinExprLists(struct Expr *e1, struct Expr *e2);
427  /**<  /**<
  *  <!--  struct Expr *JoinExprLists(e1,e2)                            -->  
  *  <!--  struct Expr *e1, *e2;                                        -->  
428   *  Append list e2 to the end of e1.  This returns e1, unless e1   *  Append list e2 to the end of e1.  This returns e1, unless e1
429   *  is NULL in which case it returns e2.   *  is NULL in which case it returns e2.
430   */   */
431    
432  extern int ExprsEqual(CONST struct Expr *e1, CONST struct Expr *e2);  extern int ExprsEqual(CONST struct Expr *e1, CONST struct Expr *e2);
433  /**<  /**<
  *  <!--  int ExprsEqual(e1,e2)                                        -->  
  *  <!--  const struct Expr *e1,*e2;                                   -->  
434   *  Return TRUE if and only if e1 and e2 are structurally equivalent.   *  Return TRUE if and only if e1 and e2 are structurally equivalent.
435   */   */
436    
437  extern int CompareExprs(CONST struct Expr *e1, CONST struct Expr *e2);  extern int CompareExprs(CONST struct Expr *e1, CONST struct Expr *e2);
438  /**<  /**<
  *  <!--  int CompareExprs(e1,e2)                                      -->  
  *  <!--  const struct Expr *e1,*e2;                                   -->  
439   *  Compares2 expressions.   *  Compares2 expressions.
440   *  Return -1, 0, 1 as e1 is < == > e2.   *  Return -1, 0, 1 as e1 is < == > e2.
441   *  Expressions being complicated things, this is not easily   *  Expressions being complicated things, this is not easily
# Line 563  extern void exprs_report_pool(void); Line 460  extern void exprs_report_pool(void);
460   * Write the pool report to ASCERR for the exprs pool.   * Write the pool report to ASCERR for the exprs pool.
461   */   */
462    
463  #endif /* __EXPRS_H_SEEN__ */  #endif /* ASC_EXPRS_H */
464    

Legend:
Removed from v.202  
changed lines
  Added in v.203

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22