X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=parser.h;h=95ee0e594176d6ef31e02e238a2ca00fb6c83ae6;hb=532af887a1892cf5a75d86c487d257609f84dd18;hp=eed45f679d14585706f9e5eca3200143c16ac533;hpb=2d0cd54c457714ca3eb97cfad3cc892612248353;p=calc.git diff --git a/parser.h b/parser.h index eed45f6..95ee0e5 100644 --- a/parser.h +++ b/parser.h @@ -13,14 +13,16 @@ 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, + 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, Code, Print, + Prog, Call, List, Edit, Del } func_t; /* keyword type */ @@ -42,10 +44,22 @@ typedef struct _element_t { double value; int prio; int hidden; + char *string; } element_t; #define ERROR_OP ((element_t *)(-1)) +/* workspace type */ + +typedef struct _workspace_t { + int id; + double answer; + double *storage; + int storage_size; + element_t *root; + char *string; +} workspace_t; + /* parser function */ void delelement (element_t *root);