1 |
/* |
/* ASCEND modelling environment |
2 |
* Expression Input/Output |
Copyright (C) 2006 Carnegie Mellon University |
3 |
|
Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly |
4 |
|
|
5 |
|
This program is free software; you can redistribute it and/or modify |
6 |
|
it under the terms of the GNU General Public License as published by |
7 |
|
the Free Software Foundation; either version 2, or (at your option) |
8 |
|
any later version. |
9 |
|
|
10 |
|
This program is distributed in the hope that it will be useful, |
11 |
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
|
GNU General Public License for more details. |
14 |
|
|
15 |
|
You should have received a copy of the GNU General Public License |
16 |
|
along with this program; if not, write to the Free Software |
17 |
|
Foundation, Inc., 59 Temple Place - Suite 330, |
18 |
|
Boston, MA 02111-1307, USA. |
19 |
|
*//** |
20 |
|
@file |
21 |
|
Expression Input/Output |
22 |
|
|
23 |
|
Requires: |
24 |
|
#include "utilities/ascConfig.h" |
25 |
|
#include "fractions.h" |
26 |
|
#include "compiler.h" |
27 |
|
#include "dimen.h" |
28 |
|
#include "expr_types.h" |
29 |
|
#include "symtab.h" |
30 |
|
*//* |
31 |
* by Tom Epperly |
* by Tom Epperly |
32 |
* Version: $Revision: 1.6 $ |
* Last in CVS: $Revision: 1.6 $ $Date: 1998/02/05 16:35:57 $ $Author: ballan $ |
33 |
* Version control file: $RCSfile: exprio.h,v $ |
*/ |
|
* Date last modified: $Date: 1998/02/05 16:35:57 $ |
|
|
* Last modified by: $Author: ballan $ |
|
|
* |
|
|
* This file is part of the Ascend Language Interpreter. |
|
|
* |
|
|
* Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly |
|
|
* |
|
|
* The Ascend Language Interpreter is free software; you can redistribute |
|
|
* it and/or modify it under the terms of the GNU General Public License as |
|
|
* published by the Free Software Foundation; either version 2 of the |
|
|
* License, or (at your option) any later version. |
|
|
* |
|
|
* The Ascend Language Interpreter is distributed in hope that it will be |
|
|
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
|
* General Public License for more details. |
|
|
* |
|
|
* You should have received a copy of the GNU General Public License |
|
|
* along with the program; if not, write to the Free Software Foundation, |
|
|
* Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named |
|
|
* COPYING. |
|
|
*/ |
|
|
|
|
|
#ifndef __EXPRIO_H_SEEN__ |
|
|
#define __EXPRIO_H_SEEN__ |
|
|
|
|
|
|
|
|
/* |
|
|
* When #including exprio.h, make sure these files are #included first: |
|
|
* #include "fractions.h" |
|
|
* #include "compiler.h" |
|
|
* #include "dimen.h" |
|
|
* #include "types.h" |
|
|
* #include "symtab.h" |
|
|
*/ |
|
34 |
|
|
35 |
|
#ifndef ASC_EXPRIO_H |
36 |
|
#define ASC_EXPRIO_H |
37 |
|
|
38 |
extern CONST char *ExprEnumName(CONST enum Expr_enum); |
extern CONST char *ExprEnumName(CONST enum Expr_enum t); |
39 |
/* |
/**< |
|
* CONST char *ExprEnumName(t); |
|
|
* CONST enum Expr_enum t; |
|
40 |
* Returns a pointer to a string containing the name of the Expr term |
* Returns a pointer to a string containing the name of the Expr term |
41 |
* given. Do not free this string under any circumstances. |
* given. Do not free this string under any circumstances. |
42 |
* This string is not in the symbol table. |
* This string is not in the symbol table. |
43 |
*/ |
*/ |
44 |
|
|
45 |
extern void WriteExprNode(FILE *,CONST struct Expr *); |
extern void WriteExprNode(FILE *f, CONST struct Expr *e); |
46 |
/* |
/**< |
47 |
* void WriteExprNode(f,e) |
* Write a single expression node with no leading or trailing white space. |
|
* FILE *f; |
|
|
* const struct Expr *e; |
|
48 |
*/ |
*/ |
49 |
|
|
50 |
extern void WriteExpr(FILE *,CONST struct Expr *); |
extern void WriteExpr(FILE *f, CONST struct Expr *e); |
51 |
/* |
/**< |
|
* void WriteExpr(f,e) |
|
|
* FILE *f; |
|
|
* const struct Expr *e; |
|
52 |
* Write the expression with no leading or trailing white space. |
* Write the expression with no leading or trailing white space. |
53 |
*/ |
*/ |
54 |
|
|
55 |
extern void WriteExprNode2Str(Asc_DString *,CONST struct Expr *); |
extern void WriteExprNode2Str(Asc_DString *dstring, CONST struct Expr *e); |
56 |
/* |
/**< |
57 |
* void WriteExprNode2Str(dstring,e) |
* Write a single expression node to a string with no leading |
58 |
* Asc_DString *dstring; |
* or trailing white space. |
|
* const struct Expr *e; |
|
59 |
*/ |
*/ |
60 |
|
|
61 |
extern void WriteExpr2Str(Asc_DString *,CONST struct Expr *); |
extern void WriteExpr2Str(Asc_DString *dstring, CONST struct Expr *e); |
62 |
/* |
/**< |
63 |
* void WriteExpr2Str(dstring,e) |
* Write the expression to a string with no leading or trailing white space. |
|
* Asc_DString *dstring; |
|
|
* const struct Expr *e; |
|
|
* Write the expression with no leading or trailing white space. |
|
64 |
*/ |
*/ |
|
#endif /* __EXPRIO_H_SEEN__ */ |
|
|
|
|
|
|
|
|
|
|
65 |
|
|
66 |
|
#endif /* ASC_EXPRIO_H */ |
67 |
|
|