diff options
| author | nass1pro <nass1pro@gmail.com> | 2020-06-18 12:41:46 +0200 |
|---|---|---|
| committer | nass1pro <nass1pro@gmail.com> | 2020-06-18 12:41:46 +0200 |
| commit | 1f0fde016765d33dc43c3c37d654be28f11c758e (patch) | |
| tree | 4a1203a5302faaffbd0bf01015567b9d448711cd | |
| parent | 3b21eea3ff3c803aa6f07c3a5bd048795c586b46 (diff) | |
| download | minishell-1f0fde016765d33dc43c3c37d654be28f11c758e.tar.gz minishell-1f0fde016765d33dc43c3c37d654be28f11c758e.tar.bz2 minishell-1f0fde016765d33dc43c3c37d654be28f11c758e.zip | |
Clean parse
| -rwxr-xr-x | src/parse/parse.c | 73 |
1 files changed, 1 insertions, 72 deletions
diff --git a/src/parse/parse.c b/src/parse/parse.c index f49f1f3..a46de84 100755 --- a/src/parse/parse.c +++ b/src/parse/parse.c @@ -6,7 +6,7 @@ /* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/06/17 18:09:04 by nahaddac #+# #+# */ -/* Updated: 2020/06/18 11:29:09 by charles ### ########.fr */ +/* Updated: 2020/06/18 12:40:23 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ @@ -130,74 +130,3 @@ t_ret *parse(t_ftlst *input) { return parse_op(input); } - -//////////////////////////////////////////////////////////////// -// saved -//////////////////////////////////////////////////////////////// - -/* t_ast *cmd_push_ast(t_ftlst *rest) */ -/* { */ -/* enum e_token_tag tag; */ -/* t_ast *ast; */ -/* */ -/* ast = NULL; */ -/* while (rest != NULL) */ -/* { */ -/* tag = ((t_token *)rest->data)->tag; */ -/* if (parse_cmd_str_true_false(tag)) */ -/* { */ -/* ast = push_cmd(ast, rest); */ -/* } */ -/* else if (parse_redir_true_false(tag)) */ -/* { */ -/* while(rest != NULL) */ -/* { */ -/* ast = push_redir(ast, rest); */ -/* if (tag & TAG_IS_STR && tag & TAG_STICK) */ -/* rest = rest->next; */ -/* else if (tag & TAG_IS_REDIR) */ -/* rest = rest->next; */ -/* else */ -/* break; */ -/* tag = ((t_token *)rest->data)->tag; */ -/* } */ -/* } */ -/* rest = rest->next; */ -/* } */ -/* return ast; */ -/* } */ - -/* t_ret *parse(t_ftlst *input) */ -/* { */ -/* t_ret *ret; */ -/* t_ret *first; */ -/* t_ast *new_ast; */ -/* */ -/* if(!(ret = malloc(sizeof(t_ret) * 1))) */ -/* return(NULL); */ -/* ret->rest = input; */ -/* ret->ast = NULL; */ -/* ret->unexpected = NULL; */ -/* first = ret; */ -/* */ -/* if(!(new_ast = malloc(sizeof(t_ast) * 1))) */ -/* return(0); */ -/* new_ast = cmd_push_ast(ret->rest); */ -/* printf("%s\n",((t_token *)ret->rest->data)->content); */ -/* if (ret->ast) */ -/* { */ -/* while(ret->ast->cmd_argv != NULL) */ -/* { */ -/* printf("[%s]\n", ((t_token *)ret->ast->cmd_argv->data)->content); */ -/* ret->ast->cmd_argv = ret->ast->cmd_argv->next; */ -/* } */ -/* while(ret->ast->redirs != NULL) */ -/* { */ -/* printf("[%s]\n", ((t_token *)ret->ast->redirs->data)->content); */ -/* ret->ast->redirs = ret->ast->redirs->next; */ -/* } */ -/* } */ -/* ast_destroy(ret->ast); */ -/* ft_lstdestroy(&ret->rest, (void (*)(void*))token_destroy); */ -/* return first; */ -/* } */ |
