extern double answer;
+extern char format[9];
+
/* function type */
typedef enum {
Add, Sub,
Mul, Div, Mod,
Pow, Sqr,
- Cos, Sin, Atan,
+ Cos, Sin, Tan, Acos, Asin, Atan,
Log, Exp,
- Store, Recall, Disp,
+ Abs, Ceil, Floor,
+ Store, Recall, Inc, Dec, Disp,
Quit, Help,
Ans, E, Pi,
Equal, Diff, Ge, Le, Gt, Lt,
And, Or, Not,
- Cond
+ Cond, While, Prog, Print
} func_t;
/* keyword type */
/* calculus element type */
-#define MAX_OPERANDS 10
typedef struct _element_t {
func_t func;
int nbops;
- struct _element_t *ops[MAX_OPERANDS];
+ struct _element_t **ops;
double value;
int prio;
} element_t;
double evaluate_element (element_t *root, char mask);
+/* completion functions */
+
+char **generate_completion_list ();
+
+void free_completion_list (char **list);
+
#endif /* __PARSER_H__ */
/* vim: set ts=4 sw=4 et: */