Merge branch 'master' of https://secure.softndesign.org/git/calc
[calc.git] / parser.h
index 734d818f173f4bc1a1ca39ac01de405c804df77a..9ce4fd098695f8b0b3f497a82eec664ed375ec66 100644 (file)
--- a/parser.h
+++ b/parser.h
@@ -1,48 +1,17 @@
 #ifndef __PARSER_H__
 #define __PARSER_H__
 
+#include "element.h"
+
 /* global variables */
 
 extern double answer;
 
-/* function type */
-
-typedef enum {
-    Val = 0, Sig,
-    Add, Sub,
-    Mul, Div, Mod,
-    Pow, Sqr,
-    Cos, Sin, Atan,
-    Log, Exp,
-    Store, Recall, Inc, Dec, Disp,
-    Quit, Help,
-    Ans, E, Pi,
-    Equal, Diff, Ge, Le, Gt, Lt,
-    And, Or, Not,
-    Cond, While, Prog
-} func_t;
-
-/* keyword type */
-
-typedef struct _keyword_t {
-    char *keyword;
-    func_t func;
-    int nbops;
-    int offset;
-    float prio;
-} keyword_t;
-
-/* calculus element type */
-
-typedef struct _element_t {
-    func_t func;
-    int nbops;
-    struct _element_t **ops;
-    double value;
-    int prio;
-} element_t;
-
-#define ERROR_OP ((element_t *)(-1))
+/* completion functions */
+
+char **generate_completion_list ();
+
+void free_completion_list (char **list);
 
 /* parser function */