/[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 74 - (show annotations) (download) (as text)
Fri Dec 2 23:33:32 2005 UTC (18 years, 6 months ago) by jds
File MIME type: text/x-chdr
File size: 2965 byte(s)
Doxygen comment update for a few headers.
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 __SYNTAX_H_SEEN__
46 #define __SYNTAX_H_SEEN__
47
48 extern unsigned NumberOfRelOps(struct Expr *ex);
49 /**<
50 * Counts the number of relation operators in the given Expr.
51 *
52 * @param ex The expresion to evaluate.
53 * @return The number of relation operators in ex.
54 */
55
56 extern int IsRelation(struct Expr *ex);
57 /**<
58 * Tests whether an expression is a real or logical relation.
59 *
60 * @param ex The expresion to test.
61 * @return Returns 1 if ex is a real relation, 0 if a
62 * logical relation.
63 * @todo compiler/syntax:IsRelation() notated as broken in source file.
64 * Fix or remove comment.
65 */
66
67 extern int GetParseRelnsFlag(void);
68 /**<
69 * Retrieves the value of the parse relations flag. If this flag is
70 * non-zero (the default), normal ASCEND relations will be parsed.
71 * If it is 0, they will not be. This flag does not affect
72 * external relations.
73 *
74 * @return The current value of the parse relations flag.
75 */
76
77 extern void SetParseRelnsFlag(int flag);
78 /**<
79 * Sets the parse relations flag. Any nonzero integer will
80 * cause relations to be parsed (see GetParseRelnsFlag()).
81 * Later it may be given more meaning.
82 *
83 * @param flag The new value for the parse relations flag.
84 */
85
86 #endif /* __SYNTAX_H_SEEN__ */
87

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