X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=parser.h;h=0b9233fa406a25834e6cb93c8acea5cc505f7272;hb=0a8a1de32bdcdad2e60958af32ccf324fa81e144;hp=f52112952eb9d73777b9d7a9bfd6d41a9165ebbd;hpb=f438579a2cbd62640bf5478026765baf04099cbb;p=calc.git diff --git a/parser.h b/parser.h index f521129..0b9233f 100644 --- 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, Mem, + 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 +43,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);