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

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

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

revision 668 by jds, Tue Aug 2 11:20:09 2005 UTC revision 669 by johnpye, Wed Jun 21 07:00:45 2006 UTC
# Line 1  Line 1 
1  /*  /*  ASCEND modelling environment
2   *  Expression Evaluation Routine      Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly
3   *  by Tom Epperly      Copyright (C) 2006 Carnegie Mellon University
4   *  Created: 1/16/90  
5   *  Version: $Revision: 1.10 $      This program is free software; you can redistribute it and/or modify
6   *  Version control file: $RCSfile: evaluate.h,v $      it under the terms of the GNU General Public License as published by
7   *  Date last modified: $Date: 1997/07/18 12:29:08 $      the Free Software Foundation; either version 2, or (at your option)
8   *  Last modified by: $Author: mthomas $      any later version.
9   *  
10   *  This file is part of the Ascend Language Interpreter.      This program is distributed in the hope that it will be useful,
11   *      but WITHOUT ANY WARRANTY; without even the implied warranty of
12   *  Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   *      GNU General Public License for more details.
14   *  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      You should have received a copy of the GNU General Public License
16   *  published by the Free Software Foundation; either version 2 of the      along with this program; if not, write to the Free Software
17   *  License, or (at your option) any later version.      Foundation, Inc., 59 Temple Place - Suite 330,
18   *      Boston, MA 02111-1307, USA.
19   *  The Ascend Language Interpreter is distributed in hope that it will be  *//**
20   *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of      @file
21   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      Expression Evaluation Routine
22   *  General Public License for more details.  
23   *      Requires:
24   *  You should have received a copy of the GNU General Public License      #include "utilities/ascConfig.h"
25   *  along with the program; if not, write to the Free Software Foundation,      #include "list.h"
26   *  Inc., 675 Mass Ave, Cambridge, MA 02139 USA.  Check the file named      #include "fractions.h"
27   *  COPYING.      #include "compiler.h"
28   */      #include "dimen.h"
29        #include "expr_types.h"
30  /** @file  *//*
31   *  Expression Evaluation Routine      by Tom Epperly
32   *  <pre>      Created: 1/16/90
33   *  When #including evaluate.h, make sure these files are #included first:      Last in CVS: $Revision: 1.10 $ $Date: 1997/07/18 12:29:08 $ $Author: mthomas $
34   *         #include "utilities/ascConfig.h"  */
  *         #include "list.h"  
  *         #include "fractions.h"  
  *         #include "compiler.h"  
  *         #include "dimen.h"  
  *         #include "types.h"  
  *  </pre>  
  */  
35    
36  #ifndef __EVALUATE_H_SEEN__  #ifndef ASC_EVALUATE_H
37  #define __EVALUATE_H_SEEN__  #define ASC_EVALUATE_H
38    
39  extern struct value_t EvaluateSet(CONST struct Set *sptr,  extern struct value_t EvaluateSet(CONST struct Set *sptr,
40                                    struct value_t (*EvaluateName)());                                    struct value_t (*EvaluateName)());
41  /**<  /**<
  *  <!--  struct value_t EvaluateSet(sptr,EvaluateName)                -->  
  *  <!--  const struct Set *sptr;                                      -->  
  *  <!--  struct value_t (*EvaluateName)();                            -->  
  *  
  *  <!--  POINTERS TO FUNCTIONS                                        -->  
  *  <!--  struct value_t EvaluateName(nptr)                            -->  
  *  <!--  struct Name *nptr;                                           -->  
42   *  Return the value of a Set structure, which just might be a set.   *  Return the value of a Set structure, which just might be a set.
43   */   */
44    
# Line 60  extern struct value_t EvaluateExpr(CONST Line 46  extern struct value_t EvaluateExpr(CONST
46                                     CONST struct Expr *stop,                                     CONST struct Expr *stop,
47                                     struct value_t (*EvaluateName)());                                     struct value_t (*EvaluateName)());
48  /**<  /**<
  *  <!--  struct value_t EvaluateExpr(expr,stop,EvaluateName)          -->  
  *  <!--  const struct Expr *expr,*stop;                               -->  
  *  <!--  struct value_t (*EvaluateName)();                            -->  
  *  
  *  <!--  POINTERS TO FUNCTIONS                                        -->  
  *  <!--  struct value_t EvaluateName(nptr)                            -->  
  *  <!--  struct Name *nptr;                                           -->  
49   *  Return the value of a name structure.   *  Return the value of a name structure.
50   *  In most cases stop = NULL.  stop can be used to evaluate just part of   *  In most cases stop = NULL.  stop can be used to evaluate just part of
51   *  an expression.  If (stop!=NULL) the calling program, must know the   *  an expression.  If (stop!=NULL) the calling program, must know the
# Line 77  extern struct gl_list_t *EvaluateNamesNe Line 56  extern struct gl_list_t *EvaluateNamesNe
56                                               CONST struct Expr *stop,                                               CONST struct Expr *stop,
57                                               struct gl_list_t *list);                                               struct gl_list_t *list);
58  /**<  /**<
59   *  <!--  list = EvaluateNamesNeeded(expr,stop,list);                     -->   *  (Analogous to EvaluateExpr, but the global EvaluatingSets is irrelevant).
  *  <!--  const struct Expr *expr,*stop;                               -->  
  *  <!--  (Analogous to EvaluateExpr, but the global EvaluatingSets is irrelevant). -->  
60   *   *
61   *  Appends all the externally defined names found in expr to list.   *  Appends all the externally defined names found in expr to list.
62   *  (Loop variables defined in the expression are ignored.)   *  (Loop variables defined in the expression are ignored.)
# Line 102  extern struct gl_list_t *EvaluateNamesNe Line 79  extern struct gl_list_t *EvaluateNamesNe
79                                                      CONST struct Expr *stop,                                                      CONST struct Expr *stop,
80                                                      struct gl_list_t *list);                                                      struct gl_list_t *list);
81  /**<  /**<
82   *  <!--  list = EvaluateNamesNeededShallow(expr,stop,list);           -->   *  (Analogous to EvaluateExpr, but the global EvaluatingSets is irrelevant).
  *  <!--  const struct Expr *expr,*stop;                               -->  
  *  <!--  (Analogous to EvaluateExpr, but the global EvaluatingSets is irrelevant). -->  
83   *   *
84   *  Appends all the externally defined names found in expr to list.   *  Appends all the externally defined names found in expr to list.
85   *  (Loop variables defined in the expression are ignored.)   *  (Loop variables defined in the expression are ignored.)
# Line 126  extern struct gl_list_t *EvaluateNamesNe Line 101  extern struct gl_list_t *EvaluateNamesNe
101  extern struct gl_list_t  extern struct gl_list_t
102  *EvaluateSetNamesNeeded(CONST struct Set *sptr, struct gl_list_t *list);  *EvaluateSetNamesNeeded(CONST struct Set *sptr, struct gl_list_t *list);
103  /**<  /**<
104   *  <!--  list = EvaluateSetNamesNeeded(sptr,list)                     -->   *  (Analogous to EvaluateExpr, but the global EvaluatingSets is irrelevant).
  *  <!--  const struct Set *sptr;                                      -->  
  *  <!--  extern struct gl_list_t *list;                               -->  
  *  <!--  (Analogous to EvaluateExpr, but the global EvaluatingSets is irrelevant). -->  
105   *   *
106   *  Appends all the externally defined names found in sptr to list.   *  Appends all the externally defined names found in sptr to list.
107   *  (Loop variables defined in the expression are ignored.)   *  (Loop variables defined in the expression are ignored.)
# Line 150  extern struct gl_list_t Line 122  extern struct gl_list_t
122  extern struct gl_list_t  extern struct gl_list_t
123  *EvaluateSetNamesNeededShallow(CONST struct Set *sptr, struct gl_list_t *list);  *EvaluateSetNamesNeededShallow(CONST struct Set *sptr, struct gl_list_t *list);
124  /**<  /**<
125   *  <!--  list = EvaluateSetNamesNeededShallow(sptr,list)              -->   *  (Analogous to EvaluateExpr, but the global EvaluatingSets is irrelevant).
  *  <!--  const struct Set *sptr;                                      -->  
  *  <!--  extern struct gl_list_t *list;                               -->  
  *  <!--  (Analogous to EvaluateExpr, but the global EvaluatingSets is irrelevant). -->  
126   *   *
127   *  Appends all the externally defined names found in sptr to list.   *  Appends all the externally defined names found in sptr to list.
128   *  (Loop variables defined in the expression are ignored.)   *  (Loop variables defined in the expression are ignored.)
# Line 185  extern void ClearRecycleStack(void); Line 154  extern void ClearRecycleStack(void);
154   *  report how many recycled stack elements it deallocates.   *  report how many recycled stack elements it deallocates.
155   */   */
156    
157  #endif /* __EVALUATE_H_SEEN__ */  #endif /* ASC_EVALUATE_H */
158    

Legend:
Removed from v.668  
changed lines
  Added in v.669

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