add Fibonacci sequence
[calc.git] / parser.h
index 49acc2080005a8c4cef2f635c71010889f71d09a..734d818f173f4bc1a1ca39ac01de405c804df77a 100644 (file)
--- a/parser.h
+++ b/parser.h
@@ -19,7 +19,7 @@ typedef enum {
     Ans, E, Pi,
     Equal, Diff, Ge, Le, Gt, Lt,
     And, Or, Not,
-    Cond, While
+    Cond, While, Prog
 } func_t;
 
 /* keyword type */
@@ -34,11 +34,10 @@ typedef struct _keyword_t {
 
 /* calculus element type */
 
-#define MAX_OPERANDS 10
 typedef struct _element_t {
     func_t func;
     int nbops;
-    struct _element_t *ops[MAX_OPERANDS];
+    struct _element_t **ops;
     double value;
     int prio;
 } element_t;