annotate src/expr.h @ 15:1f598d89b9b0

Started creating expression parser
author lost
date Thu, 23 Oct 2008 03:37:48 +0000
parents b28d7cb60779
children df0c4a46af8f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
1 /*
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
2 expr.h
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
3 Copyright © 2008 William Astle
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
4
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
5 This file is part of LWASM.
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
6
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
7 LWASM is free software: you can redistribute it and/or modify it under the
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
8 terms of the GNU General Public License as published by the Free Software
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
9 Foundation, either version 3 of the License, or (at your option) any later
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
10 version.
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
11
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
12 This program is distributed in the hope that it will be useful, but WITHOUT
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
15 more details.
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
16
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
17 You should have received a copy of the GNU General Public License along with
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
18 this program. If not, see <http://www.gnu.org/licenses/>.
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
19 */
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
20
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
21 /*
15
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
22 Definitions for expression evaluator
13
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
23 */
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
24
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
25 #ifndef __expr_h_seen__
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
26 #define __expr_h_seen__
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
27
15
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
28 #include "lwval.h"
14
b28d7cb60779 checkpoint
lost
parents: 13
diff changeset
29
b28d7cb60779 checkpoint
lost
parents: 13
diff changeset
30 #ifndef __expr_c_seen__
15
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
31 #define __expr_E__ extern
14
b28d7cb60779 checkpoint
lost
parents: 13
diff changeset
32 #else
15
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
33 #define __expr_E__
14
b28d7cb60779 checkpoint
lost
parents: 13
diff changeset
34 #endif
b28d7cb60779 checkpoint
lost
parents: 13
diff changeset
35
15
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
36 // parse an expression
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
37 __expr_E__ LWVAL *lwasm_parse_expr(char **ptr);
14
b28d7cb60779 checkpoint
lost
parents: 13
diff changeset
38
15
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
39 // attempt to evaluate/simplify expression
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
40 __expr_E__ int lwasm_eval_expr(LWVAL *expr);
13
05d4115b4860 Started work on new expression evaluator system and major code re-work for next release
lost
parents:
diff changeset
41
15
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
42 #undef __expr_E__
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
43
1f598d89b9b0 Started creating expression parser
lost
parents: 14
diff changeset
44 #endif // __expr_h_seen__