int yylex (void);
void yyerror (char const *);
+enum keyword {
+ K_DISCARD,
+ K_COPY,
+ K_MAIL,
+ K_PIPE,
+ K_EMPTY
+};
+
struct tree {
enum {
ST_IF,
} leaf;
struct {
- char* kw_left;
- char* kw_right;
+ enum keyword left;
+ enum keyword right;
struct tree* s;
} arrow;
NOP,
CAT,
GT,
- AND
+ AND,
+ PIPE,
+ MAIL,
+ STORE,
+ DISCARD
} opcode;
union {
int r;
int res; /* result */
} tpop;
+ struct {
+ int copy;
+ int what;
+ } arrow;
struct {
} nop;
} u;