]> mj.ucw.cz Git - umpf.git/blobdiff - umpf.h
add arrows
[umpf.git] / umpf.h
diff --git a/umpf.h b/umpf.h
index ff83a933e3eced743c2eebf19db44a44010d4dbc..c7d59a145ab3bff5b55c54a90df076ce063bb197 100644 (file)
--- a/umpf.h
+++ b/umpf.h
@@ -4,6 +4,14 @@
 int yylex (void);
 void yyerror (char const *);
 
+enum keyword {
+       K_DISCARD,
+       K_COPY,
+       K_MAIL,
+       K_PIPE,
+       K_EMPTY
+};
+
 struct tree {
        enum {
                ST_IF,
@@ -53,8 +61,8 @@ struct tree {
                } leaf;
 
                struct {
-                       char* kw_left;
-                       char* kw_right; 
+                       enum keyword left;
+                       enum keyword right;
                        struct tree* s;
                } arrow;
 
@@ -129,7 +137,11 @@ struct code {
                NOP,
                CAT,
                GT,
-               AND
+               AND,
+               PIPE,
+               MAIL,
+               STORE,
+               DISCARD
        } opcode;
 
        union {
@@ -153,6 +165,10 @@ struct code {
                        int r;
                        int res; /* result */
                } tpop;
+               struct {
+                       int copy;
+                       int what;
+               } arrow;
                struct {
                } nop;
        } u;