very partial program functions
[calc.git] / parser.h
index eed45f679d14585706f9e5eca3200143c16ac533..4907c67699a74dc69f5655065e5165df7ae8b072 100644 (file)
--- a/parser.h
+++ b/parser.h
@@ -15,12 +15,13 @@ typedef enum {
     Cos, Sin, Tan, Acos, Asin, Atan,
     Log, Exp,
     Abs, Ceil, Floor,
-    Store, Recall, Inc, Dec, Disp,
+    Store, Recall, Inc, Dec, Disp, Mem, Clear,
     Quit, Help,
     Ans, E, Pi,
     Equal, Diff, Ge, Le, Gt, Lt,
     And, Or, Not,
-    Cond, While, Prog, Print
+    Cond, While, Prog, Print,
+    Prog, Call, List, Edit, Del
 } func_t;
 
 /* keyword type */
@@ -46,6 +47,15 @@ typedef struct _element_t {
 
 #define ERROR_OP ((element_t *)(-1))
 
+/* workspace type */
+
+typedef struct _workspace_t {
+    int id;
+    double answer;
+    double *storage;
+    element_t *root;
+} workspace_t;
+
 /* parser function */
 
 void delelement (element_t *root);