correct switching context
[calc.git] / parser.h
index 4907c67699a74dc69f5655065e5165df7ae8b072..9458aec699e7029931dc29398f7aa490f1a31a20 100644 (file)
--- a/parser.h
+++ b/parser.h
@@ -13,15 +13,17 @@ typedef enum {
     Mul, Div, Mod,
     Pow, Sqr,
     Cos, Sin, Tan, Acos, Asin, Atan,
-    Log, Exp,
+    Ln, Log, Exp,
+    Erfc, Erf,
     Abs, Ceil, Floor,
     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,
-    Prog, Call, List, Edit, Del
+    Cond, While, Code, Print,
+    Prog, Call, List, Edit, Del,
+    Get, Length, Pop, Push, Put, Set, Show
 } func_t;
 
 /* keyword type */
@@ -43,6 +45,7 @@ typedef struct _element_t {
     double value;
     int prio;
     int hidden;
+    char *string;
 } element_t;
 
 #define ERROR_OP ((element_t *)(-1))
@@ -53,7 +56,11 @@ typedef struct _workspace_t {
     int id;
     double answer;
     double *storage;
+    int storage_size;
     element_t *root;
+    double *stack;
+    int stack_size;
+    char *string;
 } workspace_t;
 
 /* parser function */