summaryrefslogtreecommitdiff
path: root/redes/syntax.h
diff options
context:
space:
mode:
Diffstat (limited to 'redes/syntax.h')
-rw-r--r--redes/syntax.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/redes/syntax.h b/redes/syntax.h
index c40a3da..0cdb76c 100644
--- a/redes/syntax.h
+++ b/redes/syntax.h
@@ -69,18 +69,32 @@ DECLARE_VEC(Chunk, Word)
typedef enum {
TOK_WORD,
TOK_SPEC,
- TOK_SUB_IN,
- TOK_SUB_OUT,
} TokenKind;
typedef enum {
- SPEC_PIPE,
- SPEC_REDIR_W_TRUNC,
- SPEC_REDIR_W_APPEND,
- SPEC_REDIR_R,
- SPEC_EOL,
+ OP_PIPE,
+ OP_REDIR_W_TRUNC,
+ OP_REDIR_W_APPEND,
+ OP_REDIR_R,
+ OP_EOL,
+} OperatorToken;
+
+
+typedef enum {
+ SPEC_OP,
+ SPEC_SUB_IN,
+ SPEC_SUB_OUT,
+} SpecialTokenKind;
+
+typedef struct {
+ SpecialTokenKind kind;
+ union {
+ OperatorToken op;
+ void* proc_sub_region;
+ } as;
} SpecialToken;
+
typedef struct Token Token;
DECLARE_VEC(Token*, TokenPtrVec)
@@ -89,7 +103,6 @@ struct Token {
union {
Word word;
SpecialToken spec;
- void* procsub_token_vec;
} as;
};