diff options
| author | nass1pro <nass1pro@gmail.com> | 2020-06-12 13:52:58 +0200 |
|---|---|---|
| committer | nass1pro <nass1pro@gmail.com> | 2020-06-13 11:45:50 +0200 |
| commit | d971bd8d16608f316396aba7a579d0b1f1af5aeb (patch) | |
| tree | 98ec558582ed20a120e13b4a376fd206fb620da0 /test_mini/parse/parse.h | |
| parent | 3136f59540a8dd29e2f096be5a8943e2ddd28431 (diff) | |
| download | minishell-d971bd8d16608f316396aba7a579d0b1f1af5aeb.tar.gz minishell-d971bd8d16608f316396aba7a579d0b1f1af5aeb.tar.bz2 minishell-d971bd8d16608f316396aba7a579d0b1f1af5aeb.zip | |
Added e_token enum
Diffstat (limited to 'test_mini/parse/parse.h')
| -rw-r--r-- | test_mini/parse/parse.h | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/test_mini/parse/parse.h b/test_mini/parse/parse.h deleted file mode 100644 index b5fe817..0000000 --- a/test_mini/parse/parse.h +++ /dev/null @@ -1,89 +0,0 @@ - - -# include <stdlib.h> -# include <stdlib.h> -# include <stdbool.h> - - -typedef enum e_sep -{ - SEP_END, - SEP_PIPE, - SEP_AND, - SEP_OR, -} t_sep; - -struct s_ast; - -/* -** \brief Line struct -** \param left AST to the left of separator -** \param right AST to the right of separator -** \param sep Type of separator -*/ - -typedef struct s_line -{ - struct s_ast *left; - struct s_ast *right; - struct s_ast *parent; - t_sep sep; -} t_line; - -/* -** \brief Command struct -** \param argv Array of string, -** all arguments beginning with executable name -** \param in STDIN redirection filename -** \param out STDOUT redirection filename -** \param is_append True if out redirection is append to file -*/ - -typedef struct s_cmd -{ - char *str; - char *in; - char *out; - bool is_append; -} t_cmd; - -/* -** \brief AST node tag (type) -** \param TAG_CMD Command AST node -** \param TAG_LINE Line AST node -*/ - -typedef enum e_ast_tag -{ - TAG_CMD, - TAG_LINE, -} t_ast_tag; - -/* -** \brief AST node struct -** \param tag Node tag -** \param cmd Command struct -** \param line Line struct -*/ - -typedef struct s_ast -{ - t_ast_tag tag; - union - { - t_line line; - t_cmd cmd; - } ; -} t_ast; - -typedef struct s_return -{ - t_ast *result; - char **rest; -} t_return; - -t_return *parse_nw(char **input); -t_return *parse(t_return *nw, char **input); - -/* utils*/ -int verif_part(char **input, char chr); |
