Soft'N'Design Software
/
projects
/
calc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix percent printing
[calc.git]
/
parser.h
diff --git
a/parser.h
b/parser.h
index c746aaf4dfe757d00fc8dd223484046660536070..629b1b49a83272210f7faa1af41a7668506f54c9 100644
(file)
--- a/
parser.h
+++ b/
parser.h
@@
-4,13
+4,13
@@
/* function type */
typedef enum {
/* function type */
typedef enum {
- Val = 0,
+ Val = 0,
Sig,
Add, Sub,
Mul, Div, Mod,
Pow, Sqr,
Cos, Sin, Atn,
Log, Exp,
Add, Sub,
Mul, Div, Mod,
Pow, Sqr,
Cos, Sin, Atn,
Log, Exp,
- Sig
+ Qui, Hel
} func_t;
/* keyword type */
} func_t;
/* keyword type */
@@
-30,7
+30,7
@@
typedef struct _element_t {
func_t func;
int nbops;
struct _element_t *ops[MAX_OPERANDS];
func_t func;
int nbops;
struct _element_t *ops[MAX_OPERANDS];
-
float
value;
+
double
value;
int prio;
} element_t;
int prio;
} element_t;
@@
-38,6
+38,8
@@
typedef struct _element_t {
/* parser function */
/* parser function */
+void delelement (element_t *root);
+
element_t *parser (char *str, char **next, int prio);
void print_element (element_t *root, int level);
element_t *parser (char *str, char **next, int prio);
void print_element (element_t *root, int level);