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