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

Contents of /trunk/base/generic/compiler/syntax.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1066 - (show annotations) (download) (as text)
Sun Jan 7 10:02:41 2007 UTC (17 years, 8 months ago) by johnpye
File MIME type: text/x-chdr
File size: 3006 byte(s)
Adding doxygen 'addtogroup' for Solver, Compiler, Integrator.
1 /*
2 * Syntax Routines
3 * by Tom Epperly
4 * Created: 3/22/1990
5 * Version: $Revision: 1.9 $
6 * Version control file: $RCSfile: syntax.h,v $
7 * Date last modified: $Date: 1998/04/12 18:31:16 $
8 * Last modified by: $Author: ballan $
9 *
10 * This file is part of the Ascend Language Interpreter.
11 *
12 * Copyright (C) 1990, 1993, 1994 Thomas Guthrie Epperly
13 *
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
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
18 *
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
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with the program; if not, write to the Free Software Foundation, Inc., 675
26 * Mass Ave, Cambridge, MA 02139 USA. Check the file named COPYING.
27 */
28
29 /** @file
30 * Syntax Routines.
31 * These routines support the yacc parsing file ascParse.y. This module
32 * provides functions to check syntax.
33 * <pre>
34 * When #including syntax.h, make sure these files are #included first:
35 * #include "utilities/ascConfig.h"
36 * #include "compiler/fractions.h"
37 * #include "compiler/compiler.h"
38 * #include "compiler/dimen.h"
39 * #include "compiler/types.h"
40 * #include "compiler/exprs.h"
41 * #include "compiler/stattypes.h"
42 * </pre>
43 */
44
45 #ifndef ASC_SYNTAX_H
46 #define ASC_SYNTAX_H
47
48 /** addtogroup compiler Compiler
49 @{
50 */
51
52 extern unsigned NumberOfRelOps(struct Expr *ex);
53 /**<
54 * Counts the number of relation operators in the given Expr.
55 *
56 * @param ex The expresion to evaluate.
57 * @return The number of relation operators in ex.
58 */
59
60 extern int IsRelation(struct Expr *ex);
61 /**<
62 * Tests whether an expression is a real or logical relation.
63 *
64 * @param ex The expresion to test.
65 * @return Returns 1 if ex is a real relation, 0 if a
66 * logical relation.
67 * @todo compiler/syntax:IsRelation() notated as broken in source file.
68 * Fix or remove comment.
69 */
70
71 extern int GetParseRelnsFlag(void);
72 /**<
73 * Retrieves the value of the parse relations flag. If this flag is
74 * non-zero (the default), normal ASCEND relations will be parsed.
75 * If it is 0, they will not be. This flag does not affect
76 * external relations.
77 *
78 * @return The current value of the parse relations flag.
79 */
80
81 ASC_DLLSPEC void SetParseRelnsFlag(int flag);
82 /**<
83 * Sets the parse relations flag. Any nonzero integer will
84 * cause relations to be parsed (see GetParseRelnsFlag()).
85 * Later it may be given more meaning.
86 *
87 * @param flag The new value for the parse relations flag.
88 */
89
90 /* @} */
91
92 #endif /* ASC_SYNTAX_H */
93

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