From fffb8c74a5acd2c61f4e6032629636339e1c961d Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Tue, 21 Feb 2017 20:29:46 +0100 Subject: [PATCH 01/23] before pull main clean --- 42sh/includes/parser.h | 2 +- 42sh/src/exec/ft_exec.c | 2 +- 42sh/src/main/main.c | 6 +++--- 42sh/src/parser/build_tree.c | 2 +- 42sh/src/parser/ft_parse.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index e87b47b1..7708a4d1 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/01 12:15:54 by jhalford #+# #+# */ -/* Updated: 2017/02/21 18:13:10 by ariard ### ########.fr */ +/* Updated: 2017/02/21 20:28:27 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/exec/ft_exec.c b/42sh/src/exec/ft_exec.c index d2916952..ed9ec0bb 100644 --- a/42sh/src/exec/ft_exec.c +++ b/42sh/src/exec/ft_exec.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/27 20:30:32 by jhalford #+# #+# */ -/* Updated: 2017/02/21 18:15:31 by ariard ### ########.fr */ +/* Updated: 2017/02/21 18:50:05 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index 785ed302..13178f42 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/02/21 18:33:24 by ariard ### ########.fr */ +/* Updated: 2017/02/21 18:51:41 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -49,8 +49,8 @@ int handle_instruction(int fd) return (error_syntax(&token)); } btree_print(STDBUG, ast, &ft_putast); - if (ft_exec(&ast)) - return (1); +// if (ft_exec(&ast)) +// return (1); ft_add_str_in_history(lexer.str); return (1); } diff --git a/42sh/src/parser/build_tree.c b/42sh/src/parser/build_tree.c index b602bead..fa58745c 100644 --- a/42sh/src/parser/build_tree.c +++ b/42sh/src/parser/build_tree.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:32:59 by ariard #+# #+# */ -/* Updated: 2017/02/20 22:16:04 by jhalford ### ########.fr */ +/* Updated: 2017/02/21 20:28:38 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/ft_parse.c b/42sh/src/parser/ft_parse.c index a03801f6..8cc4e169 100644 --- a/42sh/src/parser/ft_parse.c +++ b/42sh/src/parser/ft_parse.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/30 17:14:58 by jhalford #+# #+# */ -/* Updated: 2017/02/21 16:40:24 by ariard ### ########.fr */ +/* Updated: 2017/02/21 18:52:33 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ From 49b79603b374d29ee2ccfdeaabd9085c8a278a04 Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Tue, 21 Feb 2017 22:45:59 +0100 Subject: [PATCH 02/23] insert newline add --- 42sh/Makefile | 3 ++- 42sh/case.sh | 8 ++++++++ 42sh/includes/lexer.h | 4 +++- 42sh/includes/parser.h | 2 +- 42sh/sample/case/case.sh | 8 ++++++++ 42sh/sample/mix/mix.sh | 2 +- 42sh/src/hash_table/hash.c | 2 +- 42sh/src/hash_table/hash_str.c | 2 +- 42sh/src/lexer/get_reserved_words.c | 2 +- 42sh/src/lexer/insert_newline.c | 23 +++++++++++++++++++++++ 42sh/src/lexer/lexer_default.c | 2 +- 42sh/src/lexer/lexer_delim.c | 4 +--- 42sh/src/lexer/lexer_great.c | 2 +- 42sh/src/lexer/lexer_lex.c | 2 +- 42sh/src/lexer/token_append.c | 2 +- 42sh/src/lexer/token_print.c | 13 +++---------- 42sh/src/main/main.c | 15 +++++++++------ 42sh/src/parser/aggregate_sym.c | 10 +++++----- 42sh/src/parser/ft_parse.c | 6 ++++-- 42sh/src/parser/produce_sym.c | 8 ++++---- 42sh/src/parser/read_stack.c | 10 +++++----- 21 files changed, 84 insertions(+), 46 deletions(-) create mode 100644 42sh/case.sh create mode 100644 42sh/sample/case/case.sh create mode 100644 42sh/src/lexer/insert_newline.c diff --git a/42sh/Makefile b/42sh/Makefile index e647c32f..88ecb85b 100644 --- a/42sh/Makefile +++ b/42sh/Makefile @@ -6,7 +6,7 @@ # By: wescande +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2016/08/29 21:32:58 by wescande #+# #+# # -# Updated: 2017/02/21 16:38:00 by ariard ### ########.fr # +# Updated: 2017/02/21 21:32:36 by ariard ### ########.fr # # # # **************************************************************************** # @@ -171,6 +171,7 @@ lexer/get_lexer_stack.c\ lexer/get_reserved_words.c\ lexer/get_state_global.c\ lexer/get_state_redir.c\ +lexer/insert_newline.c\ lexer/lexer_backslash.c\ lexer/lexer_bquote.c\ lexer/lexer_comment.c\ diff --git a/42sh/case.sh b/42sh/case.sh new file mode 100644 index 00000000..d415d6aa --- /dev/null +++ b/42sh/case.sh @@ -0,0 +1,8 @@ +case $rental in + ("car") echo "For $rental rental is Rs.20 per k/m.";; + ("van") echo "For $rental rental is Rs.10 per k/m.";; + ("jeep") echo "For $rental rental is Rs.5 per k/m.";; + ("bicycle") echo "For $rental rental 20 paisa per k/m.";; + ("enfield") echo "For $rental rental Rs.3 per k/m.";; + ("thunderbird") echo "For $rental rental Rs.5 per k/m.";; +esac diff --git a/42sh/includes/lexer.h b/42sh/includes/lexer.h index 042aed97..28b0962a 100644 --- a/42sh/includes/lexer.h +++ b/42sh/includes/lexer.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/01 12:15:50 by jhalford #+# #+# */ -/* Updated: 2017/02/20 22:26:26 by jhalford ### ########.fr */ +/* Updated: 2017/02/21 21:12:01 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -91,6 +91,8 @@ char *stack_to_prompt(t_list *stack); t_lexstate get_state_global(t_lexer *lexer); t_lexstate get_state_redir(t_lexer *lexer); int get_lexer_stack(t_lexer lexer); +int get_reserved_words(t_list **alst); +int insert_newline(t_list **alst); void lexer_init(t_lexer *lexer); int lexer_lex(t_list **alst, t_lexer *lexer); int lexer_default(t_list **alst, t_lexer *lexer); diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index 4960d21f..503a37f9 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -21,9 +21,9 @@ enum e_parstate { + ERROR = 0, UNDEFINED, SUCCESS, - ERROR, }; enum e_sym diff --git a/42sh/sample/case/case.sh b/42sh/sample/case/case.sh new file mode 100644 index 00000000..d415d6aa --- /dev/null +++ b/42sh/sample/case/case.sh @@ -0,0 +1,8 @@ +case $rental in + ("car") echo "For $rental rental is Rs.20 per k/m.";; + ("van") echo "For $rental rental is Rs.10 per k/m.";; + ("jeep") echo "For $rental rental is Rs.5 per k/m.";; + ("bicycle") echo "For $rental rental 20 paisa per k/m.";; + ("enfield") echo "For $rental rental Rs.3 per k/m.";; + ("thunderbird") echo "For $rental rental Rs.5 per k/m.";; +esac diff --git a/42sh/sample/mix/mix.sh b/42sh/sample/mix/mix.sh index d9e02158..36437d5c 100644 --- a/42sh/sample/mix/mix.sh +++ b/42sh/sample/mix/mix.sh @@ -1,6 +1,6 @@ if ls then - ls | cat + ls ; cat while ls do until ls diff --git a/42sh/src/hash_table/hash.c b/42sh/src/hash_table/hash.c index fa3604fd..8a9a1eea 100644 --- a/42sh/src/hash_table/hash.c +++ b/42sh/src/hash_table/hash.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/18 11:06:19 by gwojda #+# #+# */ -/* Updated: 2017/02/18 14:16:35 by gwojda ### ########.fr */ +/* Updated: 2017/02/21 20:57:19 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/hash_table/hash_str.c b/42sh/src/hash_table/hash_str.c index f7e70f11..a7aa38f1 100644 --- a/42sh/src/hash_table/hash_str.c +++ b/42sh/src/hash_table/hash_str.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/18 11:32:18 by gwojda #+# #+# */ -/* Updated: 2017/02/19 12:58:47 by gwojda ### ########.fr */ +/* Updated: 2017/02/21 20:57:42 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/get_reserved_words.c b/42sh/src/lexer/get_reserved_words.c index 7a24e372..413b4c35 100644 --- a/42sh/src/lexer/get_reserved_words.c +++ b/42sh/src/lexer/get_reserved_words.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/26 00:07:05 by ariard #+# #+# */ -/* Updated: 2017/02/20 22:06:20 by jhalford ### ########.fr */ +/* Updated: 2017/02/21 21:06:16 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/insert_newline.c b/42sh/src/lexer/insert_newline.c new file mode 100644 index 00000000..1057c24e --- /dev/null +++ b/42sh/src/lexer/insert_newline.c @@ -0,0 +1,23 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* insert_newline.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ariard +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2017/02/21 21:05:23 by ariard #+# #+# */ +/* Updated: 2017/02/21 21:12:13 by ariard ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "parser.h" + +int insert_newline(t_list **alst) +{ + t_token *token; + + token = token_init(); + token->type = TK_NEWLINE; + ft_lsteadd(alst, ft_lstnew(token, sizeof(*token))); + return (0); +} diff --git a/42sh/src/lexer/lexer_default.c b/42sh/src/lexer/lexer_default.c index 4d67d8cc..200bdec0 100644 --- a/42sh/src/lexer/lexer_default.c +++ b/42sh/src/lexer/lexer_default.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/28 18:36:21 by jhalford #+# #+# */ -/* Updated: 2017/02/20 20:50:30 by ariard ### ########.fr */ +/* Updated: 2017/02/21 22:40:44 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_delim.c b/42sh/src/lexer/lexer_delim.c index 4c7f4eb7..c7e789f1 100644 --- a/42sh/src/lexer/lexer_delim.c +++ b/42sh/src/lexer/lexer_delim.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 11:58:44 by jhalford #+# #+# */ -/* Updated: 2017/02/20 20:52:10 by ariard ### ########.fr */ +/* Updated: 2017/02/21 22:42:41 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,9 +21,7 @@ int lexer_delim(t_list **alst, t_lexer *lexer) lexer->pos++; lexer->state = DEFAULT; if (token->type) - { return (lexer_lex(&(*alst)->next, lexer)); - } else { if (lexer->str[lexer->pos] == 0) diff --git a/42sh/src/lexer/lexer_great.c b/42sh/src/lexer/lexer_great.c index 48c1a33b..cce8f831 100644 --- a/42sh/src/lexer/lexer_great.c +++ b/42sh/src/lexer/lexer_great.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 12:06:35 by jhalford #+# #+# */ -/* Updated: 2017/02/20 20:52:38 by ariard ### ########.fr */ +/* Updated: 2017/02/21 21:09:31 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_lex.c b/42sh/src/lexer/lexer_lex.c index 8e9a7720..222b5616 100644 --- a/42sh/src/lexer/lexer_lex.c +++ b/42sh/src/lexer/lexer_lex.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:08:51 by jhalford #+# #+# */ -/* Updated: 2017/02/20 21:55:26 by jhalford ### ########.fr */ +/* Updated: 2017/02/21 22:44:37 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/token_append.c b/42sh/src/lexer/token_append.c index 8a65c2b5..6d83ee13 100644 --- a/42sh/src/lexer/token_append.c +++ b/42sh/src/lexer/token_append.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/11 17:18:42 by jhalford #+# #+# */ -/* Updated: 2017/02/20 21:03:57 by ariard ### ########.fr */ +/* Updated: 2017/02/21 21:34:55 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/token_print.c b/42sh/src/lexer/token_print.c index 18d9b38e..d4f1f901 100644 --- a/42sh/src/lexer/token_print.c +++ b/42sh/src/lexer/token_print.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/28 14:39:01 by jhalford #+# #+# */ -/* Updated: 2017/02/20 20:55:43 by ariard ### ########.fr */ +/* Updated: 2017/02/21 22:20:00 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,19 +15,12 @@ void token_print(t_list *lst) { t_token *token; - int i; - t_type type; - int index; while (lst) { - i = -1; + token = lst->content; - type = token->type; - while (type >> (i++ + 2)) - ; - DG("%02i:[%s]", i, token->data); - index = -1; + DG("token : %s data [%s]\n", read_state(token->type), token->data); lst = lst->next; } } diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index 2568d77e..ddee0ec0 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/02/21 20:31:43 by ariard ### ########.fr */ +/* Updated: 2017/02/21 22:44:41 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,13 +31,11 @@ int handle_instruction(int fd) while (1) { if ((ret = readline(fd, get_lexer_stack(lexer), &str))) - { - DG("ret=%i, str=%s, state=%i", ret, str, parser.state); + { if (ret == -1) return (-1); return (parser.state == UNDEFINED ? error_EOF() : 1); } - DG("ret=%i, str=%s", ret, str); ft_strappend(&lexer.str, str); if (get_lexer_stack(lexer) == BACKSLASH) pop(&lexer.stack); @@ -46,11 +44,16 @@ int handle_instruction(int fd) ltoken = ft_lstlast(token); if (lexer_lex(token ? <oken : &token, &lexer)) return (1); - //token_print(token); if (get_lexer_stack(lexer)) - continue ; + continue ; + lexer.state = DEFAULT; + if (get_reserved_words(&token)) + return (1); + if (insert_newline(&token)) + return (1); if (ft_parse(&ast, &token, &parser)) continue ; + token = NULL; DG("AFTER PARSING: state=%i", parser.state); if (parser.state == SUCCESS) break ; diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index 96a82d56..2f509444 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:39:18 by ariard #+# #+# */ -/* Updated: 2017/02/21 10:49:53 by ariard ### ########.fr */ +/* Updated: 2017/02/21 20:40:31 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -240,20 +240,20 @@ int aggregate_sym(t_sym **stack, t_sym *new_sym, t_parstate *state) int i; i = 0; -// DG("aggregate head %s && sym %s", -// read_state(**stack), read_state(*new_sym)); + DG("aggregate head %s && sym %s", + read_state(**stack), read_state(*new_sym)); while (g_aggrematch[i].top) { if (*new_sym == g_aggrematch[i].top && MATCH_STACK(**stack, g_aggrematch[i].under)) { -// DG("MATCH : %s", read_state(g_aggrematch[i].new_sym)); + DG("MATCH : %s", read_state(g_aggrematch[i].new_sym)); *new_sym = g_aggrematch[i].new_sym; if (g_aggrematch[i].erase_sym) { pop_stack(stack, g_aggrematch[i].erase_sym); -// DG("stack after pop: %s", read_state(**stack)); + DG("stack after pop: %s", read_state(**stack)); } if (eval_sym(**stack, *new_sym)) return ((*state = ERROR)); diff --git a/42sh/src/parser/ft_parse.c b/42sh/src/parser/ft_parse.c index 1818c48c..acc024b8 100644 --- a/42sh/src/parser/ft_parse.c +++ b/42sh/src/parser/ft_parse.c @@ -14,6 +14,7 @@ static void insert_linebreak(t_list **lst) { t_token *token; + token = (*lst)->content; token->type = LINEBREAK; } @@ -32,12 +33,14 @@ int ft_parse(t_btree **ast, t_list **token, t_parser *parser) produce_sym(*parser->stack, parser->new_sym, token); DG("new sym %s", read_state(*parser->new_sym)); if (eval_sym(*parser->stack, *parser->new_sym)) - parser->state = ERROR; + return ((parser->state = ERROR)); else { aggregate_sym(&parser->stack, parser->new_sym, &parser->state); push_stack(++parser->stack, *parser->new_sym); } + ft_read_stack(parser->stack); + DG("\n"); if (*parser->stack == PROGRAM) parser->state = SUCCESS; else @@ -50,6 +53,5 @@ int ft_parse(t_btree **ast, t_list **token, t_parser *parser) else ft_lst_delif(token, (*token)->content, &ft_addrcmp, &token_free); } - ft_read_stack(parser->stack); return (0); } diff --git a/42sh/src/parser/produce_sym.c b/42sh/src/parser/produce_sym.c index 306c9db1..332e6bf6 100644 --- a/42sh/src/parser/produce_sym.c +++ b/42sh/src/parser/produce_sym.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:58:34 by ariard #+# #+# */ -/* Updated: 2017/02/20 22:37:22 by jhalford ### ########.fr */ +/* Updated: 2017/02/21 22:21:41 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -88,8 +88,8 @@ int produce_sym(t_sym stack, t_sym *new_sym, t_list **lst) int i; token = (*lst)->content; -// DG("produce stack : %s && token : %s", read_state(stack), -// read_state(token->type)); + DG("produce stack : %s && token : %s", read_state(stack), + read_state(token->type)); i = 0; *new_sym = 0; while (g_prodmatch[i].new_sym) @@ -97,7 +97,7 @@ int produce_sym(t_sym stack, t_sym *new_sym, t_list **lst) if (token->type == g_prodmatch[i].token && stack == g_prodmatch[i].stack) { -// DG("MATCH : %s", read_state(g_prodmatch[i].new_sym)); + DG("MATCH : %s", read_state(g_prodmatch[i].new_sym)); *new_sym = g_prodmatch[i].new_sym; } i++; diff --git a/42sh/src/parser/read_stack.c b/42sh/src/parser/read_stack.c index 95f5c3a1..e8fb06c2 100644 --- a/42sh/src/parser/read_stack.c +++ b/42sh/src/parser/read_stack.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 15:32:10 by ariard #+# #+# */ -/* Updated: 2017/02/20 22:38:48 by jhalford ### ########.fr */ +/* Updated: 2017/02/21 20:39:13 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,8 @@ char *read_state(t_sym current) { + if (current == 0) + return ("NULL"); if (current == UNTIL_CLAUSE) return ("UNTIL_CLAUSE"); if (current == TK_UNTIL) @@ -161,10 +163,8 @@ char *read_state(t_sym current) int ft_read_stack(t_sym *stack) { + DG("read stack :"); while (*stack) - { - ft_putstr(read_state(*stack--)); - ft_putchar(10); - } + DG("%s", read_state(*stack--)); return (0); } From 5976d0d281d766418e7f12e66fb13c646de2c4f5 Mon Sep 17 00:00:00 2001 From: AntoHesse Date: Wed, 22 Feb 2017 01:43:25 +0100 Subject: [PATCH 03/23] grammar case part 1 motherfucker --- 42sh/case.sh | 8 -------- 42sh/includes/exec.h | 4 ++-- 42sh/sample/case/case.sh | 12 ++++++------ 42sh/src/lexer/get_reserved_words.c | 8 ++++++++ 42sh/src/main/main.c | 8 ++++---- 42sh/src/parser/aggregate_sym.c | 1 + 42sh/src/parser/eval_sym.c | 3 +++ 42sh/src/parser/ft_parse.c | 5 +++-- 42sh/src/parser/produce_sym.c | 3 ++- 42sh/src/parser/read_stack.c | 8 ++++++++ 10 files changed, 37 insertions(+), 23 deletions(-) delete mode 100644 42sh/case.sh diff --git a/42sh/case.sh b/42sh/case.sh deleted file mode 100644 index d415d6aa..00000000 --- a/42sh/case.sh +++ /dev/null @@ -1,8 +0,0 @@ -case $rental in - ("car") echo "For $rental rental is Rs.20 per k/m.";; - ("van") echo "For $rental rental is Rs.10 per k/m.";; - ("jeep") echo "For $rental rental is Rs.5 per k/m.";; - ("bicycle") echo "For $rental rental 20 paisa per k/m.";; - ("enfield") echo "For $rental rental Rs.3 per k/m.";; - ("thunderbird") echo "For $rental rental Rs.5 per k/m.";; -esac diff --git a/42sh/includes/exec.h b/42sh/includes/exec.h index 74e303ee..58aabc7a 100644 --- a/42sh/includes/exec.h +++ b/42sh/includes/exec.h @@ -128,7 +128,7 @@ void set_exitstatus(int status, int override); void ast_free(void *data, size_t content_size); -int loop_exec(t_list *list_ast); -int loop_del(t_list *list_ast); + + #endif diff --git a/42sh/sample/case/case.sh b/42sh/sample/case/case.sh index d415d6aa..3828871c 100644 --- a/42sh/sample/case/case.sh +++ b/42sh/sample/case/case.sh @@ -1,8 +1,8 @@ case $rental in - ("car") echo "For $rental rental is Rs.20 per k/m.";; - ("van") echo "For $rental rental is Rs.10 per k/m.";; - ("jeep") echo "For $rental rental is Rs.5 per k/m.";; - ("bicycle") echo "For $rental rental 20 paisa per k/m.";; - ("enfield") echo "For $rental rental Rs.3 per k/m.";; - ("thunderbird") echo "For $rental rental Rs.5 per k/m.";; + "cat") echo "For $rental rental is Rs.20 per k/m.";; + "van") echo "For $rental rental is Rs.10 per k/m.";; + "jeep") echo "For $rental rental is Rs.5 per k/m.";; + "bicycle") echo "For $rental rental 20 paisa per k/m.";; + "enfield") echo "For $rental rental Rs.3 per k/m.";; + "thunderbird") echo "For $rental rental Rs.5 per k/m.";; esac diff --git a/42sh/src/lexer/get_reserved_words.c b/42sh/src/lexer/get_reserved_words.c index 413b4c35..84c2f493 100644 --- a/42sh/src/lexer/get_reserved_words.c +++ b/42sh/src/lexer/get_reserved_words.c @@ -16,10 +16,12 @@ int get_reserved_words(t_list **alst) { t_token *token; t_token *previous_token; + t_token *ante_token; t_list *temp; temp = *alst; previous_token = NULL; + ante_token = NULL; while (temp) { token = temp->content; @@ -45,8 +47,14 @@ int get_reserved_words(t_list **alst) token->type = TK_ELSE; else if (ft_strncmp(token->data, "until", 5) == 0) token->type = TK_UNTIL; + else if (ft_strncmp(token->data, "case", 4) == 0) + token->type = TK_CASE; } } + if (ante_token && ante_token->type == TK_CASE + && ft_strncmp(token->data, "in", 2) == 0) + token->type = TK_IN; + ante_token = previous_token; previous_token = token; temp = temp->next; } diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index ddee0ec0..88606518 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -30,6 +30,7 @@ int handle_instruction(int fd) DG("START: state=%i", parser.state); while (1) { + DG("get input"); if ((ret = readline(fd, get_lexer_stack(lexer), &str))) { if (ret == -1) @@ -47,21 +48,20 @@ int handle_instruction(int fd) if (get_lexer_stack(lexer)) continue ; lexer.state = DEFAULT; + token_print(token); if (get_reserved_words(&token)) return (1); if (insert_newline(&token)) return (1); if (ft_parse(&ast, &token, &parser)) continue ; - token = NULL; - DG("AFTER PARSING: state=%i", parser.state); if (parser.state == SUCCESS) break ; else if (parser.state == ERROR) - return (error_syntax(&token)); + return (error_syntax(&token)); } DG("succesful parsing:"); - btree_print(STDBUG, ast, &ft_putast); +// btree_print(STDBUG, ast, &ft_putast); /* if (ft_exec(&ast)) */ /* return (1); */ ft_add_str_in_history(lexer.str); diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index 2f509444..b4beb401 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -57,6 +57,7 @@ t_aggrematch g_aggrematch[] = {LINEBREAK, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST}, {NEWLINE_LIST, CMD_NAME, CMD_SUPERIOR, CMD_NAME}, {NEWLINE_LIST, TK_DO, TK_DO, TK_DO}, + {NEWLINE_LIST, TK_IN, TK_IN, TK_IN}, {NEWLINE_LIST, TK_THEN, TK_THEN, TK_THEN}, {NEWLINE_LIST, TK_IF, TK_IF, TK_IF}, {NEWLINE_LIST, TK_ELIF, TK_ELIF, TK_ELIF}, diff --git a/42sh/src/parser/eval_sym.c b/42sh/src/parser/eval_sym.c index b082ed21..db4e1fcb 100644 --- a/42sh/src/parser/eval_sym.c +++ b/42sh/src/parser/eval_sym.c @@ -203,6 +203,7 @@ t_stackmatch g_stackmatch[] = {TK_CASE, NEWLINE_LIST}, {TK_CASE, SEPARATOR_OP}, {TK_CASE, PIPE_SEMI_SEQUENCE}, + {TK_IN, TK_WORD}, {TK_ESAC, CASE_LIST}, {TK_ESAC, CASE_LIST_NS}, {TK_ESAC, LINEBREAK}, @@ -304,6 +305,7 @@ t_stackmatch g_stackmatch[] = {LINEBREAK, COMPOUND_LIST}, {LINEBREAK, PROGRAM}, {NEWLINE_LIST, TK_DO}, + {NEWLINE_LIST, TK_IN}, {NEWLINE_LIST, TK_WHILE}, {NEWLINE_LIST, TK_UNTIL}, {NEWLINE_LIST, TK_IF}, @@ -497,6 +499,7 @@ t_stackmatch g_stackmatch[] = {PATTERN, TK_PAREN_OPEN}, {PATTERN, CASE_LIST}, + {PATTERN, TK_IN}, {PATTERN_CASE, CASE_LIST}, {CASE_ITEM, CASE_LIST}, {CASE_ITEM, LINEBREAK}, diff --git a/42sh/src/parser/ft_parse.c b/42sh/src/parser/ft_parse.c index acc024b8..f54351ed 100644 --- a/42sh/src/parser/ft_parse.c +++ b/42sh/src/parser/ft_parse.c @@ -28,6 +28,7 @@ static int end_instruction(t_sym sym) int ft_parse(t_btree **ast, t_list **token, t_parser *parser) { + (void)ast; while (*token) { produce_sym(*parser->stack, parser->new_sym, token); @@ -45,8 +46,8 @@ int ft_parse(t_btree **ast, t_list **token, t_parser *parser) parser->state = SUCCESS; else parser->state = UNDEFINED; - build_tree(ast, token); - btree_print(STDBUG, *ast, &ft_putast); +// build_tree(ast, token); +// btree_print(STDBUG, *ast, &ft_putast); if ((end_instruction(*parser->stack) && !(*token)->next)) /* || *parser->stack == PROGRAM) */ insert_linebreak(token); diff --git a/42sh/src/parser/produce_sym.c b/42sh/src/parser/produce_sym.c index 332e6bf6..9164cb58 100644 --- a/42sh/src/parser/produce_sym.c +++ b/42sh/src/parser/produce_sym.c @@ -43,7 +43,7 @@ t_prodmatch g_prodmatch[] = {TK_WORD, TK_BANG, CMD_NAME}, {TK_WORD, PIPE_SEMI_SEQUENCE, CMD_NAME}, {TK_WORD, SEPARATOR_OP, CMD_NAME}, - {TK_WORD, IN, WORDLIST}, + {TK_WORD, TK_IN, PATTERN}, {TK_WORD, CASE_LIST, PATTERN}, {TK_WORD, TK_PAREN_OPEN, PATTERN}, {TK_ASSIGNEMENT_WORD, LINEBREAK, CMD_PREFIX}, @@ -56,6 +56,7 @@ t_prodmatch g_prodmatch[] = {TK_NAME, NEWLINE_LIST, FNAME}, {TK_NAME, TK_FOR, NAME}, {TK_NEWLINE, TK_DO, NEWLINE_LIST}, + {TK_NEWLINE, TK_IN, NEWLINE_LIST}, {TK_NEWLINE, TK_WHILE, NEWLINE_LIST}, {TK_NEWLINE, TK_UNTIL, NEWLINE_LIST}, {TK_NEWLINE, TK_IF, NEWLINE_LIST}, diff --git a/42sh/src/parser/read_stack.c b/42sh/src/parser/read_stack.c index e8fb06c2..2806b159 100644 --- a/42sh/src/parser/read_stack.c +++ b/42sh/src/parser/read_stack.c @@ -16,6 +16,14 @@ char *read_state(t_sym current) { if (current == 0) return ("NULL"); + if (current == PATTERN) + return ("PATTERN"); + if (current == TK_CASE) + return ("TK_CASE"); + if (current == TK_IN) + return ("TK_IN"); + if (current == TK_ESAC) + return ("TK_ESAC"); if (current == UNTIL_CLAUSE) return ("UNTIL_CLAUSE"); if (current == TK_UNTIL) From 268c5fb46e2047c2e0e7c14bad665f5819ec3da4 Mon Sep 17 00:00:00 2001 From: AntoHesse Date: Wed, 22 Feb 2017 18:36:32 +0100 Subject: [PATCH 04/23] syntax error + coordination parser etat --- 42sh/src/main/main.c | 7 ++- 42sh/src/parser/aggregate_sym.c | 20 ++++++- 42sh/src/parser/error_syntax.c | 4 +- 42sh/src/parser/eval_sym.c | 101 +++++++++++++++++++++++++++++++- 42sh/src/parser/ft_parse.c | 6 +- 42sh/src/parser/produce_sym.c | 1 + 42sh/test.sh | 2 + 7 files changed, 132 insertions(+), 9 deletions(-) create mode 100644 42sh/test.sh diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index 88606518..e75da56e 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -48,7 +48,7 @@ int handle_instruction(int fd) if (get_lexer_stack(lexer)) continue ; lexer.state = DEFAULT; - token_print(token); +// token_print(token); if (get_reserved_words(&token)) return (1); if (insert_newline(&token)) @@ -57,8 +57,9 @@ int handle_instruction(int fd) continue ; if (parser.state == SUCCESS) break ; - else if (parser.state == ERROR) - return (error_syntax(&token)); + else if (parser.state == ERROR) + error_syntax(&token); + token = NULL; } DG("succesful parsing:"); // btree_print(STDBUG, ast, &ft_putast); diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index b4beb401..788623aa 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -55,6 +55,7 @@ t_aggrematch g_aggrematch[] = {LINEBREAK, CMD_SUPERIOR, SEPARATOR_OP, 0}, {LINEBREAK, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE, PIPE_SEMI_SEQUENCE}, {LINEBREAK, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST}, + {LINEBREAK, COMPLETE_COMMANDS, PROGRAM, LINEBREAK}, {NEWLINE_LIST, CMD_NAME, CMD_SUPERIOR, CMD_NAME}, {NEWLINE_LIST, TK_DO, TK_DO, TK_DO}, {NEWLINE_LIST, TK_IN, TK_IN, TK_IN}, @@ -72,6 +73,8 @@ t_aggrematch g_aggrematch[] = {NEWLINE_LIST, COMPOUND_LIST, SEPARATOR, 0}, {NEWLINE_LIST, COMPLETE_CONDITION, COMPLETE_CONDITION, COMPLETE_CONDITION}, {NEWLINE_LIST, CONDITION, CONDITION, CONDITION}, + {NEWLINE_LIST, COMPLETE_COMMANDS, LINEBREAK, 0}, + {NEWLINE_LIST, LINEBREAK, PROGRAM, LINEBREAK}, //to check {IO_HERE, TK_IO_NUMBER, IO_REDIRECT, TK_IO_NUMBER}, @@ -96,6 +99,7 @@ t_aggrematch g_aggrematch[] = {IO_REDIRECT, CMD_WORD, CMD_SUFFIX, 0}, {IO_REDIRECT, CMD_PREFIX, CMD_PREFIX, CMD_PREFIX}, {IO_REDIRECT, LINEBREAK, CMD_PREFIX, 0}, + {IO_REDIRECT, COMPLETE_COMMANDS, CMD_PREFIX, 0}, {IO_REDIRECT, TK_BANG, CMD_PREFIX, 0}, {IO_REDIRECT, SEPARATOR_OP, CMD_PREFIX, 0}, {IO_REDIRECT, NEWLINE_LIST, CMD_PREFIX, 0}, @@ -105,6 +109,7 @@ t_aggrematch g_aggrematch[] = {CMD_SUFFIX, CMD_SUPERIOR, SIMPLE_COMMAND, CMD_SUPERIOR}, //to abstract {CMD_PREFIX, LINEBREAK, SIMPLE_COMMAND, 0}, + {CMD_PREFIX, COMPLETE_COMMANDS, SIMPLE_COMMAND, 0}, {CMD_PREFIX, TK_BANG, SIMPLE_COMMAND, 0}, {CMD_PREFIX, SEPARATOR_OP, SIMPLE_COMMAND, 0}, {CMD_PREFIX, NEWLINE_LIST, SIMPLE_COMMAND, 0}, @@ -112,6 +117,7 @@ t_aggrematch g_aggrematch[] = {CMD_WORD, CMD_PREFIX, SIMPLE_COMMAND, CMD_PREFIX}, //to check {CMD_NAME, LINEBREAK, CMD_SUPERIOR, 0}, + {CMD_NAME, COMPLETE_COMMANDS, CMD_SUPERIOR, 0}, {CMD_NAME, TK_BANG, CMD_SUPERIOR, 0}, {CMD_NAME, SEPARATOR_OP, CMD_SUPERIOR, 0}, {CMD_NAME, NEWLINE_LIST, CMD_SUPERIOR, 0}, @@ -161,6 +167,7 @@ t_aggrematch g_aggrematch[] = {COMPOUND_COMMAND, ALL, COMMAND, 0}, {AND_OR_MINOR, PIPE_SEMI_SEQUENCE, AND_OR_MAJOR, PIPE_SEMI_SEQUENCE}, {AND_OR_MINOR, LINEBREAK, AND_OR_MAJOR, 0}, + {AND_OR_MINOR, COMPLETE_COMMANDS, AND_OR_MAJOR, 0}, {AND_OR_MINOR, AND_OR_MAJOR, AND_OR_MAJOR, 0}, {COMMAND, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE}, {COMMAND, COMPOUND_LIST, PIPE_SEMI_SEQUENCE, 0}, @@ -175,12 +182,18 @@ t_aggrematch g_aggrematch[] = {COMMAND, SEPARATOR_OP, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, NEWLINE_LIST, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, LINEBREAK, PIPE_SEMI_SEQUENCE, 0}, + {COMMAND, COMPLETE_COMMANDS, PIPE_SEMI_SEQUENCE, 0}, + {COMMAND, AND_OR_MAJOR, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, AND_OR_MAJOR, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, COMPLETE_CONDITION, PIPE_SEMI_SEQUENCE, 0}, {END_COMMAND, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE, PIPE_SEMI_SEQUENCE}, + {END_COMMAND, AND_OR_MAJOR, LIST, AND_OR_MAJOR}, + {END_COMMAND, TK_WHILE, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_WHILE, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_UNTIL, PIPE_SEQUENCE, 0}, {END_COMMAND, LINEBREAK, PIPE_SEQUENCE, 0}, + {END_COMMAND, COMPLETE_COMMANDS, PIPE_SEQUENCE, 0}, + {END_COMMAND, TK_DO, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_DO, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_IF, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_ELIF, PIPE_SEQUENCE, 0}, @@ -194,6 +207,7 @@ t_aggrematch g_aggrematch[] = {PIPE_SEQUENCE, SEPARATOR_OP, PIPELINE, 0}, {PIPE_SEQUENCE, NEWLINE_LIST, PIPELINE, 0}, {PIPE_SEQUENCE, LINEBREAK, PIPELINE, 0}, + {PIPE_SEQUENCE, COMPLETE_COMMANDS, PIPELINE, 0}, {PIPE_SEQUENCE, AND_OR_MAJOR, PIPELINE, 0}, {PIPE_SEQUENCE, TK_DO, PIPELINE, 0}, {PIPE_SEQUENCE, TK_IF, PIPELINE, 0}, @@ -211,6 +225,7 @@ t_aggrematch g_aggrematch[] = {PIPELINE, TK_ELSE, AND_OR, 0}, {PIPELINE, COMPOUND_LIST, AND_OR, 0}, {PIPELINE, LINEBREAK, AND_OR, 0}, + {PIPELINE, COMPLETE_COMMANDS, AND_OR, 0}, // {PIPELINE, LINEBREAK, AND_OR, AND_OR}, {PIPELINE, SEPARATOR_OP, AND_OR, 0}, {PIPELINE, COMPLETE_CONDITION, AND_OR, 0}, @@ -228,11 +243,14 @@ t_aggrematch g_aggrematch[] = {AND_OR, SEPARATOR_OP, LIST, LIST}, {AND_OR, NEWLINE_LIST, LIST, 0}, {AND_OR, LINEBREAK, LIST, 0}, + {AND_OR, COMPLETE_COMMANDS, LIST, 0}, {LIST, NEWLINE_LIST, COMPLETE_COMMAND, 0}, {LIST, LINEBREAK, COMPLETE_COMMAND, 0}, + {LIST, COMPLETE_COMMANDS, COMPLETE_COMMAND, 0}, {COMPLETE_COMMAND, NEWLINE_LIST, COMPLETE_COMMANDS, COMPLETE_COMMANDS}, {COMPLETE_COMMAND, LINEBREAK, COMPLETE_COMMANDS, 0}, - {COMPLETE_COMMANDS, LINEBREAK, PROGRAM, LINEBREAK}, + {COMPLETE_COMMAND, COMPLETE_COMMANDS, COMPLETE_COMMANDS, 0}, + {COMPLETE_COMMANDS, COMPLETE_COMMANDS, COMPLETE_COMMANDS, COMPLETE_COMMANDS}, {0, 0, 0, 0}, }; diff --git a/42sh/src/parser/error_syntax.c b/42sh/src/parser/error_syntax.c index ab5655ca..827807be 100644 --- a/42sh/src/parser/error_syntax.c +++ b/42sh/src/parser/error_syntax.c @@ -60,9 +60,9 @@ int error_syntax(t_list **lst) { if (g_errormatch[i].token == token->type) { - ft_putstr_fd("syntax error near unexpetcted token `", 2); + ft_putstr_fd("syntax error near unexpected token `", 2); ft_putstr_fd(g_errormatch[i].error, 2); - ft_putstr_fd("'", 2); + ft_putstr_fd("'\n", 2); return (1); } i++; diff --git a/42sh/src/parser/eval_sym.c b/42sh/src/parser/eval_sym.c index db4e1fcb..8bbcb499 100644 --- a/42sh/src/parser/eval_sym.c +++ b/42sh/src/parser/eval_sym.c @@ -18,6 +18,7 @@ t_stackmatch g_stackmatch[] = {TK_WORD, TK_CASE}, {TK_WORD, WORDLIST}, {TK_WORD, LINEBREAK}, + {TK_WORD, COMPLETE_COMMANDS}, {TK_ASSIGNEMENT_WORD, CMD_PREFIX}, {TK_IO_NUMBER, REDIRECT_LIST}, {TK_IO_NUMBER, CMD_SUFFIX}, @@ -25,6 +26,7 @@ t_stackmatch g_stackmatch[] = {TK_IO_NUMBER, CMD_NAME}, {TK_IO_NUMBER, CMD_WORD}, {TK_IO_NUMBER, LINEBREAK}, + {TK_IO_NUMBER, COMPLETE_COMMANDS}, {TK_IO_NUMBER, TK_BANG}, {TK_IO_NUMBER, SEPARATOR_OP}, {TK_IO_NUMBER, NEWLINE_LIST}, @@ -37,6 +39,7 @@ t_stackmatch g_stackmatch[] = {TK_OR_IF, CMD_SUPERIOR}, {TK_OR_IF, AND_OR}, {TK_DSEMI, LINEBREAK}, + {TK_DSEMI, COMPLETE_COMMANDS}, {TK_DSEMI, COMPOUND_LIST}, {TK_LESS, TK_IO_NUMBER}, {TK_LESS, REDIRECT_LIST}, @@ -45,6 +48,7 @@ t_stackmatch g_stackmatch[] = {TK_LESS, CMD_WORD}, {TK_LESS, CMD_NAME}, {TK_LESS, LINEBREAK}, + {TK_LESS, COMPLETE_COMMANDS}, {TK_LESS, TK_BANG}, {TK_LESS, SEPARATOR_OP}, {TK_LESS, NEWLINE_LIST}, @@ -58,6 +62,7 @@ t_stackmatch g_stackmatch[] = {TK_GREAT, CMD_WORD}, {TK_GREAT, CMD_NAME}, {TK_GREAT, LINEBREAK}, + {TK_GREAT, COMPLETE_COMMANDS}, {TK_GREAT, TK_BANG}, {TK_GREAT, SEPARATOR_OP}, {TK_GREAT, NEWLINE_LIST}, @@ -73,6 +78,7 @@ t_stackmatch g_stackmatch[] = {TK_DLESS, CMD_WORD}, {TK_DLESS, CMD_NAME}, {TK_DLESS, LINEBREAK}, + {TK_DLESS, COMPLETE_COMMANDS}, {TK_DLESS, TK_BANG}, {TK_DLESS, SEPARATOR_OP}, {TK_DLESS, NEWLINE_LIST}, @@ -87,6 +93,8 @@ t_stackmatch g_stackmatch[] = {TK_DLESSDASH, CMD_WORD}, {TK_DLESSDASH, CMD_NAME}, {TK_DLESSDASH, LINEBREAK}, + {TK_DLESSDASH, COMPLETE_COMMANDS}, + {TK_DLESSDASH, TK_BANG}, {TK_DLESSDASH, TK_BANG}, {TK_DLESSDASH, SEPARATOR_OP}, {TK_DLESSDASH, NEWLINE_LIST}, @@ -101,6 +109,8 @@ t_stackmatch g_stackmatch[] = {TK_DGREAT, CMD_WORD}, {TK_DGREAT, CMD_NAME}, {TK_DGREAT, LINEBREAK}, + {TK_DGREAT, COMPLETE_COMMANDS}, + {TK_DGREAT, TK_BANG}, {TK_DGREAT, TK_BANG}, {TK_DGREAT, SEPARATOR_OP}, {TK_DGREAT, NEWLINE_LIST}, @@ -115,6 +125,8 @@ t_stackmatch g_stackmatch[] = {TK_LESSAND, CMD_WORD}, {TK_LESSAND, CMD_NAME}, {TK_LESSAND, LINEBREAK}, + {TK_LESSAND, COMPLETE_COMMANDS}, + {TK_LESSAND, TK_BANG}, {TK_LESSAND, TK_BANG}, {TK_LESSAND, SEPARATOR_OP}, {TK_LESSAND, NEWLINE_LIST}, @@ -129,6 +141,8 @@ t_stackmatch g_stackmatch[] = {TK_GREATAND, CMD_WORD}, {TK_GREATAND, CMD_NAME}, {TK_GREATAND, LINEBREAK}, + {TK_GREATAND, COMPLETE_COMMANDS}, + {TK_LESSAND, TK_BANG}, {TK_GREATAND, TK_BANG}, {TK_GREATAND, SEPARATOR_OP}, {TK_GREATAND, NEWLINE_LIST}, @@ -143,6 +157,8 @@ t_stackmatch g_stackmatch[] = {TK_LESSGREAT, CMD_WORD}, {TK_LESSGREAT, CMD_NAME}, {TK_LESSGREAT, LINEBREAK}, + {TK_LESSGREAT, COMPLETE_COMMANDS}, + {TK_LESSGREAT, TK_BANG}, {TK_LESSGREAT, TK_BANG}, {TK_LESSGREAT, SEPARATOR_OP}, {TK_LESSGREAT, NEWLINE_LIST}, @@ -157,6 +173,8 @@ t_stackmatch g_stackmatch[] = {TK_CLOBBER, CMD_WORD}, {TK_CLOBBER, CMD_NAME}, {TK_CLOBBER, LINEBREAK}, + {TK_CLOBBER, COMPLETE_COMMANDS}, + {TK_CLOBBER, TK_BANG}, {TK_CLOBBER, TK_BANG}, {TK_CLOBBER, SEPARATOR_OP}, {TK_CLOBBER, NEWLINE_LIST}, @@ -165,6 +183,8 @@ t_stackmatch g_stackmatch[] = {TK_CLOBBER, AND_OR_MAJOR}, {TK_IF, LINEBREAK}, + {TK_IF, COMPLETE_COMMANDS}, + {TK_IF, TK_BANG}, {TK_IF, TK_BANG}, {TK_IF, SEPARATOR_OP}, {TK_IF, NEWLINE_LIST}, @@ -199,6 +219,8 @@ t_stackmatch g_stackmatch[] = {TK_DONE, COMPOUND_LIST}, {TK_DONE, END_COMMAND}, {TK_CASE, LINEBREAK}, + {TK_CASE, COMPLETE_COMMANDS}, + {TK_CASE, TK_BANG}, {TK_CASE, TK_BANG}, {TK_CASE, NEWLINE_LIST}, {TK_CASE, SEPARATOR_OP}, @@ -208,6 +230,8 @@ t_stackmatch g_stackmatch[] = {TK_ESAC, CASE_LIST_NS}, {TK_ESAC, LINEBREAK}, {TK_WHILE, LINEBREAK}, + {TK_WHILE, COMPLETE_COMMANDS}, + {TK_WHILE, TK_BANG}, {TK_WHILE, TK_BANG}, {TK_WHILE, SEPARATOR_OP}, {TK_WHILE, NEWLINE_LIST}, @@ -220,6 +244,8 @@ t_stackmatch g_stackmatch[] = {TK_WHILE, TK_THEN}, {TK_WHILE, COMPLETE_CONDITION}, {TK_UNTIL, LINEBREAK}, + {TK_UNTIL, COMPLETE_COMMANDS}, + {TK_UNTIL, TK_BANG}, {TK_UNTIL, TK_BANG}, {TK_UNTIL, SEPARATOR_OP}, {TK_UNTIL, NEWLINE_LIST}, @@ -232,17 +258,23 @@ t_stackmatch g_stackmatch[] = {TK_UNTIL, TK_THEN}, {TK_UNTIL, COMPLETE_CONDITION}, {TK_FOR, LINEBREAK}, + {TK_FOR, COMPLETE_COMMANDS}, + {TK_FOR, TK_BANG}, {TK_FOR, TK_BANG}, {TK_FOR, SEPARATOR_OP}, {TK_FOR, NEWLINE_LIST}, {TK_FOR, PIPE_SEMI_SEQUENCE}, {TK_LBRACE, LINEBREAK}, + {TK_LBRACE, COMPLETE_COMMANDS}, + {TK_LBRACE, TK_BANG}, {TK_LBRACE, TK_BANG}, {TK_LBRACE, SEPARATOR_OP}, {TK_LBRACE, NEWLINE_LIST}, {TK_LBRACE, PIPE_SEMI_SEQUENCE}, {TK_RBRACE, COMPOUND_LIST}, {TK_BANG, LINEBREAK}, + {TK_BANG, COMPLETE_COMMANDS}, + {TK_BANG, SEPARATOR_OP}, {TK_BANG, SEPARATOR_OP}, {TK_BANG, NEWLINE_LIST}, {TK_IN, LINEBREAK}, @@ -260,6 +292,8 @@ t_stackmatch g_stackmatch[] = {TK_PAREN_OPEN, FNAME}, {TK_PAREN_OPEN, CASE_LIST}, {TK_PAREN_OPEN, LINEBREAK}, + {TK_PAREN_OPEN, COMPLETE_COMMANDS}, + {TK_PAREN_OPEN, TK_BANG}, {TK_PAREN_OPEN, TK_BANG}, {TK_PAREN_OPEN, SEPARATOR_OP}, {TK_PAREN_OPEN, NEWLINE_LIST}, @@ -271,6 +305,8 @@ t_stackmatch g_stackmatch[] = {SEQUENTIAL_SEP, IN}, {SEQUENTIAL_SEP, WORDLIST}, {END_COMMAND, PIPE_SEMI_SEQUENCE}, + {END_COMMAND, AND_OR_MAJOR}, + {END_COMMAND, TK_WHILE}, {END_COMMAND, TK_WHILE}, {END_COMMAND, TK_UNTIL}, {END_COMMAND, TK_DO}, @@ -279,6 +315,8 @@ t_stackmatch g_stackmatch[] = {END_COMMAND, TK_ELIF}, {END_COMMAND, TK_ELSE}, {END_COMMAND, LINEBREAK}, + {END_COMMAND, COMPLETE_COMMANDS}, + {END_COMMAND, COMPOUND_LIST}, {END_COMMAND, COMPOUND_LIST}, {END_COMMAND, COMPLETE_CONDITION}, {SEPARATOR, CMD_SUPERIOR}, @@ -291,6 +329,8 @@ t_stackmatch g_stackmatch[] = {SEPARATOR_OP, COMPOUND_LIST}, {SEPARATOR_OP, PIPE_SEMI_SEQUENCE}, {LINEBREAK, TK_SEMI}, + {LINEBREAK, END_COMMAND}, + {LINEBREAK, SEPARATOR_OP}, {LINEBREAK, SEPARATOR_OP}, {LINEBREAK, TK_PAREN_CLOSE}, {LINEBREAK, WORD}, @@ -322,6 +362,8 @@ t_stackmatch g_stackmatch[] = {NEWLINE_LIST, COMPLETE_COMMANDS}, {NEWLINE_LIST, COMPLETE_CONDITION}, {NEWLINE_LIST, CONDITION}, + {NEWLINE_LIST, LINEBREAK}, + {HERE_END, TK_DLESS}, {HERE_END, TK_DLESS}, {HERE_END, TK_DLESSDASH}, {IO_HERE, TK_IO_NUMBER}, @@ -332,6 +374,8 @@ t_stackmatch g_stackmatch[] = {IO_HERE, CMD_WORD}, {IO_HERE, CMD_NAME}, {IO_HERE, LINEBREAK}, + {IO_HERE, COMPLETE_COMMANDS}, + {IO_HERE, TK_BANG}, {IO_HERE, TK_BANG}, {IO_HERE, SEPARATOR_OP}, {IO_HERE, NEWLINE_LIST}, @@ -351,6 +395,8 @@ t_stackmatch g_stackmatch[] = {IO_FILE, CMD_WORD}, {IO_FILE, CMD_NAME}, {IO_FILE, LINEBREAK}, + {IO_FILE, COMPLETE_COMMANDS}, + {IO_FILE, TK_BANG}, {IO_FILE, TK_BANG}, {IO_FILE, SEPARATOR_OP}, {IO_FILE, NEWLINE_LIST}, @@ -362,6 +408,8 @@ t_stackmatch g_stackmatch[] = {IO_REDIRECT, CMD_WORD}, {IO_REDIRECT, CMD_NAME}, {IO_REDIRECT, LINEBREAK}, + {IO_REDIRECT, COMPLETE_COMMANDS}, + {IO_REDIRECT, TK_BANG}, {IO_REDIRECT, TK_BANG}, {IO_REDIRECT, SEPARATOR_OP}, {IO_REDIRECT, NEWLINE_LIST}, @@ -371,13 +419,17 @@ t_stackmatch g_stackmatch[] = {CMD_SUFFIX, CMD_NAME}, {CMD_SUFFIX, CMD_SUPERIOR}, {CMD_PREFIX, LINEBREAK}, + {CMD_PREFIX, COMPLETE_COMMANDS}, + {CMD_PREFIX, TK_BANG}, {CMD_PREFIX, TK_BANG}, {CMD_PREFIX, SEPARATOR_OP}, {CMD_PREFIX, NEWLINE_LIST}, {CMD_PREFIX, PIPE_SEMI_SEQUENCE}, {CMD_WORD, CMD_PREFIX}, + {CMD_NAME, COMPLETE_COMMANDS}, {CMD_NAME, LINEBREAK}, {CMD_NAME, TK_BANG}, + {CMD_NAME, TK_BANG}, {CMD_NAME, SEPARATOR_OP}, {CMD_NAME, NEWLINE_LIST}, {CMD_NAME, PIPE_SEMI_SEQUENCE}, @@ -401,7 +453,9 @@ t_stackmatch g_stackmatch[] = {CMD_SUPERIOR, TK_ELSE}, {CMD_SUPERIOR, COMPOUND_LIST}, {CMD_SUPERIOR, COMPLETE_CONDITION}, - {CMD_SUPERIOR, LINEBREAK,}, + {CMD_SUPERIOR, LINEBREAK}, + {CMD_SUPERIOR, COMPLETE_COMMANDS}, + {CMD_SUPERIOR, TK_BANG}, {CMD_SUPERIOR, TK_BANG}, {CMD_SUPERIOR, SEPARATOR_OP}, {CMD_SUPERIOR, NEWLINE_LIST}, @@ -419,6 +473,8 @@ t_stackmatch g_stackmatch[] = {SIMPLE_COMMAND, COMPOUND_LIST}, {SIMPLE_COMMAND, COMPLETE_CONDITION}, {SIMPLE_COMMAND, LINEBREAK}, + {SIMPLE_COMMAND, COMPLETE_COMMANDS}, + {SIMPLE_COMMAND, TK_BANG}, {SIMPLE_COMMAND, TK_BANG}, {SIMPLE_COMMAND, SEPARATOR_OP}, {SIMPLE_COMMAND, NEWLINE_LIST}, @@ -431,27 +487,39 @@ t_stackmatch g_stackmatch[] = {LOOP, TK_WHILE}, {LOOP, TK_UNTIL}, {CONDITION, LINEBREAK}, + {CONDITION, COMPLETE_COMMANDS}, + {CONDITION, COMPOUND_LIST}, {CONDITION, COMPOUND_LIST}, {CONDITION, COMPLETE_CONDITION}, {COMPLETE_CONDITION, LINEBREAK}, + {COMPLETE_CONDITION, COMPLETE_COMMANDS}, + {COMPLETE_CONDITION, COMPLETE_CONDITION}, {COMPLETE_CONDITION, COMPLETE_CONDITION}, {BRACE_GROUP, LINEBREAK}, + {BRACE_GROUP, COMPLETE_COMMANDS}, + {BRACE_GROUP, TK_BANG}, {BRACE_GROUP, TK_BANG}, {BRACE_GROUP, SEPARATOR_OP}, {BRACE_GROUP, NEWLINE_LIST}, {BRACE_GROUP, PIPE_SEMI_SEQUENCE}, {FNAME, LINEBREAK}, + {FNAME, COMPLETE_COMMANDS}, + {FNAME, TK_BANG}, {FNAME, TK_BANG}, {FNAME, SEPARATOR_OP}, {FNAME, NEWLINE_LIST}, {FNAME, PIPE_SEMI_SEQUENCE}, {FUNCTION_BODY, FUNC}, {FUNCTION_DEFINITION, LINEBREAK}, + {FUNCTION_DEFINITION, COMPLETE_COMMANDS}, + {FUNCTION_DEFINITION, TK_BANG}, {FUNCTION_DEFINITION, TK_BANG}, {FUNCTION_DEFINITION, SEPARATOR_OP}, {FUNCTION_DEFINITION, NEWLINE_LIST}, {FUNCTION_DEFINITION, PIPE_SEMI_SEQUENCE}, {UNTIL_CLAUSE, LINEBREAK}, + {UNTIL_CLAUSE, COMPLETE_COMMANDS}, + {UNTIL_CLAUSE, TK_BANG}, {UNTIL_CLAUSE, TK_BANG}, {UNTIL_CLAUSE, SEPARATOR_OP}, {UNTIL_CLAUSE, NEWLINE_LIST}, @@ -466,6 +534,8 @@ t_stackmatch g_stackmatch[] = {UNTIL_CLAUSE, COMPOUND_LIST}, {UNTIL_CLAUSE, COMPLETE_CONDITION}, {WHILE_CLAUSE, LINEBREAK}, + {WHILE_CLAUSE, COMPLETE_COMMANDS}, + {WHILE_CLAUSE, TK_BANG}, {WHILE_CLAUSE, TK_BANG}, {WHILE_CLAUSE, SEPARATOR_OP}, {WHILE_CLAUSE, NEWLINE_LIST}, @@ -482,6 +552,8 @@ t_stackmatch g_stackmatch[] = // {ELSE_PART, COMPOUND_LIST}, // {ELSE_PART, COMPLETE_CONDITION}, {IF_CLAUSE, LINEBREAK}, + {IF_CLAUSE, COMPLETE_COMMANDS}, + {IF_CLAUSE, TK_BANG}, {IF_CLAUSE, TK_BANG}, {IF_CLAUSE, SEPARATOR_OP}, {IF_CLAUSE, NEWLINE_LIST}, @@ -508,6 +580,8 @@ t_stackmatch g_stackmatch[] = {CASE_LIST, LINEBREAK}, {CASE_LIST_NS, LINEBREAK}, {CASE_CLAUSE, LINEBREAK}, + {CASE_CLAUSE, COMPLETE_COMMANDS}, + {CASE_CLAUSE, TK_BANG}, {CASE_CLAUSE, TK_BANG}, {CASE_CLAUSE, SEPARATOR_OP}, {CASE_CLAUSE, NEWLINE_LIST}, @@ -516,11 +590,15 @@ t_stackmatch g_stackmatch[] = {IN, LINEBREAK}, {NAME, TK_FOR}, {FOR_CLAUSE, LINEBREAK}, + {FOR_CLAUSE, COMPLETE_COMMANDS}, + {FOR_CLAUSE, TK_BANG}, {FOR_CLAUSE, TK_BANG}, {FOR_CLAUSE, SEPARATOR_OP}, {FOR_CLAUSE, NEWLINE_LIST}, {FOR_CLAUSE, PIPE_SEMI_SEQUENCE}, {TERM, LINEBREAK}, + {TERM, COMPLETE_COMMANDS}, + {COMPOUND_LIST, TK_DO}, {COMPOUND_LIST, TK_DO}, {COMPOUND_LIST, TK_LBRACE}, {COMPOUND_LIST, TK_WHILE}, @@ -533,11 +611,15 @@ t_stackmatch g_stackmatch[] = {COMPOUND_LIST, COMPOUND_LIST}, {COMPOUND_LIST, COMPLETE_CONDITION}, {SUBSHELL, LINEBREAK}, + {SUBSHELL, COMPLETE_COMMANDS}, + {SUBSHELL, TK_BANG}, {SUBSHELL, TK_BANG}, {SUBSHELL, SEPARATOR_OP}, {SUBSHELL, NEWLINE_LIST}, {SUBSHELL, PIPE_SEMI_SEQUENCE}, {COMPOUND_COMMAND, LINEBREAK}, + {COMPOUND_COMMAND, COMPLETE_COMMANDS}, + {COMPOUND_COMMAND, TK_BANG}, {COMPOUND_COMMAND, TK_BANG}, {COMPOUND_COMMAND, SEPARATOR_OP}, {COMPOUND_COMMAND, NEWLINE_LIST}, @@ -555,6 +637,8 @@ t_stackmatch g_stackmatch[] = {COMMAND, TK_WHILE}, {COMMAND, TK_UNTIL}, {COMMAND, LINEBREAK}, + {COMMAND, COMPLETE_COMMANDS}, + {COMMAND, TK_DO}, {COMMAND, TK_DO}, {COMMAND, TK_IF}, {COMMAND, TK_ELIF}, @@ -569,6 +653,8 @@ t_stackmatch g_stackmatch[] = {COMMAND, AND_OR_MAJOR}, {AND_OR_MINOR, PIPE_SEMI_SEQUENCE}, {AND_OR_MINOR, LINEBREAK}, + {AND_OR_MINOR, COMPLETE_COMMANDS}, + {AND_OR_MINOR, AND_OR_MAJOR}, {AND_OR_MINOR, AND_OR_MAJOR}, {PIPE_SEQUENCE, TK_WHILE}, {PIPE_SEQUENCE, TK_UNTIL}, @@ -580,6 +666,8 @@ t_stackmatch g_stackmatch[] = {PIPE_SEQUENCE, COMPOUND_LIST}, {PIPE_SEQUENCE, COMPLETE_CONDITION}, {PIPE_SEQUENCE, LINEBREAK}, + {PIPE_SEQUENCE, COMPLETE_COMMANDS}, + {PIPE_SEQUENCE, TK_BANG}, {PIPE_SEQUENCE, TK_BANG}, {PIPE_SEQUENCE, SEPARATOR_OP}, {PIPE_SEQUENCE, NEWLINE_LIST}, @@ -594,6 +682,8 @@ t_stackmatch g_stackmatch[] = {PIPE_SEMI_SEQUENCE, COMPOUND_LIST}, {PIPE_SEMI_SEQUENCE, COMPLETE_CONDITION}, {PIPE_SEMI_SEQUENCE, LINEBREAK}, + {PIPE_SEMI_SEQUENCE, COMPLETE_COMMANDS}, + {PIPE_SEMI_SEQUENCE, TK_BANG}, {PIPE_SEMI_SEQUENCE, TK_BANG}, {PIPE_SEMI_SEQUENCE, SEPARATOR_OP}, {PIPE_SEMI_SEQUENCE, NEWLINE_LIST}, @@ -608,10 +698,14 @@ t_stackmatch g_stackmatch[] = {PIPELINE, COMPOUND_LIST}, {PIPELINE, COMPLETE_CONDITION}, {PIPELINE, LINEBREAK}, + {PIPELINE, COMPLETE_COMMANDS}, + {PIPELINE, SEPARATOR_OP}, {PIPELINE, SEPARATOR_OP}, {PIPELINE, NEWLINE_LIST}, {PIPELINE, AND_OR_MAJOR}, {AND_OR_MAJOR, LINEBREAK}, + {AND_OR_MAJOR, COMPLETE_COMMANDS}, + {AND_OR_MAJOR, AND_OR_MAJOR}, {AND_OR_MAJOR, AND_OR_MAJOR}, {AND_OR, TK_DO}, {AND_OR, TK_WHILE}, @@ -623,13 +717,18 @@ t_stackmatch g_stackmatch[] = {AND_OR, COMPOUND_LIST}, {AND_OR, COMPLETE_CONDITION}, {AND_OR, LINEBREAK}, + {AND_OR, COMPLETE_COMMANDS}, + {AND_OR, SEPARATOR_OP}, {AND_OR, SEPARATOR_OP}, {AND_OR, NEWLINE_LIST}, {LIST, LINEBREAK}, + {LIST, COMPLETE_COMMANDS}, {LIST, NEWLINE_LIST}, {COMPLETE_COMMAND, LINEBREAK}, + {COMPLETE_COMMAND, COMPLETE_COMMANDS}, {COMPLETE_COMMAND, NEWLINE_LIST}, {COMPLETE_COMMANDS, LINEBREAK}, + {COMPLETE_COMMANDS, COMPLETE_COMMANDS}, {0, 0}, }; diff --git a/42sh/src/parser/ft_parse.c b/42sh/src/parser/ft_parse.c index f54351ed..42f0b249 100644 --- a/42sh/src/parser/ft_parse.c +++ b/42sh/src/parser/ft_parse.c @@ -21,7 +21,8 @@ static void insert_linebreak(t_list **lst) static int end_instruction(t_sym sym) { - if (sym == CMD_SUPERIOR || sym == PIPE_SEMI_SEQUENCE) + if (sym == CMD_SUPERIOR || sym == PIPE_SEMI_SEQUENCE + || sym == COMPLETE_COMMANDS || sym == END_COMMAND) return (1); return (0); } @@ -29,6 +30,8 @@ static int end_instruction(t_sym sym) int ft_parse(t_btree **ast, t_list **token, t_parser *parser) { (void)ast; + if (parser->state == SUCCESS || parser->state == ERROR) + parser_init(parser); while (*token) { produce_sym(*parser->stack, parser->new_sym, token); @@ -49,7 +52,6 @@ int ft_parse(t_btree **ast, t_list **token, t_parser *parser) // build_tree(ast, token); // btree_print(STDBUG, *ast, &ft_putast); if ((end_instruction(*parser->stack) && !(*token)->next)) - /* || *parser->stack == PROGRAM) */ insert_linebreak(token); else ft_lst_delif(token, (*token)->content, &ft_addrcmp, &token_free); diff --git a/42sh/src/parser/produce_sym.c b/42sh/src/parser/produce_sym.c index 9164cb58..9722088f 100644 --- a/42sh/src/parser/produce_sym.c +++ b/42sh/src/parser/produce_sym.c @@ -46,6 +46,7 @@ t_prodmatch g_prodmatch[] = {TK_WORD, TK_IN, PATTERN}, {TK_WORD, CASE_LIST, PATTERN}, {TK_WORD, TK_PAREN_OPEN, PATTERN}, + {TK_WORD, COMPLETE_COMMANDS, CMD_NAME}, {TK_ASSIGNEMENT_WORD, LINEBREAK, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, TK_BANG, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, SEPARATOR_OP, CMD_PREFIX}, diff --git a/42sh/test.sh b/42sh/test.sh new file mode 100644 index 00000000..b113c751 --- /dev/null +++ b/42sh/test.sh @@ -0,0 +1,2 @@ +> > +ls | cat From 7a849b360a0905df445e2990c7ce952388028475 Mon Sep 17 00:00:00 2001 From: AntoHesse Date: Wed, 22 Feb 2017 18:36:42 +0100 Subject: [PATCH 05/23] syntax error + coordination parser etat --- 42sh/test.sh | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 42sh/test.sh diff --git a/42sh/test.sh b/42sh/test.sh deleted file mode 100644 index b113c751..00000000 --- a/42sh/test.sh +++ /dev/null @@ -1,2 +0,0 @@ -> > -ls | cat From 2fbea4837d4b524b88f45544ab9d6235c613e164 Mon Sep 17 00:00:00 2001 From: AntoHesse Date: Wed, 22 Feb 2017 19:50:29 +0100 Subject: [PATCH 06/23] gramamr for --- 42sh/includes/parser.h | 1 + 42sh/src/lexer/get_reserved_words.c | 6 +++++- 42sh/src/lexer/insert_newline.c | 1 + 42sh/src/main/main.c | 7 ++++--- 42sh/src/parser/aggregate_sym.c | 9 +++++++-- 42sh/src/parser/eval_sym.c | 27 +++++++++++++++++++++++---- 42sh/src/parser/produce_sym.c | 4 +++- 42sh/src/parser/read_stack.c | 10 ++++++++++ 8 files changed, 54 insertions(+), 11 deletions(-) diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index 503a37f9..66f9a5cd 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -126,6 +126,7 @@ enum e_sym END_COMMAND, CONDITION, COMPLETE_CONDITION, + FOR_WORDLIST, ALL = 200, }; diff --git a/42sh/src/lexer/get_reserved_words.c b/42sh/src/lexer/get_reserved_words.c index 84c2f493..0dc99e4b 100644 --- a/42sh/src/lexer/get_reserved_words.c +++ b/42sh/src/lexer/get_reserved_words.c @@ -49,11 +49,15 @@ int get_reserved_words(t_list **alst) token->type = TK_UNTIL; else if (ft_strncmp(token->data, "case", 4) == 0) token->type = TK_CASE; + else if (ft_strncmp(token->data, "for", 3) == 0) + token->type = TK_FOR; } } - if (ante_token && ante_token->type == TK_CASE + if (ante_token && (ante_token->type == TK_CASE || ante_token->type == TK_FOR) && ft_strncmp(token->data, "in", 2) == 0) token->type = TK_IN; + if (previous_token && previous_token->type == TK_FOR && token->type == TK_WORD) + token->type = TK_NAME; ante_token = previous_token; previous_token = token; temp = temp->next; diff --git a/42sh/src/lexer/insert_newline.c b/42sh/src/lexer/insert_newline.c index 1057c24e..ea17e055 100644 --- a/42sh/src/lexer/insert_newline.c +++ b/42sh/src/lexer/insert_newline.c @@ -16,6 +16,7 @@ int insert_newline(t_list **alst) { t_token *token; + DG("insert newline"); token = token_init(); token->type = TK_NEWLINE; ft_lsteadd(alst, ft_lstnew(token, sizeof(*token))); diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index e75da56e..5c98209b 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -30,7 +30,6 @@ int handle_instruction(int fd) DG("START: state=%i", parser.state); while (1) { - DG("get input"); if ((ret = readline(fd, get_lexer_stack(lexer), &str))) { if (ret == -1) @@ -48,7 +47,7 @@ int handle_instruction(int fd) if (get_lexer_stack(lexer)) continue ; lexer.state = DEFAULT; -// token_print(token); + token_print(token); if (get_reserved_words(&token)) return (1); if (insert_newline(&token)) @@ -57,7 +56,9 @@ int handle_instruction(int fd) continue ; if (parser.state == SUCCESS) break ; - else if (parser.state == ERROR) + else if (parser.state == ERROR && !SH_IS_INTERACTIVE(data_singleton()->opts)) + return (error_syntax(&token)); + else if (parser.state == ERROR) error_syntax(&token); token = NULL; } diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index 788623aa..06546c3b 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -16,7 +16,9 @@ t_aggrematch g_aggrematch[] = { {TK_WORD, CMD_SUFFIX, CMD_SUFFIX, 0}, {TK_WORD, TK_PIPE, PATTERN, 0}, - {TK_WORD, WORDLIST, WORDLIST, 0}, + {TK_WORD, TK_IN, FOR_WORDLIST, TK_IN}, + {TK_WORD, FOR_WORDLIST, FOR_WORDLIST, FOR_WORDLIST}, + {TK_SEMI, FOR_WORDLIST, SEQUENTIAL_SEP, 0}, {TK_ASSIGNEMENT_WORD, CMD_PREFIX,CMD_PREFIX, 0}, {TK_PIPE, CMD_SUPERIOR, SIMPLE_COMMAND, CMD_SUPERIOR}, {TK_FI, ELSE_PART, IF_CLAUSE, TK_IF}, @@ -57,6 +59,8 @@ t_aggrematch g_aggrematch[] = {LINEBREAK, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST}, {LINEBREAK, COMPLETE_COMMANDS, PROGRAM, LINEBREAK}, {NEWLINE_LIST, CMD_NAME, CMD_SUPERIOR, CMD_NAME}, + {NEWLINE_LIST, SEQUENTIAL_SEP, SEQUENTIAL_SEP, SEQUENTIAL_SEP}, + {NEWLINE_LIST, TK_DO, TK_DO, TK_DO}, {NEWLINE_LIST, TK_DO, TK_DO, TK_DO}, {NEWLINE_LIST, TK_IN, TK_IN, TK_IN}, {NEWLINE_LIST, TK_THEN, TK_THEN, TK_THEN}, @@ -68,13 +72,13 @@ t_aggrematch g_aggrematch[] = {NEWLINE_LIST, NEWLINE_LIST, NEWLINE_LIST, NEWLINE}, {NEWLINE_LIST, NAME, SEQUENTIAL_SEP, 0}, {NEWLINE_LIST, IN, SEQUENTIAL_SEP, 0}, - {NEWLINE_LIST, WORDLIST, SEQUENTIAL_SEP, 0}, {NEWLINE_LIST, TERM, SEPARATOR, 0}, {NEWLINE_LIST, COMPOUND_LIST, SEPARATOR, 0}, {NEWLINE_LIST, COMPLETE_CONDITION, COMPLETE_CONDITION, COMPLETE_CONDITION}, {NEWLINE_LIST, CONDITION, CONDITION, CONDITION}, {NEWLINE_LIST, COMPLETE_COMMANDS, LINEBREAK, 0}, {NEWLINE_LIST, LINEBREAK, PROGRAM, LINEBREAK}, + {NEWLINE_LIST, FOR_WORDLIST, SEQUENTIAL_SEP, 0}, //to check {IO_HERE, TK_IO_NUMBER, IO_REDIRECT, TK_IO_NUMBER}, @@ -135,6 +139,7 @@ t_aggrematch g_aggrematch[] = {CMD_NAME, AND_OR_MAJOR, CMD_SUPERIOR, 0}, {SIMPLE_COMMAND, ALL, COMMAND, 0}, {DO_GROUP, NAME, FOR_CLAUSE, TK_FOR}, + {DO_GROUP, IN, FOR_CLAUSE, TK_FOR}, {DO_GROUP, SEQUENTIAL_SEP, FOR_CLAUSE, TK_FOR}, {DO_GROUP, CMD_SUPERIOR, LOOP, CMD_SUPERIOR}, {DO_GROUP, COMPOUND_LIST, LOOP, COMPOUND_LIST}, diff --git a/42sh/src/parser/eval_sym.c b/42sh/src/parser/eval_sym.c index 8bbcb499..bfb3137c 100644 --- a/42sh/src/parser/eval_sym.c +++ b/42sh/src/parser/eval_sym.c @@ -19,6 +19,8 @@ t_stackmatch g_stackmatch[] = {TK_WORD, WORDLIST}, {TK_WORD, LINEBREAK}, {TK_WORD, COMPLETE_COMMANDS}, + {TK_WORD, TK_IN}, + {TK_WORD, FOR_WORDLIST}, {TK_ASSIGNEMENT_WORD, CMD_PREFIX}, {TK_IO_NUMBER, REDIRECT_LIST}, {TK_IO_NUMBER, CMD_SUFFIX}, @@ -226,13 +228,13 @@ t_stackmatch g_stackmatch[] = {TK_CASE, SEPARATOR_OP}, {TK_CASE, PIPE_SEMI_SEQUENCE}, {TK_IN, TK_WORD}, + {TK_IN, NAME}, {TK_ESAC, CASE_LIST}, {TK_ESAC, CASE_LIST_NS}, {TK_ESAC, LINEBREAK}, {TK_WHILE, LINEBREAK}, {TK_WHILE, COMPLETE_COMMANDS}, {TK_WHILE, TK_BANG}, - {TK_WHILE, TK_BANG}, {TK_WHILE, SEPARATOR_OP}, {TK_WHILE, NEWLINE_LIST}, {TK_WHILE, PIPE_SEMI_SEQUENCE}, @@ -264,10 +266,16 @@ t_stackmatch g_stackmatch[] = {TK_FOR, SEPARATOR_OP}, {TK_FOR, NEWLINE_LIST}, {TK_FOR, PIPE_SEMI_SEQUENCE}, + {TK_FOR, TK_DO}, + {TK_FOR, TK_WHILE}, + {TK_FOR, COMPOUND_LIST}, + {TK_FOR, TK_IF}, + {TK_FOR, TK_ELIF}, + {TK_FOR, TK_THEN}, + {TK_FOR, COMPLETE_CONDITION}, {TK_LBRACE, LINEBREAK}, {TK_LBRACE, COMPLETE_COMMANDS}, {TK_LBRACE, TK_BANG}, - {TK_LBRACE, TK_BANG}, {TK_LBRACE, SEPARATOR_OP}, {TK_LBRACE, NEWLINE_LIST}, {TK_LBRACE, PIPE_SEMI_SEQUENCE}, @@ -285,6 +293,7 @@ t_stackmatch g_stackmatch[] = {TK_SEMI, TERM}, {TK_SEMI, CMD_NAME}, {TK_SEMI, PROGRAM}, + {TK_SEMI, FOR_WORDLIST}, {TK_AMP, LIST}, {TK_AMP, TERM}, {TK_PIPE, PATTERN}, @@ -345,6 +354,8 @@ t_stackmatch g_stackmatch[] = {LINEBREAK, COMPOUND_LIST}, {LINEBREAK, PROGRAM}, {NEWLINE_LIST, TK_DO}, + {NEWLINE_LIST, SEQUENTIAL_SEP}, + {NEWLINE_LIST, FOR_WORDLIST}, {NEWLINE_LIST, TK_IN}, {NEWLINE_LIST, TK_WHILE}, {NEWLINE_LIST, TK_UNTIL}, @@ -536,7 +547,6 @@ t_stackmatch g_stackmatch[] = {WHILE_CLAUSE, LINEBREAK}, {WHILE_CLAUSE, COMPLETE_COMMANDS}, {WHILE_CLAUSE, TK_BANG}, - {WHILE_CLAUSE, TK_BANG}, {WHILE_CLAUSE, SEPARATOR_OP}, {WHILE_CLAUSE, NEWLINE_LIST}, {WHILE_CLAUSE, PIPE_SEMI_SEQUENCE}, @@ -554,7 +564,6 @@ t_stackmatch g_stackmatch[] = {IF_CLAUSE, LINEBREAK}, {IF_CLAUSE, COMPLETE_COMMANDS}, {IF_CLAUSE, TK_BANG}, - {IF_CLAUSE, TK_BANG}, {IF_CLAUSE, SEPARATOR_OP}, {IF_CLAUSE, NEWLINE_LIST}, {IF_CLAUSE, PIPE_SEMI_SEQUENCE}, @@ -589,6 +598,7 @@ t_stackmatch g_stackmatch[] = {WORDLIST, IN}, {IN, LINEBREAK}, {NAME, TK_FOR}, + {FOR_WORDLIST, NAME}, {FOR_CLAUSE, LINEBREAK}, {FOR_CLAUSE, COMPLETE_COMMANDS}, {FOR_CLAUSE, TK_BANG}, @@ -596,6 +606,15 @@ t_stackmatch g_stackmatch[] = {FOR_CLAUSE, SEPARATOR_OP}, {FOR_CLAUSE, NEWLINE_LIST}, {FOR_CLAUSE, PIPE_SEMI_SEQUENCE}, + {FOR_CLAUSE, TK_DO}, + {FOR_CLAUSE, TK_WHILE}, + {FOR_CLAUSE, TK_UNTIL}, + {FOR_CLAUSE, TK_IF}, + {FOR_CLAUSE, TK_ELIF}, + {FOR_CLAUSE, TK_THEN}, + {FOR_CLAUSE, TK_ELSE}, + {FOR_CLAUSE, COMPOUND_LIST}, + {FOR_CLAUSE, COMPLETE_CONDITION}, {TERM, LINEBREAK}, {TERM, COMPLETE_COMMANDS}, {COMPOUND_LIST, TK_DO}, diff --git a/42sh/src/parser/produce_sym.c b/42sh/src/parser/produce_sym.c index 9722088f..75d3329a 100644 --- a/42sh/src/parser/produce_sym.c +++ b/42sh/src/parser/produce_sym.c @@ -43,7 +43,6 @@ t_prodmatch g_prodmatch[] = {TK_WORD, TK_BANG, CMD_NAME}, {TK_WORD, PIPE_SEMI_SEQUENCE, CMD_NAME}, {TK_WORD, SEPARATOR_OP, CMD_NAME}, - {TK_WORD, TK_IN, PATTERN}, {TK_WORD, CASE_LIST, PATTERN}, {TK_WORD, TK_PAREN_OPEN, PATTERN}, {TK_WORD, COMPLETE_COMMANDS, CMD_NAME}, @@ -73,6 +72,9 @@ t_prodmatch g_prodmatch[] = {TK_NEWLINE, COMPOUND_LIST, NEWLINE_LIST}, {TK_NEWLINE, COMPLETE_CONDITION, NEWLINE_LIST}, {TK_NEWLINE, CONDITION, NEWLINE_LIST}, + {TK_NEWLINE, FOR_WORDLIST, NEWLINE_LIST}, + {TK_NEWLINE, SEQUENTIAL_SEP, NEWLINE_LIST}, + {TK_SEMI, CMD_SUPERIOR, SEPARATOR_OP}, {TK_SEMI, CMD_SUPERIOR, SEPARATOR_OP}, {TK_SEMI, TERM, SEPARATOR_OP}, {TK_SEMI, LIST, SEPARATOR_OP}, diff --git a/42sh/src/parser/read_stack.c b/42sh/src/parser/read_stack.c index 2806b159..35b9399e 100644 --- a/42sh/src/parser/read_stack.c +++ b/42sh/src/parser/read_stack.c @@ -14,6 +14,16 @@ char *read_state(t_sym current) { + if (current == FOR_WORDLIST) + return ("FOR_WORDLIST"); + if (current == FOR_CLAUSE) + return ("FOR_CLAUSE"); + if (current == TK_NAME) + return ("TK_NAME"); + if (current == TK_FOR) + return ("FOR"); + if (current == NAME) + return ("NAME"); if (current == 0) return ("NULL"); if (current == PATTERN) From 50da96bbd689a559b129422d98fb1afcbdd21689 Mon Sep 17 00:00:00 2001 From: AntoHesse Date: Wed, 22 Feb 2017 20:25:51 +0100 Subject: [PATCH 07/23] on a retrpuve la compagnie TK_PAREN --- 42sh/includes/lexer.h | 4 ++-- 42sh/src/parser/read_stack.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/42sh/includes/lexer.h b/42sh/includes/lexer.h index 28b0962a..61c31a2c 100644 --- a/42sh/includes/lexer.h +++ b/42sh/includes/lexer.h @@ -39,9 +39,9 @@ enum e_lexstate BQUOTE, DQUOTE_BQUOTE, BACKSLASH, - VAR, - SPECIAL, PAREN, +// VAR, +// SPECIAL, COMMENT, END, }; diff --git a/42sh/src/parser/read_stack.c b/42sh/src/parser/read_stack.c index 35b9399e..8b262b95 100644 --- a/42sh/src/parser/read_stack.c +++ b/42sh/src/parser/read_stack.c @@ -14,6 +14,10 @@ char *read_state(t_sym current) { + if (current == TK_PAREN_OPEN) + return ("TK_PAREN_OPEN"); + if (current == TK_PAREN_CLOSE) + return ("TK_PAREN_CLOSE"); if (current == FOR_WORDLIST) return ("FOR_WORDLIST"); if (current == FOR_CLAUSE) From 03238b20421f3ca7aad6295f6c6e1ec63bf33bc5 Mon Sep 17 00:00:00 2001 From: AntoHesse Date: Wed, 22 Feb 2017 22:04:45 +0100 Subject: [PATCH 08/23] fucking case grammar done --- 42sh/sample/case/case.sh | 16 +++-- 42sh/src/lexer/get_reserved_words.c | 2 + 42sh/src/lexer/lexer_sep.c | 1 + 42sh/src/parser/aggregate_sym.c | 35 ++++++++--- 42sh/src/parser/eval_sym.c | 96 ++++++++++++++++++++++++----- 42sh/src/parser/produce_sym.c | 5 ++ 42sh/src/parser/read_stack.c | 6 ++ 7 files changed, 131 insertions(+), 30 deletions(-) diff --git a/42sh/sample/case/case.sh b/42sh/sample/case/case.sh index 3828871c..f84e34fc 100644 --- a/42sh/sample/case/case.sh +++ b/42sh/sample/case/case.sh @@ -1,8 +1,12 @@ case $rental in - "cat") echo "For $rental rental is Rs.20 per k/m.";; - "van") echo "For $rental rental is Rs.10 per k/m.";; - "jeep") echo "For $rental rental is Rs.5 per k/m.";; - "bicycle") echo "For $rental rental 20 paisa per k/m.";; - "enfield") echo "For $rental rental Rs.3 per k/m.";; - "thunderbird") echo "For $rental rental Rs.5 per k/m.";; + ("bus") case yolo in + ("bonjour") echo hello ;; + ("hello") echo bonjour ;; + esac + case yala in + ("bonjour") echo hello ;; + ("hello") echo yolo ;; + esac ;; + ("van") echo "For $rental rental is Rs.10 per k/m.";; + ("jeep") echo "For $rental rental is Rs.5 per k/m.";; esac diff --git a/42sh/src/lexer/get_reserved_words.c b/42sh/src/lexer/get_reserved_words.c index 0dc99e4b..139d4c1f 100644 --- a/42sh/src/lexer/get_reserved_words.c +++ b/42sh/src/lexer/get_reserved_words.c @@ -49,6 +49,8 @@ int get_reserved_words(t_list **alst) token->type = TK_UNTIL; else if (ft_strncmp(token->data, "case", 4) == 0) token->type = TK_CASE; + else if (ft_strncmp(token->data, "esac", 4) == 0) + token->type = TK_ESAC; else if (ft_strncmp(token->data, "for", 3) == 0) token->type = TK_FOR; } diff --git a/42sh/src/lexer/lexer_sep.c b/42sh/src/lexer/lexer_sep.c index eb4420a6..08fb1d1a 100644 --- a/42sh/src/lexer/lexer_sep.c +++ b/42sh/src/lexer/lexer_sep.c @@ -38,6 +38,7 @@ int lexer_sep(t_list **alst, t_lexer *lexer) else if (c == '|') token->type = cn == '|' ? TK_OR_IF : TK_PIPE; token->type = (c == ';') ? TK_SEMI : token->type; + token->type = (c == ';') && (cn == ';') ? TK_DSEMI : token->type; lexer->pos += 1 + (token->type & (TK_AND_IF | TK_OR_IF) ? 1 : 0); return (lexer_lex(&(*alst)->next, lexer)); } diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index 06546c3b..1ba587c6 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -18,7 +18,8 @@ t_aggrematch g_aggrematch[] = {TK_WORD, TK_PIPE, PATTERN, 0}, {TK_WORD, TK_IN, FOR_WORDLIST, TK_IN}, {TK_WORD, FOR_WORDLIST, FOR_WORDLIST, FOR_WORDLIST}, - {TK_SEMI, FOR_WORDLIST, SEQUENTIAL_SEP, 0}, + {TK_SEMI, FOR_WORDLIST, SEQUENTIAL_SEP, 0}, + {TK_DSEMI, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE, PIPE_SEMI_SEQUENCE}, {TK_ASSIGNEMENT_WORD, CMD_PREFIX,CMD_PREFIX, 0}, {TK_PIPE, CMD_SUPERIOR, SIMPLE_COMMAND, CMD_SUPERIOR}, {TK_FI, ELSE_PART, IF_CLAUSE, TK_IF}, @@ -29,9 +30,8 @@ t_aggrematch g_aggrematch[] = {TK_DONE, CMD_SUPERIOR, DO_GROUP, TK_DO}, {TK_DONE, COMPOUND_LIST, DO_GROUP, TK_DO}, //Esac ? - {TK_ESAC, CASE_LIST, CASE_CLAUSE, TK_CASE}, + {TK_ESAC, TK_IN, CASE_CLAUSE, TK_CASE}, {TK_ESAC, CASE_LIST_NS, CASE_CLAUSE, TK_CASE}, - {TK_ESAC, LINEBREAK, CASE_CLAUSE, TK_CASE}, {TK_RBRACE, COMPOUND_LIST, BRACE_GROUP, TK_LBRACE}, {TK_PAREN_CLOSE, COMPOUND_LIST, SUBSHELL, TK_PAREN_OPEN}, {TK_AND_IF, CMD_SUPERIOR, AND_OR_MINOR, CMD_SUPERIOR}, @@ -39,8 +39,10 @@ t_aggrematch g_aggrematch[] = //watch this {SEPARATOR_OP, CMD_SUPERIOR, SEPARATOR, 0}, {SEPARATOR_OP, COMPOUND_LIST, SEPARATOR, 0}, + {SEPARATOR_OP, CASE_LIST_NS, SEPARATOR, 0}, {SEPARATOR_OP, PIPE_SEMI_SEQUENCE, SEPARATOR, 0}, {SEPARATOR, CMD_SUPERIOR, END_COMMAND, CMD_SUPERIOR}, + {SEPARATOR, CASE_LIST_NS, CASE_LIST_NS, CASE_LIST_NS}, {SEPARATOR, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST}, {SEPARATOR, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE, PIPE_SEMI_SEQUENCE}, {LINEBREAK, SEPARATOR_OP, SEPARATOR, SEPARATOR_OP}, @@ -57,11 +59,12 @@ t_aggrematch g_aggrematch[] = {LINEBREAK, CMD_SUPERIOR, SEPARATOR_OP, 0}, {LINEBREAK, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE, PIPE_SEMI_SEQUENCE}, {LINEBREAK, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST}, + {LINEBREAK, CASE_LIST_NS, CASE_LIST_NS, CASE_LIST_NS}, {LINEBREAK, COMPLETE_COMMANDS, PROGRAM, LINEBREAK}, {NEWLINE_LIST, CMD_NAME, CMD_SUPERIOR, CMD_NAME}, {NEWLINE_LIST, SEQUENTIAL_SEP, SEQUENTIAL_SEP, SEQUENTIAL_SEP}, {NEWLINE_LIST, TK_DO, TK_DO, TK_DO}, - {NEWLINE_LIST, TK_DO, TK_DO, TK_DO}, + {NEWLINE_LIST, TK_PAREN_CLOSE, TK_PAREN_CLOSE, TK_PAREN_CLOSE}, {NEWLINE_LIST, TK_IN, TK_IN, TK_IN}, {NEWLINE_LIST, TK_THEN, TK_THEN, TK_THEN}, {NEWLINE_LIST, TK_IF, TK_IF, TK_IF}, @@ -69,11 +72,13 @@ t_aggrematch g_aggrematch[] = {NEWLINE_LIST, TK_ELSE, TK_ELSE, TK_ELSE}, {NEWLINE_LIST, TK_WHILE, TK_WHILE, TK_WHILE}, {NEWLINE_LIST, TK_UNTIL, TK_UNTIL, TK_UNTIL}, + {NEWLINE_LIST, CASE_LIST_NS, CASE_LIST_NS, CASE_LIST_NS}, {NEWLINE_LIST, NEWLINE_LIST, NEWLINE_LIST, NEWLINE}, {NEWLINE_LIST, NAME, SEQUENTIAL_SEP, 0}, {NEWLINE_LIST, IN, SEQUENTIAL_SEP, 0}, {NEWLINE_LIST, TERM, SEPARATOR, 0}, {NEWLINE_LIST, COMPOUND_LIST, SEPARATOR, 0}, + {NEWLINE_LIST, CASE_LIST_NS, SEPARATOR, 0}, {NEWLINE_LIST, COMPLETE_CONDITION, COMPLETE_CONDITION, COMPLETE_CONDITION}, {NEWLINE_LIST, CONDITION, CONDITION, CONDITION}, {NEWLINE_LIST, COMPLETE_COMMANDS, LINEBREAK, 0}, @@ -128,11 +133,13 @@ t_aggrematch g_aggrematch[] = {CMD_NAME, TK_WHILE, CMD_SUPERIOR, 0}, {CMD_NAME, TK_UNTIL, CMD_SUPERIOR, 0}, {CMD_NAME, TK_DO, CMD_SUPERIOR, 0}, + {CMD_NAME, TK_PAREN_CLOSE, CMD_SUPERIOR, 0}, {CMD_NAME, TK_IF, CMD_SUPERIOR, 0}, {CMD_NAME, TK_ELIF, CMD_SUPERIOR, 0}, {CMD_NAME, TK_ELSE, CMD_SUPERIOR, 0}, {CMD_NAME, TK_THEN, CMD_SUPERIOR, 0}, {CMD_NAME, COMPOUND_LIST, CMD_SUPERIOR, 0}, + {CMD_NAME, CASE_LIST_NS, CMD_SUPERIOR, 0}, {CMD_NAME, COMPLETE_CONDITION, CMD_SUPERIOR, 0}, {CMD_NAME, TK_PIPE, CMD_SUPERIOR, 0}, {CMD_NAME, PIPE_SEMI_SEQUENCE, CMD_SUPERIOR, 0}, @@ -153,21 +160,19 @@ t_aggrematch g_aggrematch[] = // {ELSE_PART, COMPOUND_LIST, ELSE_PART, TK_ELIF}, // {ELSE_PART, COMPLETE_CONDITION, IF_CLAUSE, COMPLETE_CONDITION}, {IF_CLAUSE, ALL, COMPOUND_COMMAND, 0}, - {PATTERN, TK_PAREN_OPEN, PATTERN_CASE, TK_PAREN_OPEN}, {PATTERN, CASE_LIST, PATTERN_CASE, 0}, - {CASE_ITEM, CASE_LIST, CASE_LIST, CASE_LIST}, - {CASE_ITEM, LINEBREAK, CASE_LIST, CASE_LIST}, - {CASE_ITEM_NS, CASE_LIST, CASE_LIST_NS, CASE_LIST}, - {CASE_ITEM_NS, LINEBREAK, CASE_LIST_NS, CASE_LIST}, + {CASE_LIST_NS, TK_IN, TK_IN, TK_IN}, {CASE_CLAUSE, ALL, COMPOUND_COMMAND, 0}, {FOR_CLAUSE, ALL, COMPOUND_COMMAND, 0}, {TERM, LINEBREAK, COMPOUND_LIST, LINEBREAK}, // {COMPOUND_LIST, TK_ELSE, ELSE_PART, TK_ELSE}, {COMPOUND_LIST, TK_IF, CONDITION, TK_IF}, {COMPOUND_LIST, TK_THEN, CONDITION, TK_THEN}, + {COMPOUND_LIST, TK_PAREN_CLOSE, CASE_LIST_NS, TK_PAREN_OPEN}, {COMPOUND_LIST, COMPLETE_CONDITION, COMPLETE_CONDITION, COMPLETE_CONDITION}, // {COMPOUND_LIST, TK_THEN, ELSE_PART, TK_ELIF}, {COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST}, + {COMPOUND_LIST, CASE_LIST_NS, CASE_LIST_NS, CASE_LIST_NS}, {SUBSHELL, ALL, COMPOUND_COMMAND, 0}, {COMPOUND_COMMAND, ALL, COMMAND, 0}, {AND_OR_MINOR, PIPE_SEMI_SEQUENCE, AND_OR_MAJOR, PIPE_SEMI_SEQUENCE}, @@ -176,9 +181,11 @@ t_aggrematch g_aggrematch[] = {AND_OR_MINOR, AND_OR_MAJOR, AND_OR_MAJOR, 0}, {COMMAND, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE}, {COMMAND, COMPOUND_LIST, PIPE_SEMI_SEQUENCE, 0}, + {COMMAND, CASE_LIST_NS, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, TK_WHILE, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, TK_UNTIL, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, TK_DO, PIPE_SEMI_SEQUENCE, 0}, + {COMMAND, TK_PAREN_CLOSE, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, TK_IF, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, TK_THEN, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, TK_ELIF, PIPE_SEMI_SEQUENCE, 0}, @@ -199,13 +206,14 @@ t_aggrematch g_aggrematch[] = {END_COMMAND, LINEBREAK, PIPE_SEQUENCE, 0}, {END_COMMAND, COMPLETE_COMMANDS, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_DO, PIPE_SEQUENCE, 0}, - {END_COMMAND, TK_DO, PIPE_SEQUENCE, 0}, + {END_COMMAND, TK_PAREN_CLOSE, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_IF, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_ELIF, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_THEN, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_ELSE, PIPE_SEQUENCE, 0}, {END_COMMAND, COMPLETE_CONDITION, PIPE_SEQUENCE, 0}, {END_COMMAND, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST}, + {END_COMMAND, CASE_LIST_NS, CASE_LIST_NS, CASE_LIST_NS}, {PIPE_SEQUENCE, TK_WHILE, PIPELINE, 0}, {PIPE_SEQUENCE, TK_UNTIL, PIPELINE, 0}, {PIPE_SEQUENCE, TK_BANG, PIPELINE, TK_BANG}, @@ -215,20 +223,25 @@ t_aggrematch g_aggrematch[] = {PIPE_SEQUENCE, COMPLETE_COMMANDS, PIPELINE, 0}, {PIPE_SEQUENCE, AND_OR_MAJOR, PIPELINE, 0}, {PIPE_SEQUENCE, TK_DO, PIPELINE, 0}, + {PIPE_SEQUENCE, TK_PAREN_CLOSE, PIPELINE, 0}, {PIPE_SEQUENCE, TK_IF, PIPELINE, 0}, {PIPE_SEQUENCE, TK_ELIF, PIPELINE, 0}, {PIPE_SEQUENCE, TK_THEN, PIPELINE, 0}, {PIPE_SEQUENCE, TK_ELSE, PIPELINE, 0}, {PIPE_SEQUENCE, COMPOUND_LIST, PIPELINE, 0}, + {PIPE_SEQUENCE, CASE_LIST_NS, PIPELINE, 0}, {PIPE_SEQUENCE, COMPLETE_CONDITION, PIPELINE, 0}, {PIPELINE, TK_WHILE, AND_OR, 0}, {PIPELINE, TK_UNTIL, AND_OR, 0}, {PIPELINE, TK_DO, AND_OR, 0}, + {PIPELINE, TK_PAREN_CLOSE, AND_OR, 0}, + {PIPELINE, TK_IF, AND_OR, 0}, {PIPELINE, TK_IF, AND_OR, 0}, {PIPELINE, TK_ELIF, AND_OR, 0}, {PIPELINE, TK_THEN, AND_OR, 0}, {PIPELINE, TK_ELSE, AND_OR, 0}, {PIPELINE, COMPOUND_LIST, AND_OR, 0}, + {PIPELINE, CASE_LIST_NS, AND_OR, 0}, {PIPELINE, LINEBREAK, AND_OR, 0}, {PIPELINE, COMPLETE_COMMANDS, AND_OR, 0}, // {PIPELINE, LINEBREAK, AND_OR, AND_OR}, @@ -237,6 +250,7 @@ t_aggrematch g_aggrematch[] = {PIPELINE, AND_OR_MAJOR, AND_OR, AND_OR_MAJOR}, {AND_OR_MAJOR, AND_OR_MAJOR, AND_OR_MAJOR, AND_OR_MAJOR}, {AND_OR, TK_DO, COMPOUND_LIST, 0}, + {AND_OR, TK_PAREN_CLOSE, COMPOUND_LIST, 0}, {AND_OR, TK_WHILE, COMPOUND_LIST, 0}, {AND_OR, TK_UNTIL, COMPOUND_LIST, 0}, {AND_OR, TK_IF, COMPOUND_LIST, 0}, @@ -244,6 +258,7 @@ t_aggrematch g_aggrematch[] = {AND_OR, TK_THEN, COMPOUND_LIST, 0}, {AND_OR, TK_ELSE, COMPOUND_LIST, 0}, {AND_OR, COMPOUND_LIST, COMPOUND_LIST, 0}, + {AND_OR, CASE_LIST_NS, CASE_LIST_NS, 0}, {AND_OR, COMPLETE_CONDITION, COMPOUND_LIST, 0}, {AND_OR, SEPARATOR_OP, LIST, LIST}, {AND_OR, NEWLINE_LIST, LIST, 0}, diff --git a/42sh/src/parser/eval_sym.c b/42sh/src/parser/eval_sym.c index bfb3137c..ad767ee5 100644 --- a/42sh/src/parser/eval_sym.c +++ b/42sh/src/parser/eval_sym.c @@ -43,6 +43,8 @@ t_stackmatch g_stackmatch[] = {TK_DSEMI, LINEBREAK}, {TK_DSEMI, COMPLETE_COMMANDS}, {TK_DSEMI, COMPOUND_LIST}, + {TK_DSEMI, CASE_LIST_NS}, + {TK_DSEMI, PIPE_SEMI_SEQUENCE}, {TK_LESS, TK_IO_NUMBER}, {TK_LESS, REDIRECT_LIST}, {TK_LESS, CMD_SUFFIX}, @@ -185,9 +187,9 @@ t_stackmatch g_stackmatch[] = {TK_CLOBBER, AND_OR_MAJOR}, {TK_IF, LINEBREAK}, + {TK_IF, TK_PAREN_CLOSE}, {TK_IF, COMPLETE_COMMANDS}, {TK_IF, TK_BANG}, - {TK_IF, TK_BANG}, {TK_IF, SEPARATOR_OP}, {TK_IF, NEWLINE_LIST}, {TK_IF, PIPE_SEMI_SEQUENCE}, @@ -196,9 +198,12 @@ t_stackmatch g_stackmatch[] = {TK_IF, TK_IF}, {TK_IF, TK_DO}, {TK_IF, TK_ELIF}, + {TK_IF, TK_ELSE}, {TK_IF, TK_THEN}, + {TK_IF, TK_PAREN_CLOSE}, {TK_IF, COMPLETE_CONDITION}, {TK_IF, COMPOUND_LIST}, + {TK_IF, CASE_LIST_NS}, {TK_THEN, CONDITION}, {TK_THEN, COMPOUND_LIST}, {TK_ELSE, COMPOUND_LIST}, @@ -223,15 +228,25 @@ t_stackmatch g_stackmatch[] = {TK_CASE, LINEBREAK}, {TK_CASE, COMPLETE_COMMANDS}, {TK_CASE, TK_BANG}, - {TK_CASE, TK_BANG}, + {TK_CASE, TK_DO}, + {TK_CASE, TK_THEN}, + {TK_CASE, TK_PAREN_CLOSE}, + {TK_CASE, TK_WHILE}, + {TK_CASE, TK_UNTIL}, + {TK_CASE, TK_IF}, + {TK_CASE, TK_ELIF}, + {TK_CASE, TK_ELSE}, + {TK_CASE, COMPLETE_CONDITION}, + {TK_CASE, CASE_LIST_NS}, + {TK_CASE, COMPOUND_LIST}, {TK_CASE, NEWLINE_LIST}, {TK_CASE, SEPARATOR_OP}, {TK_CASE, PIPE_SEMI_SEQUENCE}, {TK_IN, TK_WORD}, {TK_IN, NAME}, - {TK_ESAC, CASE_LIST}, {TK_ESAC, CASE_LIST_NS}, {TK_ESAC, LINEBREAK}, + {TK_ESAC, TK_IN}, {TK_WHILE, LINEBREAK}, {TK_WHILE, COMPLETE_COMMANDS}, {TK_WHILE, TK_BANG}, @@ -239,25 +254,32 @@ t_stackmatch g_stackmatch[] = {TK_WHILE, NEWLINE_LIST}, {TK_WHILE, PIPE_SEMI_SEQUENCE}, {TK_WHILE, TK_DO}, + {TK_WHILE, TK_PAREN_CLOSE}, {TK_WHILE, TK_WHILE}, {TK_WHILE, COMPOUND_LIST}, + {TK_WHILE, CASE_LIST_NS}, {TK_WHILE, TK_IF}, {TK_WHILE, TK_ELIF}, + {TK_WHILE, TK_ELSE}, + {TK_WHILE, TK_PAREN_CLOSE}, {TK_WHILE, TK_THEN}, {TK_WHILE, COMPLETE_CONDITION}, {TK_UNTIL, LINEBREAK}, {TK_UNTIL, COMPLETE_COMMANDS}, {TK_UNTIL, TK_BANG}, - {TK_UNTIL, TK_BANG}, {TK_UNTIL, SEPARATOR_OP}, {TK_UNTIL, NEWLINE_LIST}, {TK_UNTIL, PIPE_SEMI_SEQUENCE}, {TK_UNTIL, TK_DO}, + {TK_UNTIL, TK_PAREN_CLOSE}, {TK_UNTIL, TK_WHILE}, {TK_UNTIL, COMPOUND_LIST}, + {TK_UNTIL, CASE_LIST_NS}, {TK_UNTIL, TK_IF}, {TK_UNTIL, TK_ELIF}, + {TK_UNTIL, TK_ELSE}, {TK_UNTIL, TK_THEN}, + {TK_UNTIL, TK_PAREN_CLOSE}, {TK_UNTIL, COMPLETE_CONDITION}, {TK_FOR, LINEBREAK}, {TK_FOR, COMPLETE_COMMANDS}, @@ -267,11 +289,15 @@ t_stackmatch g_stackmatch[] = {TK_FOR, NEWLINE_LIST}, {TK_FOR, PIPE_SEMI_SEQUENCE}, {TK_FOR, TK_DO}, + {TK_FOR, TK_PAREN_CLOSE}, {TK_FOR, TK_WHILE}, {TK_FOR, COMPOUND_LIST}, + {TK_FOR, CASE_LIST_NS}, {TK_FOR, TK_IF}, {TK_FOR, TK_ELIF}, {TK_FOR, TK_THEN}, + {TK_FOR, TK_ELSE}, + {TK_FOR, TK_PAREN_CLOSE}, {TK_FOR, COMPLETE_CONDITION}, {TK_LBRACE, LINEBREAK}, {TK_LBRACE, COMPLETE_COMMANDS}, @@ -280,6 +306,7 @@ t_stackmatch g_stackmatch[] = {TK_LBRACE, NEWLINE_LIST}, {TK_LBRACE, PIPE_SEMI_SEQUENCE}, {TK_RBRACE, COMPOUND_LIST}, + {TK_RBRACE, CASE_LIST_NS}, {TK_BANG, LINEBREAK}, {TK_BANG, COMPLETE_COMMANDS}, {TK_BANG, SEPARATOR_OP}, @@ -299,6 +326,8 @@ t_stackmatch g_stackmatch[] = {TK_PIPE, PATTERN}, {TK_PIPE, CMD_SUPERIOR}, {TK_PAREN_OPEN, FNAME}, + {TK_PAREN_OPEN, CASE_LIST_NS}, + {TK_PAREN_OPEN, TK_IN}, {TK_PAREN_OPEN, CASE_LIST}, {TK_PAREN_OPEN, LINEBREAK}, {TK_PAREN_OPEN, COMPLETE_COMMANDS}, @@ -319,6 +348,7 @@ t_stackmatch g_stackmatch[] = {END_COMMAND, TK_WHILE}, {END_COMMAND, TK_UNTIL}, {END_COMMAND, TK_DO}, + {END_COMMAND, TK_PAREN_CLOSE}, {END_COMMAND, TK_IF}, {END_COMMAND, TK_THEN}, {END_COMMAND, TK_ELIF}, @@ -326,15 +356,17 @@ t_stackmatch g_stackmatch[] = {END_COMMAND, LINEBREAK}, {END_COMMAND, COMPLETE_COMMANDS}, {END_COMMAND, COMPOUND_LIST}, - {END_COMMAND, COMPOUND_LIST}, + {END_COMMAND, CASE_LIST_NS}, {END_COMMAND, COMPLETE_CONDITION}, {SEPARATOR, CMD_SUPERIOR}, {SEPARATOR, TERM}, {SEPARATOR, COMPOUND_LIST}, + {SEPARATOR, CASE_LIST_NS}, {SEPARATOR, PIPE_SEMI_SEQUENCE}, {SEPARATOR_OP, CMD_SUPERIOR}, {SEPARATOR_OP, LIST}, {SEPARATOR_OP, TERM}, + {SEPARATOR_OP, CASE_LIST_NS}, {SEPARATOR_OP, COMPOUND_LIST}, {SEPARATOR_OP, PIPE_SEMI_SEQUENCE}, {LINEBREAK, TK_SEMI}, @@ -352,8 +384,11 @@ t_stackmatch g_stackmatch[] = {LINEBREAK, CMD_SUPERIOR}, {LINEBREAK, PIPE_SEMI_SEQUENCE}, {LINEBREAK, COMPOUND_LIST}, + {LINEBREAK, CASE_LIST_NS}, {LINEBREAK, PROGRAM}, {NEWLINE_LIST, TK_DO}, + {NEWLINE_LIST, CASE_LIST_NS}, + {NEWLINE_LIST, TK_PAREN_CLOSE}, {NEWLINE_LIST, SEQUENTIAL_SEP}, {NEWLINE_LIST, FOR_WORDLIST}, {NEWLINE_LIST, TK_IN}, @@ -370,6 +405,7 @@ t_stackmatch g_stackmatch[] = {NEWLINE_LIST, WORDLIST}, {NEWLINE_LIST, TERM}, {NEWLINE_LIST, COMPOUND_LIST}, + {NEWLINE_LIST, CASE_LIST_NS}, {NEWLINE_LIST, COMPLETE_COMMANDS}, {NEWLINE_LIST, COMPLETE_CONDITION}, {NEWLINE_LIST, CONDITION}, @@ -448,21 +484,25 @@ t_stackmatch g_stackmatch[] = {CMD_NAME, TK_WHILE}, {CMD_NAME, TK_UNTIL}, {CMD_NAME, TK_DO}, + {CMD_NAME, TK_PAREN_CLOSE}, {CMD_NAME, TK_IF}, {CMD_NAME, TK_ELIF}, {CMD_NAME, TK_THEN}, {CMD_NAME, TK_ELSE}, {CMD_NAME, COMPOUND_LIST}, + {CMD_NAME, CASE_LIST_NS}, {CMD_NAME, COMPLETE_CONDITION}, {CMD_SUPERIOR, TK_WHILE}, {CMD_SUPERIOR, TK_UNTIL}, {CMD_SUPERIOR, TK_DO}, + {CMD_SUPERIOR, TK_PAREN_CLOSE}, {CMD_SUPERIOR, TK_IF}, {CMD_SUPERIOR, TK_ELIF}, {CMD_SUPERIOR, TK_THEN}, {CMD_SUPERIOR, TK_ELSE}, {CMD_SUPERIOR, COMPOUND_LIST}, + {CMD_SUPERIOR, CASE_LIST_NS}, {CMD_SUPERIOR, COMPLETE_CONDITION}, {CMD_SUPERIOR, LINEBREAK}, {CMD_SUPERIOR, COMPLETE_COMMANDS}, @@ -477,11 +517,13 @@ t_stackmatch g_stackmatch[] = {SIMPLE_COMMAND, TK_WHILE}, {SIMPLE_COMMAND, TK_UNTIL}, {SIMPLE_COMMAND, TK_DO}, + {SIMPLE_COMMAND, TK_PAREN_CLOSE}, {SIMPLE_COMMAND, TK_IF}, {SIMPLE_COMMAND, TK_ELIF}, {SIMPLE_COMMAND, TK_THEN}, {SIMPLE_COMMAND, TK_ELSE}, {SIMPLE_COMMAND, COMPOUND_LIST}, + {SIMPLE_COMMAND, CASE_LIST_NS}, {SIMPLE_COMMAND, COMPLETE_CONDITION}, {SIMPLE_COMMAND, LINEBREAK}, {SIMPLE_COMMAND, COMPLETE_COMMANDS}, @@ -500,7 +542,7 @@ t_stackmatch g_stackmatch[] = {CONDITION, LINEBREAK}, {CONDITION, COMPLETE_COMMANDS}, {CONDITION, COMPOUND_LIST}, - {CONDITION, COMPOUND_LIST}, + {CONDITION, CASE_LIST_NS}, {CONDITION, COMPLETE_CONDITION}, {COMPLETE_CONDITION, LINEBREAK}, {COMPLETE_CONDITION, COMPLETE_COMMANDS}, @@ -536,6 +578,7 @@ t_stackmatch g_stackmatch[] = {UNTIL_CLAUSE, NEWLINE_LIST}, {UNTIL_CLAUSE, PIPE_SEMI_SEQUENCE}, {UNTIL_CLAUSE, TK_DO}, + {UNTIL_CLAUSE, TK_PAREN_CLOSE}, {UNTIL_CLAUSE, TK_WHILE}, {UNTIL_CLAUSE, TK_UNTIL}, {UNTIL_CLAUSE, TK_IF}, @@ -543,6 +586,7 @@ t_stackmatch g_stackmatch[] = {UNTIL_CLAUSE, TK_THEN}, {UNTIL_CLAUSE, TK_ELSE}, {UNTIL_CLAUSE, COMPOUND_LIST}, + {UNTIL_CLAUSE, CASE_LIST_NS}, {UNTIL_CLAUSE, COMPLETE_CONDITION}, {WHILE_CLAUSE, LINEBREAK}, {WHILE_CLAUSE, COMPLETE_COMMANDS}, @@ -551,6 +595,7 @@ t_stackmatch g_stackmatch[] = {WHILE_CLAUSE, NEWLINE_LIST}, {WHILE_CLAUSE, PIPE_SEMI_SEQUENCE}, {WHILE_CLAUSE, TK_DO}, + {WHILE_CLAUSE, TK_PAREN_CLOSE}, {WHILE_CLAUSE, TK_WHILE}, {WHILE_CLAUSE, TK_UNTIL}, {WHILE_CLAUSE, TK_IF}, @@ -558,6 +603,7 @@ t_stackmatch g_stackmatch[] = {WHILE_CLAUSE, TK_THEN}, {WHILE_CLAUSE, TK_ELSE}, {WHILE_CLAUSE, COMPOUND_LIST}, + {WHILE_CLAUSE, CASE_LIST_NS}, {WHILE_CLAUSE, COMPLETE_CONDITION}, // {ELSE_PART, COMPOUND_LIST}, // {ELSE_PART, COMPLETE_CONDITION}, @@ -568,6 +614,7 @@ t_stackmatch g_stackmatch[] = {IF_CLAUSE, NEWLINE_LIST}, {IF_CLAUSE, PIPE_SEMI_SEQUENCE}, {IF_CLAUSE, TK_DO}, + {IF_CLAUSE, TK_PAREN_CLOSE}, {IF_CLAUSE, TK_WHILE}, {IF_CLAUSE, TK_UNTIL}, {IF_CLAUSE, TK_IF}, @@ -575,6 +622,7 @@ t_stackmatch g_stackmatch[] = {IF_CLAUSE, TK_THEN}, {IF_CLAUSE, TK_ELSE}, {IF_CLAUSE, COMPOUND_LIST}, + {IF_CLAUSE, CASE_LIST_NS}, {IF_CLAUSE, COMPLETE_COMMAND}, {IF_CLAUSE, COMPLETE_CONDITION}, @@ -582,19 +630,26 @@ t_stackmatch g_stackmatch[] = {PATTERN, CASE_LIST}, {PATTERN, TK_IN}, {PATTERN_CASE, CASE_LIST}, - {CASE_ITEM, CASE_LIST}, - {CASE_ITEM, LINEBREAK}, - {CASE_ITEM_NS, CASE_LIST}, - {CASE_ITEM_NS, LINEBREAK}, - {CASE_LIST, LINEBREAK}, {CASE_LIST_NS, LINEBREAK}, {CASE_CLAUSE, LINEBREAK}, {CASE_CLAUSE, COMPLETE_COMMANDS}, {CASE_CLAUSE, TK_BANG}, - {CASE_CLAUSE, TK_BANG}, {CASE_CLAUSE, SEPARATOR_OP}, {CASE_CLAUSE, NEWLINE_LIST}, {CASE_CLAUSE, PIPE_SEMI_SEQUENCE}, + {CASE_CLAUSE, TK_PAREN_CLOSE}, + {CASE_CLAUSE, CASE_LIST_NS}, + {CASE_CLAUSE, TK_DO}, + {CASE_CLAUSE, TK_WHILE}, + {CASE_CLAUSE, TK_UNTIL}, + {CASE_CLAUSE, TK_IF}, + {CASE_CLAUSE, TK_ELIF}, + {CASE_CLAUSE, TK_THEN}, + {CASE_CLAUSE, TK_ELSE}, + {CASE_CLAUSE, COMPOUND_LIST}, + {CASE_CLAUSE, CASE_LIST_NS}, + {CASE_CLAUSE, COMPLETE_COMMAND}, + {WORDLIST, IN}, {IN, LINEBREAK}, {NAME, TK_FOR}, @@ -607,6 +662,7 @@ t_stackmatch g_stackmatch[] = {FOR_CLAUSE, NEWLINE_LIST}, {FOR_CLAUSE, PIPE_SEMI_SEQUENCE}, {FOR_CLAUSE, TK_DO}, + {FOR_CLAUSE, TK_PAREN_CLOSE}, {FOR_CLAUSE, TK_WHILE}, {FOR_CLAUSE, TK_UNTIL}, {FOR_CLAUSE, TK_IF}, @@ -614,11 +670,12 @@ t_stackmatch g_stackmatch[] = {FOR_CLAUSE, TK_THEN}, {FOR_CLAUSE, TK_ELSE}, {FOR_CLAUSE, COMPOUND_LIST}, + {FOR_CLAUSE, CASE_LIST_NS}, {FOR_CLAUSE, COMPLETE_CONDITION}, {TERM, LINEBREAK}, {TERM, COMPLETE_COMMANDS}, {COMPOUND_LIST, TK_DO}, - {COMPOUND_LIST, TK_DO}, + {COMPOUND_LIST, TK_PAREN_CLOSE}, {COMPOUND_LIST, TK_LBRACE}, {COMPOUND_LIST, TK_WHILE}, {COMPOUND_LIST, TK_UNTIL}, @@ -645,6 +702,7 @@ t_stackmatch g_stackmatch[] = {COMPOUND_COMMAND, PIPE_SEMI_SEQUENCE}, {COMPOUND_COMMAND, FUNC}, {COMPOUND_COMMAND, TK_DO}, + {COMPOUND_COMMAND, TK_PAREN_CLOSE}, {COMPOUND_COMMAND, TK_WHILE}, {COMPOUND_COMMAND, TK_UNTIL}, {COMPOUND_COMMAND, TK_IF}, @@ -652,18 +710,20 @@ t_stackmatch g_stackmatch[] = {COMPOUND_COMMAND, TK_THEN}, {COMPOUND_COMMAND, TK_ELSE}, {COMPOUND_COMMAND, COMPOUND_LIST}, + {COMPOUND_COMMAND, CASE_LIST_NS}, {COMPOUND_COMMAND, COMPLETE_CONDITION}, {COMMAND, TK_WHILE}, {COMMAND, TK_UNTIL}, {COMMAND, LINEBREAK}, {COMMAND, COMPLETE_COMMANDS}, {COMMAND, TK_DO}, - {COMMAND, TK_DO}, + {COMMAND, TK_PAREN_CLOSE}, {COMMAND, TK_IF}, {COMMAND, TK_ELIF}, {COMMAND, TK_THEN}, {COMMAND, TK_ELSE}, {COMMAND, COMPOUND_LIST}, + {COMMAND, CASE_LIST_NS}, {COMMAND, COMPLETE_CONDITION}, {COMMAND, TK_BANG}, {COMMAND, SEPARATOR_OP}, @@ -678,11 +738,13 @@ t_stackmatch g_stackmatch[] = {PIPE_SEQUENCE, TK_WHILE}, {PIPE_SEQUENCE, TK_UNTIL}, {PIPE_SEQUENCE, TK_DO}, + {PIPE_SEQUENCE, TK_PAREN_CLOSE}, {PIPE_SEQUENCE, TK_IF}, {PIPE_SEQUENCE, TK_ELIF}, {PIPE_SEQUENCE, TK_THEN}, {PIPE_SEQUENCE, TK_ELSE}, {PIPE_SEQUENCE, COMPOUND_LIST}, + {PIPE_SEQUENCE, CASE_LIST_NS}, {PIPE_SEQUENCE, COMPLETE_CONDITION}, {PIPE_SEQUENCE, LINEBREAK}, {PIPE_SEQUENCE, COMPLETE_COMMANDS}, @@ -694,11 +756,13 @@ t_stackmatch g_stackmatch[] = {PIPE_SEMI_SEQUENCE, TK_WHILE}, {PIPE_SEMI_SEQUENCE, TK_UNTIL}, {PIPE_SEMI_SEQUENCE, TK_DO}, + {PIPE_SEMI_SEQUENCE, TK_PAREN_CLOSE}, {PIPE_SEMI_SEQUENCE, TK_IF}, {PIPE_SEMI_SEQUENCE, TK_ELIF}, {PIPE_SEMI_SEQUENCE, TK_THEN}, {PIPE_SEMI_SEQUENCE, TK_ELSE}, {PIPE_SEMI_SEQUENCE, COMPOUND_LIST}, + {PIPE_SEMI_SEQUENCE, CASE_LIST_NS}, {PIPE_SEMI_SEQUENCE, COMPLETE_CONDITION}, {PIPE_SEMI_SEQUENCE, LINEBREAK}, {PIPE_SEMI_SEQUENCE, COMPLETE_COMMANDS}, @@ -710,11 +774,13 @@ t_stackmatch g_stackmatch[] = {PIPELINE, TK_WHILE}, {PIPELINE, TK_UNTIL}, {PIPELINE, TK_DO}, + {PIPELINE, TK_PAREN_CLOSE}, {PIPELINE, TK_IF}, {PIPELINE, TK_ELIF}, {PIPELINE, TK_THEN}, {PIPELINE, TK_ELSE}, {PIPELINE, COMPOUND_LIST}, + {PIPELINE, CASE_LIST_NS}, {PIPELINE, COMPLETE_CONDITION}, {PIPELINE, LINEBREAK}, {PIPELINE, COMPLETE_COMMANDS}, @@ -727,6 +793,7 @@ t_stackmatch g_stackmatch[] = {AND_OR_MAJOR, AND_OR_MAJOR}, {AND_OR_MAJOR, AND_OR_MAJOR}, {AND_OR, TK_DO}, + {AND_OR, TK_PAREN_CLOSE}, {AND_OR, TK_WHILE}, {AND_OR, TK_UNTIL}, {AND_OR, TK_IF}, @@ -734,6 +801,7 @@ t_stackmatch g_stackmatch[] = {AND_OR, TK_THEN}, {AND_OR, TK_ELSE}, {AND_OR, COMPOUND_LIST}, + {AND_OR, CASE_LIST_NS}, {AND_OR, COMPLETE_CONDITION}, {AND_OR, LINEBREAK}, {AND_OR, COMPLETE_COMMANDS}, diff --git a/42sh/src/parser/produce_sym.c b/42sh/src/parser/produce_sym.c index 75d3329a..bcbef58d 100644 --- a/42sh/src/parser/produce_sym.c +++ b/42sh/src/parser/produce_sym.c @@ -33,11 +33,13 @@ t_prodmatch g_prodmatch[] = {TK_WORD, TK_WHILE, CMD_NAME}, {TK_WORD, TK_UNTIL, CMD_NAME}, {TK_WORD, TK_DO, CMD_NAME}, + {TK_WORD, TK_PAREN_CLOSE, CMD_NAME}, {TK_WORD, TK_IF, CMD_NAME}, {TK_WORD, TK_THEN, CMD_NAME}, {TK_WORD, TK_ELIF, CMD_NAME}, {TK_WORD, TK_ELSE, CMD_NAME}, {TK_WORD, COMPOUND_LIST, CMD_NAME}, + {TK_WORD, CASE_LIST_NS, CMD_NAME}, {TK_WORD, COMPLETE_CONDITION, CMD_NAME}, {TK_WORD, NEWLINE_LIST, CMD_NAME}, {TK_WORD, TK_BANG, CMD_NAME}, @@ -55,7 +57,9 @@ t_prodmatch g_prodmatch[] = {TK_NAME, SEPARATOR_OP, FNAME}, {TK_NAME, NEWLINE_LIST, FNAME}, {TK_NAME, TK_FOR, NAME}, + {TK_NEWLINE, CASE_LIST_NS, NEWLINE_LIST}, {TK_NEWLINE, TK_DO, NEWLINE_LIST}, + {TK_NEWLINE, TK_PAREN_CLOSE, NEWLINE_LIST}, {TK_NEWLINE, TK_IN, NEWLINE_LIST}, {TK_NEWLINE, TK_WHILE, NEWLINE_LIST}, {TK_NEWLINE, TK_UNTIL, NEWLINE_LIST}, @@ -69,6 +73,7 @@ t_prodmatch g_prodmatch[] = {TK_NEWLINE, LINEBREAK, NEWLINE_LIST}, {TK_NEWLINE, CMD_SUPERIOR, LINEBREAK}, {TK_NEWLINE, PIPE_SEMI_SEQUENCE, LINEBREAK}, + {TK_NEWLINE, CASE_LIST_NS, NEWLINE_LIST}, {TK_NEWLINE, COMPOUND_LIST, NEWLINE_LIST}, {TK_NEWLINE, COMPLETE_CONDITION, NEWLINE_LIST}, {TK_NEWLINE, CONDITION, NEWLINE_LIST}, diff --git a/42sh/src/parser/read_stack.c b/42sh/src/parser/read_stack.c index 8b262b95..3371958e 100644 --- a/42sh/src/parser/read_stack.c +++ b/42sh/src/parser/read_stack.c @@ -14,6 +14,12 @@ char *read_state(t_sym current) { + if (current == CASE_CLAUSE) + return ("CASE_CLAUSE"); + if (current == CASE_LIST_NS) + return ("CASE_LIST_NS"); + if (current == TK_DSEMI) + return ("TK_DSEMI"); if (current == TK_PAREN_OPEN) return ("TK_PAREN_OPEN"); if (current == TK_PAREN_CLOSE) From 79bceb05a96e93a0ca99ca98a8720c18a5729b03 Mon Sep 17 00:00:00 2001 From: AntoHesse Date: Thu, 23 Feb 2017 01:55:09 +0100 Subject: [PATCH 09/23] trop fatigue pour debug les case nesting, fuck it, todo tomorrow --- 42sh/Makefile | 1 + 42sh/includes/parser.h | 5 ++ 42sh/sample/case/case.sh | 15 ++---- 42sh/sample/for/for.sh | 11 +++++ 42sh/sample/if/01_if_easy.sh | 12 +++-- 42sh/src/main/ft_putast.c | 12 ++++- 42sh/src/main/main.c | 2 +- 42sh/src/parser/add_case.c | 81 +++++++++++++++++++++++++++++++++ 42sh/src/parser/add_cmd.c | 18 +++++++- 42sh/src/parser/add_loop.c | 1 - 42sh/src/parser/add_sep.c | 2 + 42sh/src/parser/aggregate_sym.c | 8 ++-- 42sh/src/parser/build_tree.c | 11 +++-- 42sh/src/parser/eval_sym.c | 2 +- 42sh/src/parser/ft_parse.c | 6 +-- 42sh/src/parser/produce_sym.c | 6 +-- 42sh/src/parser/tree_wrapper.c | 3 ++ 17 files changed, 163 insertions(+), 33 deletions(-) create mode 100644 42sh/sample/for/for.sh create mode 100644 42sh/src/parser/add_case.c diff --git a/42sh/Makefile b/42sh/Makefile index 88ecb85b..d6ca50db 100644 --- a/42sh/Makefile +++ b/42sh/Makefile @@ -229,6 +229,7 @@ parser/add_condition.c\ parser/add_file.c\ parser/add_loop.c\ parser/add_sep.c\ +parser/add_case.c\ parser/aggregate_sym.c\ parser/build_tree.c\ parser/error_syntax.c\ diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index 66f9a5cd..3f418fbe 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -216,8 +216,12 @@ int add_loop_sep(t_btree **ast, t_list **lst); int add_condition_cmd(t_btree **ast, t_list **lst); int add_condition_sep(t_btree **ast, t_list **lst); int add_branch(t_btree **ast, t_list **lst); +int add_case_cmd(t_btree **ast, t_list **lst); +int add_case_sep(t_btree **ast, t_list **lst); +int add_pattern(t_btree **ast, t_list **lst); int isloop(t_btree **ast); int isdir(t_btree **ast); +int iscase(t_btree **ast, t_list **lst); int iscondition(t_btree **ast, t_list **lst); int join_ast(t_btree **ast, t_btree **new_node); @@ -255,6 +259,7 @@ struct s_astnode int nest; int full; + int pattern; t_type type; t_astdata data; }; diff --git a/42sh/sample/case/case.sh b/42sh/sample/case/case.sh index f84e34fc..90d45405 100644 --- a/42sh/sample/case/case.sh +++ b/42sh/sample/case/case.sh @@ -1,12 +1,7 @@ case $rental in - ("bus") case yolo in - ("bonjour") echo hello ;; - ("hello") echo bonjour ;; - esac - case yala in - ("bonjour") echo hello ;; - ("hello") echo yolo ;; - esac ;; - ("van") echo "For $rental rental is Rs.10 per k/m.";; - ("jeep") echo "For $rental rental is Rs.5 per k/m.";; + ("bus") case $rental in + ("yolo") echo hello ;; + ("bonjour") echo yolo ;; + esac ;; + ("van") echo yolo ;; esac diff --git a/42sh/sample/for/for.sh b/42sh/sample/for/for.sh new file mode 100644 index 00000000..676abb4b --- /dev/null +++ b/42sh/sample/for/for.sh @@ -0,0 +1,11 @@ +for i in ls + do + for i in echo + do + pwd + done + for i in cd + do + cat + done +done diff --git a/42sh/sample/if/01_if_easy.sh b/42sh/sample/if/01_if_easy.sh index 171c2a03..f7d0a10c 100644 --- a/42sh/sample/if/01_if_easy.sh +++ b/42sh/sample/if/01_if_easy.sh @@ -1,8 +1,10 @@ if ls then - if ls - then - ls | cat - pwd ; ls - fi + ls +elif ls +then + ls +elif ls +then + ls fi diff --git a/42sh/src/main/ft_putast.c b/42sh/src/main/ft_putast.c index 43f53e0a..8720b1df 100644 --- a/42sh/src/main/ft_putast.c +++ b/42sh/src/main/ft_putast.c @@ -16,7 +16,17 @@ char *ft_putast(void *nodein) { t_astnode *node; node = nodein; - if (node->type == TK_THEN) + if (node->type == TK_CASE) + return ("TK_CASE"); + else if (node->type == TK_PAREN_OPEN) + return ("TK_OPE"); + else if (node->type == TK_PAREN_CLOSE) + return ("TK_CLO"); + else if (node->type == TK_IN) + return ("TK_IN"); + else if (node->type ==TK_ESAC) + return ("TK_ESAC"); + else if (node->type == TK_THEN) return ("THEN"); else if (node->type == TK_FI) return ("FI"); diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index 5c98209b..f321b2a8 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -63,7 +63,7 @@ int handle_instruction(int fd) token = NULL; } DG("succesful parsing:"); -// btree_print(STDBUG, ast, &ft_putast); + btree_print(STDBUG, ast, &ft_putast); /* if (ft_exec(&ast)) */ /* return (1); */ ft_add_str_in_history(lexer.str); diff --git a/42sh/src/parser/add_case.c b/42sh/src/parser/add_case.c new file mode 100644 index 00000000..8ee56bc8 --- /dev/null +++ b/42sh/src/parser/add_case.c @@ -0,0 +1,81 @@ +#include "parser.h" + +int iscase(t_btree **ast, t_list **lst) +{ + t_astnode *node; + t_token *token; + + node = NULL; + token = (*lst)->content; + if (*ast) + { + node = (*ast)->item; + if (node->type == TK_PAREN_OPEN && node->full == 0) + { + // DG("go right"); + return (1); + } + if ((node->type == TK_CASE || node->type == TK_PAREN_OPEN + || iscase(&(*ast)->right, lst) == 1) && token->type == TK_WORD + && node->pattern == 0) + { + // DG("add pattern"); + return (2); + } + if ((node->type == TK_CASE || iscase(&(*ast)->right, lst) == 4) + && token->type == TK_PAREN_OPEN) + { + // DG("new branch"); + return (3); + } + if ((node->type == TK_NEWLINE || node->type == TK_SEMI + || node->type == TK_AMP) && iscase(&(*ast)->right, lst) == 1) + { +// DG(" go right"); + return (1); + } + if (node->type == TK_PAREN_OPEN && node->nest == 0) + return (4); + } + return (0); +} + +int add_case_cmd(t_btree **ast, t_list **lst) +{ + t_astnode *node; + t_token *token; + + token = (*lst)->content; + node = (*ast)->item; + DG("add case cmd"); + if (token->type == TK_CASE && node->type == TK_PAREN_OPEN) + { + DG("nesting"); + node->nest++; + } + if (token->type == TK_ESAC && node->type == TK_PAREN_OPEN && node->nest > 0) + { + DG("nesting less"); + node->nest--; + } + else if (token->type == TK_DSEMI && node->type == TK_PAREN_OPEN) + return ((node->full = 1)); + return (add_cmd(&(*ast)->right, lst)); +} + +int add_case_sep(t_btree **ast, t_list **lst) +{ + return (add_sep(&(*ast)->right, lst)); +} + +int add_pattern(t_btree **ast, t_list **lst) +{ + t_astnode *node; + t_token *token; + + token = (*lst)->content; + node = (*ast)->item; + node->data.redir.word.word = ft_strdup(token->data); + node->pattern = 1; + return (0); +} diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index 23bf28bf..b8d1112c 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -29,8 +29,24 @@ int add_cmd(t_btree **ast, t_list **lst) return (add_condition_cmd(ast, lst)); else if (iscondition(ast, lst) == 2) return (add_branch(ast, lst)); - else if ((node = (*ast)->item)->type != TK_DO && node->type != TK_THEN) + else if (iscase(ast, lst) == 1) + { + DG("go add cmd"); + return (add_case_cmd(ast, lst)); + } + else if (iscase(ast, lst) == 2) + return (add_pattern(ast, lst)); + else if (iscase(ast, lst) == 3) + { + DG("add branc"); + return (add_branch(ast, lst)); + } + else if ((node = (*ast)->item)->type != TK_DO && node->type != TK_THEN + && node->type != TK_PAREN_CLOSE && node->type != TK_ESAC) + { + DG("return cmd : %s", read_state(node->type)); return (add_cmd(&(*ast)->right, lst)); + } my_tab = NULL; token = (*lst)->content; node = (*ast)->item; diff --git a/42sh/src/parser/add_loop.c b/42sh/src/parser/add_loop.c index 22c7865b..81d9e016 100644 --- a/42sh/src/parser/add_loop.c +++ b/42sh/src/parser/add_loop.c @@ -20,7 +20,6 @@ int isloop(t_btree **ast) if (*ast) { node = (*ast)->item; - DG("TEST LOOP"); if ((node->type == TK_NEWLINE || node->type == TK_SEMI || node->type == TK_AMP) && isloop(&(*ast)->right) == 1) return (1); diff --git a/42sh/src/parser/add_sep.c b/42sh/src/parser/add_sep.c index e9243154..950b17f5 100644 --- a/42sh/src/parser/add_sep.c +++ b/42sh/src/parser/add_sep.c @@ -23,6 +23,8 @@ int add_sep(t_btree **ast, t_list **lst) return (add_loop_sep(ast, lst)); else if (iscondition(ast, lst) == 1) return (add_condition_sep(ast, lst)); + else if (iscase(ast, lst)) + return (add_case_sep(ast, lst)); if (!*ast) gen_node(ast); token = (*lst)->content; diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index 1ba587c6..e33fa3a5 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -279,20 +279,20 @@ int aggregate_sym(t_sym **stack, t_sym *new_sym, t_parstate *state) int i; i = 0; - DG("aggregate head %s && sym %s", - read_state(**stack), read_state(*new_sym)); +// DG("aggregate head %s && sym %s", +// read_state(**stack), read_state(*new_sym)); while (g_aggrematch[i].top) { if (*new_sym == g_aggrematch[i].top && MATCH_STACK(**stack, g_aggrematch[i].under)) { - DG("MATCH : %s", read_state(g_aggrematch[i].new_sym)); +// DG("MATCH : %s", read_state(g_aggrematch[i].new_sym)); *new_sym = g_aggrematch[i].new_sym; if (g_aggrematch[i].erase_sym) { pop_stack(stack, g_aggrematch[i].erase_sym); - DG("stack after pop: %s", read_state(**stack)); +// DG("stack after pop: %s", read_state(**stack)); } if (eval_sym(**stack, *new_sym)) return ((*state = ERROR)); diff --git a/42sh/src/parser/build_tree.c b/42sh/src/parser/build_tree.c index fa58745c..cbebde17 100644 --- a/42sh/src/parser/build_tree.c +++ b/42sh/src/parser/build_tree.c @@ -31,13 +31,17 @@ t_treematch g_treematch[] = {TK_THEN, &add_cmd}, {TK_FI, &add_cmd}, {TK_NEWLINE, &add_sep}, + {TK_CASE, &add_cmd}, + {TK_ESAC, &add_cmd}, + {TK_PAREN_OPEN, &add_cmd}, + {TK_PAREN_CLOSE, &add_cmd}, {0, NULL}, }; static int isseparator(int type, int cache) { if (type == TK_NEWLINE && (cache == TK_WHILE || cache == TK_DO - || cache == TK_NEWLINE || cache == TK_THEN)) + || cache == TK_NEWLINE || cache == TK_THEN || cache == TK_IN)) return (0); return (1); } @@ -50,6 +54,8 @@ int build_tree(t_btree **ast, t_list **lst) i = 0; token = (*lst)->content; +//check bug de cache + cache = token->type; while (g_treematch[i].type) { if (g_treematch[i].type == token->type @@ -57,8 +63,7 @@ int build_tree(t_btree **ast, t_list **lst) { DG("func TK : '%s' TK : '%s'", - read_state(g_treematch[i].type) ,read_state(token->type)); - cache = token->type; + read_state(g_treematch[i].type) ,read_state(token->type)); return (g_treematch[i].add(ast, lst)); } i++; diff --git a/42sh/src/parser/eval_sym.c b/42sh/src/parser/eval_sym.c index ad767ee5..eeb9b093 100644 --- a/42sh/src/parser/eval_sym.c +++ b/42sh/src/parser/eval_sym.c @@ -823,7 +823,7 @@ int eval_sym(t_sym stack, t_sym new_sym) { int i; - DG("eval head %s && sym %s", read_state(stack), read_state(new_sym)); +// DG("eval head %s && sym %s", read_state(stack), read_state(new_sym)); i = 0; while (g_stackmatch[i].top) { diff --git a/42sh/src/parser/ft_parse.c b/42sh/src/parser/ft_parse.c index 42f0b249..714d5b4e 100644 --- a/42sh/src/parser/ft_parse.c +++ b/42sh/src/parser/ft_parse.c @@ -43,14 +43,14 @@ int ft_parse(t_btree **ast, t_list **token, t_parser *parser) aggregate_sym(&parser->stack, parser->new_sym, &parser->state); push_stack(++parser->stack, *parser->new_sym); } - ft_read_stack(parser->stack); +// ft_read_stack(parser->stack); DG("\n"); if (*parser->stack == PROGRAM) parser->state = SUCCESS; else parser->state = UNDEFINED; -// build_tree(ast, token); -// btree_print(STDBUG, *ast, &ft_putast); + build_tree(ast, token); + btree_print(STDBUG, *ast, &ft_putast); if ((end_instruction(*parser->stack) && !(*token)->next)) insert_linebreak(token); else diff --git a/42sh/src/parser/produce_sym.c b/42sh/src/parser/produce_sym.c index bcbef58d..505a21a6 100644 --- a/42sh/src/parser/produce_sym.c +++ b/42sh/src/parser/produce_sym.c @@ -97,8 +97,8 @@ int produce_sym(t_sym stack, t_sym *new_sym, t_list **lst) int i; token = (*lst)->content; - DG("produce stack : %s && token : %s", read_state(stack), - read_state(token->type)); +// DG("produce stack : %s && token : %s", read_state(stack), +// read_state(token->type)); i = 0; *new_sym = 0; while (g_prodmatch[i].new_sym) @@ -106,7 +106,7 @@ int produce_sym(t_sym stack, t_sym *new_sym, t_list **lst) if (token->type == g_prodmatch[i].token && stack == g_prodmatch[i].stack) { - DG("MATCH : %s", read_state(g_prodmatch[i].new_sym)); +// DG("MATCH : %s", read_state(g_prodmatch[i].new_sym)); *new_sym = g_prodmatch[i].new_sym; } i++; diff --git a/42sh/src/parser/tree_wrapper.c b/42sh/src/parser/tree_wrapper.c index 505f2050..7fbc3c2a 100644 --- a/42sh/src/parser/tree_wrapper.c +++ b/42sh/src/parser/tree_wrapper.c @@ -31,6 +31,9 @@ int gen_node(t_btree **ast) ((t_astnode *)(*ast)->item)->nest = 0; ((t_astnode *)(*ast)->item)->full = 0; ((t_astnode *)(*ast)->item)->type = 0; + ((t_astnode *)(*ast)->item)->pattern = 0; } return (0); } + + From ecc058dd11f0b3c2c9cc2fc1d4137547d0d2b830 Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Thu, 23 Feb 2017 22:55:17 +0100 Subject: [PATCH 10/23] still case --- 42sh/src/parser/add_case.c | 23 ++++------------------- 42sh/src/parser/add_cmd.c | 2 +- 42sh/src/parser/add_sep.c | 4 ++-- 42sh/src/parser/build_tree.c | 2 +- 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/42sh/src/parser/add_case.c b/42sh/src/parser/add_case.c index 8ee56bc8..234fd46f 100644 --- a/42sh/src/parser/add_case.c +++ b/42sh/src/parser/add_case.c @@ -9,33 +9,18 @@ int iscase(t_btree **ast, t_list **lst) token = (*lst)->content; if (*ast) { - node = (*ast)->item; + node = (*ast)->item; + if (node->type == TK_PAREN_OPEN && node->full == 0 && node->nest > 0) + return (4); if (node->type == TK_PAREN_OPEN && node->full == 0) - { - // DG("go right"); return (1); - } if ((node->type == TK_CASE || node->type == TK_PAREN_OPEN || iscase(&(*ast)->right, lst) == 1) && token->type == TK_WORD && node->pattern == 0) - { - // DG("add pattern"); return (2); - } - if ((node->type == TK_CASE || iscase(&(*ast)->right, lst) == 4) + if ((node->type == TK_CASE || iscase(&(*ast)->right, lst) == 1) && token->type == TK_PAREN_OPEN) - { - // DG("new branch"); return (3); - } - if ((node->type == TK_NEWLINE || node->type == TK_SEMI - || node->type == TK_AMP) && iscase(&(*ast)->right, lst) == 1) - { -// DG(" go right"); - return (1); - } - if (node->type == TK_PAREN_OPEN && node->nest == 0) - return (4); } return (0); } diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index b8d1112c..bdc8fe11 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 20:49:15 by ariard #+# #+# */ -/* Updated: 2017/02/20 22:27:06 by jhalford ### ########.fr */ +/* Updated: 2017/02/23 18:04:26 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_sep.c b/42sh/src/parser/add_sep.c index 950b17f5..faa49b14 100644 --- a/42sh/src/parser/add_sep.c +++ b/42sh/src/parser/add_sep.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 19:12:07 by ariard #+# #+# */ -/* Updated: 2017/02/20 17:46:54 by ariard ### ########.fr */ +/* Updated: 2017/02/23 18:04:24 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,7 +23,7 @@ int add_sep(t_btree **ast, t_list **lst) return (add_loop_sep(ast, lst)); else if (iscondition(ast, lst) == 1) return (add_condition_sep(ast, lst)); - else if (iscase(ast, lst)) + else if (iscase(ast, lst) == 1) return (add_case_sep(ast, lst)); if (!*ast) gen_node(ast); diff --git a/42sh/src/parser/build_tree.c b/42sh/src/parser/build_tree.c index cbebde17..05ab6407 100644 --- a/42sh/src/parser/build_tree.c +++ b/42sh/src/parser/build_tree.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:32:59 by ariard #+# #+# */ -/* Updated: 2017/02/21 20:28:38 by ariard ### ########.fr */ +/* Updated: 2017/02/23 18:03:35 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ From d251474db9a648e1b8c4672e3cdb692f3ee1e6a4 Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Fri, 24 Feb 2017 14:52:04 +0100 Subject: [PATCH 11/23] erase error --- 42sh/src/parser/add_cmd.c | 2 +- 42sh/src/parser/add_condition.c | 19 +++++++++---------- 42sh/src/parser/add_loop.c | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index bdc8fe11..38565bea 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 20:49:15 by ariard #+# #+# */ -/* Updated: 2017/02/23 18:04:26 by ariard ### ########.fr */ +/* Updated: 2017/02/24 14:51:47 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_condition.c b/42sh/src/parser/add_condition.c index b1d43125..769f4425 100644 --- a/42sh/src/parser/add_condition.c +++ b/42sh/src/parser/add_condition.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/19 18:12:52 by ariard #+# #+# */ -/* Updated: 2017/02/20 18:18:56 by ariard ### ########.fr */ +/* Updated: 2017/02/24 14:51:05 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,16 +22,15 @@ int iscondition(t_btree **ast, t_list **lst) if (*ast) { node = (*ast)->item; - if ((node->type == TK_IF || iscondition(&(*ast)->right, lst)) - && (token->type == TK_ELIF || token->type == TK_ELSE) - && node->nest == 0) + if ((node->type == TK_CASE || node->type == TK_PAREN_OPEN) + && node->pattern = 0 && token->type == TK_WORD) return (2); - if ((node->type == TK_IF || node->type == TK_ELIF || node->type == TK_ELSE) - && node->full == 0) - return (1); - if ((node->type == TK_NEWLINE || node->type == TK_SEMI - || node->type == TK_AMP) && iscondition(&(*ast)->right, lst) == 1) - return (1); + if (node->type == TK_CASE) + return (3); + if (node->type == TK_PAREN_OPEN && nest == 0) + return (3); + if (node->type == TK_PAREN_OPEN && nest > 0) + return (0); } return (0); } diff --git a/42sh/src/parser/add_loop.c b/42sh/src/parser/add_loop.c index 81d9e016..9d892675 100644 --- a/42sh/src/parser/add_loop.c +++ b/42sh/src/parser/add_loop.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 22:17:14 by ariard #+# #+# */ -/* Updated: 2017/02/20 19:03:04 by ariard ### ########.fr */ +/* Updated: 2017/02/24 14:41:20 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ From 5f596310e1cd08e0773f6557cfcda2c4381a0e95 Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Fri, 24 Feb 2017 15:32:56 +0100 Subject: [PATCH 12/23] nesting case ok --- 42sh/sample/case/case.sh | 6 +++--- 42sh/src/parser/add_case.c | 37 ++++++++++++++------------------- 42sh/src/parser/add_cmd.c | 17 ++++----------- 42sh/src/parser/add_condition.c | 19 +++++++++-------- 42sh/src/parser/add_loop.c | 2 +- 42sh/src/parser/add_sep.c | 4 ++-- 42sh/src/parser/build_tree.c | 2 +- 7 files changed, 37 insertions(+), 50 deletions(-) diff --git a/42sh/sample/case/case.sh b/42sh/sample/case/case.sh index 90d45405..3642f40b 100644 --- a/42sh/sample/case/case.sh +++ b/42sh/sample/case/case.sh @@ -1,7 +1,7 @@ case $rental in ("bus") case $rental in - ("yolo") echo hello ;; - ("bonjour") echo yolo ;; - esac ;; + ("yolo") echo bonjour + esac ;; ("van") echo yolo ;; + ("bicycle") echo hola ;; esac diff --git a/42sh/src/parser/add_case.c b/42sh/src/parser/add_case.c index 234fd46f..ff0d1532 100644 --- a/42sh/src/parser/add_case.c +++ b/42sh/src/parser/add_case.c @@ -9,18 +9,15 @@ int iscase(t_btree **ast, t_list **lst) token = (*lst)->content; if (*ast) { - node = (*ast)->item; - if (node->type == TK_PAREN_OPEN && node->full == 0 && node->nest > 0) - return (4); - if (node->type == TK_PAREN_OPEN && node->full == 0) + node = (*ast)->item; + if ((node->type == TK_CASE || node->type == TK_PAREN_OPEN) + && token->type == TK_WORD && node->pattern == 0) return (1); - if ((node->type == TK_CASE || node->type == TK_PAREN_OPEN - || iscase(&(*ast)->right, lst) == 1) && token->type == TK_WORD - && node->pattern == 0) - return (2); - if ((node->type == TK_CASE || iscase(&(*ast)->right, lst) == 1) - && token->type == TK_PAREN_OPEN) + if ((node->type == TK_PAREN_OPEN || node->type == TK_CASE) + && node->nest == 0 && token->type == TK_PAREN_OPEN) return (3); + if (node->type == TK_CASE || node->type == TK_PAREN_OPEN) + return (2); } return (0); } @@ -32,19 +29,17 @@ int add_case_cmd(t_btree **ast, t_list **lst) token = (*lst)->content; node = (*ast)->item; - DG("add case cmd"); - if (token->type == TK_CASE && node->type == TK_PAREN_OPEN) - { - DG("nesting"); + if (token->type == TK_CASE && (node->type == TK_PAREN_OPEN + || node->type == TK_CASE)) node->nest++; - } - if (token->type == TK_ESAC && node->type == TK_PAREN_OPEN && node->nest > 0) - { - DG("nesting less"); - node->nest--; - } - else if (token->type == TK_DSEMI && node->type == TK_PAREN_OPEN) + if (token->type == TK_ESAC && (node->type == TK_PAREN_OPEN + || node->type == TK_CASE) && node->nest > 0) + return ((node->nest--)); + else if (token->type == TK_DSEMI && node->type == TK_PAREN_OPEN + && node->nest == 0) return ((node->full = 1)); + else if (token->type == TK_ESAC) + return (0); return (add_cmd(&(*ast)->right, lst)); } diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index 38565bea..40da190d 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 20:49:15 by ariard #+# #+# */ -/* Updated: 2017/02/24 14:51:47 by ariard ### ########.fr */ +/* Updated: 2017/02/24 15:30:23 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,23 +30,14 @@ int add_cmd(t_btree **ast, t_list **lst) else if (iscondition(ast, lst) == 2) return (add_branch(ast, lst)); else if (iscase(ast, lst) == 1) - { - DG("go add cmd"); - return (add_case_cmd(ast, lst)); - } - else if (iscase(ast, lst) == 2) return (add_pattern(ast, lst)); + else if (iscase(ast, lst) == 2) + return (add_case_cmd(ast, lst)); else if (iscase(ast, lst) == 3) - { - DG("add branc"); return (add_branch(ast, lst)); - } else if ((node = (*ast)->item)->type != TK_DO && node->type != TK_THEN && node->type != TK_PAREN_CLOSE && node->type != TK_ESAC) - { - DG("return cmd : %s", read_state(node->type)); return (add_cmd(&(*ast)->right, lst)); - } my_tab = NULL; token = (*lst)->content; node = (*ast)->item; @@ -55,7 +46,7 @@ int add_cmd(t_btree **ast, t_list **lst) { my_tab = ft_sstradd(my_tab, token->data); my_tab = ft_sstradd(my_tab, (char *)token->esc); -// ft_ld_pushback(&node->data.token, my_tab); + ft_ld_pushback(&node->data.token, my_tab); } return (0); } diff --git a/42sh/src/parser/add_condition.c b/42sh/src/parser/add_condition.c index 769f4425..4c2af18c 100644 --- a/42sh/src/parser/add_condition.c +++ b/42sh/src/parser/add_condition.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/19 18:12:52 by ariard #+# #+# */ -/* Updated: 2017/02/24 14:51:05 by ariard ### ########.fr */ +/* Updated: 2017/02/24 14:53:49 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,15 +22,16 @@ int iscondition(t_btree **ast, t_list **lst) if (*ast) { node = (*ast)->item; - if ((node->type == TK_CASE || node->type == TK_PAREN_OPEN) - && node->pattern = 0 && token->type == TK_WORD) + if ((node->type == TK_IF || iscondition(&(*ast)->right, lst)) + && (token->type == TK_ELIF || token->type == TK_ELSE) + && node->nest == 0) return (2); - if (node->type == TK_CASE) - return (3); - if (node->type == TK_PAREN_OPEN && nest == 0) - return (3); - if (node->type == TK_PAREN_OPEN && nest > 0) - return (0); + if ((node->type == TK_IF || node->type == TK_ELIF || node->type == TK_ELSE) + && node->full == 0) + return (1); + if ((node->type == TK_NEWLINE || node->type == TK_SEMI + || node->type == TK_AMP) && iscondition(&(*ast)->right, lst) == 1) + return (1); } return (0); } diff --git a/42sh/src/parser/add_loop.c b/42sh/src/parser/add_loop.c index 9d892675..c830f5b4 100644 --- a/42sh/src/parser/add_loop.c +++ b/42sh/src/parser/add_loop.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 22:17:14 by ariard #+# #+# */ -/* Updated: 2017/02/24 14:41:20 by ariard ### ########.fr */ +/* Updated: 2017/02/24 15:08:08 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_sep.c b/42sh/src/parser/add_sep.c index faa49b14..a30ccb71 100644 --- a/42sh/src/parser/add_sep.c +++ b/42sh/src/parser/add_sep.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 19:12:07 by ariard #+# #+# */ -/* Updated: 2017/02/23 18:04:24 by ariard ### ########.fr */ +/* Updated: 2017/02/24 15:15:33 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,7 +23,7 @@ int add_sep(t_btree **ast, t_list **lst) return (add_loop_sep(ast, lst)); else if (iscondition(ast, lst) == 1) return (add_condition_sep(ast, lst)); - else if (iscase(ast, lst) == 1) + else if (iscase(ast, lst) == 2) return (add_case_sep(ast, lst)); if (!*ast) gen_node(ast); diff --git a/42sh/src/parser/build_tree.c b/42sh/src/parser/build_tree.c index 05ab6407..a0c573a7 100644 --- a/42sh/src/parser/build_tree.c +++ b/42sh/src/parser/build_tree.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:32:59 by ariard #+# #+# */ -/* Updated: 2017/02/23 18:03:35 by ariard ### ########.fr */ +/* Updated: 2017/02/24 15:21:16 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ From d50a0d1b1374a797dd3d5a31ff3e021a621f143c Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Fri, 24 Feb 2017 16:29:51 +0100 Subject: [PATCH 13/23] parsing for ok --- 42sh/includes/parser.h | 31 ++---------------- 42sh/sample/for/for.sh | 8 ++--- 42sh/sample/while/while01.sh | 11 +++++++ 42sh/src/lexer/insert_newline.c | 2 +- 42sh/src/main/ft_putast.c | 6 +++- 42sh/src/main/main.c | 2 +- 42sh/src/parser/add_case.c | 2 +- 42sh/src/parser/add_cmd.c | 6 ++-- 42sh/src/parser/add_condition.c | 2 +- 42sh/src/parser/add_loop.c | 57 ++++++++++++++++++--------------- 42sh/src/parser/add_sep.c | 16 ++++----- 42sh/src/parser/build_tree.c | 13 +++++--- 42sh/src/parser/tree_wrapper.c | 2 +- 13 files changed, 78 insertions(+), 80 deletions(-) create mode 100644 42sh/sample/while/while01.sh diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index 3f418fbe..f3c28da4 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -213,13 +213,14 @@ int add_cmd(t_btree **ast, t_list **lst); int add_file(t_btree **ast, t_list **lst); int add_loop_cmd(t_btree **ast, t_list **lst); int add_loop_sep(t_btree **ast, t_list **lst); +int add_loop_condition(t_btree **ast, t_list **lst); int add_condition_cmd(t_btree **ast, t_list **lst); int add_condition_sep(t_btree **ast, t_list **lst); int add_branch(t_btree **ast, t_list **lst); int add_case_cmd(t_btree **ast, t_list **lst); int add_case_sep(t_btree **ast, t_list **lst); int add_pattern(t_btree **ast, t_list **lst); -int isloop(t_btree **ast); +int isloop(t_btree **ast, t_list **lst); int isdir(t_btree **ast); int iscase(t_btree **ast, t_list **lst); int iscondition(t_btree **ast, t_list **lst); @@ -250,6 +251,7 @@ union u_astdata { t_redir redir; t_ld *token; + t_list *wordlist; char **sstr; char *str; }; @@ -264,31 +266,4 @@ struct s_astnode t_astdata data; }; -int parse(t_btree **ast, t_list **token); - -int get_instruction(t_list **lst); -int get_sub_instruction(t_btree **ast, t_list **start, t_list **lst); - -int parse_newline(t_btree **ast, t_list **start, t_list **lst); -int parse_separator(t_btree **ast, t_list **start, t_list **lst); -int parse_redir(t_btree **ast, t_list **start, t_list **lst); -int parse_less(t_btree **ast, t_list **start, t_list **lst); -int parse_great(t_btree **ast, t_list **start, t_list **lst); -int parse_dless(t_btree **ast, t_list **start, t_list **lst); -int parse_dgreat(t_btree **ast, t_list **start, t_list **lst); -int parse_lessand(t_btree **ast, t_list **start, t_list **lst); -int parse_greatand(t_btree **ast, t_list **start, t_list **lst); -int parse_word(t_btree **ast, t_list **start, t_list **lst); -int parse_subshell(t_btree **ast, t_list **start, t_list **lst); -int parse_newline(t_btree **ast, t_list **start, t_list **lst); -int parse_while(t_btree **ast, t_list **start, t_list **lst); -int parse_if(t_btree **ast, t_list **start, t_list **lst); -int parse_do(t_btree **ast, t_list **start, t_list **lst); -int parse_done(t_btree **ast, t_list **start, t_list **lst); -int parse_elif(t_btree **ast, t_list **start, t_list **lst); -int parse_else(t_btree **ast, t_list **start, t_list **lst); - -int delete_newline(t_list **start, t_list **lst); -int parse_head(t_btree **ast, t_btree **new_ast, t_list **start, t_list **lst); - #endif diff --git a/42sh/sample/for/for.sh b/42sh/sample/for/for.sh index 676abb4b..90cfffe6 100644 --- a/42sh/sample/for/for.sh +++ b/42sh/sample/for/for.sh @@ -1,11 +1,11 @@ -for i in ls - do +for i in hello bonjour salut comment +do for i in echo do pwd done - for i in cd + for i in echo do - cat + pwd done done diff --git a/42sh/sample/while/while01.sh b/42sh/sample/while/while01.sh new file mode 100644 index 00000000..f2897742 --- /dev/null +++ b/42sh/sample/while/while01.sh @@ -0,0 +1,11 @@ +while ls +do + while ls + do + pwd + done + while ls + do + pwd + done +done diff --git a/42sh/src/lexer/insert_newline.c b/42sh/src/lexer/insert_newline.c index ea17e055..6d39ec5d 100644 --- a/42sh/src/lexer/insert_newline.c +++ b/42sh/src/lexer/insert_newline.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/21 21:05:23 by ariard #+# #+# */ -/* Updated: 2017/02/21 21:12:13 by ariard ### ########.fr */ +/* Updated: 2017/02/24 16:22:08 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/main/ft_putast.c b/42sh/src/main/ft_putast.c index 8720b1df..a535e33d 100644 --- a/42sh/src/main/ft_putast.c +++ b/42sh/src/main/ft_putast.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/14 18:18:04 by jhalford #+# #+# */ -/* Updated: 2017/02/21 19:20:20 by jhalford ### ########.fr */ +/* Updated: 2017/02/24 16:24:19 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,10 @@ char *ft_putast(void *nodein) { t_astnode *node; node = nodein; + if (node->type == TK_NAME) + return ("TK_NAME"); + if (node->type == TK_FOR) + return ("TK_FOR"); if (node->type == TK_CASE) return ("TK_CASE"); else if (node->type == TK_PAREN_OPEN) diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index f321b2a8..03b10ea2 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/02/21 22:44:41 by ariard ### ########.fr */ +/* Updated: 2017/02/24 16:17:54 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_case.c b/42sh/src/parser/add_case.c index ff0d1532..7eba9636 100644 --- a/42sh/src/parser/add_case.c +++ b/42sh/src/parser/add_case.c @@ -55,7 +55,7 @@ int add_pattern(t_btree **ast, t_list **lst) token = (*lst)->content; node = (*ast)->item; - node->data.redir.word.word = ft_strdup(token->data); + node->data.str = ft_strdup(token->data); node->pattern = 1; return (0); } diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index 40da190d..f976f875 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 20:49:15 by ariard #+# #+# */ -/* Updated: 2017/02/24 15:30:23 by ariard ### ########.fr */ +/* Updated: 2017/02/24 16:29:21 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,7 +23,9 @@ int add_cmd(t_btree **ast, t_list **lst) gen_node(ast); else if (isdir(ast)) return (add_file(ast, lst)); - else if (isloop(ast)) + else if (isloop(ast, lst) == 3) + return (add_loop_condition(ast, lst)); + else if (isloop(ast, lst)) return (add_loop_cmd(ast, lst)); else if (iscondition(ast, lst) == 1) return (add_condition_cmd(ast, lst)); diff --git a/42sh/src/parser/add_condition.c b/42sh/src/parser/add_condition.c index 4c2af18c..b95c45ab 100644 --- a/42sh/src/parser/add_condition.c +++ b/42sh/src/parser/add_condition.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/19 18:12:52 by ariard #+# #+# */ -/* Updated: 2017/02/24 14:53:49 by ariard ### ########.fr */ +/* Updated: 2017/02/24 15:45:39 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_loop.c b/42sh/src/parser/add_loop.c index c830f5b4..7a03b988 100644 --- a/42sh/src/parser/add_loop.c +++ b/42sh/src/parser/add_loop.c @@ -6,33 +6,33 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 22:17:14 by ariard #+# #+# */ -/* Updated: 2017/02/24 15:08:08 by ariard ### ########.fr */ +/* Updated: 2017/02/24 16:28:27 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ #include "parser.h" -int isloop(t_btree **ast) +int isloop(t_btree **ast, t_list **lst) { t_astnode *node; + t_token *token; node = NULL; + token = (*lst)->content; if (*ast) { node = (*ast)->item; + if (node->type == TK_FOR && token->type == TK_WORD && node->pattern == 0) + return (3); if ((node->type == TK_NEWLINE || node->type == TK_SEMI - || node->type == TK_AMP) && isloop(&(*ast)->right) == 1) + || node->type == TK_AMP) && isloop(&(*ast)->right, lst) == 1) return (1); - if ((node->type == TK_WHILE || node->type == TK_UNTIL) && node->full == 1) - { - DG("DON ENTER"); + if ((node->type == TK_WHILE || node->type == TK_UNTIL + || node->type == TK_FOR) && node->full == 1) return (2); - } - if ((node->type == TK_WHILE || node->type == TK_UNTIL) && node->full == 0) - { - DG(" NOFULL"); + if ((node->type == TK_WHILE || node->type == TK_UNTIL + || node->type == TK_FOR) && node->full == 0) return (1); - } } return (0); } @@ -45,27 +45,20 @@ int add_loop_cmd(t_btree **ast, t_list **lst) token = (*lst)->content; node = (*ast)->item; DG("add loop cmd"); - if ((token->type == TK_WHILE || token->type == TK_UNTIL) - && (node->type == TK_WHILE || node->type == TK_UNTIL)) - { - DG("nest one more"); + if (token->type == TK_DO && node->type == TK_FOR) + node->pattern = 1; + if ((token->type == TK_WHILE || token->type == TK_UNTIL || token->type == TK_FOR) + && (node->type == TK_WHILE || node->type == TK_UNTIL || node->type == TK_FOR)) node->nest++; - } - if (token->type == TK_DONE && (node->type == TK_WHILE || node->type == TK_UNTIL) - && node->nest > 0) - { + if (token->type == TK_DONE && (node->type == TK_WHILE + || node->type == TK_UNTIL || node->type == TK_FOR) && node->nest > 0) node->nest--; - DG("nest one less"); - } else if (token->type == TK_DONE && (node->type == TK_WHILE - || node->type == TK_UNTIL) && node->nest == 0) - { - DG("WHILE FULL"); + || node->type == TK_UNTIL || node->type == TK_FOR) && node->nest == 0) return ((node->full = 1)); - } if (token->type == TK_DO && node->nest == 0) return (add_cmd(&(*ast)->right, lst)); - else if (!(*ast)->right && isloop(&(*ast)->left) != 2) + else if (!(*ast)->right && isloop(&(*ast)->left, lst) != 2) return (add_cmd(&(*ast)->left, lst)); else return (add_cmd(&(*ast)->right, lst)); @@ -80,3 +73,15 @@ int add_loop_sep(t_btree **ast, t_list **lst) return (add_sep(&(*ast)->right, lst)); return (0); } + +int add_loop_condition(t_btree **ast, t_list **lst) +{ + t_astnode *node; + t_token *token; + + token = (*lst)->content; + node = (*ast)->item; + ft_lsteadd(&node->data.wordlist, ft_lstnew(ft_strdup(token->data), + ft_strlen(token->data))); + return (0); +} diff --git a/42sh/src/parser/add_sep.c b/42sh/src/parser/add_sep.c index a30ccb71..7dbbb270 100644 --- a/42sh/src/parser/add_sep.c +++ b/42sh/src/parser/add_sep.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 19:12:07 by ariard #+# #+# */ -/* Updated: 2017/02/24 15:15:33 by ariard ### ########.fr */ +/* Updated: 2017/02/24 16:08:47 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,7 +19,7 @@ int add_sep(t_btree **ast, t_list **lst) t_btree *new_node; DG("add sep"); - if (isloop(ast) == 1) + if (isloop(ast, lst) == 1) return (add_loop_sep(ast, lst)); else if (iscondition(ast, lst) == 1) return (add_condition_sep(ast, lst)); @@ -28,13 +28,11 @@ int add_sep(t_btree **ast, t_list **lst) if (!*ast) gen_node(ast); token = (*lst)->content; -// if (node->type != TK_DO) -// { - new_node = NULL; - gen_node(&new_node); - join_ast(ast, &new_node); - node = (new_node)->item; -// } +//watch != TK_DO + new_node = NULL; + gen_node(&new_node); + join_ast(ast, &new_node); + node = (new_node)->item; node->type = token->type; return (0); } diff --git a/42sh/src/parser/build_tree.c b/42sh/src/parser/build_tree.c index a0c573a7..021aef29 100644 --- a/42sh/src/parser/build_tree.c +++ b/42sh/src/parser/build_tree.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:32:59 by ariard #+# #+# */ -/* Updated: 2017/02/24 15:21:16 by ariard ### ########.fr */ +/* Updated: 2017/02/24 16:24:44 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,13 +35,15 @@ t_treematch g_treematch[] = {TK_ESAC, &add_cmd}, {TK_PAREN_OPEN, &add_cmd}, {TK_PAREN_CLOSE, &add_cmd}, + {TK_FOR, &add_cmd}, {0, NULL}, }; static int isseparator(int type, int cache) { if (type == TK_NEWLINE && (cache == TK_WHILE || cache == TK_DO - || cache == TK_NEWLINE || cache == TK_THEN || cache == TK_IN)) + || cache == TK_NEWLINE || cache == TK_THEN || cache == TK_IN + || cache == TK_WORD)) return (0); return (1); } @@ -54,8 +56,8 @@ int build_tree(t_btree **ast, t_list **lst) i = 0; token = (*lst)->content; -//check bug de cache - cache = token->type; +//check bug de cache case ? +// cache = token->type; while (g_treematch[i].type) { if (g_treematch[i].type == token->type @@ -63,7 +65,8 @@ int build_tree(t_btree **ast, t_list **lst) { DG("func TK : '%s' TK : '%s'", - read_state(g_treematch[i].type) ,read_state(token->type)); + read_state(g_treematch[i].type) ,read_state(token->type)); + cache = token->type; return (g_treematch[i].add(ast, lst)); } i++; diff --git a/42sh/src/parser/tree_wrapper.c b/42sh/src/parser/tree_wrapper.c index 7fbc3c2a..f667a6fe 100644 --- a/42sh/src/parser/tree_wrapper.c +++ b/42sh/src/parser/tree_wrapper.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:57:44 by ariard #+# #+# */ -/* Updated: 2017/02/19 16:34:17 by ariard ### ########.fr */ +/* Updated: 2017/02/24 16:00:40 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ From 0461285d9559f613845ee641a811369fabee51cc Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Fri, 24 Feb 2017 19:30:20 +0100 Subject: [PATCH 14/23] subshell et case ok --- 42sh/Makefile | 3 +- 42sh/includes/parser.h | 7 +- 42sh/sample/case/case.sh | 1 - 42sh/sample/subshell/subshell01.sh | 1 + 42sh/src/lexer/lexer_sep.c | 4 +- 42sh/src/main/ft_putast.c | 4 +- 42sh/src/main/main.c | 2 +- 42sh/src/parser/add_cmd.c | 11 ++- 42sh/src/parser/add_loop.c | 2 +- 42sh/src/parser/add_sep.c | 4 +- 42sh/src/parser/add_subshell.c | 48 +++++++++++ 42sh/src/parser/aggregate_sym.c | 34 +++++--- 42sh/src/parser/build_tree.c | 16 ++-- 42sh/src/parser/error_syntax.c | 3 +- 42sh/src/parser/eval_sym.c | 126 +++++++++++++++++++++++++---- 42sh/src/parser/ft_parse.c | 4 +- 42sh/src/parser/produce_sym.c | 14 ++-- 17 files changed, 228 insertions(+), 56 deletions(-) create mode 100644 42sh/sample/subshell/subshell01.sh create mode 100644 42sh/src/parser/add_subshell.c diff --git a/42sh/Makefile b/42sh/Makefile index d6ca50db..4193e6da 100644 --- a/42sh/Makefile +++ b/42sh/Makefile @@ -6,7 +6,7 @@ # By: wescande +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2016/08/29 21:32:58 by wescande #+# #+# # -# Updated: 2017/02/21 21:32:36 by ariard ### ########.fr # +# Updated: 2017/02/24 18:49:55 by ariard ### ########.fr # # # # **************************************************************************** # @@ -225,6 +225,7 @@ main/shell_get_avdata.c\ main/shell_get_opts.c\ main/shell_init.c\ parser/add_cmd.c\ +parser/add_subshell.c\ parser/add_condition.c\ parser/add_file.c\ parser/add_loop.c\ diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index f3c28da4..2f840910 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -44,7 +44,6 @@ enum e_sym TK_PAREN_OPEN, TK_PAREN_CLOSE, TK_BQUOTE, - TK_SUBSHELL, TK_NEWLINE, TK_WHILE, TK_DO, @@ -63,6 +62,7 @@ enum e_sym TK_IO_NUMBER, TK_DLESSDASH, TK_LESSGREAT, + TK_SUBSHELL, TK_CASE, TK_IN, TK_ESAC, @@ -119,7 +119,6 @@ enum e_sym LOOP, FUNC, PIPE_SEMI_SEQUENCE, - PATTERN_CASE, CMD_SUPERIOR, AND_OR_MAJOR, AND_OR_MINOR, @@ -127,6 +126,7 @@ enum e_sym CONDITION, COMPLETE_CONDITION, FOR_WORDLIST, + PATTERN_CASE, ALL = 200, }; @@ -220,10 +220,13 @@ int add_branch(t_btree **ast, t_list **lst); int add_case_cmd(t_btree **ast, t_list **lst); int add_case_sep(t_btree **ast, t_list **lst); int add_pattern(t_btree **ast, t_list **lst); +int add_subshell_cmd(t_btree **ast, t_list **lst); +int add_subshell_sep(t_btree **ast, t_list **lst); int isloop(t_btree **ast, t_list **lst); int isdir(t_btree **ast); int iscase(t_btree **ast, t_list **lst); int iscondition(t_btree **ast, t_list **lst); +int issubshell(t_btree **ast, t_list **lst); int join_ast(t_btree **ast, t_btree **new_node); int gen_node(t_btree **ast); diff --git a/42sh/sample/case/case.sh b/42sh/sample/case/case.sh index 3642f40b..d89cd66d 100644 --- a/42sh/sample/case/case.sh +++ b/42sh/sample/case/case.sh @@ -3,5 +3,4 @@ case $rental in ("yolo") echo bonjour esac ;; ("van") echo yolo ;; - ("bicycle") echo hola ;; esac diff --git a/42sh/sample/subshell/subshell01.sh b/42sh/sample/subshell/subshell01.sh new file mode 100644 index 00000000..244aeed7 --- /dev/null +++ b/42sh/sample/subshell/subshell01.sh @@ -0,0 +1 @@ +(ls | cat && pwd) diff --git a/42sh/src/lexer/lexer_sep.c b/42sh/src/lexer/lexer_sep.c index 08fb1d1a..2c12ea8b 100644 --- a/42sh/src/lexer/lexer_sep.c +++ b/42sh/src/lexer/lexer_sep.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/30 16:29:57 by jhalford #+# #+# */ -/* Updated: 2017/02/20 20:54:07 by ariard ### ########.fr */ +/* Updated: 2017/02/24 19:14:57 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -39,6 +39,6 @@ int lexer_sep(t_list **alst, t_lexer *lexer) token->type = cn == '|' ? TK_OR_IF : TK_PIPE; token->type = (c == ';') ? TK_SEMI : token->type; token->type = (c == ';') && (cn == ';') ? TK_DSEMI : token->type; - lexer->pos += 1 + (token->type & (TK_AND_IF | TK_OR_IF) ? 1 : 0); + lexer->pos += 1 + (token->type & (TK_AND_IF | TK_OR_IF | TK_DSEMI) ? 1 : 0); return (lexer_lex(&(*alst)->next, lexer)); } diff --git a/42sh/src/main/ft_putast.c b/42sh/src/main/ft_putast.c index a535e33d..65e550aa 100644 --- a/42sh/src/main/ft_putast.c +++ b/42sh/src/main/ft_putast.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/14 18:18:04 by jhalford #+# #+# */ -/* Updated: 2017/02/24 16:24:19 by ariard ### ########.fr */ +/* Updated: 2017/02/24 19:06:19 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,8 @@ char *ft_putast(void *nodein) { t_astnode *node; node = nodein; + if (node->type == SUBSHELL) + return ("SUBSHELL"); if (node->type == TK_NAME) return ("TK_NAME"); if (node->type == TK_FOR) diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index 03b10ea2..032b4529 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/02/24 16:17:54 by ariard ### ########.fr */ +/* Updated: 2017/02/24 18:39:09 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index f976f875..9b26dd7c 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 20:49:15 by ariard #+# #+# */ -/* Updated: 2017/02/24 16:29:21 by ariard ### ########.fr */ +/* Updated: 2017/02/24 19:29:04 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,6 +21,8 @@ int add_cmd(t_btree **ast, t_list **lst) DG("add cmd"); if (!*ast) gen_node(ast); + else if ((token = (*lst)->content)->type == TK_IN) + return (0); else if (isdir(ast)) return (add_file(ast, lst)); else if (isloop(ast, lst) == 3) @@ -37,11 +39,12 @@ int add_cmd(t_btree **ast, t_list **lst) return (add_case_cmd(ast, lst)); else if (iscase(ast, lst) == 3) return (add_branch(ast, lst)); - else if ((node = (*ast)->item)->type != TK_DO && node->type != TK_THEN - && node->type != TK_PAREN_CLOSE && node->type != TK_ESAC) + else if (issubshell(ast, lst)) + return (add_subshell_cmd(ast, lst)); + else if ((node = (*ast)->item)->type != TK_DO && node->type != TK_THEN + && node->type != TK_PAREN_CLOSE) return (add_cmd(&(*ast)->right, lst)); my_tab = NULL; - token = (*lst)->content; node = (*ast)->item; node->type = token->type; if (token->type == TK_WORD) diff --git a/42sh/src/parser/add_loop.c b/42sh/src/parser/add_loop.c index 7a03b988..5f7ae736 100644 --- a/42sh/src/parser/add_loop.c +++ b/42sh/src/parser/add_loop.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 22:17:14 by ariard #+# #+# */ -/* Updated: 2017/02/24 16:28:27 by ariard ### ########.fr */ +/* Updated: 2017/02/24 18:47:29 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_sep.c b/42sh/src/parser/add_sep.c index 7dbbb270..4fef29e4 100644 --- a/42sh/src/parser/add_sep.c +++ b/42sh/src/parser/add_sep.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 19:12:07 by ariard #+# #+# */ -/* Updated: 2017/02/24 16:08:47 by ariard ### ########.fr */ +/* Updated: 2017/02/24 18:54:09 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,6 +25,8 @@ int add_sep(t_btree **ast, t_list **lst) return (add_condition_sep(ast, lst)); else if (iscase(ast, lst) == 2) return (add_case_sep(ast, lst)); + else if (issubshell(ast, lst)) + return (add_subshell_sep(ast, lst)); if (!*ast) gen_node(ast); token = (*lst)->content; diff --git a/42sh/src/parser/add_subshell.c b/42sh/src/parser/add_subshell.c new file mode 100644 index 00000000..b42b8fad --- /dev/null +++ b/42sh/src/parser/add_subshell.c @@ -0,0 +1,48 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* add_subshell.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ariard +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2017/02/24 18:41:50 by ariard #+# #+# */ +/* Updated: 2017/02/24 19:16:06 by ariard ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "parser.h" + +int issubshell(t_btree **ast, t_list **lst) +{ + t_astnode *node; + t_token *token; + + node = NULL; + token = (*lst)->content; + DG("test loop"); + if (*ast) + { + node = (*ast)->item; + if (node->type == SUBSHELL && node->full == 0) + return (1); + } + return (0); +} + +int add_subshell_cmd(t_btree **ast, t_list **lst) +{ + t_token *token; + t_astnode *node; + + DG("add subshell"); + token = (*lst)->content; + node = (*ast)->item; + if (token->type == TK_PAREN_CLOSE && node->type == SUBSHELL) + return ((node->full = 1)); + return (add_cmd(&(*ast)->right, lst)); +} + +int add_subshell_sep(t_btree **ast, t_list **lst) +{ + return (add_sep(&(*ast)->right, lst)); +} diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index e33fa3a5..d97e3261 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:39:18 by ariard #+# #+# */ -/* Updated: 2017/02/21 20:40:31 by ariard ### ########.fr */ +/* Updated: 2017/02/24 18:25:45 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -20,6 +20,8 @@ t_aggrematch g_aggrematch[] = {TK_WORD, FOR_WORDLIST, FOR_WORDLIST, FOR_WORDLIST}, {TK_SEMI, FOR_WORDLIST, SEQUENTIAL_SEP, 0}, {TK_DSEMI, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE, PIPE_SEMI_SEQUENCE}, + {TK_PAREN_OPEN, TK_IN, PATTERN_CASE, 0}, + {TK_PAREN_OPEN, CASE_LIST_NS, PATTERN_CASE, 0}, {TK_ASSIGNEMENT_WORD, CMD_PREFIX,CMD_PREFIX, 0}, {TK_PIPE, CMD_SUPERIOR, SIMPLE_COMMAND, CMD_SUPERIOR}, {TK_FI, ELSE_PART, IF_CLAUSE, TK_IF}, @@ -34,6 +36,9 @@ t_aggrematch g_aggrematch[] = {TK_ESAC, CASE_LIST_NS, CASE_CLAUSE, TK_CASE}, {TK_RBRACE, COMPOUND_LIST, BRACE_GROUP, TK_LBRACE}, {TK_PAREN_CLOSE, COMPOUND_LIST, SUBSHELL, TK_PAREN_OPEN}, + {TK_PAREN_CLOSE, CMD_SUPERIOR, SUBSHELL, TK_PAREN_OPEN}, + {TK_PAREN_CLOSE, PIPE_SEMI_SEQUENCE, SUBSHELL, TK_PAREN_OPEN}, + {TK_AND_IF, CMD_SUPERIOR, AND_OR_MINOR, CMD_SUPERIOR}, {TK_OR_IF, CMD_SUPERIOR, AND_OR_MINOR, CMD_SUPERIOR}, //watch this @@ -49,11 +54,8 @@ t_aggrematch g_aggrematch[] = {LINEBREAK, TK_SEMI, SEQUENTIAL_SEP, TK_SEMI}, //to abstract TK_ESAC - {LINEBREAK, TK_PAREN_CLOSE, CASE_ITEM_NS, PATTERN_CASE}, {LINEBREAK, TK_PAREN_CLOSE, FUNC, FNAME}, //paren open - {LINEBREAK, TK_DSEMI, CASE_ITEM, PATTERN_CASE}, - {LINEBREAK, COMPLETE_COMMANDS, PROGRAM, LINEBREAK}, {LINEBREAK, TK_PIPE, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE}, {LINEBREAK, COMPLETE_COMMANDS, PROGRAM, LINEBREAK}, {LINEBREAK, CMD_SUPERIOR, SEPARATOR_OP, 0}, @@ -108,6 +110,7 @@ t_aggrematch g_aggrematch[] = {IO_REDIRECT, CMD_WORD, CMD_SUFFIX, 0}, {IO_REDIRECT, CMD_PREFIX, CMD_PREFIX, CMD_PREFIX}, {IO_REDIRECT, LINEBREAK, CMD_PREFIX, 0}, + {IO_REDIRECT, TK_PAREN_OPEN, CMD_PREFIX, 0}, {IO_REDIRECT, COMPLETE_COMMANDS, CMD_PREFIX, 0}, {IO_REDIRECT, TK_BANG, CMD_PREFIX, 0}, {IO_REDIRECT, SEPARATOR_OP, CMD_PREFIX, 0}, @@ -118,6 +121,7 @@ t_aggrematch g_aggrematch[] = {CMD_SUFFIX, CMD_SUPERIOR, SIMPLE_COMMAND, CMD_SUPERIOR}, //to abstract {CMD_PREFIX, LINEBREAK, SIMPLE_COMMAND, 0}, + {CMD_PREFIX, TK_PAREN_OPEN, SIMPLE_COMMAND, 0}, {CMD_PREFIX, COMPLETE_COMMANDS, SIMPLE_COMMAND, 0}, {CMD_PREFIX, TK_BANG, SIMPLE_COMMAND, 0}, {CMD_PREFIX, SEPARATOR_OP, SIMPLE_COMMAND, 0}, @@ -126,6 +130,7 @@ t_aggrematch g_aggrematch[] = {CMD_WORD, CMD_PREFIX, SIMPLE_COMMAND, CMD_PREFIX}, //to check {CMD_NAME, LINEBREAK, CMD_SUPERIOR, 0}, + {CMD_NAME, TK_PAREN_OPEN, CMD_SUPERIOR, 0}, {CMD_NAME, COMPLETE_COMMANDS, CMD_SUPERIOR, 0}, {CMD_NAME, TK_BANG, CMD_SUPERIOR, 0}, {CMD_NAME, SEPARATOR_OP, CMD_SUPERIOR, 0}, @@ -160,15 +165,13 @@ t_aggrematch g_aggrematch[] = // {ELSE_PART, COMPOUND_LIST, ELSE_PART, TK_ELIF}, // {ELSE_PART, COMPLETE_CONDITION, IF_CLAUSE, COMPLETE_CONDITION}, {IF_CLAUSE, ALL, COMPOUND_COMMAND, 0}, - {PATTERN, CASE_LIST, PATTERN_CASE, 0}, {CASE_LIST_NS, TK_IN, TK_IN, TK_IN}, {CASE_CLAUSE, ALL, COMPOUND_COMMAND, 0}, {FOR_CLAUSE, ALL, COMPOUND_COMMAND, 0}, - {TERM, LINEBREAK, COMPOUND_LIST, LINEBREAK}, // {COMPOUND_LIST, TK_ELSE, ELSE_PART, TK_ELSE}, {COMPOUND_LIST, TK_IF, CONDITION, TK_IF}, {COMPOUND_LIST, TK_THEN, CONDITION, TK_THEN}, - {COMPOUND_LIST, TK_PAREN_CLOSE, CASE_LIST_NS, TK_PAREN_OPEN}, + {COMPOUND_LIST, TK_PAREN_CLOSE, CASE_LIST_NS, PATTERN_CASE}, {COMPOUND_LIST, COMPLETE_CONDITION, COMPLETE_CONDITION, COMPLETE_CONDITION}, // {COMPOUND_LIST, TK_THEN, ELSE_PART, TK_ELIF}, {COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST}, @@ -177,6 +180,7 @@ t_aggrematch g_aggrematch[] = {COMPOUND_COMMAND, ALL, COMMAND, 0}, {AND_OR_MINOR, PIPE_SEMI_SEQUENCE, AND_OR_MAJOR, PIPE_SEMI_SEQUENCE}, {AND_OR_MINOR, LINEBREAK, AND_OR_MAJOR, 0}, + {AND_OR_MINOR, TK_PAREN_OPEN, AND_OR_MAJOR, 0}, {AND_OR_MINOR, COMPLETE_COMMANDS, AND_OR_MAJOR, 0}, {AND_OR_MINOR, AND_OR_MAJOR, AND_OR_MAJOR, 0}, {COMMAND, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE}, @@ -194,9 +198,9 @@ t_aggrematch g_aggrematch[] = {COMMAND, SEPARATOR_OP, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, NEWLINE_LIST, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, LINEBREAK, PIPE_SEMI_SEQUENCE, 0}, + {COMMAND, TK_PAREN_OPEN, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, COMPLETE_COMMANDS, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, AND_OR_MAJOR, PIPE_SEMI_SEQUENCE, 0}, - {COMMAND, AND_OR_MAJOR, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, COMPLETE_CONDITION, PIPE_SEMI_SEQUENCE, 0}, {END_COMMAND, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE, PIPE_SEMI_SEQUENCE}, {END_COMMAND, AND_OR_MAJOR, LIST, AND_OR_MAJOR}, @@ -204,6 +208,7 @@ t_aggrematch g_aggrematch[] = {END_COMMAND, TK_WHILE, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_UNTIL, PIPE_SEQUENCE, 0}, {END_COMMAND, LINEBREAK, PIPE_SEQUENCE, 0}, + {END_COMMAND, TK_PAREN_OPEN, PIPE_SEQUENCE, 0}, {END_COMMAND, COMPLETE_COMMANDS, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_DO, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_PAREN_CLOSE, PIPE_SEQUENCE, 0}, @@ -220,6 +225,7 @@ t_aggrematch g_aggrematch[] = {PIPE_SEQUENCE, SEPARATOR_OP, PIPELINE, 0}, {PIPE_SEQUENCE, NEWLINE_LIST, PIPELINE, 0}, {PIPE_SEQUENCE, LINEBREAK, PIPELINE, 0}, + {PIPE_SEQUENCE, TK_PAREN_OPEN, PIPELINE, 0}, {PIPE_SEQUENCE, COMPLETE_COMMANDS, PIPELINE, 0}, {PIPE_SEQUENCE, AND_OR_MAJOR, PIPELINE, 0}, {PIPE_SEQUENCE, TK_DO, PIPELINE, 0}, @@ -243,6 +249,7 @@ t_aggrematch g_aggrematch[] = {PIPELINE, COMPOUND_LIST, AND_OR, 0}, {PIPELINE, CASE_LIST_NS, AND_OR, 0}, {PIPELINE, LINEBREAK, AND_OR, 0}, + {PIPELINE, TK_PAREN_OPEN, AND_OR, 0}, {PIPELINE, COMPLETE_COMMANDS, AND_OR, 0}, // {PIPELINE, LINEBREAK, AND_OR, AND_OR}, {PIPELINE, SEPARATOR_OP, AND_OR, 0}, @@ -263,12 +270,15 @@ t_aggrematch g_aggrematch[] = {AND_OR, SEPARATOR_OP, LIST, LIST}, {AND_OR, NEWLINE_LIST, LIST, 0}, {AND_OR, LINEBREAK, LIST, 0}, + {AND_OR, TK_PAREN_OPEN, LIST, 0}, {AND_OR, COMPLETE_COMMANDS, LIST, 0}, {LIST, NEWLINE_LIST, COMPLETE_COMMAND, 0}, {LIST, LINEBREAK, COMPLETE_COMMAND, 0}, + {LIST, TK_PAREN_OPEN, LIST, 0}, {LIST, COMPLETE_COMMANDS, COMPLETE_COMMAND, 0}, {COMPLETE_COMMAND, NEWLINE_LIST, COMPLETE_COMMANDS, COMPLETE_COMMANDS}, {COMPLETE_COMMAND, LINEBREAK, COMPLETE_COMMANDS, 0}, + {COMPLETE_COMMAND, TK_PAREN_OPEN, COMPLETE_COMMANDS, 0}, {COMPLETE_COMMAND, COMPLETE_COMMANDS, COMPLETE_COMMANDS, 0}, {COMPLETE_COMMANDS, COMPLETE_COMMANDS, COMPLETE_COMMANDS, COMPLETE_COMMANDS}, {0, 0, 0, 0}, @@ -279,20 +289,20 @@ int aggregate_sym(t_sym **stack, t_sym *new_sym, t_parstate *state) int i; i = 0; -// DG("aggregate head %s && sym %s", -// read_state(**stack), read_state(*new_sym)); + DG("aggregate head %s && sym %s", + read_state(**stack), read_state(*new_sym)); while (g_aggrematch[i].top) { if (*new_sym == g_aggrematch[i].top && MATCH_STACK(**stack, g_aggrematch[i].under)) { -// DG("MATCH : %s", read_state(g_aggrematch[i].new_sym)); + DG("MATCH : %s", read_state(g_aggrematch[i].new_sym)); *new_sym = g_aggrematch[i].new_sym; if (g_aggrematch[i].erase_sym) { pop_stack(stack, g_aggrematch[i].erase_sym); -// DG("stack after pop: %s", read_state(**stack)); + DG("stack after pop: %s", read_state(**stack)); } if (eval_sym(**stack, *new_sym)) return ((*state = ERROR)); diff --git a/42sh/src/parser/build_tree.c b/42sh/src/parser/build_tree.c index 021aef29..805dd403 100644 --- a/42sh/src/parser/build_tree.c +++ b/42sh/src/parser/build_tree.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:32:59 by ariard #+# #+# */ -/* Updated: 2017/02/24 16:24:44 by ariard ### ########.fr */ +/* Updated: 2017/02/24 19:27:32 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,17 +33,20 @@ t_treematch g_treematch[] = {TK_NEWLINE, &add_sep}, {TK_CASE, &add_cmd}, {TK_ESAC, &add_cmd}, + {TK_IN, &add_cmd}, + {TK_DSEMI, &add_cmd}, {TK_PAREN_OPEN, &add_cmd}, {TK_PAREN_CLOSE, &add_cmd}, {TK_FOR, &add_cmd}, + {SUBSHELL, &add_cmd}, {0, NULL}, }; -static int isseparator(int type, int cache) +static int isseparator(t_token *token, int cache) { - if (type == TK_NEWLINE && (cache == TK_WHILE || cache == TK_DO + if (token->type == TK_NEWLINE && (cache == TK_WHILE || cache == TK_DO || cache == TK_NEWLINE || cache == TK_THEN || cache == TK_IN - || cache == TK_WORD)) + || cache == TK_WORD || cache == TK_DSEMI)) return (0); return (1); } @@ -58,10 +61,11 @@ int build_tree(t_btree **ast, t_list **lst) token = (*lst)->content; //check bug de cache case ? // cache = token->type; + if (token->type == TK_PAREN_OPEN && cache != TK_IN && cache != TK_DSEMI) + token->type = SUBSHELL; while (g_treematch[i].type) { - if (g_treematch[i].type == token->type - && isseparator(token->type, cache)) + if ((isseparator(token, cache) && g_treematch[i].type == token->type)) { DG("func TK : '%s' TK : '%s'", diff --git a/42sh/src/parser/error_syntax.c b/42sh/src/parser/error_syntax.c index 827807be..169be95f 100644 --- a/42sh/src/parser/error_syntax.c +++ b/42sh/src/parser/error_syntax.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 20:15:35 by ariard #+# #+# */ -/* Updated: 2017/02/21 19:27:59 by jhalford ### ########.fr */ +/* Updated: 2017/02/24 19:12:35 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,7 @@ t_errormatch g_errormatch[] = { {TK_NEWLINE, "newline"}, {TK_SEMI, ";"}, + {TK_DSEMI, ";;"}, {TK_PIPE, "|"}, {TK_AMP, "&"}, {TK_LESS, "<"}, diff --git a/42sh/src/parser/eval_sym.c b/42sh/src/parser/eval_sym.c index eeb9b093..eac28ec2 100644 --- a/42sh/src/parser/eval_sym.c +++ b/42sh/src/parser/eval_sym.c @@ -18,6 +18,7 @@ t_stackmatch g_stackmatch[] = {TK_WORD, TK_CASE}, {TK_WORD, WORDLIST}, {TK_WORD, LINEBREAK}, + {TK_WORD, TK_PAREN_OPEN}, {TK_WORD, COMPLETE_COMMANDS}, {TK_WORD, TK_IN}, {TK_WORD, FOR_WORDLIST}, @@ -28,6 +29,7 @@ t_stackmatch g_stackmatch[] = {TK_IO_NUMBER, CMD_NAME}, {TK_IO_NUMBER, CMD_WORD}, {TK_IO_NUMBER, LINEBREAK}, + {TK_IO_NUMBER, TK_PAREN_OPEN}, {TK_IO_NUMBER, COMPLETE_COMMANDS}, {TK_IO_NUMBER, TK_BANG}, {TK_IO_NUMBER, SEPARATOR_OP}, @@ -52,6 +54,7 @@ t_stackmatch g_stackmatch[] = {TK_LESS, CMD_WORD}, {TK_LESS, CMD_NAME}, {TK_LESS, LINEBREAK}, + {TK_LESS, TK_PAREN_OPEN}, {TK_LESS, COMPLETE_COMMANDS}, {TK_LESS, TK_BANG}, {TK_LESS, SEPARATOR_OP}, @@ -66,6 +69,7 @@ t_stackmatch g_stackmatch[] = {TK_GREAT, CMD_WORD}, {TK_GREAT, CMD_NAME}, {TK_GREAT, LINEBREAK}, + {TK_GREAT, TK_PAREN_OPEN}, {TK_GREAT, COMPLETE_COMMANDS}, {TK_GREAT, TK_BANG}, {TK_GREAT, SEPARATOR_OP}, @@ -82,6 +86,7 @@ t_stackmatch g_stackmatch[] = {TK_DLESS, CMD_WORD}, {TK_DLESS, CMD_NAME}, {TK_DLESS, LINEBREAK}, + {TK_DLESS, TK_PAREN_OPEN}, {TK_DLESS, COMPLETE_COMMANDS}, {TK_DLESS, TK_BANG}, {TK_DLESS, SEPARATOR_OP}, @@ -97,6 +102,7 @@ t_stackmatch g_stackmatch[] = {TK_DLESSDASH, CMD_WORD}, {TK_DLESSDASH, CMD_NAME}, {TK_DLESSDASH, LINEBREAK}, + {TK_DLESSDASH, TK_PAREN_OPEN}, {TK_DLESSDASH, COMPLETE_COMMANDS}, {TK_DLESSDASH, TK_BANG}, {TK_DLESSDASH, TK_BANG}, @@ -113,6 +119,7 @@ t_stackmatch g_stackmatch[] = {TK_DGREAT, CMD_WORD}, {TK_DGREAT, CMD_NAME}, {TK_DGREAT, LINEBREAK}, + {TK_DGREAT, TK_PAREN_OPEN}, {TK_DGREAT, COMPLETE_COMMANDS}, {TK_DGREAT, TK_BANG}, {TK_DGREAT, TK_BANG}, @@ -129,6 +136,7 @@ t_stackmatch g_stackmatch[] = {TK_LESSAND, CMD_WORD}, {TK_LESSAND, CMD_NAME}, {TK_LESSAND, LINEBREAK}, + {TK_LESSAND, TK_PAREN_OPEN}, {TK_LESSAND, COMPLETE_COMMANDS}, {TK_LESSAND, TK_BANG}, {TK_LESSAND, TK_BANG}, @@ -145,6 +153,7 @@ t_stackmatch g_stackmatch[] = {TK_GREATAND, CMD_WORD}, {TK_GREATAND, CMD_NAME}, {TK_GREATAND, LINEBREAK}, + {TK_GREATAND, TK_PAREN_OPEN}, {TK_GREATAND, COMPLETE_COMMANDS}, {TK_LESSAND, TK_BANG}, {TK_GREATAND, TK_BANG}, @@ -161,6 +170,7 @@ t_stackmatch g_stackmatch[] = {TK_LESSGREAT, CMD_WORD}, {TK_LESSGREAT, CMD_NAME}, {TK_LESSGREAT, LINEBREAK}, + {TK_LESSGREAT, TK_PAREN_OPEN}, {TK_LESSGREAT, COMPLETE_COMMANDS}, {TK_LESSGREAT, TK_BANG}, {TK_LESSGREAT, TK_BANG}, @@ -177,6 +187,7 @@ t_stackmatch g_stackmatch[] = {TK_CLOBBER, CMD_WORD}, {TK_CLOBBER, CMD_NAME}, {TK_CLOBBER, LINEBREAK}, + {TK_CLOBBER, TK_PAREN_OPEN}, {TK_CLOBBER, COMPLETE_COMMANDS}, {TK_CLOBBER, TK_BANG}, {TK_CLOBBER, TK_BANG}, @@ -187,6 +198,7 @@ t_stackmatch g_stackmatch[] = {TK_CLOBBER, AND_OR_MAJOR}, {TK_IF, LINEBREAK}, + {TK_IF, TK_PAREN_OPEN}, {TK_IF, TK_PAREN_CLOSE}, {TK_IF, COMPLETE_COMMANDS}, {TK_IF, TK_BANG}, @@ -226,6 +238,7 @@ t_stackmatch g_stackmatch[] = {TK_DONE, COMPOUND_LIST}, {TK_DONE, END_COMMAND}, {TK_CASE, LINEBREAK}, + {TK_CASE, TK_PAREN_OPEN}, {TK_CASE, COMPLETE_COMMANDS}, {TK_CASE, TK_BANG}, {TK_CASE, TK_DO}, @@ -248,6 +261,7 @@ t_stackmatch g_stackmatch[] = {TK_ESAC, LINEBREAK}, {TK_ESAC, TK_IN}, {TK_WHILE, LINEBREAK}, + {TK_WHILE, TK_PAREN_OPEN}, {TK_WHILE, COMPLETE_COMMANDS}, {TK_WHILE, TK_BANG}, {TK_WHILE, SEPARATOR_OP}, @@ -265,6 +279,7 @@ t_stackmatch g_stackmatch[] = {TK_WHILE, TK_THEN}, {TK_WHILE, COMPLETE_CONDITION}, {TK_UNTIL, LINEBREAK}, + {TK_UNTIL, TK_PAREN_OPEN}, {TK_UNTIL, COMPLETE_COMMANDS}, {TK_UNTIL, TK_BANG}, {TK_UNTIL, SEPARATOR_OP}, @@ -282,6 +297,7 @@ t_stackmatch g_stackmatch[] = {TK_UNTIL, TK_PAREN_CLOSE}, {TK_UNTIL, COMPLETE_CONDITION}, {TK_FOR, LINEBREAK}, + {TK_FOR, TK_PAREN_OPEN}, {TK_FOR, COMPLETE_COMMANDS}, {TK_FOR, TK_BANG}, {TK_FOR, TK_BANG}, @@ -300,6 +316,7 @@ t_stackmatch g_stackmatch[] = {TK_FOR, TK_PAREN_CLOSE}, {TK_FOR, COMPLETE_CONDITION}, {TK_LBRACE, LINEBREAK}, + {TK_LBRACE, TK_PAREN_OPEN}, {TK_LBRACE, COMPLETE_COMMANDS}, {TK_LBRACE, TK_BANG}, {TK_LBRACE, SEPARATOR_OP}, @@ -308,6 +325,7 @@ t_stackmatch g_stackmatch[] = {TK_RBRACE, COMPOUND_LIST}, {TK_RBRACE, CASE_LIST_NS}, {TK_BANG, LINEBREAK}, + {TK_BANG, TK_PAREN_OPEN}, {TK_BANG, COMPLETE_COMMANDS}, {TK_BANG, SEPARATOR_OP}, {TK_BANG, SEPARATOR_OP}, @@ -325,20 +343,29 @@ t_stackmatch g_stackmatch[] = {TK_AMP, TERM}, {TK_PIPE, PATTERN}, {TK_PIPE, CMD_SUPERIOR}, - {TK_PAREN_OPEN, FNAME}, - {TK_PAREN_OPEN, CASE_LIST_NS}, - {TK_PAREN_OPEN, TK_IN}, - {TK_PAREN_OPEN, CASE_LIST}, - {TK_PAREN_OPEN, LINEBREAK}, + {PATTERN_CASE, TK_IN}, + {PATTERN_CASE, CASE_LIST_NS}, {TK_PAREN_OPEN, COMPLETE_COMMANDS}, - {TK_PAREN_OPEN, TK_BANG}, + {TK_PAREN_OPEN, LINEBREAK}, + {TK_PAREN_OPEN, TK_PAREN_OPEN}, {TK_PAREN_OPEN, TK_BANG}, {TK_PAREN_OPEN, SEPARATOR_OP}, {TK_PAREN_OPEN, NEWLINE_LIST}, {TK_PAREN_OPEN, PIPE_SEMI_SEQUENCE}, - {TK_PAREN_CLOSE, TK_PAREN_OPEN}, - {TK_PAREN_CLOSE, PATTERN}, - {TK_PAREN_CLOSE, COMPOUND_LIST}, + {TK_PAREN_OPEN, AND_OR_MAJOR}, + {TK_PAREN_OPEN, TK_WHILE}, + {TK_PAREN_OPEN, TK_UNTIL}, + {TK_PAREN_OPEN, TK_DO}, + {TK_PAREN_OPEN, TK_PAREN_CLOSE}, + {TK_PAREN_OPEN, TK_PAREN_OPEN}, + {TK_PAREN_OPEN, TK_IF}, + {TK_PAREN_OPEN, TK_ELIF}, + {TK_PAREN_OPEN, TK_THEN}, + {TK_PAREN_OPEN, TK_ELSE}, + {TK_PAREN_OPEN, COMPOUND_LIST}, + {TK_PAREN_OPEN, CASE_LIST_NS}, + {TK_PAREN_OPEN, COMPLETE_CONDITION}, + {TK_PAREN_OPEN, TK_IN}, {SEQUENTIAL_SEP, NAME}, {SEQUENTIAL_SEP, IN}, {SEQUENTIAL_SEP, WORDLIST}, @@ -354,6 +381,7 @@ t_stackmatch g_stackmatch[] = {END_COMMAND, TK_ELIF}, {END_COMMAND, TK_ELSE}, {END_COMMAND, LINEBREAK}, + {END_COMMAND, TK_PAREN_OPEN}, {END_COMMAND, COMPLETE_COMMANDS}, {END_COMMAND, COMPOUND_LIST}, {END_COMMAND, CASE_LIST_NS}, @@ -372,7 +400,6 @@ t_stackmatch g_stackmatch[] = {LINEBREAK, TK_SEMI}, {LINEBREAK, END_COMMAND}, {LINEBREAK, SEPARATOR_OP}, - {LINEBREAK, SEPARATOR_OP}, {LINEBREAK, TK_PAREN_CLOSE}, {LINEBREAK, WORD}, {LINEBREAK, IN}, @@ -386,6 +413,25 @@ t_stackmatch g_stackmatch[] = {LINEBREAK, COMPOUND_LIST}, {LINEBREAK, CASE_LIST_NS}, {LINEBREAK, PROGRAM}, + {LINEBREAK, TK_PAREN_OPEN}, + {TK_PAREN_CLOSE, TK_SEMI}, + {TK_PAREN_CLOSE, END_COMMAND}, + {TK_PAREN_CLOSE, SEPARATOR_OP}, + {TK_PAREN_CLOSE, WORD}, + {TK_PAREN_CLOSE, IN}, + {TK_PAREN_CLOSE, TK_AND_IF}, + {TK_PAREN_CLOSE, TK_OR_IF}, + {TK_PAREN_CLOSE, TK_PIPE}, + {TK_PAREN_CLOSE, TK_PAREN_CLOSE}, + {TK_PAREN_CLOSE, COMPLETE_COMMANDS}, + {TK_PAREN_CLOSE, CMD_SUPERIOR}, + {TK_PAREN_CLOSE, PIPE_SEMI_SEQUENCE}, + {TK_PAREN_CLOSE, CASE_LIST_NS}, + {TK_PAREN_CLOSE, PROGRAM}, + {TK_PAREN_CLOSE, TK_PAREN_OPEN}, + {TK_PAREN_CLOSE, PATTERN_CASE}, + {TK_PAREN_CLOSE, PATTERN}, + {TK_PAREN_CLOSE, COMPOUND_LIST}, {NEWLINE_LIST, TK_DO}, {NEWLINE_LIST, CASE_LIST_NS}, {NEWLINE_LIST, TK_PAREN_CLOSE}, @@ -410,6 +456,7 @@ t_stackmatch g_stackmatch[] = {NEWLINE_LIST, COMPLETE_CONDITION}, {NEWLINE_LIST, CONDITION}, {NEWLINE_LIST, LINEBREAK}, + {NEWLINE_LIST, TK_PAREN_OPEN}, {HERE_END, TK_DLESS}, {HERE_END, TK_DLESS}, {HERE_END, TK_DLESSDASH}, @@ -421,6 +468,7 @@ t_stackmatch g_stackmatch[] = {IO_HERE, CMD_WORD}, {IO_HERE, CMD_NAME}, {IO_HERE, LINEBREAK}, + {IO_HERE, TK_PAREN_OPEN}, {IO_HERE, COMPLETE_COMMANDS}, {IO_HERE, TK_BANG}, {IO_HERE, TK_BANG}, @@ -455,6 +503,7 @@ t_stackmatch g_stackmatch[] = {IO_REDIRECT, CMD_WORD}, {IO_REDIRECT, CMD_NAME}, {IO_REDIRECT, LINEBREAK}, + {IO_REDIRECT, TK_PAREN_OPEN}, {IO_REDIRECT, COMPLETE_COMMANDS}, {IO_REDIRECT, TK_BANG}, {IO_REDIRECT, TK_BANG}, @@ -466,6 +515,7 @@ t_stackmatch g_stackmatch[] = {CMD_SUFFIX, CMD_NAME}, {CMD_SUFFIX, CMD_SUPERIOR}, {CMD_PREFIX, LINEBREAK}, + {CMD_PREFIX, TK_PAREN_OPEN}, {CMD_PREFIX, COMPLETE_COMMANDS}, {CMD_PREFIX, TK_BANG}, {CMD_PREFIX, TK_BANG}, @@ -475,6 +525,7 @@ t_stackmatch g_stackmatch[] = {CMD_WORD, CMD_PREFIX}, {CMD_NAME, COMPLETE_COMMANDS}, {CMD_NAME, LINEBREAK}, + {CMD_NAME, TK_PAREN_OPEN}, {CMD_NAME, TK_BANG}, {CMD_NAME, TK_BANG}, {CMD_NAME, SEPARATOR_OP}, @@ -485,6 +536,7 @@ t_stackmatch g_stackmatch[] = {CMD_NAME, TK_UNTIL}, {CMD_NAME, TK_DO}, {CMD_NAME, TK_PAREN_CLOSE}, + {CMD_NAME, TK_PAREN_OPEN}, {CMD_NAME, TK_IF}, {CMD_NAME, TK_ELIF}, {CMD_NAME, TK_THEN}, @@ -505,6 +557,7 @@ t_stackmatch g_stackmatch[] = {CMD_SUPERIOR, CASE_LIST_NS}, {CMD_SUPERIOR, COMPLETE_CONDITION}, {CMD_SUPERIOR, LINEBREAK}, + {CMD_SUPERIOR, TK_PAREN_OPEN}, {CMD_SUPERIOR, COMPLETE_COMMANDS}, {CMD_SUPERIOR, TK_BANG}, {CMD_SUPERIOR, TK_BANG}, @@ -526,6 +579,7 @@ t_stackmatch g_stackmatch[] = {SIMPLE_COMMAND, CASE_LIST_NS}, {SIMPLE_COMMAND, COMPLETE_CONDITION}, {SIMPLE_COMMAND, LINEBREAK}, + {SIMPLE_COMMAND, TK_PAREN_OPEN}, {SIMPLE_COMMAND, COMPLETE_COMMANDS}, {SIMPLE_COMMAND, TK_BANG}, {SIMPLE_COMMAND, TK_BANG}, @@ -540,15 +594,18 @@ t_stackmatch g_stackmatch[] = {LOOP, TK_WHILE}, {LOOP, TK_UNTIL}, {CONDITION, LINEBREAK}, + {CONDITION, TK_PAREN_OPEN}, {CONDITION, COMPLETE_COMMANDS}, {CONDITION, COMPOUND_LIST}, {CONDITION, CASE_LIST_NS}, {CONDITION, COMPLETE_CONDITION}, {COMPLETE_CONDITION, LINEBREAK}, + {COMPLETE_CONDITION, TK_PAREN_OPEN}, {COMPLETE_CONDITION, COMPLETE_COMMANDS}, {COMPLETE_CONDITION, COMPLETE_CONDITION}, {COMPLETE_CONDITION, COMPLETE_CONDITION}, {BRACE_GROUP, LINEBREAK}, + {BRACE_GROUP, TK_PAREN_OPEN}, {BRACE_GROUP, COMPLETE_COMMANDS}, {BRACE_GROUP, TK_BANG}, {BRACE_GROUP, TK_BANG}, @@ -556,6 +613,7 @@ t_stackmatch g_stackmatch[] = {BRACE_GROUP, NEWLINE_LIST}, {BRACE_GROUP, PIPE_SEMI_SEQUENCE}, {FNAME, LINEBREAK}, + {FNAME, TK_PAREN_OPEN}, {FNAME, COMPLETE_COMMANDS}, {FNAME, TK_BANG}, {FNAME, TK_BANG}, @@ -564,6 +622,7 @@ t_stackmatch g_stackmatch[] = {FNAME, PIPE_SEMI_SEQUENCE}, {FUNCTION_BODY, FUNC}, {FUNCTION_DEFINITION, LINEBREAK}, + {FUNCTION_DEFINITION, TK_PAREN_OPEN}, {FUNCTION_DEFINITION, COMPLETE_COMMANDS}, {FUNCTION_DEFINITION, TK_BANG}, {FUNCTION_DEFINITION, TK_BANG}, @@ -571,9 +630,9 @@ t_stackmatch g_stackmatch[] = {FUNCTION_DEFINITION, NEWLINE_LIST}, {FUNCTION_DEFINITION, PIPE_SEMI_SEQUENCE}, {UNTIL_CLAUSE, LINEBREAK}, + {UNTIL_CLAUSE, TK_PAREN_OPEN}, {UNTIL_CLAUSE, COMPLETE_COMMANDS}, {UNTIL_CLAUSE, TK_BANG}, - {UNTIL_CLAUSE, TK_BANG}, {UNTIL_CLAUSE, SEPARATOR_OP}, {UNTIL_CLAUSE, NEWLINE_LIST}, {UNTIL_CLAUSE, PIPE_SEMI_SEQUENCE}, @@ -588,7 +647,9 @@ t_stackmatch g_stackmatch[] = {UNTIL_CLAUSE, COMPOUND_LIST}, {UNTIL_CLAUSE, CASE_LIST_NS}, {UNTIL_CLAUSE, COMPLETE_CONDITION}, + {UNTIL_CLAUSE, AND_OR_MAJOR}, {WHILE_CLAUSE, LINEBREAK}, + {WHILE_CLAUSE, TK_PAREN_OPEN}, {WHILE_CLAUSE, COMPLETE_COMMANDS}, {WHILE_CLAUSE, TK_BANG}, {WHILE_CLAUSE, SEPARATOR_OP}, @@ -605,9 +666,11 @@ t_stackmatch g_stackmatch[] = {WHILE_CLAUSE, COMPOUND_LIST}, {WHILE_CLAUSE, CASE_LIST_NS}, {WHILE_CLAUSE, COMPLETE_CONDITION}, + {WHILE_CLAUSE, AND_OR_MAJOR}, // {ELSE_PART, COMPOUND_LIST}, // {ELSE_PART, COMPLETE_CONDITION}, {IF_CLAUSE, LINEBREAK}, + {IF_CLAUSE, TK_PAREN_OPEN}, {IF_CLAUSE, COMPLETE_COMMANDS}, {IF_CLAUSE, TK_BANG}, {IF_CLAUSE, SEPARATOR_OP}, @@ -625,13 +688,14 @@ t_stackmatch g_stackmatch[] = {IF_CLAUSE, CASE_LIST_NS}, {IF_CLAUSE, COMPLETE_COMMAND}, {IF_CLAUSE, COMPLETE_CONDITION}, + {IF_CLAUSE, AND_OR_MAJOR}, - {PATTERN, TK_PAREN_OPEN}, + {PATTERN, PATTERN_CASE}, {PATTERN, CASE_LIST}, {PATTERN, TK_IN}, - {PATTERN_CASE, CASE_LIST}, {CASE_LIST_NS, LINEBREAK}, {CASE_CLAUSE, LINEBREAK}, + {CASE_CLAUSE, TK_PAREN_OPEN}, {CASE_CLAUSE, COMPLETE_COMMANDS}, {CASE_CLAUSE, TK_BANG}, {CASE_CLAUSE, SEPARATOR_OP}, @@ -648,13 +712,15 @@ t_stackmatch g_stackmatch[] = {CASE_CLAUSE, TK_ELSE}, {CASE_CLAUSE, COMPOUND_LIST}, {CASE_CLAUSE, CASE_LIST_NS}, - {CASE_CLAUSE, COMPLETE_COMMAND}, + {CASE_CLAUSE, COMPLETE_CONDITION}, + {CASE_CLAUSE, AND_OR_MAJOR}, {WORDLIST, IN}, {IN, LINEBREAK}, {NAME, TK_FOR}, {FOR_WORDLIST, NAME}, {FOR_CLAUSE, LINEBREAK}, + {FOR_CLAUSE, TK_PAREN_OPEN}, {FOR_CLAUSE, COMPLETE_COMMANDS}, {FOR_CLAUSE, TK_BANG}, {FOR_CLAUSE, TK_BANG}, @@ -672,6 +738,7 @@ t_stackmatch g_stackmatch[] = {FOR_CLAUSE, COMPOUND_LIST}, {FOR_CLAUSE, CASE_LIST_NS}, {FOR_CLAUSE, COMPLETE_CONDITION}, + {FOR_CLAUSE, AND_OR_MAJOR}, {TERM, LINEBREAK}, {TERM, COMPLETE_COMMANDS}, {COMPOUND_LIST, TK_DO}, @@ -689,11 +756,26 @@ t_stackmatch g_stackmatch[] = {SUBSHELL, LINEBREAK}, {SUBSHELL, COMPLETE_COMMANDS}, {SUBSHELL, TK_BANG}, - {SUBSHELL, TK_BANG}, {SUBSHELL, SEPARATOR_OP}, {SUBSHELL, NEWLINE_LIST}, {SUBSHELL, PIPE_SEMI_SEQUENCE}, + {SUBSHELL, SEPARATOR_OP}, + {SUBSHELL, NEWLINE_LIST}, + {SUBSHELL, PIPE_SEMI_SEQUENCE}, + {SUBSHELL, TK_DO}, + {SUBSHELL, TK_PAREN_CLOSE}, + {SUBSHELL, TK_WHILE}, + {SUBSHELL, TK_UNTIL}, + {SUBSHELL, TK_IF}, + {SUBSHELL, TK_ELIF}, + {SUBSHELL, TK_THEN}, + {SUBSHELL, TK_ELSE}, + {SUBSHELL, COMPOUND_LIST}, + {SUBSHELL, CASE_LIST_NS}, + {SUBSHELL, COMPLETE_CONDITION}, + {SUBSHELL, AND_OR_MAJOR}, {COMPOUND_COMMAND, LINEBREAK}, + {COMPOUND_COMMAND, TK_PAREN_OPEN}, {COMPOUND_COMMAND, COMPLETE_COMMANDS}, {COMPOUND_COMMAND, TK_BANG}, {COMPOUND_COMMAND, TK_BANG}, @@ -712,9 +794,11 @@ t_stackmatch g_stackmatch[] = {COMPOUND_COMMAND, COMPOUND_LIST}, {COMPOUND_COMMAND, CASE_LIST_NS}, {COMPOUND_COMMAND, COMPLETE_CONDITION}, + {COMPOUND_COMMAND, AND_OR_MAJOR}, {COMMAND, TK_WHILE}, {COMMAND, TK_UNTIL}, {COMMAND, LINEBREAK}, + {COMMAND, TK_PAREN_OPEN}, {COMMAND, COMPLETE_COMMANDS}, {COMMAND, TK_DO}, {COMMAND, TK_PAREN_CLOSE}, @@ -732,9 +816,9 @@ t_stackmatch g_stackmatch[] = {COMMAND, AND_OR_MAJOR}, {AND_OR_MINOR, PIPE_SEMI_SEQUENCE}, {AND_OR_MINOR, LINEBREAK}, + {AND_OR_MINOR, TK_PAREN_OPEN}, {AND_OR_MINOR, COMPLETE_COMMANDS}, {AND_OR_MINOR, AND_OR_MAJOR}, - {AND_OR_MINOR, AND_OR_MAJOR}, {PIPE_SEQUENCE, TK_WHILE}, {PIPE_SEQUENCE, TK_UNTIL}, {PIPE_SEQUENCE, TK_DO}, @@ -747,6 +831,7 @@ t_stackmatch g_stackmatch[] = {PIPE_SEQUENCE, CASE_LIST_NS}, {PIPE_SEQUENCE, COMPLETE_CONDITION}, {PIPE_SEQUENCE, LINEBREAK}, + {PIPE_SEQUENCE, TK_PAREN_OPEN}, {PIPE_SEQUENCE, COMPLETE_COMMANDS}, {PIPE_SEQUENCE, TK_BANG}, {PIPE_SEQUENCE, TK_BANG}, @@ -765,6 +850,7 @@ t_stackmatch g_stackmatch[] = {PIPE_SEMI_SEQUENCE, CASE_LIST_NS}, {PIPE_SEMI_SEQUENCE, COMPLETE_CONDITION}, {PIPE_SEMI_SEQUENCE, LINEBREAK}, + {PIPE_SEMI_SEQUENCE, TK_PAREN_OPEN}, {PIPE_SEMI_SEQUENCE, COMPLETE_COMMANDS}, {PIPE_SEMI_SEQUENCE, TK_BANG}, {PIPE_SEMI_SEQUENCE, TK_BANG}, @@ -783,12 +869,14 @@ t_stackmatch g_stackmatch[] = {PIPELINE, CASE_LIST_NS}, {PIPELINE, COMPLETE_CONDITION}, {PIPELINE, LINEBREAK}, + {PIPELINE, TK_PAREN_OPEN}, {PIPELINE, COMPLETE_COMMANDS}, {PIPELINE, SEPARATOR_OP}, {PIPELINE, SEPARATOR_OP}, {PIPELINE, NEWLINE_LIST}, {PIPELINE, AND_OR_MAJOR}, {AND_OR_MAJOR, LINEBREAK}, + {AND_OR_MAJOR, TK_PAREN_OPEN}, {AND_OR_MAJOR, COMPLETE_COMMANDS}, {AND_OR_MAJOR, AND_OR_MAJOR}, {AND_OR_MAJOR, AND_OR_MAJOR}, @@ -804,17 +892,21 @@ t_stackmatch g_stackmatch[] = {AND_OR, CASE_LIST_NS}, {AND_OR, COMPLETE_CONDITION}, {AND_OR, LINEBREAK}, + {AND_OR, TK_PAREN_OPEN}, {AND_OR, COMPLETE_COMMANDS}, {AND_OR, SEPARATOR_OP}, {AND_OR, SEPARATOR_OP}, {AND_OR, NEWLINE_LIST}, {LIST, LINEBREAK}, + {LIST, TK_PAREN_OPEN}, {LIST, COMPLETE_COMMANDS}, {LIST, NEWLINE_LIST}, {COMPLETE_COMMAND, LINEBREAK}, + {COMPLETE_COMMAND, TK_PAREN_OPEN}, {COMPLETE_COMMAND, COMPLETE_COMMANDS}, {COMPLETE_COMMAND, NEWLINE_LIST}, {COMPLETE_COMMANDS, LINEBREAK}, + {COMPLETE_COMMANDS, TK_PAREN_OPEN}, {COMPLETE_COMMANDS, COMPLETE_COMMANDS}, {0, 0}, }; @@ -823,7 +915,7 @@ int eval_sym(t_sym stack, t_sym new_sym) { int i; -// DG("eval head %s && sym %s", read_state(stack), read_state(new_sym)); + DG("eval head %s && sym %s", read_state(stack), read_state(new_sym)); i = 0; while (g_stackmatch[i].top) { diff --git a/42sh/src/parser/ft_parse.c b/42sh/src/parser/ft_parse.c index 714d5b4e..01f978b8 100644 --- a/42sh/src/parser/ft_parse.c +++ b/42sh/src/parser/ft_parse.c @@ -43,7 +43,7 @@ int ft_parse(t_btree **ast, t_list **token, t_parser *parser) aggregate_sym(&parser->stack, parser->new_sym, &parser->state); push_stack(++parser->stack, *parser->new_sym); } -// ft_read_stack(parser->stack); + ft_read_stack(parser->stack); DG("\n"); if (*parser->stack == PROGRAM) parser->state = SUCCESS; @@ -56,5 +56,7 @@ int ft_parse(t_btree **ast, t_list **token, t_parser *parser) else ft_lst_delif(token, (*token)->content, &ft_addrcmp, &token_free); } + if (parser->state == SUCCESS) + DG("sucessful parsing"); return (0); } diff --git a/42sh/src/parser/produce_sym.c b/42sh/src/parser/produce_sym.c index 505a21a6..1cc792f4 100644 --- a/42sh/src/parser/produce_sym.c +++ b/42sh/src/parser/produce_sym.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:58:34 by ariard #+# #+# */ -/* Updated: 2017/02/21 22:21:41 by ariard ### ########.fr */ +/* Updated: 2017/02/24 18:25:47 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -45,14 +45,17 @@ t_prodmatch g_prodmatch[] = {TK_WORD, TK_BANG, CMD_NAME}, {TK_WORD, PIPE_SEMI_SEQUENCE, CMD_NAME}, {TK_WORD, SEPARATOR_OP, CMD_NAME}, + {TK_WORD, TK_PAREN_OPEN, CMD_NAME}, {TK_WORD, CASE_LIST, PATTERN}, - {TK_WORD, TK_PAREN_OPEN, PATTERN}, + {TK_WORD, PATTERN_CASE, PATTERN}, {TK_WORD, COMPLETE_COMMANDS, CMD_NAME}, {TK_ASSIGNEMENT_WORD, LINEBREAK, CMD_PREFIX}, + {TK_ASSIGNEMENT_WORD, TK_PAREN_OPEN, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, TK_BANG, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, SEPARATOR_OP, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, NEWLINE_LIST, CMD_PREFIX}, {TK_NAME, LINEBREAK, FNAME}, + {TK_NAME, TK_PAREN_OPEN, FNAME}, {TK_NAME, TK_BANG, FNAME}, {TK_NAME, SEPARATOR_OP, FNAME}, {TK_NAME, NEWLINE_LIST, FNAME}, @@ -71,6 +74,7 @@ t_prodmatch g_prodmatch[] = {TK_NEWLINE, CMD_NAME, NEWLINE_LIST}, {TK_NEWLINE, COMPLETE_COMMANDS, NEWLINE_LIST}, {TK_NEWLINE, LINEBREAK, NEWLINE_LIST}, + {TK_NEWLINE, TK_PAREN_OPEN, NEWLINE_LIST}, {TK_NEWLINE, CMD_SUPERIOR, LINEBREAK}, {TK_NEWLINE, PIPE_SEMI_SEQUENCE, LINEBREAK}, {TK_NEWLINE, CASE_LIST_NS, NEWLINE_LIST}, @@ -97,8 +101,8 @@ int produce_sym(t_sym stack, t_sym *new_sym, t_list **lst) int i; token = (*lst)->content; -// DG("produce stack : %s && token : %s", read_state(stack), -// read_state(token->type)); + DG("produce stack : %s && token : %s", read_state(stack), + read_state(token->type)); i = 0; *new_sym = 0; while (g_prodmatch[i].new_sym) @@ -106,7 +110,7 @@ int produce_sym(t_sym stack, t_sym *new_sym, t_list **lst) if (token->type == g_prodmatch[i].token && stack == g_prodmatch[i].stack) { -// DG("MATCH : %s", read_state(g_prodmatch[i].new_sym)); + DG("MATCH : %s", read_state(g_prodmatch[i].new_sym)); *new_sym = g_prodmatch[i].new_sym; } i++; From a3c750494f116ccedb69a9b7113ad5634e84bc1b Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Fri, 24 Feb 2017 19:32:45 +0100 Subject: [PATCH 15/23] good code --- 42sh/src/parser/add_cmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index 9b26dd7c..489eb52b 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 20:49:15 by ariard #+# #+# */ -/* Updated: 2017/02/24 19:29:04 by ariard ### ########.fr */ +/* Updated: 2017/02/24 19:31:18 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,10 +19,10 @@ int add_cmd(t_btree **ast, t_list **lst) char **my_tab; DG("add cmd"); - if (!*ast) - gen_node(ast); - else if ((token = (*lst)->content)->type == TK_IN) + if ((token = (*lst)->content)->type == TK_IN) return (0); + else if (!*ast) + gen_node(ast); else if (isdir(ast)) return (add_file(ast, lst)); else if (isloop(ast, lst) == 3) From f703185a3a01fbf9e94f7cea9fbf6dfdb411db3c Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Fri, 24 Feb 2017 21:00:38 +0100 Subject: [PATCH 16/23] assignement word lexing parsing --- 42sh/Makefile | 3 +- 42sh/includes/lexer.h | 4 ++- 42sh/sample/assignement/var_01.sh | 1 + 42sh/sample/func/func01.sh | 4 +++ 42sh/src/lexer/get_state_global.c | 4 ++- 42sh/src/lexer/get_state_redir.c | 2 +- 42sh/src/lexer/lexer_assignement_word.c | 37 +++++++++++++++++++++++++ 42sh/src/lexer/lexer_default.c | 2 +- 42sh/src/lexer/lexer_lex.c | 3 +- 42sh/src/lexer/lexer_word.c | 2 +- 42sh/src/lexer/token_append.c | 2 +- 42sh/src/main/ft_putast.c | 4 ++- 42sh/src/main/main.c | 2 +- 42sh/src/parser/add_cmd.c | 2 +- 42sh/src/parser/add_sep.c | 2 +- 42sh/src/parser/build_tree.c | 3 +- 42sh/src/parser/read_stack.c | 4 ++- 17 files changed, 67 insertions(+), 14 deletions(-) create mode 100644 42sh/sample/assignement/var_01.sh create mode 100644 42sh/sample/func/func01.sh create mode 100644 42sh/src/lexer/lexer_assignement_word.c diff --git a/42sh/Makefile b/42sh/Makefile index 4193e6da..c9126e3d 100644 --- a/42sh/Makefile +++ b/42sh/Makefile @@ -6,7 +6,7 @@ # By: wescande +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2016/08/29 21:32:58 by wescande #+# #+# # -# Updated: 2017/02/24 18:49:55 by ariard ### ########.fr # +# Updated: 2017/02/24 20:51:33 by ariard ### ########.fr # # # # **************************************************************************** # @@ -189,6 +189,7 @@ lexer/lexer_lex.c\ lexer/lexer_newline.c\ lexer/lexer_number.c\ lexer/lexer_paren.c\ +lexer/lexer_assignement_word.c\ lexer/lexer_quote.c\ lexer/lexer_sep.c\ lexer/lexer_word.c\ diff --git a/42sh/includes/lexer.h b/42sh/includes/lexer.h index 61c31a2c..7602ed9f 100644 --- a/42sh/includes/lexer.h +++ b/42sh/includes/lexer.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/01 12:15:50 by jhalford #+# #+# */ -/* Updated: 2017/02/21 21:12:01 by ariard ### ########.fr */ +/* Updated: 2017/02/24 20:45:05 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -40,6 +40,7 @@ enum e_lexstate DQUOTE_BQUOTE, BACKSLASH, PAREN, + ASSIGNEMENT_WORD, // VAR, // SPECIAL, COMMENT, @@ -111,6 +112,7 @@ int lexer_dquote(t_list **alst, t_lexer *lexer); int lexer_bquote(t_list **alst, t_lexer *lexer); int lexer_backslash(t_list **alst, t_lexer *lexer); int lexer_paren(t_list **alst, t_lexer *lexer); +int lexer_assignement_word(t_list **alst, t_lexer *lexer); int lexer_comment(t_list **alst, t_lexer *lexer); int lexer_end(t_list **alst, t_lexer *lexer); diff --git a/42sh/sample/assignement/var_01.sh b/42sh/sample/assignement/var_01.sh new file mode 100644 index 00000000..d77e8f12 --- /dev/null +++ b/42sh/sample/assignement/var_01.sh @@ -0,0 +1 @@ +HELLO=WORLD diff --git a/42sh/sample/func/func01.sh b/42sh/sample/func/func01.sh new file mode 100644 index 00000000..579f9b0f --- /dev/null +++ b/42sh/sample/func/func01.sh @@ -0,0 +1,4 @@ +hello() { + ls | cat + pwd ; cd +} diff --git a/42sh/src/lexer/get_state_global.c b/42sh/src/lexer/get_state_global.c index 41ae160e..72886e5c 100644 --- a/42sh/src/lexer/get_state_global.c +++ b/42sh/src/lexer/get_state_global.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 20:39:06 by jhalford #+# #+# */ -/* Updated: 2017/02/20 20:48:53 by ariard ### ########.fr */ +/* Updated: 2017/02/24 20:45:37 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,6 +33,8 @@ t_lexstate get_state_global(t_lexer *lexer) return (BQUOTE); else if (c == '(' || c == ')') return (PAREN); + else if (c == '=') + return (ASSIGNEMENT_WORD); else if (c == 0) return (END); return (0); diff --git a/42sh/src/lexer/get_state_redir.c b/42sh/src/lexer/get_state_redir.c index 7b6acd31..6ea22d94 100644 --- a/42sh/src/lexer/get_state_redir.c +++ b/42sh/src/lexer/get_state_redir.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 20:37:28 by jhalford #+# #+# */ -/* Updated: 2017/02/09 20:39:11 by jhalford ### ########.fr */ +/* Updated: 2017/02/24 20:44:40 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_assignement_word.c b/42sh/src/lexer/lexer_assignement_word.c new file mode 100644 index 00000000..70429bed --- /dev/null +++ b/42sh/src/lexer/lexer_assignement_word.c @@ -0,0 +1,37 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* lexer_assignement_word.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ariard +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2017/02/24 20:28:13 by ariard #+# #+# */ +/* Updated: 2017/02/24 21:00:13 by ariard ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "lexer.h" + +int lexer_assignement_word(t_list **alst, t_lexer *lexer) +{ + t_token *token; + char c; + + token = (*alst)->content; + if (token->type != TK_WORD && token->type != TK_ASSIGNEMENT_WORD) + { + token_append(token, lexer, 0, 0); + lexer->pos++; + return (lexer_lex(alst, lexer)); + } + token->type = TK_ASSIGNEMENT_WORD; + token_append(token, lexer, 0, 0); + lexer->pos++; + c = lexer->str[lexer->pos]; + if ((lexer->state = get_state_global(lexer))) + return (lexer_lex(alst, lexer)); + if ((lexer->state = get_state_redir(lexer))) + return (lexer_lex(alst, lexer)); + lexer->state = ft_isdigit(c) ? NUMBER : ASSIGNEMENT_WORD; + return(lexer_lex(alst, lexer)); +} diff --git a/42sh/src/lexer/lexer_default.c b/42sh/src/lexer/lexer_default.c index 200bdec0..f1781eed 100644 --- a/42sh/src/lexer/lexer_default.c +++ b/42sh/src/lexer/lexer_default.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/28 18:36:21 by jhalford #+# #+# */ -/* Updated: 2017/02/21 22:40:44 by ariard ### ########.fr */ +/* Updated: 2017/02/24 20:43:56 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_lex.c b/42sh/src/lexer/lexer_lex.c index 222b5616..0bb7ebca 100644 --- a/42sh/src/lexer/lexer_lex.c +++ b/42sh/src/lexer/lexer_lex.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:08:51 by jhalford #+# #+# */ -/* Updated: 2017/02/21 22:44:37 by ariard ### ########.fr */ +/* Updated: 2017/02/24 20:51:04 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,6 +31,7 @@ int (*g_lexer[])(t_list **alst, t_lexer *lexer) = &lexer_bquote, &lexer_backslash, &lexer_paren, + &lexer_assignement_word, &lexer_comment, &lexer_end, }; diff --git a/42sh/src/lexer/lexer_word.c b/42sh/src/lexer/lexer_word.c index f8c7ea6b..910be7b8 100644 --- a/42sh/src/lexer/lexer_word.c +++ b/42sh/src/lexer/lexer_word.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 12:07:11 by jhalford #+# #+# */ -/* Updated: 2017/02/20 20:54:32 by ariard ### ########.fr */ +/* Updated: 2017/02/24 21:00:15 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/token_append.c b/42sh/src/lexer/token_append.c index 6d83ee13..0ec12be6 100644 --- a/42sh/src/lexer/token_append.c +++ b/42sh/src/lexer/token_append.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/11 17:18:42 by jhalford #+# #+# */ -/* Updated: 2017/02/21 21:34:55 by ariard ### ########.fr */ +/* Updated: 2017/02/24 20:33:59 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/main/ft_putast.c b/42sh/src/main/ft_putast.c index 65e550aa..134e3370 100644 --- a/42sh/src/main/ft_putast.c +++ b/42sh/src/main/ft_putast.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/14 18:18:04 by jhalford #+# #+# */ -/* Updated: 2017/02/24 19:06:19 by ariard ### ########.fr */ +/* Updated: 2017/02/24 20:59:07 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,8 @@ char *ft_putast(void *nodein) { t_astnode *node; node = nodein; + if (node->type == TK_ASSIGNEMENT_WORD) + return ("ASSIGNEMENT_WORD"); if (node->type == SUBSHELL) return ("SUBSHELL"); if (node->type == TK_NAME) diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index 032b4529..bfe103c2 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/02/24 18:39:09 by ariard ### ########.fr */ +/* Updated: 2017/02/24 20:58:33 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index 489eb52b..b1843f82 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 20:49:15 by ariard #+# #+# */ -/* Updated: 2017/02/24 19:31:18 by ariard ### ########.fr */ +/* Updated: 2017/02/24 19:40:07 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_sep.c b/42sh/src/parser/add_sep.c index 4fef29e4..5a084a01 100644 --- a/42sh/src/parser/add_sep.c +++ b/42sh/src/parser/add_sep.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 19:12:07 by ariard #+# #+# */ -/* Updated: 2017/02/24 18:54:09 by ariard ### ########.fr */ +/* Updated: 2017/02/24 19:40:12 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/build_tree.c b/42sh/src/parser/build_tree.c index 805dd403..78c77692 100644 --- a/42sh/src/parser/build_tree.c +++ b/42sh/src/parser/build_tree.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:32:59 by ariard #+# #+# */ -/* Updated: 2017/02/24 19:27:32 by ariard ### ########.fr */ +/* Updated: 2017/02/24 20:59:49 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -38,6 +38,7 @@ t_treematch g_treematch[] = {TK_PAREN_OPEN, &add_cmd}, {TK_PAREN_CLOSE, &add_cmd}, {TK_FOR, &add_cmd}, + {TK_ASSIGNEMENT_WORD, &add_cmd}, {SUBSHELL, &add_cmd}, {0, NULL}, }; diff --git a/42sh/src/parser/read_stack.c b/42sh/src/parser/read_stack.c index 3371958e..09f6ee03 100644 --- a/42sh/src/parser/read_stack.c +++ b/42sh/src/parser/read_stack.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 15:32:10 by ariard #+# #+# */ -/* Updated: 2017/02/21 20:39:13 by ariard ### ########.fr */ +/* Updated: 2017/02/24 20:57:40 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,8 @@ char *read_state(t_sym current) { + if (current == TK_ASSIGNEMENT_WORD) + return ("TK_ASSIGNEMENT_WORD"); if (current == CASE_CLAUSE) return ("CASE_CLAUSE"); if (current == CASE_LIST_NS) From 102196bff472d3a1a239b4dac11edece6d3a4095 Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Fri, 24 Feb 2017 23:17:29 +0100 Subject: [PATCH 17/23] parsing brace_clause + func def ok --- 42sh/Makefile | 3 +- 42sh/includes/lexer.h | 4 +- 42sh/includes/parser.h | 4 + 42sh/objs/builtin/bt_read_get.d | 10 ++ 42sh/objs/builtin/bt_read_parse.d | 10 ++ 42sh/objs/builtin/bt_read_term.d | 10 ++ 42sh/objs/builtin/builtin_cd.d | 9 ++ 42sh/objs/builtin/builtin_echo.d | 10 ++ 42sh/objs/builtin/builtin_env.d | 10 ++ 42sh/objs/builtin/builtin_exit.d | 10 ++ 42sh/objs/builtin/builtin_export.d | 10 ++ 42sh/objs/builtin/builtin_hash.d | 10 ++ 42sh/objs/builtin/builtin_history.d | 10 ++ 42sh/objs/builtin/builtin_read.d | 10 ++ 42sh/objs/builtin/builtin_setenv.d | 10 ++ 42sh/objs/builtin/builtin_unset.d | 10 ++ 42sh/objs/builtin/builtin_unsetenv.d | 10 ++ 42sh/objs/builtin/is_builtin.d | 10 ++ 42sh/objs/completion/c_binary.d | 10 ++ 42sh/objs/completion/c_clear.d | 9 ++ 42sh/objs/completion/c_files.d | 9 ++ 42sh/objs/completion/c_init.d | 9 ++ 42sh/objs/completion/c_matching.d | 10 ++ 42sh/objs/completion/c_misc.d | 9 ++ 42sh/objs/completion/c_output.d | 10 ++ 42sh/objs/completion/c_parser.d | 10 ++ 42sh/objs/completion/c_pathsolver.d | 10 ++ 42sh/objs/completion/c_printer.d | 10 ++ 42sh/objs/completion/c_rematch.d | 10 ++ 42sh/objs/completion/c_sizing.d | 10 ++ 42sh/objs/completion/c_terminal.d | 10 ++ 42sh/objs/completion/completion.d | 10 ++ 42sh/objs/exec/ast_free.d | 10 ++ 42sh/objs/exec/bad_fd.d | 10 ++ 42sh/objs/exec/exec_ampersand.d | 10 ++ 42sh/objs/exec/exec_and_if.d | 10 ++ 42sh/objs/exec/exec_command.d | 10 ++ 42sh/objs/exec/exec_default.d | 10 ++ 42sh/objs/exec/exec_elif.d | 10 ++ 42sh/objs/exec/exec_else.d | 10 ++ 42sh/objs/exec/exec_if.d | 10 ++ 42sh/objs/exec/exec_less.d | 10 ++ 42sh/objs/exec/exec_or_if.d | 10 ++ 42sh/objs/exec/exec_pipe.d | 10 ++ 42sh/objs/exec/exec_redir.d | 10 ++ 42sh/objs/exec/exec_semi.d | 10 ++ 42sh/objs/exec/exec_until.d | 10 ++ 42sh/objs/exec/exec_while.d | 10 ++ 42sh/objs/exec/fd_is_valid.d | 10 ++ 42sh/objs/exec/ft_exec.d | 10 ++ 42sh/objs/exec/ft_findexec.d | 10 ++ 42sh/objs/exec/launch_process.d | 10 ++ 42sh/objs/exec/loop_del.d | 10 ++ 42sh/objs/exec/loop_exec.d | 10 ++ 42sh/objs/exec/process_redirect.d | 10 ++ 42sh/objs/exec/process_reset.d | 10 ++ 42sh/objs/exec/process_resetfds.d | 10 ++ 42sh/objs/exec/process_setexec.d | 10 ++ 42sh/objs/exec/process_setgroup.d | 10 ++ 42sh/objs/exec/process_setsig.d | 10 ++ 42sh/objs/exec/redirect_dgreat.d | 10 ++ 42sh/objs/exec/redirect_dless.d | 10 ++ 42sh/objs/exec/redirect_great.d | 10 ++ 42sh/objs/exec/redirect_greatand.d | 10 ++ 42sh/objs/exec/redirect_less.d | 10 ++ 42sh/objs/exec/redirect_lessand.d | 10 ++ 42sh/objs/exec/set_exitstatus.d | 10 ++ 42sh/objs/glob/command_getoutput.d | 10 ++ 42sh/objs/glob/dir_glob.d | 9 ++ 42sh/objs/glob/esc_print.d | 9 ++ 42sh/objs/glob/expand_bquote.d | 9 ++ 42sh/objs/glob/expand_brace.d | 9 ++ 42sh/objs/glob/expand_esc.d | 9 ++ 42sh/objs/glob/expand_var.d | 9 ++ 42sh/objs/glob/ft_strsplit_esc.d | 9 ++ 42sh/objs/glob/ft_strsplit_spe.d | 9 ++ 42sh/objs/glob/glob.d | 9 ++ 42sh/objs/glob/is_char_esc.d | 9 ++ 42sh/objs/glob/lib_perso/ft_ld_back.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_clear.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_del.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_front.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_new.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_order.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_pushback.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_pushfront.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_reverse.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_size.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_swap.d | 10 ++ 42sh/objs/glob/lib_perso/ft_ld_to_tab.d | 10 ++ 42sh/objs/glob/lib_perso/ft_memrealloc.d | 10 ++ 42sh/objs/glob/lib_perso/ft_strjoinf.d | 10 ++ 42sh/objs/glob/lib_perso/ft_strsubf.d | 10 ++ 42sh/objs/glob/lib_perso/ft_tabdel.d | 10 ++ 42sh/objs/glob/lib_perso/ft_tablen.d | 6 + 42sh/objs/glob/match_pattern.d | 9 ++ 42sh/objs/hash_table/ft_add_hash.d | 10 ++ 42sh/objs/hash_table/hash.d | 10 ++ 42sh/objs/hash_table/hash_free.d | 10 ++ 42sh/objs/hash_table/hash_str.d | 10 ++ 42sh/objs/hash_table/is_hash.d | 10 ++ 42sh/objs/history/add_str_in_history.d | 10 ++ 42sh/objs/history/history.d | 10 ++ 42sh/objs/history/history_parsing.d | 10 ++ 42sh/objs/history/history_parsing_toolz.d | 10 ++ 42sh/objs/history/history_parsing_toolz_2.d | 11 ++ 42sh/objs/history/list_toolz.d | 10 ++ 42sh/objs/history/surch_in_history.d | 10 ++ 42sh/objs/job-control/builtin_bg.d | 10 ++ 42sh/objs/job-control/builtin_fg.d | 10 ++ 42sh/objs/job-control/builtin_jobs.d | 10 ++ 42sh/objs/job-control/do_job_notification.d | 11 ++ 42sh/objs/job-control/job_addprocess.d | 10 ++ 42sh/objs/job-control/job_cmp_id.d | 10 ++ 42sh/objs/job-control/job_format.d | 10 ++ 42sh/objs/job-control/job_format_head.d | 10 ++ 42sh/objs/job-control/job_free.d | 10 ++ 42sh/objs/job-control/job_getprocess.d | 10 ++ 42sh/objs/job-control/job_getrank.d | 10 ++ 42sh/objs/job-control/job_is_completed.d | 10 ++ 42sh/objs/job-control/job_is_stopped.d | 10 ++ 42sh/objs/job-control/job_kill_all.d | 10 ++ 42sh/objs/job-control/job_notify_change.d | 10 ++ 42sh/objs/job-control/job_notify_new.d | 10 ++ 42sh/objs/job-control/job_remove.d | 10 ++ 42sh/objs/job-control/job_run.d | 10 ++ 42sh/objs/job-control/job_update_id.d | 10 ++ 42sh/objs/job-control/job_update_status.d | 10 ++ 42sh/objs/job-control/job_wait.d | 10 ++ 42sh/objs/job-control/mark_job_as_running.d | 11 ++ 42sh/objs/job-control/process_cmp_pid.d | 10 ++ 42sh/objs/job-control/process_format.d | 10 ++ 42sh/objs/job-control/process_free.d | 10 ++ 42sh/objs/job-control/process_mark_status.d | 11 ++ 42sh/objs/job-control/put_job_in_background.d | 11 ++ 42sh/objs/job-control/put_job_in_foreground.d | 11 ++ 42sh/objs/job-control/sigchld_handler.d | 10 ++ 42sh/objs/job-control/sigint_handler.d | 10 ++ 42sh/objs/job-control/sigtstp_handler.d | 10 ++ 42sh/objs/job-control/sigttin_handler.d | 10 ++ 42sh/objs/job-control/sigttou_handler.d | 10 ++ 42sh/objs/lexer/get_lexer_stack.d | 10 ++ 42sh/objs/lexer/get_reserved_words.d | 10 ++ 42sh/objs/lexer/get_state_global.d | 10 ++ 42sh/objs/lexer/get_state_redir.d | 10 ++ 42sh/objs/lexer/insert_newline.d | 9 ++ 42sh/objs/lexer/lexer_assignement_word.d | 10 ++ 42sh/objs/lexer/lexer_backslash.d | 10 ++ 42sh/objs/lexer/lexer_bquote.d | 9 ++ 42sh/objs/lexer/lexer_comment.d | 9 ++ 42sh/objs/lexer/lexer_curly_brackets.d | 10 ++ 42sh/objs/lexer/lexer_default.d | 9 ++ 42sh/objs/lexer/lexer_delim.d | 9 ++ 42sh/objs/lexer/lexer_dless.d | 9 ++ 42sh/objs/lexer/lexer_dquote.d | 9 ++ 42sh/objs/lexer/lexer_end.d | 9 ++ 42sh/objs/lexer/lexer_great.d | 9 ++ 42sh/objs/lexer/lexer_greatand.d | 9 ++ 42sh/objs/lexer/lexer_init.d | 9 ++ 42sh/objs/lexer/lexer_less.d | 9 ++ 42sh/objs/lexer/lexer_lessand.d | 9 ++ 42sh/objs/lexer/lexer_lex.d | 9 ++ 42sh/objs/lexer/lexer_newline.d | 9 ++ 42sh/objs/lexer/lexer_number.d | 9 ++ 42sh/objs/lexer/lexer_paren.d | 9 ++ 42sh/objs/lexer/lexer_quote.d | 9 ++ 42sh/objs/lexer/lexer_sep.d | 9 ++ 42sh/objs/lexer/lexer_word.d | 9 ++ 42sh/objs/lexer/token_append.d | 9 ++ 42sh/objs/lexer/token_cmp_type.d | 9 ++ 42sh/objs/lexer/token_free.d | 9 ++ 42sh/objs/lexer/token_init.d | 9 ++ 42sh/objs/lexer/token_print.d | 9 ++ 42sh/objs/line-editing/completion.d | 10 ++ 42sh/objs/line-editing/control_c_and_d.d | 10 ++ 42sh/objs/line-editing/copy_cut_paste.d | 10 ++ 42sh/objs/line-editing/ft_prompt.d | 10 ++ 42sh/objs/line-editing/get_key.d | 10 ++ 42sh/objs/line-editing/home_end.d | 10 ++ .../line-editing/lib_line_editing/tool_line.d | 11 ++ .../lib_line_editing/tool_line_2.d | 11 ++ .../line-editing/lib_line_editing/toolz.d | 11 ++ .../line-editing/lib_line_editing/toolz2.d | 11 ++ .../lib_line_editing/toolz_parseur.d | 11 ++ .../lib_line_editing/toolz_termcaps.d | 11 ++ 42sh/objs/line-editing/move_left_and_right.d | 11 ++ 42sh/objs/line-editing/move_to_word.d | 10 ++ 42sh/objs/line-editing/move_up_and_down.d | 10 ++ 42sh/objs/line-editing/print_and_del.d | 10 ++ 42sh/objs/line-editing/queue.d | 10 ++ 42sh/objs/line-editing/readline.d | 10 ++ 42sh/objs/main/data_exit.d | 10 ++ 42sh/objs/main/data_init.d | 10 ++ 42sh/objs/main/data_singleton.d | 10 ++ 42sh/objs/main/ft_putast.d | 10 ++ 42sh/objs/main/main.d | 10 ++ 42sh/objs/main/shell_exit.d | 10 ++ 42sh/objs/main/shell_get_avdata.d | 10 ++ 42sh/objs/main/shell_get_opts.d | 10 ++ 42sh/objs/main/shell_init.d | 10 ++ 42sh/objs/parser/add_case.d | 9 ++ 42sh/objs/parser/add_cmd.d | 9 ++ 42sh/objs/parser/add_condition.d | 9 ++ 42sh/objs/parser/add_file.d | 9 ++ 42sh/objs/parser/add_loop.d | 9 ++ 42sh/objs/parser/add_sep.d | 9 ++ 42sh/objs/parser/add_subshell.d | 9 ++ 42sh/objs/parser/aggregate_sym.d | 9 ++ 42sh/objs/parser/build_tree.d | 9 ++ 42sh/objs/parser/error_syntax.d | 9 ++ 42sh/objs/parser/eval_sym.d | 9 ++ 42sh/objs/parser/ft_parse.d | 9 ++ 42sh/objs/parser/parser_init.d | 9 ++ 42sh/objs/parser/pop_stack.d | 9 ++ 42sh/objs/parser/produce_sym.d | 9 ++ 42sh/objs/parser/push_stack.d | 9 ++ 42sh/objs/parser/read_stack.d | 9 ++ 42sh/objs/parser/tree_wrapper.d | 9 ++ 42sh/sample/brace/brace_01.sh | 1 + 42sh/sample/func/func01.sh | 2 +- 42sh/src/glob/command_getoutput.c | 2 +- 42sh/src/glob/dir_glob.c | 2 +- 42sh/src/glob/esc_print.c | 2 +- 42sh/src/glob/expand_bquote.c | 2 +- 42sh/src/glob/expand_brace.c | 2 +- 42sh/src/glob/expand_esc.c | 2 +- 42sh/src/glob/expand_var.c | 2 +- 42sh/src/glob/ft_strsplit_esc.c | 2 +- 42sh/src/glob/ft_strsplit_spe.c | 2 +- 42sh/src/glob/glob.c | 2 +- 42sh/src/glob/match_pattern.c | 2 +- 42sh/src/lexer/get_state_global.c | 4 +- 42sh/src/lexer/lexer_curly_brackets.c | 46 +++++++ 42sh/src/lexer/lexer_lex.c | 3 +- 42sh/src/lexer/token_print.c | 10 +- 42sh/src/main/main.c | 4 +- 42sh/src/parser/add_subshell.c | 6 +- 42sh/src/parser/aggregate_sym.c | 25 +++- 42sh/src/parser/build_tree.c | 2 +- 42sh/src/parser/eval_sym.c | 116 ++++++++++++++++-- 42sh/src/parser/ft_parse.c | 4 +- 42sh/src/parser/produce_sym.c | 6 +- 42sh/src/parser/read_stack.c | 10 +- 42sh/test.sh | 1 + 244 files changed, 2329 insertions(+), 44 deletions(-) create mode 100644 42sh/objs/builtin/bt_read_get.d create mode 100644 42sh/objs/builtin/bt_read_parse.d create mode 100644 42sh/objs/builtin/bt_read_term.d create mode 100644 42sh/objs/builtin/builtin_cd.d create mode 100644 42sh/objs/builtin/builtin_echo.d create mode 100644 42sh/objs/builtin/builtin_env.d create mode 100644 42sh/objs/builtin/builtin_exit.d create mode 100644 42sh/objs/builtin/builtin_export.d create mode 100644 42sh/objs/builtin/builtin_hash.d create mode 100644 42sh/objs/builtin/builtin_history.d create mode 100644 42sh/objs/builtin/builtin_read.d create mode 100644 42sh/objs/builtin/builtin_setenv.d create mode 100644 42sh/objs/builtin/builtin_unset.d create mode 100644 42sh/objs/builtin/builtin_unsetenv.d create mode 100644 42sh/objs/builtin/is_builtin.d create mode 100644 42sh/objs/completion/c_binary.d create mode 100644 42sh/objs/completion/c_clear.d create mode 100644 42sh/objs/completion/c_files.d create mode 100644 42sh/objs/completion/c_init.d create mode 100644 42sh/objs/completion/c_matching.d create mode 100644 42sh/objs/completion/c_misc.d create mode 100644 42sh/objs/completion/c_output.d create mode 100644 42sh/objs/completion/c_parser.d create mode 100644 42sh/objs/completion/c_pathsolver.d create mode 100644 42sh/objs/completion/c_printer.d create mode 100644 42sh/objs/completion/c_rematch.d create mode 100644 42sh/objs/completion/c_sizing.d create mode 100644 42sh/objs/completion/c_terminal.d create mode 100644 42sh/objs/completion/completion.d create mode 100644 42sh/objs/exec/ast_free.d create mode 100644 42sh/objs/exec/bad_fd.d create mode 100644 42sh/objs/exec/exec_ampersand.d create mode 100644 42sh/objs/exec/exec_and_if.d create mode 100644 42sh/objs/exec/exec_command.d create mode 100644 42sh/objs/exec/exec_default.d create mode 100644 42sh/objs/exec/exec_elif.d create mode 100644 42sh/objs/exec/exec_else.d create mode 100644 42sh/objs/exec/exec_if.d create mode 100644 42sh/objs/exec/exec_less.d create mode 100644 42sh/objs/exec/exec_or_if.d create mode 100644 42sh/objs/exec/exec_pipe.d create mode 100644 42sh/objs/exec/exec_redir.d create mode 100644 42sh/objs/exec/exec_semi.d create mode 100644 42sh/objs/exec/exec_until.d create mode 100644 42sh/objs/exec/exec_while.d create mode 100644 42sh/objs/exec/fd_is_valid.d create mode 100644 42sh/objs/exec/ft_exec.d create mode 100644 42sh/objs/exec/ft_findexec.d create mode 100644 42sh/objs/exec/launch_process.d create mode 100644 42sh/objs/exec/loop_del.d create mode 100644 42sh/objs/exec/loop_exec.d create mode 100644 42sh/objs/exec/process_redirect.d create mode 100644 42sh/objs/exec/process_reset.d create mode 100644 42sh/objs/exec/process_resetfds.d create mode 100644 42sh/objs/exec/process_setexec.d create mode 100644 42sh/objs/exec/process_setgroup.d create mode 100644 42sh/objs/exec/process_setsig.d create mode 100644 42sh/objs/exec/redirect_dgreat.d create mode 100644 42sh/objs/exec/redirect_dless.d create mode 100644 42sh/objs/exec/redirect_great.d create mode 100644 42sh/objs/exec/redirect_greatand.d create mode 100644 42sh/objs/exec/redirect_less.d create mode 100644 42sh/objs/exec/redirect_lessand.d create mode 100644 42sh/objs/exec/set_exitstatus.d create mode 100644 42sh/objs/glob/command_getoutput.d create mode 100644 42sh/objs/glob/dir_glob.d create mode 100644 42sh/objs/glob/esc_print.d create mode 100644 42sh/objs/glob/expand_bquote.d create mode 100644 42sh/objs/glob/expand_brace.d create mode 100644 42sh/objs/glob/expand_esc.d create mode 100644 42sh/objs/glob/expand_var.d create mode 100644 42sh/objs/glob/ft_strsplit_esc.d create mode 100644 42sh/objs/glob/ft_strsplit_spe.d create mode 100644 42sh/objs/glob/glob.d create mode 100644 42sh/objs/glob/is_char_esc.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_back.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_clear.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_del.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_front.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_new.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_order.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_pushback.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_pushfront.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_reverse.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_size.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_swap.d create mode 100644 42sh/objs/glob/lib_perso/ft_ld_to_tab.d create mode 100644 42sh/objs/glob/lib_perso/ft_memrealloc.d create mode 100644 42sh/objs/glob/lib_perso/ft_strjoinf.d create mode 100644 42sh/objs/glob/lib_perso/ft_strsubf.d create mode 100644 42sh/objs/glob/lib_perso/ft_tabdel.d create mode 100644 42sh/objs/glob/lib_perso/ft_tablen.d create mode 100644 42sh/objs/glob/match_pattern.d create mode 100644 42sh/objs/hash_table/ft_add_hash.d create mode 100644 42sh/objs/hash_table/hash.d create mode 100644 42sh/objs/hash_table/hash_free.d create mode 100644 42sh/objs/hash_table/hash_str.d create mode 100644 42sh/objs/hash_table/is_hash.d create mode 100644 42sh/objs/history/add_str_in_history.d create mode 100644 42sh/objs/history/history.d create mode 100644 42sh/objs/history/history_parsing.d create mode 100644 42sh/objs/history/history_parsing_toolz.d create mode 100644 42sh/objs/history/history_parsing_toolz_2.d create mode 100644 42sh/objs/history/list_toolz.d create mode 100644 42sh/objs/history/surch_in_history.d create mode 100644 42sh/objs/job-control/builtin_bg.d create mode 100644 42sh/objs/job-control/builtin_fg.d create mode 100644 42sh/objs/job-control/builtin_jobs.d create mode 100644 42sh/objs/job-control/do_job_notification.d create mode 100644 42sh/objs/job-control/job_addprocess.d create mode 100644 42sh/objs/job-control/job_cmp_id.d create mode 100644 42sh/objs/job-control/job_format.d create mode 100644 42sh/objs/job-control/job_format_head.d create mode 100644 42sh/objs/job-control/job_free.d create mode 100644 42sh/objs/job-control/job_getprocess.d create mode 100644 42sh/objs/job-control/job_getrank.d create mode 100644 42sh/objs/job-control/job_is_completed.d create mode 100644 42sh/objs/job-control/job_is_stopped.d create mode 100644 42sh/objs/job-control/job_kill_all.d create mode 100644 42sh/objs/job-control/job_notify_change.d create mode 100644 42sh/objs/job-control/job_notify_new.d create mode 100644 42sh/objs/job-control/job_remove.d create mode 100644 42sh/objs/job-control/job_run.d create mode 100644 42sh/objs/job-control/job_update_id.d create mode 100644 42sh/objs/job-control/job_update_status.d create mode 100644 42sh/objs/job-control/job_wait.d create mode 100644 42sh/objs/job-control/mark_job_as_running.d create mode 100644 42sh/objs/job-control/process_cmp_pid.d create mode 100644 42sh/objs/job-control/process_format.d create mode 100644 42sh/objs/job-control/process_free.d create mode 100644 42sh/objs/job-control/process_mark_status.d create mode 100644 42sh/objs/job-control/put_job_in_background.d create mode 100644 42sh/objs/job-control/put_job_in_foreground.d create mode 100644 42sh/objs/job-control/sigchld_handler.d create mode 100644 42sh/objs/job-control/sigint_handler.d create mode 100644 42sh/objs/job-control/sigtstp_handler.d create mode 100644 42sh/objs/job-control/sigttin_handler.d create mode 100644 42sh/objs/job-control/sigttou_handler.d create mode 100644 42sh/objs/lexer/get_lexer_stack.d create mode 100644 42sh/objs/lexer/get_reserved_words.d create mode 100644 42sh/objs/lexer/get_state_global.d create mode 100644 42sh/objs/lexer/get_state_redir.d create mode 100644 42sh/objs/lexer/insert_newline.d create mode 100644 42sh/objs/lexer/lexer_assignement_word.d create mode 100644 42sh/objs/lexer/lexer_backslash.d create mode 100644 42sh/objs/lexer/lexer_bquote.d create mode 100644 42sh/objs/lexer/lexer_comment.d create mode 100644 42sh/objs/lexer/lexer_curly_brackets.d create mode 100644 42sh/objs/lexer/lexer_default.d create mode 100644 42sh/objs/lexer/lexer_delim.d create mode 100644 42sh/objs/lexer/lexer_dless.d create mode 100644 42sh/objs/lexer/lexer_dquote.d create mode 100644 42sh/objs/lexer/lexer_end.d create mode 100644 42sh/objs/lexer/lexer_great.d create mode 100644 42sh/objs/lexer/lexer_greatand.d create mode 100644 42sh/objs/lexer/lexer_init.d create mode 100644 42sh/objs/lexer/lexer_less.d create mode 100644 42sh/objs/lexer/lexer_lessand.d create mode 100644 42sh/objs/lexer/lexer_lex.d create mode 100644 42sh/objs/lexer/lexer_newline.d create mode 100644 42sh/objs/lexer/lexer_number.d create mode 100644 42sh/objs/lexer/lexer_paren.d create mode 100644 42sh/objs/lexer/lexer_quote.d create mode 100644 42sh/objs/lexer/lexer_sep.d create mode 100644 42sh/objs/lexer/lexer_word.d create mode 100644 42sh/objs/lexer/token_append.d create mode 100644 42sh/objs/lexer/token_cmp_type.d create mode 100644 42sh/objs/lexer/token_free.d create mode 100644 42sh/objs/lexer/token_init.d create mode 100644 42sh/objs/lexer/token_print.d create mode 100644 42sh/objs/line-editing/completion.d create mode 100644 42sh/objs/line-editing/control_c_and_d.d create mode 100644 42sh/objs/line-editing/copy_cut_paste.d create mode 100644 42sh/objs/line-editing/ft_prompt.d create mode 100644 42sh/objs/line-editing/get_key.d create mode 100644 42sh/objs/line-editing/home_end.d create mode 100644 42sh/objs/line-editing/lib_line_editing/tool_line.d create mode 100644 42sh/objs/line-editing/lib_line_editing/tool_line_2.d create mode 100644 42sh/objs/line-editing/lib_line_editing/toolz.d create mode 100644 42sh/objs/line-editing/lib_line_editing/toolz2.d create mode 100644 42sh/objs/line-editing/lib_line_editing/toolz_parseur.d create mode 100644 42sh/objs/line-editing/lib_line_editing/toolz_termcaps.d create mode 100644 42sh/objs/line-editing/move_left_and_right.d create mode 100644 42sh/objs/line-editing/move_to_word.d create mode 100644 42sh/objs/line-editing/move_up_and_down.d create mode 100644 42sh/objs/line-editing/print_and_del.d create mode 100644 42sh/objs/line-editing/queue.d create mode 100644 42sh/objs/line-editing/readline.d create mode 100644 42sh/objs/main/data_exit.d create mode 100644 42sh/objs/main/data_init.d create mode 100644 42sh/objs/main/data_singleton.d create mode 100644 42sh/objs/main/ft_putast.d create mode 100644 42sh/objs/main/main.d create mode 100644 42sh/objs/main/shell_exit.d create mode 100644 42sh/objs/main/shell_get_avdata.d create mode 100644 42sh/objs/main/shell_get_opts.d create mode 100644 42sh/objs/main/shell_init.d create mode 100644 42sh/objs/parser/add_case.d create mode 100644 42sh/objs/parser/add_cmd.d create mode 100644 42sh/objs/parser/add_condition.d create mode 100644 42sh/objs/parser/add_file.d create mode 100644 42sh/objs/parser/add_loop.d create mode 100644 42sh/objs/parser/add_sep.d create mode 100644 42sh/objs/parser/add_subshell.d create mode 100644 42sh/objs/parser/aggregate_sym.d create mode 100644 42sh/objs/parser/build_tree.d create mode 100644 42sh/objs/parser/error_syntax.d create mode 100644 42sh/objs/parser/eval_sym.d create mode 100644 42sh/objs/parser/ft_parse.d create mode 100644 42sh/objs/parser/parser_init.d create mode 100644 42sh/objs/parser/pop_stack.d create mode 100644 42sh/objs/parser/produce_sym.d create mode 100644 42sh/objs/parser/push_stack.d create mode 100644 42sh/objs/parser/read_stack.d create mode 100644 42sh/objs/parser/tree_wrapper.d create mode 100644 42sh/sample/brace/brace_01.sh create mode 100644 42sh/src/lexer/lexer_curly_brackets.c create mode 100644 42sh/test.sh diff --git a/42sh/Makefile b/42sh/Makefile index c9126e3d..e99bd9a8 100644 --- a/42sh/Makefile +++ b/42sh/Makefile @@ -6,7 +6,7 @@ # By: wescande +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2016/08/29 21:32:58 by wescande #+# #+# # -# Updated: 2017/02/24 20:51:33 by ariard ### ########.fr # +# Updated: 2017/02/24 21:33:24 by ariard ### ########.fr # # # # **************************************************************************** # @@ -189,6 +189,7 @@ lexer/lexer_lex.c\ lexer/lexer_newline.c\ lexer/lexer_number.c\ lexer/lexer_paren.c\ +lexer/lexer_curly_brackets.c\ lexer/lexer_assignement_word.c\ lexer/lexer_quote.c\ lexer/lexer_sep.c\ diff --git a/42sh/includes/lexer.h b/42sh/includes/lexer.h index 7602ed9f..f1ca6dc2 100644 --- a/42sh/includes/lexer.h +++ b/42sh/includes/lexer.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/01 12:15:50 by jhalford #+# #+# */ -/* Updated: 2017/02/24 20:45:05 by ariard ### ########.fr */ +/* Updated: 2017/02/24 21:46:08 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -40,6 +40,7 @@ enum e_lexstate DQUOTE_BQUOTE, BACKSLASH, PAREN, + CURLY_BRACKETS, ASSIGNEMENT_WORD, // VAR, // SPECIAL, @@ -112,6 +113,7 @@ int lexer_dquote(t_list **alst, t_lexer *lexer); int lexer_bquote(t_list **alst, t_lexer *lexer); int lexer_backslash(t_list **alst, t_lexer *lexer); int lexer_paren(t_list **alst, t_lexer *lexer); +int lexer_curly_brackets(t_list **alst, t_lexer *lexer); int lexer_assignement_word(t_list **alst, t_lexer *lexer); int lexer_comment(t_list **alst, t_lexer *lexer); int lexer_end(t_list **alst, t_lexer *lexer); diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index 2f840910..34290b31 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -93,6 +93,7 @@ enum e_sym CASE_ITEM_NS, PATTERN, IF_CLAUSE, + BRACE_CLAUSE, ELSE_PART, WHILE_CLAUSE, UNTIL_CLAUSE, @@ -116,6 +117,7 @@ enum e_sym SEPARATOR_OP, SEPARATOR, SEQUENTIAL_SEP, + BRACE, LOOP, FUNC, PIPE_SEMI_SEQUENCE, @@ -127,6 +129,8 @@ enum e_sym COMPLETE_CONDITION, FOR_WORDLIST, PATTERN_CASE, + FUNC_NAME, + CLOSE_LIST, ALL = 200, }; diff --git a/42sh/objs/builtin/bt_read_get.d b/42sh/objs/builtin/bt_read_get.d new file mode 100644 index 00000000..3d96b8dc --- /dev/null +++ b/42sh/objs/builtin/bt_read_get.d @@ -0,0 +1,10 @@ +objs/builtin/bt_read_get.o: src/builtin/bt_read_get.c \ + includes/builtin_read.h includes/types.h includes/builtin.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/minishell.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/glob.h \ + includes/completion.h includes/hash.h diff --git a/42sh/objs/builtin/bt_read_parse.d b/42sh/objs/builtin/bt_read_parse.d new file mode 100644 index 00000000..89009e04 --- /dev/null +++ b/42sh/objs/builtin/bt_read_parse.d @@ -0,0 +1,10 @@ +objs/builtin/bt_read_parse.o: src/builtin/bt_read_parse.c \ + includes/builtin_read.h includes/types.h includes/builtin.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/minishell.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/glob.h \ + includes/completion.h includes/hash.h diff --git a/42sh/objs/builtin/bt_read_term.d b/42sh/objs/builtin/bt_read_term.d new file mode 100644 index 00000000..928d1921 --- /dev/null +++ b/42sh/objs/builtin/bt_read_term.d @@ -0,0 +1,10 @@ +objs/builtin/bt_read_term.o: src/builtin/bt_read_term.c \ + includes/builtin.h includes/types.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/builtin_read.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/builtin/builtin_cd.d b/42sh/objs/builtin/builtin_cd.d new file mode 100644 index 00000000..4d1c59c9 --- /dev/null +++ b/42sh/objs/builtin/builtin_cd.d @@ -0,0 +1,9 @@ +objs/builtin/builtin_cd.o: src/builtin/builtin_cd.c includes/builtin.h \ + includes/types.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/builtin_read.h includes/minishell.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/builtin/builtin_echo.d b/42sh/objs/builtin/builtin_echo.d new file mode 100644 index 00000000..48a2ec11 --- /dev/null +++ b/42sh/objs/builtin/builtin_echo.d @@ -0,0 +1,10 @@ +objs/builtin/builtin_echo.o: src/builtin/builtin_echo.c \ + includes/builtin.h includes/types.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/builtin_read.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/builtin/builtin_env.d b/42sh/objs/builtin/builtin_env.d new file mode 100644 index 00000000..99743bb9 --- /dev/null +++ b/42sh/objs/builtin/builtin_env.d @@ -0,0 +1,10 @@ +objs/builtin/builtin_env.o: src/builtin/builtin_env.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/builtin/builtin_exit.d b/42sh/objs/builtin/builtin_exit.d new file mode 100644 index 00000000..6f13cb81 --- /dev/null +++ b/42sh/objs/builtin/builtin_exit.d @@ -0,0 +1,10 @@ +objs/builtin/builtin_exit.o: src/builtin/builtin_exit.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/builtin/builtin_export.d b/42sh/objs/builtin/builtin_export.d new file mode 100644 index 00000000..5df846e8 --- /dev/null +++ b/42sh/objs/builtin/builtin_export.d @@ -0,0 +1,10 @@ +objs/builtin/builtin_export.o: src/builtin/builtin_export.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/builtin/builtin_hash.d b/42sh/objs/builtin/builtin_hash.d new file mode 100644 index 00000000..f4eb8938 --- /dev/null +++ b/42sh/objs/builtin/builtin_hash.d @@ -0,0 +1,10 @@ +objs/builtin/builtin_hash.o: src/builtin/builtin_hash.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/builtin/builtin_history.d b/42sh/objs/builtin/builtin_history.d new file mode 100644 index 00000000..a60a1c6e --- /dev/null +++ b/42sh/objs/builtin/builtin_history.d @@ -0,0 +1,10 @@ +objs/builtin/builtin_history.o: src/builtin/builtin_history.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/builtin/builtin_read.d b/42sh/objs/builtin/builtin_read.d new file mode 100644 index 00000000..d5785763 --- /dev/null +++ b/42sh/objs/builtin/builtin_read.d @@ -0,0 +1,10 @@ +objs/builtin/builtin_read.o: src/builtin/builtin_read.c \ + includes/builtin_read.h includes/types.h includes/builtin.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/minishell.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/glob.h \ + includes/completion.h includes/hash.h diff --git a/42sh/objs/builtin/builtin_setenv.d b/42sh/objs/builtin/builtin_setenv.d new file mode 100644 index 00000000..502946a9 --- /dev/null +++ b/42sh/objs/builtin/builtin_setenv.d @@ -0,0 +1,10 @@ +objs/builtin/builtin_setenv.o: src/builtin/builtin_setenv.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/builtin/builtin_unset.d b/42sh/objs/builtin/builtin_unset.d new file mode 100644 index 00000000..d0d88852 --- /dev/null +++ b/42sh/objs/builtin/builtin_unset.d @@ -0,0 +1,10 @@ +objs/builtin/builtin_unset.o: src/builtin/builtin_unset.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/builtin/builtin_unsetenv.d b/42sh/objs/builtin/builtin_unsetenv.d new file mode 100644 index 00000000..25dd7671 --- /dev/null +++ b/42sh/objs/builtin/builtin_unsetenv.d @@ -0,0 +1,10 @@ +objs/builtin/builtin_unsetenv.o: src/builtin/builtin_unsetenv.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/builtin/is_builtin.d b/42sh/objs/builtin/is_builtin.d new file mode 100644 index 00000000..40071c79 --- /dev/null +++ b/42sh/objs/builtin/is_builtin.d @@ -0,0 +1,10 @@ +objs/builtin/is_builtin.o: src/builtin/is_builtin.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/completion/c_binary.d b/42sh/objs/completion/c_binary.d new file mode 100644 index 00000000..017f6e2a --- /dev/null +++ b/42sh/objs/completion/c_binary.d @@ -0,0 +1,10 @@ +objs/completion/c_binary.o: src/completion/c_binary.c \ + includes/completion.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/glob.h \ + includes/hash.h diff --git a/42sh/objs/completion/c_clear.d b/42sh/objs/completion/c_clear.d new file mode 100644 index 00000000..51457990 --- /dev/null +++ b/42sh/objs/completion/c_clear.d @@ -0,0 +1,9 @@ +objs/completion/c_clear.o: src/completion/c_clear.c includes/completion.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/hash.h diff --git a/42sh/objs/completion/c_files.d b/42sh/objs/completion/c_files.d new file mode 100644 index 00000000..d611d285 --- /dev/null +++ b/42sh/objs/completion/c_files.d @@ -0,0 +1,9 @@ +objs/completion/c_files.o: src/completion/c_files.c includes/completion.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/hash.h diff --git a/42sh/objs/completion/c_init.d b/42sh/objs/completion/c_init.d new file mode 100644 index 00000000..42812396 --- /dev/null +++ b/42sh/objs/completion/c_init.d @@ -0,0 +1,9 @@ +objs/completion/c_init.o: src/completion/c_init.c includes/completion.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/hash.h diff --git a/42sh/objs/completion/c_matching.d b/42sh/objs/completion/c_matching.d new file mode 100644 index 00000000..265147a1 --- /dev/null +++ b/42sh/objs/completion/c_matching.d @@ -0,0 +1,10 @@ +objs/completion/c_matching.o: src/completion/c_matching.c \ + includes/completion.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/glob.h \ + includes/hash.h diff --git a/42sh/objs/completion/c_misc.d b/42sh/objs/completion/c_misc.d new file mode 100644 index 00000000..3dde2e26 --- /dev/null +++ b/42sh/objs/completion/c_misc.d @@ -0,0 +1,9 @@ +objs/completion/c_misc.o: src/completion/c_misc.c includes/completion.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/hash.h diff --git a/42sh/objs/completion/c_output.d b/42sh/objs/completion/c_output.d new file mode 100644 index 00000000..c58c0475 --- /dev/null +++ b/42sh/objs/completion/c_output.d @@ -0,0 +1,10 @@ +objs/completion/c_output.o: src/completion/c_output.c \ + includes/completion.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/glob.h \ + includes/hash.h diff --git a/42sh/objs/completion/c_parser.d b/42sh/objs/completion/c_parser.d new file mode 100644 index 00000000..20e78c29 --- /dev/null +++ b/42sh/objs/completion/c_parser.d @@ -0,0 +1,10 @@ +objs/completion/c_parser.o: src/completion/c_parser.c \ + includes/completion.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/glob.h \ + includes/hash.h diff --git a/42sh/objs/completion/c_pathsolver.d b/42sh/objs/completion/c_pathsolver.d new file mode 100644 index 00000000..a43db912 --- /dev/null +++ b/42sh/objs/completion/c_pathsolver.d @@ -0,0 +1,10 @@ +objs/completion/c_pathsolver.o: src/completion/c_pathsolver.c \ + includes/completion.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/glob.h \ + includes/hash.h diff --git a/42sh/objs/completion/c_printer.d b/42sh/objs/completion/c_printer.d new file mode 100644 index 00000000..f5c0111d --- /dev/null +++ b/42sh/objs/completion/c_printer.d @@ -0,0 +1,10 @@ +objs/completion/c_printer.o: src/completion/c_printer.c \ + includes/completion.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/glob.h \ + includes/hash.h diff --git a/42sh/objs/completion/c_rematch.d b/42sh/objs/completion/c_rematch.d new file mode 100644 index 00000000..4402b27d --- /dev/null +++ b/42sh/objs/completion/c_rematch.d @@ -0,0 +1,10 @@ +objs/completion/c_rematch.o: src/completion/c_rematch.c \ + includes/completion.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/glob.h \ + includes/hash.h diff --git a/42sh/objs/completion/c_sizing.d b/42sh/objs/completion/c_sizing.d new file mode 100644 index 00000000..6d931b50 --- /dev/null +++ b/42sh/objs/completion/c_sizing.d @@ -0,0 +1,10 @@ +objs/completion/c_sizing.o: src/completion/c_sizing.c \ + includes/completion.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/glob.h \ + includes/hash.h diff --git a/42sh/objs/completion/c_terminal.d b/42sh/objs/completion/c_terminal.d new file mode 100644 index 00000000..e2fc7d30 --- /dev/null +++ b/42sh/objs/completion/c_terminal.d @@ -0,0 +1,10 @@ +objs/completion/c_terminal.o: src/completion/c_terminal.c \ + includes/completion.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/glob.h \ + includes/hash.h diff --git a/42sh/objs/completion/completion.d b/42sh/objs/completion/completion.d new file mode 100644 index 00000000..2e7aca1d --- /dev/null +++ b/42sh/objs/completion/completion.d @@ -0,0 +1,10 @@ +objs/completion/completion.o: src/completion/completion.c \ + includes/completion.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/glob.h \ + includes/hash.h diff --git a/42sh/objs/exec/ast_free.d b/42sh/objs/exec/ast_free.d new file mode 100644 index 00000000..a938bba4 --- /dev/null +++ b/42sh/objs/exec/ast_free.d @@ -0,0 +1,10 @@ +objs/exec/ast_free.o: src/exec/ast_free.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/bad_fd.d b/42sh/objs/exec/bad_fd.d new file mode 100644 index 00000000..10582e42 --- /dev/null +++ b/42sh/objs/exec/bad_fd.d @@ -0,0 +1,10 @@ +objs/exec/bad_fd.o: src/exec/bad_fd.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_ampersand.d b/42sh/objs/exec/exec_ampersand.d new file mode 100644 index 00000000..a099a3a2 --- /dev/null +++ b/42sh/objs/exec/exec_ampersand.d @@ -0,0 +1,10 @@ +objs/exec/exec_ampersand.o: src/exec/exec_ampersand.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_and_if.d b/42sh/objs/exec/exec_and_if.d new file mode 100644 index 00000000..e94f2cac --- /dev/null +++ b/42sh/objs/exec/exec_and_if.d @@ -0,0 +1,10 @@ +objs/exec/exec_and_if.o: src/exec/exec_and_if.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_command.d b/42sh/objs/exec/exec_command.d new file mode 100644 index 00000000..d0f0225c --- /dev/null +++ b/42sh/objs/exec/exec_command.d @@ -0,0 +1,10 @@ +objs/exec/exec_command.o: src/exec/exec_command.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_default.d b/42sh/objs/exec/exec_default.d new file mode 100644 index 00000000..e2f12d17 --- /dev/null +++ b/42sh/objs/exec/exec_default.d @@ -0,0 +1,10 @@ +objs/exec/exec_default.o: src/exec/exec_default.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_elif.d b/42sh/objs/exec/exec_elif.d new file mode 100644 index 00000000..31a808b1 --- /dev/null +++ b/42sh/objs/exec/exec_elif.d @@ -0,0 +1,10 @@ +objs/exec/exec_elif.o: src/exec/exec_elif.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_else.d b/42sh/objs/exec/exec_else.d new file mode 100644 index 00000000..7fbf18af --- /dev/null +++ b/42sh/objs/exec/exec_else.d @@ -0,0 +1,10 @@ +objs/exec/exec_else.o: src/exec/exec_else.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_if.d b/42sh/objs/exec/exec_if.d new file mode 100644 index 00000000..bfc49041 --- /dev/null +++ b/42sh/objs/exec/exec_if.d @@ -0,0 +1,10 @@ +objs/exec/exec_if.o: src/exec/exec_if.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_less.d b/42sh/objs/exec/exec_less.d new file mode 100644 index 00000000..80163f71 --- /dev/null +++ b/42sh/objs/exec/exec_less.d @@ -0,0 +1,10 @@ +objs/exec/exec_less.o: src/exec/exec_less.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_or_if.d b/42sh/objs/exec/exec_or_if.d new file mode 100644 index 00000000..e47e7589 --- /dev/null +++ b/42sh/objs/exec/exec_or_if.d @@ -0,0 +1,10 @@ +objs/exec/exec_or_if.o: src/exec/exec_or_if.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_pipe.d b/42sh/objs/exec/exec_pipe.d new file mode 100644 index 00000000..f0e75e4a --- /dev/null +++ b/42sh/objs/exec/exec_pipe.d @@ -0,0 +1,10 @@ +objs/exec/exec_pipe.o: src/exec/exec_pipe.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_redir.d b/42sh/objs/exec/exec_redir.d new file mode 100644 index 00000000..e38c21e1 --- /dev/null +++ b/42sh/objs/exec/exec_redir.d @@ -0,0 +1,10 @@ +objs/exec/exec_redir.o: src/exec/exec_redir.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_semi.d b/42sh/objs/exec/exec_semi.d new file mode 100644 index 00000000..a4e14789 --- /dev/null +++ b/42sh/objs/exec/exec_semi.d @@ -0,0 +1,10 @@ +objs/exec/exec_semi.o: src/exec/exec_semi.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_until.d b/42sh/objs/exec/exec_until.d new file mode 100644 index 00000000..892f8a85 --- /dev/null +++ b/42sh/objs/exec/exec_until.d @@ -0,0 +1,10 @@ +objs/exec/exec_until.o: src/exec/exec_until.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/exec_while.d b/42sh/objs/exec/exec_while.d new file mode 100644 index 00000000..e2156a69 --- /dev/null +++ b/42sh/objs/exec/exec_while.d @@ -0,0 +1,10 @@ +objs/exec/exec_while.o: src/exec/exec_while.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/fd_is_valid.d b/42sh/objs/exec/fd_is_valid.d new file mode 100644 index 00000000..82af7a1d --- /dev/null +++ b/42sh/objs/exec/fd_is_valid.d @@ -0,0 +1,10 @@ +objs/exec/fd_is_valid.o: src/exec/fd_is_valid.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/ft_exec.d b/42sh/objs/exec/ft_exec.d new file mode 100644 index 00000000..4d324b14 --- /dev/null +++ b/42sh/objs/exec/ft_exec.d @@ -0,0 +1,10 @@ +objs/exec/ft_exec.o: src/exec/ft_exec.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/ft_findexec.d b/42sh/objs/exec/ft_findexec.d new file mode 100644 index 00000000..bdef00c4 --- /dev/null +++ b/42sh/objs/exec/ft_findexec.d @@ -0,0 +1,10 @@ +objs/exec/ft_findexec.o: src/exec/ft_findexec.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/launch_process.d b/42sh/objs/exec/launch_process.d new file mode 100644 index 00000000..f85c0e5d --- /dev/null +++ b/42sh/objs/exec/launch_process.d @@ -0,0 +1,10 @@ +objs/exec/launch_process.o: src/exec/launch_process.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/loop_del.d b/42sh/objs/exec/loop_del.d new file mode 100644 index 00000000..96008067 --- /dev/null +++ b/42sh/objs/exec/loop_del.d @@ -0,0 +1,10 @@ +objs/exec/loop_del.o: src/exec/loop_del.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/loop_exec.d b/42sh/objs/exec/loop_exec.d new file mode 100644 index 00000000..289f40e6 --- /dev/null +++ b/42sh/objs/exec/loop_exec.d @@ -0,0 +1,10 @@ +objs/exec/loop_exec.o: src/exec/loop_exec.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/process_redirect.d b/42sh/objs/exec/process_redirect.d new file mode 100644 index 00000000..51148225 --- /dev/null +++ b/42sh/objs/exec/process_redirect.d @@ -0,0 +1,10 @@ +objs/exec/process_redirect.o: src/exec/process_redirect.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/process_reset.d b/42sh/objs/exec/process_reset.d new file mode 100644 index 00000000..66d081e7 --- /dev/null +++ b/42sh/objs/exec/process_reset.d @@ -0,0 +1,10 @@ +objs/exec/process_reset.o: src/exec/process_reset.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/process_resetfds.d b/42sh/objs/exec/process_resetfds.d new file mode 100644 index 00000000..2ee6d106 --- /dev/null +++ b/42sh/objs/exec/process_resetfds.d @@ -0,0 +1,10 @@ +objs/exec/process_resetfds.o: src/exec/process_resetfds.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/process_setexec.d b/42sh/objs/exec/process_setexec.d new file mode 100644 index 00000000..a0440320 --- /dev/null +++ b/42sh/objs/exec/process_setexec.d @@ -0,0 +1,10 @@ +objs/exec/process_setexec.o: src/exec/process_setexec.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/process_setgroup.d b/42sh/objs/exec/process_setgroup.d new file mode 100644 index 00000000..a1b5f93e --- /dev/null +++ b/42sh/objs/exec/process_setgroup.d @@ -0,0 +1,10 @@ +objs/exec/process_setgroup.o: src/exec/process_setgroup.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/process_setsig.d b/42sh/objs/exec/process_setsig.d new file mode 100644 index 00000000..79adabd6 --- /dev/null +++ b/42sh/objs/exec/process_setsig.d @@ -0,0 +1,10 @@ +objs/exec/process_setsig.o: src/exec/process_setsig.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/redirect_dgreat.d b/42sh/objs/exec/redirect_dgreat.d new file mode 100644 index 00000000..233d1240 --- /dev/null +++ b/42sh/objs/exec/redirect_dgreat.d @@ -0,0 +1,10 @@ +objs/exec/redirect_dgreat.o: src/exec/redirect_dgreat.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/redirect_dless.d b/42sh/objs/exec/redirect_dless.d new file mode 100644 index 00000000..e982e0a5 --- /dev/null +++ b/42sh/objs/exec/redirect_dless.d @@ -0,0 +1,10 @@ +objs/exec/redirect_dless.o: src/exec/redirect_dless.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/redirect_great.d b/42sh/objs/exec/redirect_great.d new file mode 100644 index 00000000..b1d05efd --- /dev/null +++ b/42sh/objs/exec/redirect_great.d @@ -0,0 +1,10 @@ +objs/exec/redirect_great.o: src/exec/redirect_great.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/redirect_greatand.d b/42sh/objs/exec/redirect_greatand.d new file mode 100644 index 00000000..b49fe193 --- /dev/null +++ b/42sh/objs/exec/redirect_greatand.d @@ -0,0 +1,10 @@ +objs/exec/redirect_greatand.o: src/exec/redirect_greatand.c \ + includes/exec.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/redirect_less.d b/42sh/objs/exec/redirect_less.d new file mode 100644 index 00000000..89e46d58 --- /dev/null +++ b/42sh/objs/exec/redirect_less.d @@ -0,0 +1,10 @@ +objs/exec/redirect_less.o: src/exec/redirect_less.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/redirect_lessand.d b/42sh/objs/exec/redirect_lessand.d new file mode 100644 index 00000000..8f964246 --- /dev/null +++ b/42sh/objs/exec/redirect_lessand.d @@ -0,0 +1,10 @@ +objs/exec/redirect_lessand.o: src/exec/redirect_lessand.c includes/exec.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/job_control.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/exec/set_exitstatus.d b/42sh/objs/exec/set_exitstatus.d new file mode 100644 index 00000000..f457b366 --- /dev/null +++ b/42sh/objs/exec/set_exitstatus.d @@ -0,0 +1,10 @@ +objs/exec/set_exitstatus.o: src/exec/set_exitstatus.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/command_getoutput.d b/42sh/objs/glob/command_getoutput.d new file mode 100644 index 00000000..9d35c410 --- /dev/null +++ b/42sh/objs/glob/command_getoutput.d @@ -0,0 +1,10 @@ +objs/glob/command_getoutput.o: src/glob/command_getoutput.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/dir_glob.d b/42sh/objs/glob/dir_glob.d new file mode 100644 index 00000000..91f9d5d3 --- /dev/null +++ b/42sh/objs/glob/dir_glob.d @@ -0,0 +1,9 @@ +objs/glob/dir_glob.o: src/glob/dir_glob.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/esc_print.d b/42sh/objs/glob/esc_print.d new file mode 100644 index 00000000..a10646b9 --- /dev/null +++ b/42sh/objs/glob/esc_print.d @@ -0,0 +1,9 @@ +objs/glob/esc_print.o: src/glob/esc_print.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/expand_bquote.d b/42sh/objs/glob/expand_bquote.d new file mode 100644 index 00000000..dcf407fc --- /dev/null +++ b/42sh/objs/glob/expand_bquote.d @@ -0,0 +1,9 @@ +objs/glob/expand_bquote.o: src/glob/expand_bquote.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/expand_brace.d b/42sh/objs/glob/expand_brace.d new file mode 100644 index 00000000..33dcb5e8 --- /dev/null +++ b/42sh/objs/glob/expand_brace.d @@ -0,0 +1,9 @@ +objs/glob/expand_brace.o: src/glob/expand_brace.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/expand_esc.d b/42sh/objs/glob/expand_esc.d new file mode 100644 index 00000000..51558b19 --- /dev/null +++ b/42sh/objs/glob/expand_esc.d @@ -0,0 +1,9 @@ +objs/glob/expand_esc.o: src/glob/expand_esc.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/expand_var.d b/42sh/objs/glob/expand_var.d new file mode 100644 index 00000000..d3f356b0 --- /dev/null +++ b/42sh/objs/glob/expand_var.d @@ -0,0 +1,9 @@ +objs/glob/expand_var.o: src/glob/expand_var.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/ft_strsplit_esc.d b/42sh/objs/glob/ft_strsplit_esc.d new file mode 100644 index 00000000..87445b4a --- /dev/null +++ b/42sh/objs/glob/ft_strsplit_esc.d @@ -0,0 +1,9 @@ +objs/glob/ft_strsplit_esc.o: src/glob/ft_strsplit_esc.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/ft_strsplit_spe.d b/42sh/objs/glob/ft_strsplit_spe.d new file mode 100644 index 00000000..efec76f6 --- /dev/null +++ b/42sh/objs/glob/ft_strsplit_spe.d @@ -0,0 +1,9 @@ +objs/glob/ft_strsplit_spe.o: src/glob/ft_strsplit_spe.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/glob.d b/42sh/objs/glob/glob.d new file mode 100644 index 00000000..97d1827b --- /dev/null +++ b/42sh/objs/glob/glob.d @@ -0,0 +1,9 @@ +objs/glob/glob.o: src/glob/glob.c includes/glob.h includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/is_char_esc.d b/42sh/objs/glob/is_char_esc.d new file mode 100644 index 00000000..dde23a1e --- /dev/null +++ b/42sh/objs/glob/is_char_esc.d @@ -0,0 +1,9 @@ +objs/glob/is_char_esc.o: src/glob/is_char_esc.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_back.d b/42sh/objs/glob/lib_perso/ft_ld_back.d new file mode 100644 index 00000000..afc57d2c --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_back.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_back.o: src/glob/lib_perso/ft_ld_back.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_clear.d b/42sh/objs/glob/lib_perso/ft_ld_clear.d new file mode 100644 index 00000000..6855ddd6 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_clear.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_clear.o: src/glob/lib_perso/ft_ld_clear.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_del.d b/42sh/objs/glob/lib_perso/ft_ld_del.d new file mode 100644 index 00000000..060ccc53 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_del.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_del.o: src/glob/lib_perso/ft_ld_del.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_front.d b/42sh/objs/glob/lib_perso/ft_ld_front.d new file mode 100644 index 00000000..13574f83 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_front.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_front.o: src/glob/lib_perso/ft_ld_front.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_new.d b/42sh/objs/glob/lib_perso/ft_ld_new.d new file mode 100644 index 00000000..b7db9543 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_new.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_new.o: src/glob/lib_perso/ft_ld_new.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_order.d b/42sh/objs/glob/lib_perso/ft_ld_order.d new file mode 100644 index 00000000..8b6ffe0c --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_order.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_order.o: src/glob/lib_perso/ft_ld_order.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_pushback.d b/42sh/objs/glob/lib_perso/ft_ld_pushback.d new file mode 100644 index 00000000..de57e36f --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_pushback.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_pushback.o: src/glob/lib_perso/ft_ld_pushback.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_pushfront.d b/42sh/objs/glob/lib_perso/ft_ld_pushfront.d new file mode 100644 index 00000000..4bb25bc3 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_pushfront.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_pushfront.o: \ + src/glob/lib_perso/ft_ld_pushfront.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_reverse.d b/42sh/objs/glob/lib_perso/ft_ld_reverse.d new file mode 100644 index 00000000..2cbfe7ff --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_reverse.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_reverse.o: src/glob/lib_perso/ft_ld_reverse.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_size.d b/42sh/objs/glob/lib_perso/ft_ld_size.d new file mode 100644 index 00000000..e79ba8c1 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_size.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_size.o: src/glob/lib_perso/ft_ld_size.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_swap.d b/42sh/objs/glob/lib_perso/ft_ld_swap.d new file mode 100644 index 00000000..952177a3 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_swap.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_swap.o: src/glob/lib_perso/ft_ld_swap.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_to_tab.d b/42sh/objs/glob/lib_perso/ft_ld_to_tab.d new file mode 100644 index 00000000..661420b6 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_ld_to_tab.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_ld_to_tab.o: src/glob/lib_perso/ft_ld_to_tab.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_memrealloc.d b/42sh/objs/glob/lib_perso/ft_memrealloc.d new file mode 100644 index 00000000..2a7fd8eb --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_memrealloc.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_memrealloc.o: src/glob/lib_perso/ft_memrealloc.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_strjoinf.d b/42sh/objs/glob/lib_perso/ft_strjoinf.d new file mode 100644 index 00000000..43e9fbf9 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_strjoinf.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_strjoinf.o: src/glob/lib_perso/ft_strjoinf.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_strsubf.d b/42sh/objs/glob/lib_perso/ft_strsubf.d new file mode 100644 index 00000000..1e156f0b --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_strsubf.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_strsubf.o: src/glob/lib_perso/ft_strsubf.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_tabdel.d b/42sh/objs/glob/lib_perso/ft_tabdel.d new file mode 100644 index 00000000..ff2f5e53 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_tabdel.d @@ -0,0 +1,10 @@ +objs/glob/lib_perso/ft_tabdel.o: src/glob/lib_perso/ft_tabdel.c \ + includes/glob.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/parser.h includes/ft_readline.h \ + includes/ft_input.h includes/exec.h includes/job_control.h \ + includes/builtin.h includes/builtin_read.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_tablen.d b/42sh/objs/glob/lib_perso/ft_tablen.d new file mode 100644 index 00000000..7ea8a517 --- /dev/null +++ b/42sh/objs/glob/lib_perso/ft_tablen.d @@ -0,0 +1,6 @@ +objs/glob/lib_perso/ft_tablen.o: src/glob/lib_perso/ft_tablen.c \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h diff --git a/42sh/objs/glob/match_pattern.d b/42sh/objs/glob/match_pattern.d new file mode 100644 index 00000000..e194a52a --- /dev/null +++ b/42sh/objs/glob/match_pattern.d @@ -0,0 +1,9 @@ +objs/glob/match_pattern.o: src/glob/match_pattern.c includes/glob.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/hash_table/ft_add_hash.d b/42sh/objs/hash_table/ft_add_hash.d new file mode 100644 index 00000000..bf1a58cb --- /dev/null +++ b/42sh/objs/hash_table/ft_add_hash.d @@ -0,0 +1,10 @@ +objs/hash_table/ft_add_hash.o: src/hash_table/ft_add_hash.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/hash_table/hash.d b/42sh/objs/hash_table/hash.d new file mode 100644 index 00000000..800ce022 --- /dev/null +++ b/42sh/objs/hash_table/hash.d @@ -0,0 +1,10 @@ +objs/hash_table/hash.o: src/hash_table/hash.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/hash_table/hash_free.d b/42sh/objs/hash_table/hash_free.d new file mode 100644 index 00000000..63be677a --- /dev/null +++ b/42sh/objs/hash_table/hash_free.d @@ -0,0 +1,10 @@ +objs/hash_table/hash_free.o: src/hash_table/hash_free.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/hash_table/hash_str.d b/42sh/objs/hash_table/hash_str.d new file mode 100644 index 00000000..a76416ca --- /dev/null +++ b/42sh/objs/hash_table/hash_str.d @@ -0,0 +1,10 @@ +objs/hash_table/hash_str.o: src/hash_table/hash_str.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/hash_table/is_hash.d b/42sh/objs/hash_table/is_hash.d new file mode 100644 index 00000000..6e962431 --- /dev/null +++ b/42sh/objs/hash_table/is_hash.d @@ -0,0 +1,10 @@ +objs/hash_table/is_hash.o: src/hash_table/is_hash.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/history/add_str_in_history.d b/42sh/objs/history/add_str_in_history.d new file mode 100644 index 00000000..a1d8a7eb --- /dev/null +++ b/42sh/objs/history/add_str_in_history.d @@ -0,0 +1,10 @@ +objs/history/add_str_in_history.o: src/history/add_str_in_history.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/history/history.d b/42sh/objs/history/history.d new file mode 100644 index 00000000..57982de7 --- /dev/null +++ b/42sh/objs/history/history.d @@ -0,0 +1,10 @@ +objs/history/history.o: src/history/history.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/history/history_parsing.d b/42sh/objs/history/history_parsing.d new file mode 100644 index 00000000..85445519 --- /dev/null +++ b/42sh/objs/history/history_parsing.d @@ -0,0 +1,10 @@ +objs/history/history_parsing.o: src/history/history_parsing.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/history/history_parsing_toolz.d b/42sh/objs/history/history_parsing_toolz.d new file mode 100644 index 00000000..0fe8517d --- /dev/null +++ b/42sh/objs/history/history_parsing_toolz.d @@ -0,0 +1,10 @@ +objs/history/history_parsing_toolz.o: src/history/history_parsing_toolz.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/history/history_parsing_toolz_2.d b/42sh/objs/history/history_parsing_toolz_2.d new file mode 100644 index 00000000..f17d84c5 --- /dev/null +++ b/42sh/objs/history/history_parsing_toolz_2.d @@ -0,0 +1,11 @@ +objs/history/history_parsing_toolz_2.o: \ + src/history/history_parsing_toolz_2.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/history/list_toolz.d b/42sh/objs/history/list_toolz.d new file mode 100644 index 00000000..c96548ad --- /dev/null +++ b/42sh/objs/history/list_toolz.d @@ -0,0 +1,10 @@ +objs/history/list_toolz.o: src/history/list_toolz.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/history/surch_in_history.d b/42sh/objs/history/surch_in_history.d new file mode 100644 index 00000000..6a389c3a --- /dev/null +++ b/42sh/objs/history/surch_in_history.d @@ -0,0 +1,10 @@ +objs/history/surch_in_history.o: src/history/surch_in_history.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/builtin_bg.d b/42sh/objs/job-control/builtin_bg.d new file mode 100644 index 00000000..45276f5f --- /dev/null +++ b/42sh/objs/job-control/builtin_bg.d @@ -0,0 +1,10 @@ +objs/job-control/builtin_bg.o: src/job-control/builtin_bg.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/builtin_fg.d b/42sh/objs/job-control/builtin_fg.d new file mode 100644 index 00000000..4c70f313 --- /dev/null +++ b/42sh/objs/job-control/builtin_fg.d @@ -0,0 +1,10 @@ +objs/job-control/builtin_fg.o: src/job-control/builtin_fg.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/builtin_jobs.d b/42sh/objs/job-control/builtin_jobs.d new file mode 100644 index 00000000..24978381 --- /dev/null +++ b/42sh/objs/job-control/builtin_jobs.d @@ -0,0 +1,10 @@ +objs/job-control/builtin_jobs.o: src/job-control/builtin_jobs.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/do_job_notification.d b/42sh/objs/job-control/do_job_notification.d new file mode 100644 index 00000000..fbcbc8ed --- /dev/null +++ b/42sh/objs/job-control/do_job_notification.d @@ -0,0 +1,11 @@ +objs/job-control/do_job_notification.o: \ + src/job-control/do_job_notification.c includes/job_control.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_addprocess.d b/42sh/objs/job-control/job_addprocess.d new file mode 100644 index 00000000..73a11c51 --- /dev/null +++ b/42sh/objs/job-control/job_addprocess.d @@ -0,0 +1,10 @@ +objs/job-control/job_addprocess.o: src/job-control/job_addprocess.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_cmp_id.d b/42sh/objs/job-control/job_cmp_id.d new file mode 100644 index 00000000..16f0b3b0 --- /dev/null +++ b/42sh/objs/job-control/job_cmp_id.d @@ -0,0 +1,10 @@ +objs/job-control/job_cmp_id.o: src/job-control/job_cmp_id.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_format.d b/42sh/objs/job-control/job_format.d new file mode 100644 index 00000000..020f7849 --- /dev/null +++ b/42sh/objs/job-control/job_format.d @@ -0,0 +1,10 @@ +objs/job-control/job_format.o: src/job-control/job_format.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_format_head.d b/42sh/objs/job-control/job_format_head.d new file mode 100644 index 00000000..d9c43887 --- /dev/null +++ b/42sh/objs/job-control/job_format_head.d @@ -0,0 +1,10 @@ +objs/job-control/job_format_head.o: src/job-control/job_format_head.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_free.d b/42sh/objs/job-control/job_free.d new file mode 100644 index 00000000..b38c8f5f --- /dev/null +++ b/42sh/objs/job-control/job_free.d @@ -0,0 +1,10 @@ +objs/job-control/job_free.o: src/job-control/job_free.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_getprocess.d b/42sh/objs/job-control/job_getprocess.d new file mode 100644 index 00000000..94d6b64b --- /dev/null +++ b/42sh/objs/job-control/job_getprocess.d @@ -0,0 +1,10 @@ +objs/job-control/job_getprocess.o: src/job-control/job_getprocess.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_getrank.d b/42sh/objs/job-control/job_getrank.d new file mode 100644 index 00000000..6a17e542 --- /dev/null +++ b/42sh/objs/job-control/job_getrank.d @@ -0,0 +1,10 @@ +objs/job-control/job_getrank.o: src/job-control/job_getrank.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_is_completed.d b/42sh/objs/job-control/job_is_completed.d new file mode 100644 index 00000000..01acb475 --- /dev/null +++ b/42sh/objs/job-control/job_is_completed.d @@ -0,0 +1,10 @@ +objs/job-control/job_is_completed.o: src/job-control/job_is_completed.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_is_stopped.d b/42sh/objs/job-control/job_is_stopped.d new file mode 100644 index 00000000..99ff0d4f --- /dev/null +++ b/42sh/objs/job-control/job_is_stopped.d @@ -0,0 +1,10 @@ +objs/job-control/job_is_stopped.o: src/job-control/job_is_stopped.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_kill_all.d b/42sh/objs/job-control/job_kill_all.d new file mode 100644 index 00000000..3fcaf708 --- /dev/null +++ b/42sh/objs/job-control/job_kill_all.d @@ -0,0 +1,10 @@ +objs/job-control/job_kill_all.o: src/job-control/job_kill_all.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_notify_change.d b/42sh/objs/job-control/job_notify_change.d new file mode 100644 index 00000000..6cf53473 --- /dev/null +++ b/42sh/objs/job-control/job_notify_change.d @@ -0,0 +1,10 @@ +objs/job-control/job_notify_change.o: src/job-control/job_notify_change.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_notify_new.d b/42sh/objs/job-control/job_notify_new.d new file mode 100644 index 00000000..53900c61 --- /dev/null +++ b/42sh/objs/job-control/job_notify_new.d @@ -0,0 +1,10 @@ +objs/job-control/job_notify_new.o: src/job-control/job_notify_new.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_remove.d b/42sh/objs/job-control/job_remove.d new file mode 100644 index 00000000..545d61d8 --- /dev/null +++ b/42sh/objs/job-control/job_remove.d @@ -0,0 +1,10 @@ +objs/job-control/job_remove.o: src/job-control/job_remove.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_run.d b/42sh/objs/job-control/job_run.d new file mode 100644 index 00000000..bd23bf28 --- /dev/null +++ b/42sh/objs/job-control/job_run.d @@ -0,0 +1,10 @@ +objs/job-control/job_run.o: src/job-control/job_run.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_update_id.d b/42sh/objs/job-control/job_update_id.d new file mode 100644 index 00000000..a542008e --- /dev/null +++ b/42sh/objs/job-control/job_update_id.d @@ -0,0 +1,10 @@ +objs/job-control/job_update_id.o: src/job-control/job_update_id.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_update_status.d b/42sh/objs/job-control/job_update_status.d new file mode 100644 index 00000000..d557ad2d --- /dev/null +++ b/42sh/objs/job-control/job_update_status.d @@ -0,0 +1,10 @@ +objs/job-control/job_update_status.o: src/job-control/job_update_status.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/job_wait.d b/42sh/objs/job-control/job_wait.d new file mode 100644 index 00000000..11f06005 --- /dev/null +++ b/42sh/objs/job-control/job_wait.d @@ -0,0 +1,10 @@ +objs/job-control/job_wait.o: src/job-control/job_wait.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/mark_job_as_running.d b/42sh/objs/job-control/mark_job_as_running.d new file mode 100644 index 00000000..58089f19 --- /dev/null +++ b/42sh/objs/job-control/mark_job_as_running.d @@ -0,0 +1,11 @@ +objs/job-control/mark_job_as_running.o: \ + src/job-control/mark_job_as_running.c includes/job_control.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/process_cmp_pid.d b/42sh/objs/job-control/process_cmp_pid.d new file mode 100644 index 00000000..35886dc5 --- /dev/null +++ b/42sh/objs/job-control/process_cmp_pid.d @@ -0,0 +1,10 @@ +objs/job-control/process_cmp_pid.o: src/job-control/process_cmp_pid.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/process_format.d b/42sh/objs/job-control/process_format.d new file mode 100644 index 00000000..7bbf0450 --- /dev/null +++ b/42sh/objs/job-control/process_format.d @@ -0,0 +1,10 @@ +objs/job-control/process_format.o: src/job-control/process_format.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/process_free.d b/42sh/objs/job-control/process_free.d new file mode 100644 index 00000000..07209bee --- /dev/null +++ b/42sh/objs/job-control/process_free.d @@ -0,0 +1,10 @@ +objs/job-control/process_free.o: src/job-control/process_free.c \ + includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/process_mark_status.d b/42sh/objs/job-control/process_mark_status.d new file mode 100644 index 00000000..c5fb61ed --- /dev/null +++ b/42sh/objs/job-control/process_mark_status.d @@ -0,0 +1,11 @@ +objs/job-control/process_mark_status.o: \ + src/job-control/process_mark_status.c includes/job_control.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/put_job_in_background.d b/42sh/objs/job-control/put_job_in_background.d new file mode 100644 index 00000000..cfa0938a --- /dev/null +++ b/42sh/objs/job-control/put_job_in_background.d @@ -0,0 +1,11 @@ +objs/job-control/put_job_in_background.o: \ + src/job-control/put_job_in_background.c includes/job_control.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/put_job_in_foreground.d b/42sh/objs/job-control/put_job_in_foreground.d new file mode 100644 index 00000000..b0322e72 --- /dev/null +++ b/42sh/objs/job-control/put_job_in_foreground.d @@ -0,0 +1,11 @@ +objs/job-control/put_job_in_foreground.o: \ + src/job-control/put_job_in_foreground.c includes/job_control.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/exec.h \ + includes/minishell.h includes/lexer.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/sigchld_handler.d b/42sh/objs/job-control/sigchld_handler.d new file mode 100644 index 00000000..b6e2b5c3 --- /dev/null +++ b/42sh/objs/job-control/sigchld_handler.d @@ -0,0 +1,10 @@ +objs/job-control/sigchld_handler.o: src/job-control/sigchld_handler.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/sigint_handler.d b/42sh/objs/job-control/sigint_handler.d new file mode 100644 index 00000000..42ddb498 --- /dev/null +++ b/42sh/objs/job-control/sigint_handler.d @@ -0,0 +1,10 @@ +objs/job-control/sigint_handler.o: src/job-control/sigint_handler.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/sigtstp_handler.d b/42sh/objs/job-control/sigtstp_handler.d new file mode 100644 index 00000000..8eac50f2 --- /dev/null +++ b/42sh/objs/job-control/sigtstp_handler.d @@ -0,0 +1,10 @@ +objs/job-control/sigtstp_handler.o: src/job-control/sigtstp_handler.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/sigttin_handler.d b/42sh/objs/job-control/sigttin_handler.d new file mode 100644 index 00000000..ac11d282 --- /dev/null +++ b/42sh/objs/job-control/sigttin_handler.d @@ -0,0 +1,10 @@ +objs/job-control/sigttin_handler.o: src/job-control/sigttin_handler.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/job-control/sigttou_handler.d b/42sh/objs/job-control/sigttou_handler.d new file mode 100644 index 00000000..acfd89be --- /dev/null +++ b/42sh/objs/job-control/sigttou_handler.d @@ -0,0 +1,10 @@ +objs/job-control/sigttou_handler.o: src/job-control/sigttou_handler.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/lexer/get_lexer_stack.d b/42sh/objs/lexer/get_lexer_stack.d new file mode 100644 index 00000000..33c4900b --- /dev/null +++ b/42sh/objs/lexer/get_lexer_stack.d @@ -0,0 +1,10 @@ +objs/lexer/get_lexer_stack.o: src/lexer/get_lexer_stack.c \ + includes/lexer.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/lexer/get_reserved_words.d b/42sh/objs/lexer/get_reserved_words.d new file mode 100644 index 00000000..bbfb8e21 --- /dev/null +++ b/42sh/objs/lexer/get_reserved_words.d @@ -0,0 +1,10 @@ +objs/lexer/get_reserved_words.o: src/lexer/get_reserved_words.c \ + includes/lexer.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/lexer/get_state_global.d b/42sh/objs/lexer/get_state_global.d new file mode 100644 index 00000000..44ee3528 --- /dev/null +++ b/42sh/objs/lexer/get_state_global.d @@ -0,0 +1,10 @@ +objs/lexer/get_state_global.o: src/lexer/get_state_global.c \ + includes/lexer.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/lexer/get_state_redir.d b/42sh/objs/lexer/get_state_redir.d new file mode 100644 index 00000000..732027db --- /dev/null +++ b/42sh/objs/lexer/get_state_redir.d @@ -0,0 +1,10 @@ +objs/lexer/get_state_redir.o: src/lexer/get_state_redir.c \ + includes/lexer.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/lexer/insert_newline.d b/42sh/objs/lexer/insert_newline.d new file mode 100644 index 00000000..821da266 --- /dev/null +++ b/42sh/objs/lexer/insert_newline.d @@ -0,0 +1,9 @@ +objs/lexer/insert_newline.o: src/lexer/insert_newline.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_assignement_word.d b/42sh/objs/lexer/lexer_assignement_word.d new file mode 100644 index 00000000..fdecce12 --- /dev/null +++ b/42sh/objs/lexer/lexer_assignement_word.d @@ -0,0 +1,10 @@ +objs/lexer/lexer_assignement_word.o: src/lexer/lexer_assignement_word.c \ + includes/lexer.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/lexer/lexer_backslash.d b/42sh/objs/lexer/lexer_backslash.d new file mode 100644 index 00000000..ed8c3998 --- /dev/null +++ b/42sh/objs/lexer/lexer_backslash.d @@ -0,0 +1,10 @@ +objs/lexer/lexer_backslash.o: src/lexer/lexer_backslash.c \ + includes/lexer.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/lexer/lexer_bquote.d b/42sh/objs/lexer/lexer_bquote.d new file mode 100644 index 00000000..43ee354f --- /dev/null +++ b/42sh/objs/lexer/lexer_bquote.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_bquote.o: src/lexer/lexer_bquote.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_comment.d b/42sh/objs/lexer/lexer_comment.d new file mode 100644 index 00000000..22fe129f --- /dev/null +++ b/42sh/objs/lexer/lexer_comment.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_comment.o: src/lexer/lexer_comment.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_curly_brackets.d b/42sh/objs/lexer/lexer_curly_brackets.d new file mode 100644 index 00000000..b9f9a7d3 --- /dev/null +++ b/42sh/objs/lexer/lexer_curly_brackets.d @@ -0,0 +1,10 @@ +objs/lexer/lexer_curly_brackets.o: src/lexer/lexer_curly_brackets.c \ + includes/parser.h includes/minishell.h libft/includes/libft.h \ + libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ + libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ + libft/includes/mytime.h libft/includes/get_next_line.h \ + libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ + includes/lexer.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/lexer/lexer_default.d b/42sh/objs/lexer/lexer_default.d new file mode 100644 index 00000000..585fa28d --- /dev/null +++ b/42sh/objs/lexer/lexer_default.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_default.o: src/lexer/lexer_default.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_delim.d b/42sh/objs/lexer/lexer_delim.d new file mode 100644 index 00000000..bb9c7e94 --- /dev/null +++ b/42sh/objs/lexer/lexer_delim.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_delim.o: src/lexer/lexer_delim.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_dless.d b/42sh/objs/lexer/lexer_dless.d new file mode 100644 index 00000000..dcdb441b --- /dev/null +++ b/42sh/objs/lexer/lexer_dless.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_dless.o: src/lexer/lexer_dless.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_dquote.d b/42sh/objs/lexer/lexer_dquote.d new file mode 100644 index 00000000..01838b82 --- /dev/null +++ b/42sh/objs/lexer/lexer_dquote.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_dquote.o: src/lexer/lexer_dquote.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_end.d b/42sh/objs/lexer/lexer_end.d new file mode 100644 index 00000000..868b431c --- /dev/null +++ b/42sh/objs/lexer/lexer_end.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_end.o: src/lexer/lexer_end.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_great.d b/42sh/objs/lexer/lexer_great.d new file mode 100644 index 00000000..a2180b64 --- /dev/null +++ b/42sh/objs/lexer/lexer_great.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_great.o: src/lexer/lexer_great.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_greatand.d b/42sh/objs/lexer/lexer_greatand.d new file mode 100644 index 00000000..69c8375e --- /dev/null +++ b/42sh/objs/lexer/lexer_greatand.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_greatand.o: src/lexer/lexer_greatand.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_init.d b/42sh/objs/lexer/lexer_init.d new file mode 100644 index 00000000..4ee3c05b --- /dev/null +++ b/42sh/objs/lexer/lexer_init.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_init.o: src/lexer/lexer_init.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_less.d b/42sh/objs/lexer/lexer_less.d new file mode 100644 index 00000000..ebccd85b --- /dev/null +++ b/42sh/objs/lexer/lexer_less.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_less.o: src/lexer/lexer_less.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_lessand.d b/42sh/objs/lexer/lexer_lessand.d new file mode 100644 index 00000000..e3358721 --- /dev/null +++ b/42sh/objs/lexer/lexer_lessand.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_lessand.o: src/lexer/lexer_lessand.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_lex.d b/42sh/objs/lexer/lexer_lex.d new file mode 100644 index 00000000..ad9b5d4e --- /dev/null +++ b/42sh/objs/lexer/lexer_lex.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_lex.o: src/lexer/lexer_lex.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_newline.d b/42sh/objs/lexer/lexer_newline.d new file mode 100644 index 00000000..d11e70b2 --- /dev/null +++ b/42sh/objs/lexer/lexer_newline.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_newline.o: src/lexer/lexer_newline.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_number.d b/42sh/objs/lexer/lexer_number.d new file mode 100644 index 00000000..e49baefb --- /dev/null +++ b/42sh/objs/lexer/lexer_number.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_number.o: src/lexer/lexer_number.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_paren.d b/42sh/objs/lexer/lexer_paren.d new file mode 100644 index 00000000..d0f86ab7 --- /dev/null +++ b/42sh/objs/lexer/lexer_paren.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_paren.o: src/lexer/lexer_paren.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_quote.d b/42sh/objs/lexer/lexer_quote.d new file mode 100644 index 00000000..bb8ed097 --- /dev/null +++ b/42sh/objs/lexer/lexer_quote.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_quote.o: src/lexer/lexer_quote.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_sep.d b/42sh/objs/lexer/lexer_sep.d new file mode 100644 index 00000000..060a4b6f --- /dev/null +++ b/42sh/objs/lexer/lexer_sep.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_sep.o: src/lexer/lexer_sep.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_word.d b/42sh/objs/lexer/lexer_word.d new file mode 100644 index 00000000..393edf7e --- /dev/null +++ b/42sh/objs/lexer/lexer_word.d @@ -0,0 +1,9 @@ +objs/lexer/lexer_word.o: src/lexer/lexer_word.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/token_append.d b/42sh/objs/lexer/token_append.d new file mode 100644 index 00000000..367c7fab --- /dev/null +++ b/42sh/objs/lexer/token_append.d @@ -0,0 +1,9 @@ +objs/lexer/token_append.o: src/lexer/token_append.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/token_cmp_type.d b/42sh/objs/lexer/token_cmp_type.d new file mode 100644 index 00000000..13aacae7 --- /dev/null +++ b/42sh/objs/lexer/token_cmp_type.d @@ -0,0 +1,9 @@ +objs/lexer/token_cmp_type.o: src/lexer/token_cmp_type.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/token_free.d b/42sh/objs/lexer/token_free.d new file mode 100644 index 00000000..0357cacc --- /dev/null +++ b/42sh/objs/lexer/token_free.d @@ -0,0 +1,9 @@ +objs/lexer/token_free.o: src/lexer/token_free.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/token_init.d b/42sh/objs/lexer/token_init.d new file mode 100644 index 00000000..0f3b7925 --- /dev/null +++ b/42sh/objs/lexer/token_init.d @@ -0,0 +1,9 @@ +objs/lexer/token_init.o: src/lexer/token_init.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/token_print.d b/42sh/objs/lexer/token_print.d new file mode 100644 index 00000000..c00139ec --- /dev/null +++ b/42sh/objs/lexer/token_print.d @@ -0,0 +1,9 @@ +objs/lexer/token_print.o: src/lexer/token_print.c includes/lexer.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/parser.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/line-editing/completion.d b/42sh/objs/line-editing/completion.d new file mode 100644 index 00000000..5e65f8e8 --- /dev/null +++ b/42sh/objs/line-editing/completion.d @@ -0,0 +1,10 @@ +objs/line-editing/completion.o: src/line-editing/completion.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/control_c_and_d.d b/42sh/objs/line-editing/control_c_and_d.d new file mode 100644 index 00000000..d0f99cb6 --- /dev/null +++ b/42sh/objs/line-editing/control_c_and_d.d @@ -0,0 +1,10 @@ +objs/line-editing/control_c_and_d.o: src/line-editing/control_c_and_d.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/copy_cut_paste.d b/42sh/objs/line-editing/copy_cut_paste.d new file mode 100644 index 00000000..4ae03557 --- /dev/null +++ b/42sh/objs/line-editing/copy_cut_paste.d @@ -0,0 +1,10 @@ +objs/line-editing/copy_cut_paste.o: src/line-editing/copy_cut_paste.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/ft_prompt.d b/42sh/objs/line-editing/ft_prompt.d new file mode 100644 index 00000000..0e111e7a --- /dev/null +++ b/42sh/objs/line-editing/ft_prompt.d @@ -0,0 +1,10 @@ +objs/line-editing/ft_prompt.o: src/line-editing/ft_prompt.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/get_key.d b/42sh/objs/line-editing/get_key.d new file mode 100644 index 00000000..acae0b18 --- /dev/null +++ b/42sh/objs/line-editing/get_key.d @@ -0,0 +1,10 @@ +objs/line-editing/get_key.o: src/line-editing/get_key.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/home_end.d b/42sh/objs/line-editing/home_end.d new file mode 100644 index 00000000..9aed3bbc --- /dev/null +++ b/42sh/objs/line-editing/home_end.d @@ -0,0 +1,10 @@ +objs/line-editing/home_end.o: src/line-editing/home_end.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/tool_line.d b/42sh/objs/line-editing/lib_line_editing/tool_line.d new file mode 100644 index 00000000..4b90a89f --- /dev/null +++ b/42sh/objs/line-editing/lib_line_editing/tool_line.d @@ -0,0 +1,11 @@ +objs/line-editing/lib_line_editing/tool_line.o: \ + src/line-editing/lib_line_editing/tool_line.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/tool_line_2.d b/42sh/objs/line-editing/lib_line_editing/tool_line_2.d new file mode 100644 index 00000000..d0b9f168 --- /dev/null +++ b/42sh/objs/line-editing/lib_line_editing/tool_line_2.d @@ -0,0 +1,11 @@ +objs/line-editing/lib_line_editing/tool_line_2.o: \ + src/line-editing/lib_line_editing/tool_line_2.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/toolz.d b/42sh/objs/line-editing/lib_line_editing/toolz.d new file mode 100644 index 00000000..08f16b8b --- /dev/null +++ b/42sh/objs/line-editing/lib_line_editing/toolz.d @@ -0,0 +1,11 @@ +objs/line-editing/lib_line_editing/toolz.o: \ + src/line-editing/lib_line_editing/toolz.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/toolz2.d b/42sh/objs/line-editing/lib_line_editing/toolz2.d new file mode 100644 index 00000000..c90c4b26 --- /dev/null +++ b/42sh/objs/line-editing/lib_line_editing/toolz2.d @@ -0,0 +1,11 @@ +objs/line-editing/lib_line_editing/toolz2.o: \ + src/line-editing/lib_line_editing/toolz2.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/toolz_parseur.d b/42sh/objs/line-editing/lib_line_editing/toolz_parseur.d new file mode 100644 index 00000000..f5546aa3 --- /dev/null +++ b/42sh/objs/line-editing/lib_line_editing/toolz_parseur.d @@ -0,0 +1,11 @@ +objs/line-editing/lib_line_editing/toolz_parseur.o: \ + src/line-editing/lib_line_editing/toolz_parseur.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/toolz_termcaps.d b/42sh/objs/line-editing/lib_line_editing/toolz_termcaps.d new file mode 100644 index 00000000..7b7a9634 --- /dev/null +++ b/42sh/objs/line-editing/lib_line_editing/toolz_termcaps.d @@ -0,0 +1,11 @@ +objs/line-editing/lib_line_editing/toolz_termcaps.o: \ + src/line-editing/lib_line_editing/toolz_termcaps.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/move_left_and_right.d b/42sh/objs/line-editing/move_left_and_right.d new file mode 100644 index 00000000..c9a30c9d --- /dev/null +++ b/42sh/objs/line-editing/move_left_and_right.d @@ -0,0 +1,11 @@ +objs/line-editing/move_left_and_right.o: \ + src/line-editing/move_left_and_right.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/move_to_word.d b/42sh/objs/line-editing/move_to_word.d new file mode 100644 index 00000000..f6a580d0 --- /dev/null +++ b/42sh/objs/line-editing/move_to_word.d @@ -0,0 +1,10 @@ +objs/line-editing/move_to_word.o: src/line-editing/move_to_word.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/move_up_and_down.d b/42sh/objs/line-editing/move_up_and_down.d new file mode 100644 index 00000000..ca251284 --- /dev/null +++ b/42sh/objs/line-editing/move_up_and_down.d @@ -0,0 +1,10 @@ +objs/line-editing/move_up_and_down.o: src/line-editing/move_up_and_down.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/print_and_del.d b/42sh/objs/line-editing/print_and_del.d new file mode 100644 index 00000000..ed044083 --- /dev/null +++ b/42sh/objs/line-editing/print_and_del.d @@ -0,0 +1,10 @@ +objs/line-editing/print_and_del.o: src/line-editing/print_and_del.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/queue.d b/42sh/objs/line-editing/queue.d new file mode 100644 index 00000000..a893ff9e --- /dev/null +++ b/42sh/objs/line-editing/queue.d @@ -0,0 +1,10 @@ +objs/line-editing/queue.o: src/line-editing/queue.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/line-editing/readline.d b/42sh/objs/line-editing/readline.d new file mode 100644 index 00000000..7b738413 --- /dev/null +++ b/42sh/objs/line-editing/readline.d @@ -0,0 +1,10 @@ +objs/line-editing/readline.o: src/line-editing/readline.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/main/data_exit.d b/42sh/objs/main/data_exit.d new file mode 100644 index 00000000..a1fac3c9 --- /dev/null +++ b/42sh/objs/main/data_exit.d @@ -0,0 +1,10 @@ +objs/main/data_exit.o: src/main/data_exit.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/main/data_init.d b/42sh/objs/main/data_init.d new file mode 100644 index 00000000..49e739da --- /dev/null +++ b/42sh/objs/main/data_init.d @@ -0,0 +1,10 @@ +objs/main/data_init.o: src/main/data_init.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/main/data_singleton.d b/42sh/objs/main/data_singleton.d new file mode 100644 index 00000000..9be60903 --- /dev/null +++ b/42sh/objs/main/data_singleton.d @@ -0,0 +1,10 @@ +objs/main/data_singleton.o: src/main/data_singleton.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/main/ft_putast.d b/42sh/objs/main/ft_putast.d new file mode 100644 index 00000000..d335f39b --- /dev/null +++ b/42sh/objs/main/ft_putast.d @@ -0,0 +1,10 @@ +objs/main/ft_putast.o: src/main/ft_putast.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/main/main.d b/42sh/objs/main/main.d new file mode 100644 index 00000000..5da61998 --- /dev/null +++ b/42sh/objs/main/main.d @@ -0,0 +1,10 @@ +objs/main/main.o: src/main/main.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/main/shell_exit.d b/42sh/objs/main/shell_exit.d new file mode 100644 index 00000000..0d304bf9 --- /dev/null +++ b/42sh/objs/main/shell_exit.d @@ -0,0 +1,10 @@ +objs/main/shell_exit.o: src/main/shell_exit.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/main/shell_get_avdata.d b/42sh/objs/main/shell_get_avdata.d new file mode 100644 index 00000000..489615e5 --- /dev/null +++ b/42sh/objs/main/shell_get_avdata.d @@ -0,0 +1,10 @@ +objs/main/shell_get_avdata.o: src/main/shell_get_avdata.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/main/shell_get_opts.d b/42sh/objs/main/shell_get_opts.d new file mode 100644 index 00000000..b5fe8d72 --- /dev/null +++ b/42sh/objs/main/shell_get_opts.d @@ -0,0 +1,10 @@ +objs/main/shell_get_opts.o: src/main/shell_get_opts.c \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/main/shell_init.d b/42sh/objs/main/shell_init.d new file mode 100644 index 00000000..bfb3d987 --- /dev/null +++ b/42sh/objs/main/shell_init.d @@ -0,0 +1,10 @@ +objs/main/shell_init.o: src/main/shell_init.c includes/minishell.h \ + libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ + libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ + libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/parser.h includes/ft_readline.h includes/ft_input.h \ + includes/exec.h includes/job_control.h includes/builtin.h \ + includes/builtin_read.h includes/glob.h includes/completion.h \ + includes/hash.h diff --git a/42sh/objs/parser/add_case.d b/42sh/objs/parser/add_case.d new file mode 100644 index 00000000..caa49d65 --- /dev/null +++ b/42sh/objs/parser/add_case.d @@ -0,0 +1,9 @@ +objs/parser/add_case.o: src/parser/add_case.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_cmd.d b/42sh/objs/parser/add_cmd.d new file mode 100644 index 00000000..69abecee --- /dev/null +++ b/42sh/objs/parser/add_cmd.d @@ -0,0 +1,9 @@ +objs/parser/add_cmd.o: src/parser/add_cmd.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_condition.d b/42sh/objs/parser/add_condition.d new file mode 100644 index 00000000..81f9912c --- /dev/null +++ b/42sh/objs/parser/add_condition.d @@ -0,0 +1,9 @@ +objs/parser/add_condition.o: src/parser/add_condition.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_file.d b/42sh/objs/parser/add_file.d new file mode 100644 index 00000000..956785ae --- /dev/null +++ b/42sh/objs/parser/add_file.d @@ -0,0 +1,9 @@ +objs/parser/add_file.o: src/parser/add_file.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_loop.d b/42sh/objs/parser/add_loop.d new file mode 100644 index 00000000..8aa90512 --- /dev/null +++ b/42sh/objs/parser/add_loop.d @@ -0,0 +1,9 @@ +objs/parser/add_loop.o: src/parser/add_loop.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_sep.d b/42sh/objs/parser/add_sep.d new file mode 100644 index 00000000..d28684c3 --- /dev/null +++ b/42sh/objs/parser/add_sep.d @@ -0,0 +1,9 @@ +objs/parser/add_sep.o: src/parser/add_sep.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_subshell.d b/42sh/objs/parser/add_subshell.d new file mode 100644 index 00000000..3c3dae01 --- /dev/null +++ b/42sh/objs/parser/add_subshell.d @@ -0,0 +1,9 @@ +objs/parser/add_subshell.o: src/parser/add_subshell.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/aggregate_sym.d b/42sh/objs/parser/aggregate_sym.d new file mode 100644 index 00000000..0963f76c --- /dev/null +++ b/42sh/objs/parser/aggregate_sym.d @@ -0,0 +1,9 @@ +objs/parser/aggregate_sym.o: src/parser/aggregate_sym.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/build_tree.d b/42sh/objs/parser/build_tree.d new file mode 100644 index 00000000..246fcb51 --- /dev/null +++ b/42sh/objs/parser/build_tree.d @@ -0,0 +1,9 @@ +objs/parser/build_tree.o: src/parser/build_tree.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/error_syntax.d b/42sh/objs/parser/error_syntax.d new file mode 100644 index 00000000..867dddf1 --- /dev/null +++ b/42sh/objs/parser/error_syntax.d @@ -0,0 +1,9 @@ +objs/parser/error_syntax.o: src/parser/error_syntax.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/eval_sym.d b/42sh/objs/parser/eval_sym.d new file mode 100644 index 00000000..deac8211 --- /dev/null +++ b/42sh/objs/parser/eval_sym.d @@ -0,0 +1,9 @@ +objs/parser/eval_sym.o: src/parser/eval_sym.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/ft_parse.d b/42sh/objs/parser/ft_parse.d new file mode 100644 index 00000000..a1bd3710 --- /dev/null +++ b/42sh/objs/parser/ft_parse.d @@ -0,0 +1,9 @@ +objs/parser/ft_parse.o: src/parser/ft_parse.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/parser_init.d b/42sh/objs/parser/parser_init.d new file mode 100644 index 00000000..3d2daa4e --- /dev/null +++ b/42sh/objs/parser/parser_init.d @@ -0,0 +1,9 @@ +objs/parser/parser_init.o: src/parser/parser_init.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/pop_stack.d b/42sh/objs/parser/pop_stack.d new file mode 100644 index 00000000..7fa094af --- /dev/null +++ b/42sh/objs/parser/pop_stack.d @@ -0,0 +1,9 @@ +objs/parser/pop_stack.o: src/parser/pop_stack.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/produce_sym.d b/42sh/objs/parser/produce_sym.d new file mode 100644 index 00000000..4f304113 --- /dev/null +++ b/42sh/objs/parser/produce_sym.d @@ -0,0 +1,9 @@ +objs/parser/produce_sym.o: src/parser/produce_sym.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/push_stack.d b/42sh/objs/parser/push_stack.d new file mode 100644 index 00000000..cb9ff706 --- /dev/null +++ b/42sh/objs/parser/push_stack.d @@ -0,0 +1,9 @@ +objs/parser/push_stack.o: src/parser/push_stack.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/read_stack.d b/42sh/objs/parser/read_stack.d new file mode 100644 index 00000000..bfa5ac37 --- /dev/null +++ b/42sh/objs/parser/read_stack.d @@ -0,0 +1,9 @@ +objs/parser/read_stack.o: src/parser/read_stack.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/tree_wrapper.d b/42sh/objs/parser/tree_wrapper.d new file mode 100644 index 00000000..1fc2ef3b --- /dev/null +++ b/42sh/objs/parser/tree_wrapper.d @@ -0,0 +1,9 @@ +objs/parser/tree_wrapper.o: src/parser/tree_wrapper.c includes/parser.h \ + includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ + libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ + libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ + libft/includes/get_next_line.h libft/includes/color.h \ + libft/includes/ft_sys.h includes/types.h includes/lexer.h \ + includes/ft_readline.h includes/ft_input.h includes/exec.h \ + includes/job_control.h includes/builtin.h includes/builtin_read.h \ + includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/sample/brace/brace_01.sh b/42sh/sample/brace/brace_01.sh new file mode 100644 index 00000000..54b84d56 --- /dev/null +++ b/42sh/sample/brace/brace_01.sh @@ -0,0 +1 @@ +{ ls | cat } diff --git a/42sh/sample/func/func01.sh b/42sh/sample/func/func01.sh index 579f9b0f..b3bc2ba1 100644 --- a/42sh/sample/func/func01.sh +++ b/42sh/sample/func/func01.sh @@ -1,4 +1,4 @@ hello() { ls | cat pwd ; cd -} +} diff --git a/42sh/src/glob/command_getoutput.c b/42sh/src/glob/command_getoutput.c index 00ef6581..fdf3dda4 100644 --- a/42sh/src/glob/command_getoutput.c +++ b/42sh/src/glob/command_getoutput.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/12 14:01:59 by jhalford #+# #+# */ -/* Updated: 2017/02/03 14:46:27 by ariard ### ########.fr */ +/* Updated: 2017/02/24 22:04:43 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/dir_glob.c b/42sh/src/glob/dir_glob.c index 8dc2d0da..f4be218d 100644 --- a/42sh/src/glob/dir_glob.c +++ b/42sh/src/glob/dir_glob.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/30 12:07:16 by wescande #+# #+# */ -/* Updated: 2017/02/07 19:48:12 by wescande ### ########.fr */ +/* Updated: 2017/02/24 22:04:49 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/esc_print.c b/42sh/src/glob/esc_print.c index 8938302d..44de1fb5 100644 --- a/42sh/src/glob/esc_print.c +++ b/42sh/src/glob/esc_print.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 15:38:14 by jhalford #+# #+# */ -/* Updated: 2017/02/20 18:49:02 by wescande ### ########.fr */ +/* Updated: 2017/02/24 22:05:04 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/expand_bquote.c b/42sh/src/glob/expand_bquote.c index d24e3892..7c7c0667 100644 --- a/42sh/src/glob/expand_bquote.c +++ b/42sh/src/glob/expand_bquote.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 17:47:53 by wescande #+# #+# */ -/* Updated: 2017/02/20 19:11:11 by wescande ### ########.fr */ +/* Updated: 2017/02/24 22:04:59 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/expand_brace.c b/42sh/src/glob/expand_brace.c index 13cacf4d..c0055817 100644 --- a/42sh/src/glob/expand_brace.c +++ b/42sh/src/glob/expand_brace.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/12 19:00:29 by wescande #+# #+# */ -/* Updated: 2017/02/20 18:54:19 by wescande ### ########.fr */ +/* Updated: 2017/02/24 22:05:14 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/expand_esc.c b/42sh/src/glob/expand_esc.c index 35777c6f..f66bf422 100644 --- a/42sh/src/glob/expand_esc.c +++ b/42sh/src/glob/expand_esc.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/31 23:18:56 by wescande #+# #+# */ -/* Updated: 2017/02/20 17:25:43 by wescande ### ########.fr */ +/* Updated: 2017/02/24 22:05:26 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/expand_var.c b/42sh/src/glob/expand_var.c index bcf85bc9..05c77e8a 100644 --- a/42sh/src/glob/expand_var.c +++ b/42sh/src/glob/expand_var.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/06 16:09:27 by wescande #+# #+# */ -/* Updated: 2017/02/20 18:56:50 by wescande ### ########.fr */ +/* Updated: 2017/02/24 22:05:34 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/ft_strsplit_esc.c b/42sh/src/glob/ft_strsplit_esc.c index f37c7b14..6e050cb7 100644 --- a/42sh/src/glob/ft_strsplit_esc.c +++ b/42sh/src/glob/ft_strsplit_esc.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/31 22:18:46 by wescande #+# #+# */ -/* Updated: 2017/01/31 23:15:17 by wescande ### ########.fr */ +/* Updated: 2017/02/24 22:05:41 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/ft_strsplit_spe.c b/42sh/src/glob/ft_strsplit_spe.c index 8c11de67..3d69627c 100644 --- a/42sh/src/glob/ft_strsplit_spe.c +++ b/42sh/src/glob/ft_strsplit_spe.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/31 20:49:30 by wescande #+# #+# */ -/* Updated: 2017/02/20 18:57:58 by wescande ### ########.fr */ +/* Updated: 2017/02/24 22:03:22 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/glob.c b/42sh/src/glob/glob.c index d5832efd..b25b86ec 100644 --- a/42sh/src/glob/glob.c +++ b/42sh/src/glob/glob.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/04 16:29:54 by wescande #+# #+# */ -/* Updated: 2017/02/20 19:04:44 by wescande ### ########.fr */ +/* Updated: 2017/02/24 22:05:48 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/glob/match_pattern.c b/42sh/src/glob/match_pattern.c index 536cb08c..d98fd7e2 100644 --- a/42sh/src/glob/match_pattern.c +++ b/42sh/src/glob/match_pattern.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/24 17:30:23 by wescande #+# #+# */ -/* Updated: 2017/02/20 14:00:41 by wescande ### ########.fr */ +/* Updated: 2017/02/24 22:06:01 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/get_state_global.c b/42sh/src/lexer/get_state_global.c index 72886e5c..78530edc 100644 --- a/42sh/src/lexer/get_state_global.c +++ b/42sh/src/lexer/get_state_global.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 20:39:06 by jhalford #+# #+# */ -/* Updated: 2017/02/24 20:45:37 by ariard ### ########.fr */ +/* Updated: 2017/02/24 21:39:47 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,6 +33,8 @@ t_lexstate get_state_global(t_lexer *lexer) return (BQUOTE); else if (c == '(' || c == ')') return (PAREN); + else if (c == '{' || c == '}') + return (CURLY_BRACKETS); else if (c == '=') return (ASSIGNEMENT_WORD); else if (c == 0) diff --git a/42sh/src/lexer/lexer_curly_brackets.c b/42sh/src/lexer/lexer_curly_brackets.c new file mode 100644 index 00000000..e63356d1 --- /dev/null +++ b/42sh/src/lexer/lexer_curly_brackets.c @@ -0,0 +1,46 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* lexer_curly_brackets.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ariard +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2017/02/24 21:24:50 by ariard #+# #+# */ +/* Updated: 2017/02/24 21:48:52 by ariard ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "parser.h" + +int lexer_curly_brackets(t_list **alst, t_lexer *lexer) +{ + t_token *token; + t_list **lst; + + DG("lexer curly brackets"); + lst = alst; + if (*alst) + { + token = (*alst)->content; + if (token->type) + lst = &(*alst)->next; + } + token = token_init(); + *lst = ft_lstnew(token, sizeof(*token)); + token = (*lst)->content; + if (lexer->str[lexer->pos] == '{') + { + DG("lbrace"); + token->type = TK_LBRACE; + push(&lexer->stack, CURLY_BRACKETS); + } + else if (lexer->stack && *(int*)lexer->stack->content == CURLY_BRACKETS) + { + DG("rbrace"); + token->type = TK_RBRACE; + pop(&lexer->stack); + } + lexer->pos++; + lexer->state = DEFAULT; + return (lexer_lex(&(*lst)->next, lexer)); +} diff --git a/42sh/src/lexer/lexer_lex.c b/42sh/src/lexer/lexer_lex.c index 0bb7ebca..27535a56 100644 --- a/42sh/src/lexer/lexer_lex.c +++ b/42sh/src/lexer/lexer_lex.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:08:51 by jhalford #+# #+# */ -/* Updated: 2017/02/24 20:51:04 by ariard ### ########.fr */ +/* Updated: 2017/02/24 21:38:42 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,6 +31,7 @@ int (*g_lexer[])(t_list **alst, t_lexer *lexer) = &lexer_bquote, &lexer_backslash, &lexer_paren, + &lexer_curly_brackets, &lexer_assignement_word, &lexer_comment, &lexer_end, diff --git a/42sh/src/lexer/token_print.c b/42sh/src/lexer/token_print.c index d4f1f901..0c2ca145 100644 --- a/42sh/src/lexer/token_print.c +++ b/42sh/src/lexer/token_print.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/28 14:39:01 by jhalford #+# #+# */ -/* Updated: 2017/02/21 22:20:00 by ariard ### ########.fr */ +/* Updated: 2017/02/24 21:48:47 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,9 +18,11 @@ void token_print(t_list *lst) while (lst) { - - token = lst->content; - DG("token : %s data [%s]\n", read_state(token->type), token->data); + DG("token print"); + if (lst->content) + token = lst->content; + if (token->type) + DG("token : %s data [%s]\n", read_state(token->type), token->data); lst = lst->next; } } diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index bfe103c2..ec5af014 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/02/24 20:58:33 by ariard ### ########.fr */ +/* Updated: 2017/02/24 21:48:51 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -45,7 +45,7 @@ int handle_instruction(int fd) if (lexer_lex(token ? <oken : &token, &lexer)) return (1); if (get_lexer_stack(lexer)) - continue ; + continue ; lexer.state = DEFAULT; token_print(token); if (get_reserved_words(&token)) diff --git a/42sh/src/parser/add_subshell.c b/42sh/src/parser/add_subshell.c index b42b8fad..3341234e 100644 --- a/42sh/src/parser/add_subshell.c +++ b/42sh/src/parser/add_subshell.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/24 18:41:50 by ariard #+# #+# */ -/* Updated: 2017/02/24 19:16:06 by ariard ### ########.fr */ +/* Updated: 2017/02/24 23:15:24 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,6 +25,8 @@ int issubshell(t_btree **ast, t_list **lst) node = (*ast)->item; if (node->type == SUBSHELL && node->full == 0) return (1); + if (node->type == TK_LBRACE && node->full == 0) + return (1); } return (0); } @@ -39,6 +41,8 @@ int add_subshell_cmd(t_btree **ast, t_list **lst) node = (*ast)->item; if (token->type == TK_PAREN_CLOSE && node->type == SUBSHELL) return ((node->full = 1)); + if (token->type == TK_RBRACE && node->type == TK_LBRACE) + return ((node->full = 1)); return (add_cmd(&(*ast)->right, lst)); } diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index d97e3261..84a5c5cc 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:39:18 by ariard #+# #+# */ -/* Updated: 2017/02/24 18:25:45 by ariard ### ########.fr */ +/* Updated: 2017/02/24 23:16:29 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,6 +22,7 @@ t_aggrematch g_aggrematch[] = {TK_DSEMI, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE, PIPE_SEMI_SEQUENCE}, {TK_PAREN_OPEN, TK_IN, PATTERN_CASE, 0}, {TK_PAREN_OPEN, CASE_LIST_NS, PATTERN_CASE, 0}, + {TK_PAREN_OPEN, CMD_SUPERIOR, FUNC_NAME, CMD_SUPERIOR}, {TK_ASSIGNEMENT_WORD, CMD_PREFIX,CMD_PREFIX, 0}, {TK_PIPE, CMD_SUPERIOR, SIMPLE_COMMAND, CMD_SUPERIOR}, {TK_FI, ELSE_PART, IF_CLAUSE, TK_IF}, @@ -39,6 +40,9 @@ t_aggrematch g_aggrematch[] = {TK_PAREN_CLOSE, CMD_SUPERIOR, SUBSHELL, TK_PAREN_OPEN}, {TK_PAREN_CLOSE, PIPE_SEMI_SEQUENCE, SUBSHELL, TK_PAREN_OPEN}, + {TK_RBRACE, COMPOUND_LIST, BRACE_CLAUSE, TK_LBRACE}, + {TK_RBRACE, CMD_SUPERIOR, BRACE_CLAUSE, TK_LBRACE}, + {TK_RBRACE, PIPE_SEMI_SEQUENCE, BRACE_CLAUSE, TK_LBRACE}, {TK_AND_IF, CMD_SUPERIOR, AND_OR_MINOR, CMD_SUPERIOR}, {TK_OR_IF, CMD_SUPERIOR, AND_OR_MINOR, CMD_SUPERIOR}, //watch this @@ -111,6 +115,7 @@ t_aggrematch g_aggrematch[] = {IO_REDIRECT, CMD_PREFIX, CMD_PREFIX, CMD_PREFIX}, {IO_REDIRECT, LINEBREAK, CMD_PREFIX, 0}, {IO_REDIRECT, TK_PAREN_OPEN, CMD_PREFIX, 0}, + {IO_REDIRECT, TK_LBRACE, CMD_PREFIX, 0}, {IO_REDIRECT, COMPLETE_COMMANDS, CMD_PREFIX, 0}, {IO_REDIRECT, TK_BANG, CMD_PREFIX, 0}, {IO_REDIRECT, SEPARATOR_OP, CMD_PREFIX, 0}, @@ -122,6 +127,7 @@ t_aggrematch g_aggrematch[] = //to abstract {CMD_PREFIX, LINEBREAK, SIMPLE_COMMAND, 0}, {CMD_PREFIX, TK_PAREN_OPEN, SIMPLE_COMMAND, 0}, + {CMD_PREFIX, TK_LBRACE, SIMPLE_COMMAND, 0}, {CMD_PREFIX, COMPLETE_COMMANDS, SIMPLE_COMMAND, 0}, {CMD_PREFIX, TK_BANG, SIMPLE_COMMAND, 0}, {CMD_PREFIX, SEPARATOR_OP, SIMPLE_COMMAND, 0}, @@ -131,6 +137,7 @@ t_aggrematch g_aggrematch[] = //to check {CMD_NAME, LINEBREAK, CMD_SUPERIOR, 0}, {CMD_NAME, TK_PAREN_OPEN, CMD_SUPERIOR, 0}, + {CMD_NAME, TK_LBRACE, CMD_SUPERIOR, 0}, {CMD_NAME, COMPLETE_COMMANDS, CMD_SUPERIOR, 0}, {CMD_NAME, TK_BANG, CMD_SUPERIOR, 0}, {CMD_NAME, SEPARATOR_OP, CMD_SUPERIOR, 0}, @@ -171,16 +178,20 @@ t_aggrematch g_aggrematch[] = // {COMPOUND_LIST, TK_ELSE, ELSE_PART, TK_ELSE}, {COMPOUND_LIST, TK_IF, CONDITION, TK_IF}, {COMPOUND_LIST, TK_THEN, CONDITION, TK_THEN}, - {COMPOUND_LIST, TK_PAREN_CLOSE, CASE_LIST_NS, PATTERN_CASE}, + {COMPOUND_LIST, TK_PAREN_CLOSE, CLOSE_LIST, TK_PAREN_CLOSE}, {COMPOUND_LIST, COMPLETE_CONDITION, COMPLETE_CONDITION, COMPLETE_CONDITION}, // {COMPOUND_LIST, TK_THEN, ELSE_PART, TK_ELIF}, {COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST}, {COMPOUND_LIST, CASE_LIST_NS, CASE_LIST_NS, CASE_LIST_NS}, + {CLOSE_LIST, PATTERN, CASE_LIST_NS, PATTERN_CASE}, + {CLOSE_LIST, FUNC_NAME, FUNCTION_DEFINITION, FUNC_NAME}, {SUBSHELL, ALL, COMPOUND_COMMAND, 0}, + {BRACE_CLAUSE, ALL, COMPOUND_COMMAND, 0}, {COMPOUND_COMMAND, ALL, COMMAND, 0}, {AND_OR_MINOR, PIPE_SEMI_SEQUENCE, AND_OR_MAJOR, PIPE_SEMI_SEQUENCE}, {AND_OR_MINOR, LINEBREAK, AND_OR_MAJOR, 0}, {AND_OR_MINOR, TK_PAREN_OPEN, AND_OR_MAJOR, 0}, + {AND_OR_MINOR, TK_LBRACE, AND_OR_MAJOR, 0}, {AND_OR_MINOR, COMPLETE_COMMANDS, AND_OR_MAJOR, 0}, {AND_OR_MINOR, AND_OR_MAJOR, AND_OR_MAJOR, 0}, {COMMAND, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE}, @@ -199,6 +210,7 @@ t_aggrematch g_aggrematch[] = {COMMAND, NEWLINE_LIST, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, LINEBREAK, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, TK_PAREN_OPEN, PIPE_SEMI_SEQUENCE, 0}, + {COMMAND, TK_LBRACE, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, COMPLETE_COMMANDS, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, AND_OR_MAJOR, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, COMPLETE_CONDITION, PIPE_SEMI_SEQUENCE, 0}, @@ -209,6 +221,7 @@ t_aggrematch g_aggrematch[] = {END_COMMAND, TK_UNTIL, PIPE_SEQUENCE, 0}, {END_COMMAND, LINEBREAK, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_PAREN_OPEN, PIPE_SEQUENCE, 0}, + {END_COMMAND, TK_LBRACE, PIPE_SEQUENCE, 0}, {END_COMMAND, COMPLETE_COMMANDS, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_DO, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_PAREN_CLOSE, PIPE_SEQUENCE, 0}, @@ -226,6 +239,7 @@ t_aggrematch g_aggrematch[] = {PIPE_SEQUENCE, NEWLINE_LIST, PIPELINE, 0}, {PIPE_SEQUENCE, LINEBREAK, PIPELINE, 0}, {PIPE_SEQUENCE, TK_PAREN_OPEN, PIPELINE, 0}, + {PIPE_SEQUENCE, TK_LBRACE, PIPELINE, 0}, {PIPE_SEQUENCE, COMPLETE_COMMANDS, PIPELINE, 0}, {PIPE_SEQUENCE, AND_OR_MAJOR, PIPELINE, 0}, {PIPE_SEQUENCE, TK_DO, PIPELINE, 0}, @@ -250,6 +264,7 @@ t_aggrematch g_aggrematch[] = {PIPELINE, CASE_LIST_NS, AND_OR, 0}, {PIPELINE, LINEBREAK, AND_OR, 0}, {PIPELINE, TK_PAREN_OPEN, AND_OR, 0}, + {PIPELINE, TK_LBRACE, AND_OR, 0}, {PIPELINE, COMPLETE_COMMANDS, AND_OR, 0}, // {PIPELINE, LINEBREAK, AND_OR, AND_OR}, {PIPELINE, SEPARATOR_OP, AND_OR, 0}, @@ -265,20 +280,20 @@ t_aggrematch g_aggrematch[] = {AND_OR, TK_THEN, COMPOUND_LIST, 0}, {AND_OR, TK_ELSE, COMPOUND_LIST, 0}, {AND_OR, COMPOUND_LIST, COMPOUND_LIST, 0}, + {AND_OR, TK_PAREN_OPEN, COMPOUND_LIST, 0}, + {AND_OR, TK_LBRACE, COMPOUND_LIST, 0}, {AND_OR, CASE_LIST_NS, CASE_LIST_NS, 0}, {AND_OR, COMPLETE_CONDITION, COMPOUND_LIST, 0}, {AND_OR, SEPARATOR_OP, LIST, LIST}, {AND_OR, NEWLINE_LIST, LIST, 0}, {AND_OR, LINEBREAK, LIST, 0}, - {AND_OR, TK_PAREN_OPEN, LIST, 0}, + {AND_OR, TK_LBRACE, LIST, 0}, {AND_OR, COMPLETE_COMMANDS, LIST, 0}, {LIST, NEWLINE_LIST, COMPLETE_COMMAND, 0}, {LIST, LINEBREAK, COMPLETE_COMMAND, 0}, - {LIST, TK_PAREN_OPEN, LIST, 0}, {LIST, COMPLETE_COMMANDS, COMPLETE_COMMAND, 0}, {COMPLETE_COMMAND, NEWLINE_LIST, COMPLETE_COMMANDS, COMPLETE_COMMANDS}, {COMPLETE_COMMAND, LINEBREAK, COMPLETE_COMMANDS, 0}, - {COMPLETE_COMMAND, TK_PAREN_OPEN, COMPLETE_COMMANDS, 0}, {COMPLETE_COMMAND, COMPLETE_COMMANDS, COMPLETE_COMMANDS, 0}, {COMPLETE_COMMANDS, COMPLETE_COMMANDS, COMPLETE_COMMANDS, COMPLETE_COMMANDS}, {0, 0, 0, 0}, diff --git a/42sh/src/parser/build_tree.c b/42sh/src/parser/build_tree.c index 78c77692..9fdcc75c 100644 --- a/42sh/src/parser/build_tree.c +++ b/42sh/src/parser/build_tree.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:32:59 by ariard #+# #+# */ -/* Updated: 2017/02/24 20:59:49 by ariard ### ########.fr */ +/* Updated: 2017/02/24 23:14:00 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/eval_sym.c b/42sh/src/parser/eval_sym.c index eac28ec2..4c0fc578 100644 --- a/42sh/src/parser/eval_sym.c +++ b/42sh/src/parser/eval_sym.c @@ -19,6 +19,7 @@ t_stackmatch g_stackmatch[] = {TK_WORD, WORDLIST}, {TK_WORD, LINEBREAK}, {TK_WORD, TK_PAREN_OPEN}, + {TK_WORD, TK_LBRACE}, {TK_WORD, COMPLETE_COMMANDS}, {TK_WORD, TK_IN}, {TK_WORD, FOR_WORDLIST}, @@ -30,6 +31,7 @@ t_stackmatch g_stackmatch[] = {TK_IO_NUMBER, CMD_WORD}, {TK_IO_NUMBER, LINEBREAK}, {TK_IO_NUMBER, TK_PAREN_OPEN}, + {TK_IO_NUMBER, TK_LBRACE}, {TK_IO_NUMBER, COMPLETE_COMMANDS}, {TK_IO_NUMBER, TK_BANG}, {TK_IO_NUMBER, SEPARATOR_OP}, @@ -55,6 +57,7 @@ t_stackmatch g_stackmatch[] = {TK_LESS, CMD_NAME}, {TK_LESS, LINEBREAK}, {TK_LESS, TK_PAREN_OPEN}, + {TK_LESS, TK_LBRACE}, {TK_LESS, COMPLETE_COMMANDS}, {TK_LESS, TK_BANG}, {TK_LESS, SEPARATOR_OP}, @@ -70,6 +73,7 @@ t_stackmatch g_stackmatch[] = {TK_GREAT, CMD_NAME}, {TK_GREAT, LINEBREAK}, {TK_GREAT, TK_PAREN_OPEN}, + {TK_GREAT, TK_LBRACE}, {TK_GREAT, COMPLETE_COMMANDS}, {TK_GREAT, TK_BANG}, {TK_GREAT, SEPARATOR_OP}, @@ -87,6 +91,7 @@ t_stackmatch g_stackmatch[] = {TK_DLESS, CMD_NAME}, {TK_DLESS, LINEBREAK}, {TK_DLESS, TK_PAREN_OPEN}, + {TK_DLESS, TK_LBRACE}, {TK_DLESS, COMPLETE_COMMANDS}, {TK_DLESS, TK_BANG}, {TK_DLESS, SEPARATOR_OP}, @@ -103,6 +108,7 @@ t_stackmatch g_stackmatch[] = {TK_DLESSDASH, CMD_NAME}, {TK_DLESSDASH, LINEBREAK}, {TK_DLESSDASH, TK_PAREN_OPEN}, + {TK_DLESSDASH, TK_LBRACE}, {TK_DLESSDASH, COMPLETE_COMMANDS}, {TK_DLESSDASH, TK_BANG}, {TK_DLESSDASH, TK_BANG}, @@ -120,6 +126,7 @@ t_stackmatch g_stackmatch[] = {TK_DGREAT, CMD_NAME}, {TK_DGREAT, LINEBREAK}, {TK_DGREAT, TK_PAREN_OPEN}, + {TK_DGREAT, TK_LBRACE}, {TK_DGREAT, COMPLETE_COMMANDS}, {TK_DGREAT, TK_BANG}, {TK_DGREAT, TK_BANG}, @@ -137,6 +144,7 @@ t_stackmatch g_stackmatch[] = {TK_LESSAND, CMD_NAME}, {TK_LESSAND, LINEBREAK}, {TK_LESSAND, TK_PAREN_OPEN}, + {TK_LESSAND, TK_LBRACE}, {TK_LESSAND, COMPLETE_COMMANDS}, {TK_LESSAND, TK_BANG}, {TK_LESSAND, TK_BANG}, @@ -154,6 +162,7 @@ t_stackmatch g_stackmatch[] = {TK_GREATAND, CMD_NAME}, {TK_GREATAND, LINEBREAK}, {TK_GREATAND, TK_PAREN_OPEN}, + {TK_GREATAND, TK_LBRACE}, {TK_GREATAND, COMPLETE_COMMANDS}, {TK_LESSAND, TK_BANG}, {TK_GREATAND, TK_BANG}, @@ -171,6 +180,7 @@ t_stackmatch g_stackmatch[] = {TK_LESSGREAT, CMD_NAME}, {TK_LESSGREAT, LINEBREAK}, {TK_LESSGREAT, TK_PAREN_OPEN}, + {TK_LESSGREAT, TK_LBRACE}, {TK_LESSGREAT, COMPLETE_COMMANDS}, {TK_LESSGREAT, TK_BANG}, {TK_LESSGREAT, TK_BANG}, @@ -188,6 +198,7 @@ t_stackmatch g_stackmatch[] = {TK_CLOBBER, CMD_NAME}, {TK_CLOBBER, LINEBREAK}, {TK_CLOBBER, TK_PAREN_OPEN}, + {TK_CLOBBER, TK_LBRACE}, {TK_CLOBBER, COMPLETE_COMMANDS}, {TK_CLOBBER, TK_BANG}, {TK_CLOBBER, TK_BANG}, @@ -199,6 +210,7 @@ t_stackmatch g_stackmatch[] = {TK_IF, LINEBREAK}, {TK_IF, TK_PAREN_OPEN}, + {TK_IF, TK_LBRACE}, {TK_IF, TK_PAREN_CLOSE}, {TK_IF, COMPLETE_COMMANDS}, {TK_IF, TK_BANG}, @@ -239,6 +251,7 @@ t_stackmatch g_stackmatch[] = {TK_DONE, END_COMMAND}, {TK_CASE, LINEBREAK}, {TK_CASE, TK_PAREN_OPEN}, + {TK_CASE, TK_LBRACE}, {TK_CASE, COMPLETE_COMMANDS}, {TK_CASE, TK_BANG}, {TK_CASE, TK_DO}, @@ -262,6 +275,7 @@ t_stackmatch g_stackmatch[] = {TK_ESAC, TK_IN}, {TK_WHILE, LINEBREAK}, {TK_WHILE, TK_PAREN_OPEN}, + {TK_WHILE, TK_LBRACE}, {TK_WHILE, COMPLETE_COMMANDS}, {TK_WHILE, TK_BANG}, {TK_WHILE, SEPARATOR_OP}, @@ -280,6 +294,7 @@ t_stackmatch g_stackmatch[] = {TK_WHILE, COMPLETE_CONDITION}, {TK_UNTIL, LINEBREAK}, {TK_UNTIL, TK_PAREN_OPEN}, + {TK_UNTIL, TK_LBRACE}, {TK_UNTIL, COMPLETE_COMMANDS}, {TK_UNTIL, TK_BANG}, {TK_UNTIL, SEPARATOR_OP}, @@ -298,6 +313,7 @@ t_stackmatch g_stackmatch[] = {TK_UNTIL, COMPLETE_CONDITION}, {TK_FOR, LINEBREAK}, {TK_FOR, TK_PAREN_OPEN}, + {TK_FOR, TK_LBRACE}, {TK_FOR, COMPLETE_COMMANDS}, {TK_FOR, TK_BANG}, {TK_FOR, TK_BANG}, @@ -315,17 +331,51 @@ t_stackmatch g_stackmatch[] = {TK_FOR, TK_ELSE}, {TK_FOR, TK_PAREN_CLOSE}, {TK_FOR, COMPLETE_CONDITION}, - {TK_LBRACE, LINEBREAK}, - {TK_LBRACE, TK_PAREN_OPEN}, {TK_LBRACE, COMPLETE_COMMANDS}, + {TK_LBRACE, LINEBREAK}, + {TK_LBRACE, TK_LBRACE}, {TK_LBRACE, TK_BANG}, {TK_LBRACE, SEPARATOR_OP}, {TK_LBRACE, NEWLINE_LIST}, {TK_LBRACE, PIPE_SEMI_SEQUENCE}, - {TK_RBRACE, COMPOUND_LIST}, + {TK_LBRACE, AND_OR_MAJOR}, + {TK_LBRACE, TK_WHILE}, + {TK_LBRACE, TK_UNTIL}, + {TK_LBRACE, TK_DO}, + {TK_LBRACE, TK_PAREN_CLOSE}, + {TK_LBRACE, TK_LBRACE}, + {TK_LBRACE, TK_IF}, + {TK_LBRACE, TK_ELIF}, + {TK_LBRACE, TK_THEN}, + {TK_LBRACE, TK_ELSE}, + {TK_LBRACE, COMPOUND_LIST}, + {TK_LBRACE, CASE_LIST_NS}, + {TK_LBRACE, COMPLETE_CONDITION}, + {TK_LBRACE, TK_IN}, + {SEQUENTIAL_SEP, NAME}, + {TK_RBRACE, TK_SEMI}, + {TK_RBRACE, END_COMMAND}, + {TK_RBRACE, SEPARATOR_OP}, + {TK_RBRACE, WORD}, + {TK_RBRACE, IN}, + {TK_RBRACE, TK_AND_IF}, + {TK_RBRACE, TK_OR_IF}, + {TK_RBRACE, TK_PIPE}, + {TK_RBRACE, TK_RBRACE}, + {TK_RBRACE, COMPLETE_COMMANDS}, + {TK_RBRACE, CMD_SUPERIOR}, + {TK_RBRACE, PIPE_SEMI_SEQUENCE}, {TK_RBRACE, CASE_LIST_NS}, + {TK_RBRACE, PROGRAM}, + {TK_RBRACE, TK_PAREN_OPEN}, + {TK_RBRACE, TK_LBRACE}, + {TK_RBRACE, PATTERN_CASE}, + {TK_RBRACE, PATTERN}, + {TK_RBRACE, COMPOUND_LIST}, + {TK_RBRACE, FUNC_NAME}, {TK_BANG, LINEBREAK}, {TK_BANG, TK_PAREN_OPEN}, + {TK_BANG, TK_LBRACE}, {TK_BANG, COMPLETE_COMMANDS}, {TK_BANG, SEPARATOR_OP}, {TK_BANG, SEPARATOR_OP}, @@ -357,7 +407,6 @@ t_stackmatch g_stackmatch[] = {TK_PAREN_OPEN, TK_UNTIL}, {TK_PAREN_OPEN, TK_DO}, {TK_PAREN_OPEN, TK_PAREN_CLOSE}, - {TK_PAREN_OPEN, TK_PAREN_OPEN}, {TK_PAREN_OPEN, TK_IF}, {TK_PAREN_OPEN, TK_ELIF}, {TK_PAREN_OPEN, TK_THEN}, @@ -366,6 +415,7 @@ t_stackmatch g_stackmatch[] = {TK_PAREN_OPEN, CASE_LIST_NS}, {TK_PAREN_OPEN, COMPLETE_CONDITION}, {TK_PAREN_OPEN, TK_IN}, + {TK_PAREN_OPEN, CMD_SUPERIOR}, {SEQUENTIAL_SEP, NAME}, {SEQUENTIAL_SEP, IN}, {SEQUENTIAL_SEP, WORDLIST}, @@ -382,6 +432,7 @@ t_stackmatch g_stackmatch[] = {END_COMMAND, TK_ELSE}, {END_COMMAND, LINEBREAK}, {END_COMMAND, TK_PAREN_OPEN}, + {END_COMMAND, TK_LBRACE}, {END_COMMAND, COMPLETE_COMMANDS}, {END_COMMAND, COMPOUND_LIST}, {END_COMMAND, CASE_LIST_NS}, @@ -414,6 +465,7 @@ t_stackmatch g_stackmatch[] = {LINEBREAK, CASE_LIST_NS}, {LINEBREAK, PROGRAM}, {LINEBREAK, TK_PAREN_OPEN}, + {LINEBREAK, TK_LBRACE}, {TK_PAREN_CLOSE, TK_SEMI}, {TK_PAREN_CLOSE, END_COMMAND}, {TK_PAREN_CLOSE, SEPARATOR_OP}, @@ -429,9 +481,11 @@ t_stackmatch g_stackmatch[] = {TK_PAREN_CLOSE, CASE_LIST_NS}, {TK_PAREN_CLOSE, PROGRAM}, {TK_PAREN_CLOSE, TK_PAREN_OPEN}, + {TK_PAREN_CLOSE, TK_LBRACE}, {TK_PAREN_CLOSE, PATTERN_CASE}, {TK_PAREN_CLOSE, PATTERN}, {TK_PAREN_CLOSE, COMPOUND_LIST}, + {TK_PAREN_CLOSE, FUNC_NAME}, {NEWLINE_LIST, TK_DO}, {NEWLINE_LIST, CASE_LIST_NS}, {NEWLINE_LIST, TK_PAREN_CLOSE}, @@ -457,6 +511,7 @@ t_stackmatch g_stackmatch[] = {NEWLINE_LIST, CONDITION}, {NEWLINE_LIST, LINEBREAK}, {NEWLINE_LIST, TK_PAREN_OPEN}, + {NEWLINE_LIST, TK_LBRACE}, {HERE_END, TK_DLESS}, {HERE_END, TK_DLESS}, {HERE_END, TK_DLESSDASH}, @@ -469,6 +524,7 @@ t_stackmatch g_stackmatch[] = {IO_HERE, CMD_NAME}, {IO_HERE, LINEBREAK}, {IO_HERE, TK_PAREN_OPEN}, + {IO_HERE, TK_LBRACE}, {IO_HERE, COMPLETE_COMMANDS}, {IO_HERE, TK_BANG}, {IO_HERE, TK_BANG}, @@ -504,6 +560,7 @@ t_stackmatch g_stackmatch[] = {IO_REDIRECT, CMD_NAME}, {IO_REDIRECT, LINEBREAK}, {IO_REDIRECT, TK_PAREN_OPEN}, + {IO_REDIRECT, TK_LBRACE}, {IO_REDIRECT, COMPLETE_COMMANDS}, {IO_REDIRECT, TK_BANG}, {IO_REDIRECT, TK_BANG}, @@ -516,6 +573,7 @@ t_stackmatch g_stackmatch[] = {CMD_SUFFIX, CMD_SUPERIOR}, {CMD_PREFIX, LINEBREAK}, {CMD_PREFIX, TK_PAREN_OPEN}, + {CMD_PREFIX, TK_LBRACE}, {CMD_PREFIX, COMPLETE_COMMANDS}, {CMD_PREFIX, TK_BANG}, {CMD_PREFIX, TK_BANG}, @@ -526,6 +584,7 @@ t_stackmatch g_stackmatch[] = {CMD_NAME, COMPLETE_COMMANDS}, {CMD_NAME, LINEBREAK}, {CMD_NAME, TK_PAREN_OPEN}, + {CMD_NAME, TK_LBRACE}, {CMD_NAME, TK_BANG}, {CMD_NAME, TK_BANG}, {CMD_NAME, SEPARATOR_OP}, @@ -536,7 +595,6 @@ t_stackmatch g_stackmatch[] = {CMD_NAME, TK_UNTIL}, {CMD_NAME, TK_DO}, {CMD_NAME, TK_PAREN_CLOSE}, - {CMD_NAME, TK_PAREN_OPEN}, {CMD_NAME, TK_IF}, {CMD_NAME, TK_ELIF}, {CMD_NAME, TK_THEN}, @@ -558,6 +616,7 @@ t_stackmatch g_stackmatch[] = {CMD_SUPERIOR, COMPLETE_CONDITION}, {CMD_SUPERIOR, LINEBREAK}, {CMD_SUPERIOR, TK_PAREN_OPEN}, + {CMD_SUPERIOR, TK_LBRACE}, {CMD_SUPERIOR, COMPLETE_COMMANDS}, {CMD_SUPERIOR, TK_BANG}, {CMD_SUPERIOR, TK_BANG}, @@ -580,6 +639,7 @@ t_stackmatch g_stackmatch[] = {SIMPLE_COMMAND, COMPLETE_CONDITION}, {SIMPLE_COMMAND, LINEBREAK}, {SIMPLE_COMMAND, TK_PAREN_OPEN}, + {SIMPLE_COMMAND, TK_LBRACE}, {SIMPLE_COMMAND, COMPLETE_COMMANDS}, {SIMPLE_COMMAND, TK_BANG}, {SIMPLE_COMMAND, TK_BANG}, @@ -595,17 +655,20 @@ t_stackmatch g_stackmatch[] = {LOOP, TK_UNTIL}, {CONDITION, LINEBREAK}, {CONDITION, TK_PAREN_OPEN}, + {CONDITION, TK_LBRACE}, {CONDITION, COMPLETE_COMMANDS}, {CONDITION, COMPOUND_LIST}, {CONDITION, CASE_LIST_NS}, {CONDITION, COMPLETE_CONDITION}, {COMPLETE_CONDITION, LINEBREAK}, {COMPLETE_CONDITION, TK_PAREN_OPEN}, + {COMPLETE_CONDITION, TK_LBRACE}, {COMPLETE_CONDITION, COMPLETE_COMMANDS}, {COMPLETE_CONDITION, COMPLETE_CONDITION}, {COMPLETE_CONDITION, COMPLETE_CONDITION}, {BRACE_GROUP, LINEBREAK}, {BRACE_GROUP, TK_PAREN_OPEN}, + {BRACE_GROUP, TK_LBRACE}, {BRACE_GROUP, COMPLETE_COMMANDS}, {BRACE_GROUP, TK_BANG}, {BRACE_GROUP, TK_BANG}, @@ -614,6 +677,7 @@ t_stackmatch g_stackmatch[] = {BRACE_GROUP, PIPE_SEMI_SEQUENCE}, {FNAME, LINEBREAK}, {FNAME, TK_PAREN_OPEN}, + {FNAME, TK_LBRACE}, {FNAME, COMPLETE_COMMANDS}, {FNAME, TK_BANG}, {FNAME, TK_BANG}, @@ -623,6 +687,7 @@ t_stackmatch g_stackmatch[] = {FUNCTION_BODY, FUNC}, {FUNCTION_DEFINITION, LINEBREAK}, {FUNCTION_DEFINITION, TK_PAREN_OPEN}, + {FUNCTION_DEFINITION, TK_LBRACE}, {FUNCTION_DEFINITION, COMPLETE_COMMANDS}, {FUNCTION_DEFINITION, TK_BANG}, {FUNCTION_DEFINITION, TK_BANG}, @@ -631,6 +696,7 @@ t_stackmatch g_stackmatch[] = {FUNCTION_DEFINITION, PIPE_SEMI_SEQUENCE}, {UNTIL_CLAUSE, LINEBREAK}, {UNTIL_CLAUSE, TK_PAREN_OPEN}, + {UNTIL_CLAUSE, TK_LBRACE}, {UNTIL_CLAUSE, COMPLETE_COMMANDS}, {UNTIL_CLAUSE, TK_BANG}, {UNTIL_CLAUSE, SEPARATOR_OP}, @@ -649,7 +715,6 @@ t_stackmatch g_stackmatch[] = {UNTIL_CLAUSE, COMPLETE_CONDITION}, {UNTIL_CLAUSE, AND_OR_MAJOR}, {WHILE_CLAUSE, LINEBREAK}, - {WHILE_CLAUSE, TK_PAREN_OPEN}, {WHILE_CLAUSE, COMPLETE_COMMANDS}, {WHILE_CLAUSE, TK_BANG}, {WHILE_CLAUSE, SEPARATOR_OP}, @@ -671,6 +736,7 @@ t_stackmatch g_stackmatch[] = // {ELSE_PART, COMPLETE_CONDITION}, {IF_CLAUSE, LINEBREAK}, {IF_CLAUSE, TK_PAREN_OPEN}, + {IF_CLAUSE, TK_LBRACE}, {IF_CLAUSE, COMPLETE_COMMANDS}, {IF_CLAUSE, TK_BANG}, {IF_CLAUSE, SEPARATOR_OP}, @@ -689,13 +755,34 @@ t_stackmatch g_stackmatch[] = {IF_CLAUSE, COMPLETE_COMMAND}, {IF_CLAUSE, COMPLETE_CONDITION}, {IF_CLAUSE, AND_OR_MAJOR}, - + {BRACE_CLAUSE, LINEBREAK}, + {BRACE_CLAUSE, TK_PAREN_OPEN}, + {BRACE_CLAUSE, TK_LBRACE}, + {BRACE_CLAUSE, COMPLETE_COMMANDS}, + {BRACE_CLAUSE, TK_BANG}, + {BRACE_CLAUSE, SEPARATOR_OP}, + {BRACE_CLAUSE, NEWLINE_LIST}, + {BRACE_CLAUSE, PIPE_SEMI_SEQUENCE}, + {BRACE_CLAUSE, TK_DO}, + {BRACE_CLAUSE, TK_PAREN_CLOSE}, + {BRACE_CLAUSE, TK_WHILE}, + {BRACE_CLAUSE, TK_UNTIL}, + {BRACE_CLAUSE, TK_IF}, + {BRACE_CLAUSE, TK_ELIF}, + {BRACE_CLAUSE, TK_THEN}, + {BRACE_CLAUSE, TK_ELSE}, + {BRACE_CLAUSE, COMPOUND_LIST}, + {BRACE_CLAUSE, CASE_LIST_NS}, + {BRACE_CLAUSE, COMPLETE_COMMAND}, + {BRACE_CLAUSE, COMPLETE_CONDITION}, + {BRACE_CLAUSE, AND_OR_MAJOR}, {PATTERN, PATTERN_CASE}, {PATTERN, CASE_LIST}, {PATTERN, TK_IN}, {CASE_LIST_NS, LINEBREAK}, {CASE_CLAUSE, LINEBREAK}, {CASE_CLAUSE, TK_PAREN_OPEN}, + {CASE_CLAUSE, TK_LBRACE}, {CASE_CLAUSE, COMPLETE_COMMANDS}, {CASE_CLAUSE, TK_BANG}, {CASE_CLAUSE, SEPARATOR_OP}, @@ -721,6 +808,7 @@ t_stackmatch g_stackmatch[] = {FOR_WORDLIST, NAME}, {FOR_CLAUSE, LINEBREAK}, {FOR_CLAUSE, TK_PAREN_OPEN}, + {FOR_CLAUSE, TK_LBRACE}, {FOR_CLAUSE, COMPLETE_COMMANDS}, {FOR_CLAUSE, TK_BANG}, {FOR_CLAUSE, TK_BANG}, @@ -753,6 +841,8 @@ t_stackmatch g_stackmatch[] = {COMPOUND_LIST, TK_ELSE}, {COMPOUND_LIST, COMPOUND_LIST}, {COMPOUND_LIST, COMPLETE_CONDITION}, + {CLOSE_LIST, PATTERN_CASE}, + {CLOSE_LIST, FUNC_NAME}, {SUBSHELL, LINEBREAK}, {SUBSHELL, COMPLETE_COMMANDS}, {SUBSHELL, TK_BANG}, @@ -776,6 +866,7 @@ t_stackmatch g_stackmatch[] = {SUBSHELL, AND_OR_MAJOR}, {COMPOUND_COMMAND, LINEBREAK}, {COMPOUND_COMMAND, TK_PAREN_OPEN}, + {COMPOUND_COMMAND, TK_LBRACE}, {COMPOUND_COMMAND, COMPLETE_COMMANDS}, {COMPOUND_COMMAND, TK_BANG}, {COMPOUND_COMMAND, TK_BANG}, @@ -799,6 +890,7 @@ t_stackmatch g_stackmatch[] = {COMMAND, TK_UNTIL}, {COMMAND, LINEBREAK}, {COMMAND, TK_PAREN_OPEN}, + {COMMAND, TK_LBRACE}, {COMMAND, COMPLETE_COMMANDS}, {COMMAND, TK_DO}, {COMMAND, TK_PAREN_CLOSE}, @@ -817,6 +909,7 @@ t_stackmatch g_stackmatch[] = {AND_OR_MINOR, PIPE_SEMI_SEQUENCE}, {AND_OR_MINOR, LINEBREAK}, {AND_OR_MINOR, TK_PAREN_OPEN}, + {AND_OR_MINOR, TK_LBRACE}, {AND_OR_MINOR, COMPLETE_COMMANDS}, {AND_OR_MINOR, AND_OR_MAJOR}, {PIPE_SEQUENCE, TK_WHILE}, @@ -832,6 +925,7 @@ t_stackmatch g_stackmatch[] = {PIPE_SEQUENCE, COMPLETE_CONDITION}, {PIPE_SEQUENCE, LINEBREAK}, {PIPE_SEQUENCE, TK_PAREN_OPEN}, + {PIPE_SEQUENCE, TK_LBRACE}, {PIPE_SEQUENCE, COMPLETE_COMMANDS}, {PIPE_SEQUENCE, TK_BANG}, {PIPE_SEQUENCE, TK_BANG}, @@ -851,6 +945,7 @@ t_stackmatch g_stackmatch[] = {PIPE_SEMI_SEQUENCE, COMPLETE_CONDITION}, {PIPE_SEMI_SEQUENCE, LINEBREAK}, {PIPE_SEMI_SEQUENCE, TK_PAREN_OPEN}, + {PIPE_SEMI_SEQUENCE, TK_LBRACE}, {PIPE_SEMI_SEQUENCE, COMPLETE_COMMANDS}, {PIPE_SEMI_SEQUENCE, TK_BANG}, {PIPE_SEMI_SEQUENCE, TK_BANG}, @@ -870,6 +965,7 @@ t_stackmatch g_stackmatch[] = {PIPELINE, COMPLETE_CONDITION}, {PIPELINE, LINEBREAK}, {PIPELINE, TK_PAREN_OPEN}, + {PIPELINE, TK_LBRACE}, {PIPELINE, COMPLETE_COMMANDS}, {PIPELINE, SEPARATOR_OP}, {PIPELINE, SEPARATOR_OP}, @@ -877,6 +973,7 @@ t_stackmatch g_stackmatch[] = {PIPELINE, AND_OR_MAJOR}, {AND_OR_MAJOR, LINEBREAK}, {AND_OR_MAJOR, TK_PAREN_OPEN}, + {AND_OR_MAJOR, TK_LBRACE}, {AND_OR_MAJOR, COMPLETE_COMMANDS}, {AND_OR_MAJOR, AND_OR_MAJOR}, {AND_OR_MAJOR, AND_OR_MAJOR}, @@ -893,20 +990,17 @@ t_stackmatch g_stackmatch[] = {AND_OR, COMPLETE_CONDITION}, {AND_OR, LINEBREAK}, {AND_OR, TK_PAREN_OPEN}, + {AND_OR, TK_LBRACE}, {AND_OR, COMPLETE_COMMANDS}, {AND_OR, SEPARATOR_OP}, {AND_OR, SEPARATOR_OP}, {AND_OR, NEWLINE_LIST}, {LIST, LINEBREAK}, - {LIST, TK_PAREN_OPEN}, {LIST, COMPLETE_COMMANDS}, {LIST, NEWLINE_LIST}, {COMPLETE_COMMAND, LINEBREAK}, - {COMPLETE_COMMAND, TK_PAREN_OPEN}, {COMPLETE_COMMAND, COMPLETE_COMMANDS}, {COMPLETE_COMMAND, NEWLINE_LIST}, - {COMPLETE_COMMANDS, LINEBREAK}, - {COMPLETE_COMMANDS, TK_PAREN_OPEN}, {COMPLETE_COMMANDS, COMPLETE_COMMANDS}, {0, 0}, }; diff --git a/42sh/src/parser/ft_parse.c b/42sh/src/parser/ft_parse.c index 01f978b8..f971f12f 100644 --- a/42sh/src/parser/ft_parse.c +++ b/42sh/src/parser/ft_parse.c @@ -49,8 +49,8 @@ int ft_parse(t_btree **ast, t_list **token, t_parser *parser) parser->state = SUCCESS; else parser->state = UNDEFINED; - build_tree(ast, token); - btree_print(STDBUG, *ast, &ft_putast); +// build_tree(ast, token); +// btree_print(STDBUG, *ast, &ft_putast); if ((end_instruction(*parser->stack) && !(*token)->next)) insert_linebreak(token); else diff --git a/42sh/src/parser/produce_sym.c b/42sh/src/parser/produce_sym.c index 1cc792f4..113696bb 100644 --- a/42sh/src/parser/produce_sym.c +++ b/42sh/src/parser/produce_sym.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:58:34 by ariard #+# #+# */ -/* Updated: 2017/02/24 18:25:47 by ariard ### ########.fr */ +/* Updated: 2017/02/24 23:10:35 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -46,16 +46,19 @@ t_prodmatch g_prodmatch[] = {TK_WORD, PIPE_SEMI_SEQUENCE, CMD_NAME}, {TK_WORD, SEPARATOR_OP, CMD_NAME}, {TK_WORD, TK_PAREN_OPEN, CMD_NAME}, + {TK_WORD, TK_LBRACE, CMD_NAME}, {TK_WORD, CASE_LIST, PATTERN}, {TK_WORD, PATTERN_CASE, PATTERN}, {TK_WORD, COMPLETE_COMMANDS, CMD_NAME}, {TK_ASSIGNEMENT_WORD, LINEBREAK, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, TK_PAREN_OPEN, CMD_PREFIX}, + {TK_ASSIGNEMENT_WORD, TK_LBRACE, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, TK_BANG, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, SEPARATOR_OP, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, NEWLINE_LIST, CMD_PREFIX}, {TK_NAME, LINEBREAK, FNAME}, {TK_NAME, TK_PAREN_OPEN, FNAME}, + {TK_NAME, TK_LBRACE, FNAME}, {TK_NAME, TK_BANG, FNAME}, {TK_NAME, SEPARATOR_OP, FNAME}, {TK_NAME, NEWLINE_LIST, FNAME}, @@ -75,6 +78,7 @@ t_prodmatch g_prodmatch[] = {TK_NEWLINE, COMPLETE_COMMANDS, NEWLINE_LIST}, {TK_NEWLINE, LINEBREAK, NEWLINE_LIST}, {TK_NEWLINE, TK_PAREN_OPEN, NEWLINE_LIST}, + {TK_NEWLINE, TK_LBRACE, NEWLINE_LIST}, {TK_NEWLINE, CMD_SUPERIOR, LINEBREAK}, {TK_NEWLINE, PIPE_SEMI_SEQUENCE, LINEBREAK}, {TK_NEWLINE, CASE_LIST_NS, NEWLINE_LIST}, diff --git a/42sh/src/parser/read_stack.c b/42sh/src/parser/read_stack.c index 09f6ee03..f5cf146b 100644 --- a/42sh/src/parser/read_stack.c +++ b/42sh/src/parser/read_stack.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 15:32:10 by ariard #+# #+# */ -/* Updated: 2017/02/24 20:57:40 by ariard ### ########.fr */ +/* Updated: 2017/02/24 22:59:52 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,14 @@ char *read_state(t_sym current) { + if (current == BRACE_CLAUSE) + return ("BRACE_CLAUSE"); + if (current == FUNC_NAME) + return ("FUNC_NAME"); + if (current == TK_LBRACE) + return ("TK_LBRACE"); + if (current == TK_RBRACE) + return ("TK_RBRACE"); if (current == TK_ASSIGNEMENT_WORD) return ("TK_ASSIGNEMENT_WORD"); if (current == CASE_CLAUSE) diff --git a/42sh/test.sh b/42sh/test.sh new file mode 100644 index 00000000..cce06da7 --- /dev/null +++ b/42sh/test.sh @@ -0,0 +1 @@ +{ hello } From a8a06305bbfe24adc783c7a55be4ebc4c19bebb4 Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Fri, 24 Feb 2017 23:18:00 +0100 Subject: [PATCH 18/23] parsing brace_clause + func def ok --- 42sh/objs/builtin/bt_read_get.d | 10 ---------- 42sh/objs/builtin/bt_read_parse.d | 10 ---------- 42sh/objs/builtin/bt_read_term.d | 10 ---------- 42sh/objs/builtin/builtin_cd.d | 9 --------- 42sh/objs/builtin/builtin_echo.d | 10 ---------- 42sh/objs/builtin/builtin_env.d | 10 ---------- 42sh/objs/builtin/builtin_exit.d | 10 ---------- 42sh/objs/builtin/builtin_export.d | 10 ---------- 42sh/objs/builtin/builtin_hash.d | 10 ---------- 42sh/objs/builtin/builtin_history.d | 10 ---------- 42sh/objs/builtin/builtin_read.d | 10 ---------- 42sh/objs/builtin/builtin_setenv.d | 10 ---------- 42sh/objs/builtin/builtin_unset.d | 10 ---------- 42sh/objs/builtin/builtin_unsetenv.d | 10 ---------- 42sh/objs/builtin/is_builtin.d | 10 ---------- 42sh/objs/completion/c_binary.d | 10 ---------- 42sh/objs/completion/c_clear.d | 9 --------- 42sh/objs/completion/c_files.d | 9 --------- 42sh/objs/completion/c_init.d | 9 --------- 42sh/objs/completion/c_matching.d | 10 ---------- 42sh/objs/completion/c_misc.d | 9 --------- 42sh/objs/completion/c_output.d | 10 ---------- 42sh/objs/completion/c_parser.d | 10 ---------- 42sh/objs/completion/c_pathsolver.d | 10 ---------- 42sh/objs/completion/c_printer.d | 10 ---------- 42sh/objs/completion/c_rematch.d | 10 ---------- 42sh/objs/completion/c_sizing.d | 10 ---------- 42sh/objs/completion/c_terminal.d | 10 ---------- 42sh/objs/completion/completion.d | 10 ---------- 42sh/objs/exec/ast_free.d | 10 ---------- 42sh/objs/exec/bad_fd.d | 10 ---------- 42sh/objs/exec/exec_ampersand.d | 10 ---------- 42sh/objs/exec/exec_and_if.d | 10 ---------- 42sh/objs/exec/exec_command.d | 10 ---------- 42sh/objs/exec/exec_default.d | 10 ---------- 42sh/objs/exec/exec_elif.d | 10 ---------- 42sh/objs/exec/exec_else.d | 10 ---------- 42sh/objs/exec/exec_if.d | 10 ---------- 42sh/objs/exec/exec_less.d | 10 ---------- 42sh/objs/exec/exec_or_if.d | 10 ---------- 42sh/objs/exec/exec_pipe.d | 10 ---------- 42sh/objs/exec/exec_redir.d | 10 ---------- 42sh/objs/exec/exec_semi.d | 10 ---------- 42sh/objs/exec/exec_until.d | 10 ---------- 42sh/objs/exec/exec_while.d | 10 ---------- 42sh/objs/exec/fd_is_valid.d | 10 ---------- 42sh/objs/exec/ft_exec.d | 10 ---------- 42sh/objs/exec/ft_findexec.d | 10 ---------- 42sh/objs/exec/launch_process.d | 10 ---------- 42sh/objs/exec/loop_del.d | 10 ---------- 42sh/objs/exec/loop_exec.d | 10 ---------- 42sh/objs/exec/process_redirect.d | 10 ---------- 42sh/objs/exec/process_reset.d | 10 ---------- 42sh/objs/exec/process_resetfds.d | 10 ---------- 42sh/objs/exec/process_setexec.d | 10 ---------- 42sh/objs/exec/process_setgroup.d | 10 ---------- 42sh/objs/exec/process_setsig.d | 10 ---------- 42sh/objs/exec/redirect_dgreat.d | 10 ---------- 42sh/objs/exec/redirect_dless.d | 10 ---------- 42sh/objs/exec/redirect_great.d | 10 ---------- 42sh/objs/exec/redirect_greatand.d | 10 ---------- 42sh/objs/exec/redirect_less.d | 10 ---------- 42sh/objs/exec/redirect_lessand.d | 10 ---------- 42sh/objs/exec/set_exitstatus.d | 10 ---------- 42sh/objs/glob/command_getoutput.d | 10 ---------- 42sh/objs/glob/dir_glob.d | 9 --------- 42sh/objs/glob/esc_print.d | 9 --------- 42sh/objs/glob/expand_bquote.d | 9 --------- 42sh/objs/glob/expand_brace.d | 9 --------- 42sh/objs/glob/expand_esc.d | 9 --------- 42sh/objs/glob/expand_var.d | 9 --------- 42sh/objs/glob/ft_strsplit_esc.d | 9 --------- 42sh/objs/glob/ft_strsplit_spe.d | 9 --------- 42sh/objs/glob/glob.d | 9 --------- 42sh/objs/glob/is_char_esc.d | 9 --------- 42sh/objs/glob/lib_perso/ft_ld_back.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_clear.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_del.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_front.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_new.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_order.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_pushback.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_pushfront.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_reverse.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_size.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_swap.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_ld_to_tab.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_memrealloc.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_strjoinf.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_strsubf.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_tabdel.d | 10 ---------- 42sh/objs/glob/lib_perso/ft_tablen.d | 6 ------ 42sh/objs/glob/match_pattern.d | 9 --------- 42sh/objs/hash_table/ft_add_hash.d | 10 ---------- 42sh/objs/hash_table/hash.d | 10 ---------- 42sh/objs/hash_table/hash_free.d | 10 ---------- 42sh/objs/hash_table/hash_str.d | 10 ---------- 42sh/objs/hash_table/is_hash.d | 10 ---------- 42sh/objs/history/add_str_in_history.d | 10 ---------- 42sh/objs/history/history.d | 10 ---------- 42sh/objs/history/history_parsing.d | 10 ---------- 42sh/objs/history/history_parsing_toolz.d | 10 ---------- 42sh/objs/history/history_parsing_toolz_2.d | 11 ----------- 42sh/objs/history/list_toolz.d | 10 ---------- 42sh/objs/history/surch_in_history.d | 10 ---------- 42sh/objs/job-control/builtin_bg.d | 10 ---------- 42sh/objs/job-control/builtin_fg.d | 10 ---------- 42sh/objs/job-control/builtin_jobs.d | 10 ---------- 42sh/objs/job-control/do_job_notification.d | 11 ----------- 42sh/objs/job-control/job_addprocess.d | 10 ---------- 42sh/objs/job-control/job_cmp_id.d | 10 ---------- 42sh/objs/job-control/job_format.d | 10 ---------- 42sh/objs/job-control/job_format_head.d | 10 ---------- 42sh/objs/job-control/job_free.d | 10 ---------- 42sh/objs/job-control/job_getprocess.d | 10 ---------- 42sh/objs/job-control/job_getrank.d | 10 ---------- 42sh/objs/job-control/job_is_completed.d | 10 ---------- 42sh/objs/job-control/job_is_stopped.d | 10 ---------- 42sh/objs/job-control/job_kill_all.d | 10 ---------- 42sh/objs/job-control/job_notify_change.d | 10 ---------- 42sh/objs/job-control/job_notify_new.d | 10 ---------- 42sh/objs/job-control/job_remove.d | 10 ---------- 42sh/objs/job-control/job_run.d | 10 ---------- 42sh/objs/job-control/job_update_id.d | 10 ---------- 42sh/objs/job-control/job_update_status.d | 10 ---------- 42sh/objs/job-control/job_wait.d | 10 ---------- 42sh/objs/job-control/mark_job_as_running.d | 11 ----------- 42sh/objs/job-control/process_cmp_pid.d | 10 ---------- 42sh/objs/job-control/process_format.d | 10 ---------- 42sh/objs/job-control/process_free.d | 10 ---------- 42sh/objs/job-control/process_mark_status.d | 11 ----------- 42sh/objs/job-control/put_job_in_background.d | 11 ----------- 42sh/objs/job-control/put_job_in_foreground.d | 11 ----------- 42sh/objs/job-control/sigchld_handler.d | 10 ---------- 42sh/objs/job-control/sigint_handler.d | 10 ---------- 42sh/objs/job-control/sigtstp_handler.d | 10 ---------- 42sh/objs/job-control/sigttin_handler.d | 10 ---------- 42sh/objs/job-control/sigttou_handler.d | 10 ---------- 42sh/objs/lexer/get_lexer_stack.d | 10 ---------- 42sh/objs/lexer/get_reserved_words.d | 10 ---------- 42sh/objs/lexer/get_state_global.d | 10 ---------- 42sh/objs/lexer/get_state_redir.d | 10 ---------- 42sh/objs/lexer/insert_newline.d | 9 --------- 42sh/objs/lexer/lexer_assignement_word.d | 10 ---------- 42sh/objs/lexer/lexer_backslash.d | 10 ---------- 42sh/objs/lexer/lexer_bquote.d | 9 --------- 42sh/objs/lexer/lexer_comment.d | 9 --------- 42sh/objs/lexer/lexer_curly_brackets.d | 10 ---------- 42sh/objs/lexer/lexer_default.d | 9 --------- 42sh/objs/lexer/lexer_delim.d | 9 --------- 42sh/objs/lexer/lexer_dless.d | 9 --------- 42sh/objs/lexer/lexer_dquote.d | 9 --------- 42sh/objs/lexer/lexer_end.d | 9 --------- 42sh/objs/lexer/lexer_great.d | 9 --------- 42sh/objs/lexer/lexer_greatand.d | 9 --------- 42sh/objs/lexer/lexer_init.d | 9 --------- 42sh/objs/lexer/lexer_less.d | 9 --------- 42sh/objs/lexer/lexer_lessand.d | 9 --------- 42sh/objs/lexer/lexer_lex.d | 9 --------- 42sh/objs/lexer/lexer_newline.d | 9 --------- 42sh/objs/lexer/lexer_number.d | 9 --------- 42sh/objs/lexer/lexer_paren.d | 9 --------- 42sh/objs/lexer/lexer_quote.d | 9 --------- 42sh/objs/lexer/lexer_sep.d | 9 --------- 42sh/objs/lexer/lexer_word.d | 9 --------- 42sh/objs/lexer/token_append.d | 9 --------- 42sh/objs/lexer/token_cmp_type.d | 9 --------- 42sh/objs/lexer/token_free.d | 9 --------- 42sh/objs/lexer/token_init.d | 9 --------- 42sh/objs/lexer/token_print.d | 9 --------- 42sh/objs/line-editing/completion.d | 10 ---------- 42sh/objs/line-editing/control_c_and_d.d | 10 ---------- 42sh/objs/line-editing/copy_cut_paste.d | 10 ---------- 42sh/objs/line-editing/ft_prompt.d | 10 ---------- 42sh/objs/line-editing/get_key.d | 10 ---------- 42sh/objs/line-editing/home_end.d | 10 ---------- 42sh/objs/line-editing/lib_line_editing/tool_line.d | 11 ----------- 42sh/objs/line-editing/lib_line_editing/tool_line_2.d | 11 ----------- 42sh/objs/line-editing/lib_line_editing/toolz.d | 11 ----------- 42sh/objs/line-editing/lib_line_editing/toolz2.d | 11 ----------- .../line-editing/lib_line_editing/toolz_parseur.d | 11 ----------- .../line-editing/lib_line_editing/toolz_termcaps.d | 11 ----------- 42sh/objs/line-editing/move_left_and_right.d | 11 ----------- 42sh/objs/line-editing/move_to_word.d | 10 ---------- 42sh/objs/line-editing/move_up_and_down.d | 10 ---------- 42sh/objs/line-editing/print_and_del.d | 10 ---------- 42sh/objs/line-editing/queue.d | 10 ---------- 42sh/objs/line-editing/readline.d | 10 ---------- 42sh/objs/main/data_exit.d | 10 ---------- 42sh/objs/main/data_init.d | 10 ---------- 42sh/objs/main/data_singleton.d | 10 ---------- 42sh/objs/main/ft_putast.d | 10 ---------- 42sh/objs/main/main.d | 10 ---------- 42sh/objs/main/shell_exit.d | 10 ---------- 42sh/objs/main/shell_get_avdata.d | 10 ---------- 42sh/objs/main/shell_get_opts.d | 10 ---------- 42sh/objs/main/shell_init.d | 10 ---------- 42sh/objs/parser/add_case.d | 9 --------- 42sh/objs/parser/add_cmd.d | 9 --------- 42sh/objs/parser/add_condition.d | 9 --------- 42sh/objs/parser/add_file.d | 9 --------- 42sh/objs/parser/add_loop.d | 9 --------- 42sh/objs/parser/add_sep.d | 9 --------- 42sh/objs/parser/add_subshell.d | 9 --------- 42sh/objs/parser/aggregate_sym.d | 9 --------- 42sh/objs/parser/build_tree.d | 9 --------- 42sh/objs/parser/error_syntax.d | 9 --------- 42sh/objs/parser/eval_sym.d | 9 --------- 42sh/objs/parser/ft_parse.d | 9 --------- 42sh/objs/parser/parser_init.d | 9 --------- 42sh/objs/parser/pop_stack.d | 9 --------- 42sh/objs/parser/produce_sym.d | 9 --------- 42sh/objs/parser/push_stack.d | 9 --------- 42sh/objs/parser/read_stack.d | 9 --------- 42sh/objs/parser/tree_wrapper.d | 9 --------- 215 files changed, 2100 deletions(-) delete mode 100644 42sh/objs/builtin/bt_read_get.d delete mode 100644 42sh/objs/builtin/bt_read_parse.d delete mode 100644 42sh/objs/builtin/bt_read_term.d delete mode 100644 42sh/objs/builtin/builtin_cd.d delete mode 100644 42sh/objs/builtin/builtin_echo.d delete mode 100644 42sh/objs/builtin/builtin_env.d delete mode 100644 42sh/objs/builtin/builtin_exit.d delete mode 100644 42sh/objs/builtin/builtin_export.d delete mode 100644 42sh/objs/builtin/builtin_hash.d delete mode 100644 42sh/objs/builtin/builtin_history.d delete mode 100644 42sh/objs/builtin/builtin_read.d delete mode 100644 42sh/objs/builtin/builtin_setenv.d delete mode 100644 42sh/objs/builtin/builtin_unset.d delete mode 100644 42sh/objs/builtin/builtin_unsetenv.d delete mode 100644 42sh/objs/builtin/is_builtin.d delete mode 100644 42sh/objs/completion/c_binary.d delete mode 100644 42sh/objs/completion/c_clear.d delete mode 100644 42sh/objs/completion/c_files.d delete mode 100644 42sh/objs/completion/c_init.d delete mode 100644 42sh/objs/completion/c_matching.d delete mode 100644 42sh/objs/completion/c_misc.d delete mode 100644 42sh/objs/completion/c_output.d delete mode 100644 42sh/objs/completion/c_parser.d delete mode 100644 42sh/objs/completion/c_pathsolver.d delete mode 100644 42sh/objs/completion/c_printer.d delete mode 100644 42sh/objs/completion/c_rematch.d delete mode 100644 42sh/objs/completion/c_sizing.d delete mode 100644 42sh/objs/completion/c_terminal.d delete mode 100644 42sh/objs/completion/completion.d delete mode 100644 42sh/objs/exec/ast_free.d delete mode 100644 42sh/objs/exec/bad_fd.d delete mode 100644 42sh/objs/exec/exec_ampersand.d delete mode 100644 42sh/objs/exec/exec_and_if.d delete mode 100644 42sh/objs/exec/exec_command.d delete mode 100644 42sh/objs/exec/exec_default.d delete mode 100644 42sh/objs/exec/exec_elif.d delete mode 100644 42sh/objs/exec/exec_else.d delete mode 100644 42sh/objs/exec/exec_if.d delete mode 100644 42sh/objs/exec/exec_less.d delete mode 100644 42sh/objs/exec/exec_or_if.d delete mode 100644 42sh/objs/exec/exec_pipe.d delete mode 100644 42sh/objs/exec/exec_redir.d delete mode 100644 42sh/objs/exec/exec_semi.d delete mode 100644 42sh/objs/exec/exec_until.d delete mode 100644 42sh/objs/exec/exec_while.d delete mode 100644 42sh/objs/exec/fd_is_valid.d delete mode 100644 42sh/objs/exec/ft_exec.d delete mode 100644 42sh/objs/exec/ft_findexec.d delete mode 100644 42sh/objs/exec/launch_process.d delete mode 100644 42sh/objs/exec/loop_del.d delete mode 100644 42sh/objs/exec/loop_exec.d delete mode 100644 42sh/objs/exec/process_redirect.d delete mode 100644 42sh/objs/exec/process_reset.d delete mode 100644 42sh/objs/exec/process_resetfds.d delete mode 100644 42sh/objs/exec/process_setexec.d delete mode 100644 42sh/objs/exec/process_setgroup.d delete mode 100644 42sh/objs/exec/process_setsig.d delete mode 100644 42sh/objs/exec/redirect_dgreat.d delete mode 100644 42sh/objs/exec/redirect_dless.d delete mode 100644 42sh/objs/exec/redirect_great.d delete mode 100644 42sh/objs/exec/redirect_greatand.d delete mode 100644 42sh/objs/exec/redirect_less.d delete mode 100644 42sh/objs/exec/redirect_lessand.d delete mode 100644 42sh/objs/exec/set_exitstatus.d delete mode 100644 42sh/objs/glob/command_getoutput.d delete mode 100644 42sh/objs/glob/dir_glob.d delete mode 100644 42sh/objs/glob/esc_print.d delete mode 100644 42sh/objs/glob/expand_bquote.d delete mode 100644 42sh/objs/glob/expand_brace.d delete mode 100644 42sh/objs/glob/expand_esc.d delete mode 100644 42sh/objs/glob/expand_var.d delete mode 100644 42sh/objs/glob/ft_strsplit_esc.d delete mode 100644 42sh/objs/glob/ft_strsplit_spe.d delete mode 100644 42sh/objs/glob/glob.d delete mode 100644 42sh/objs/glob/is_char_esc.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_back.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_clear.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_del.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_front.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_new.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_order.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_pushback.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_pushfront.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_reverse.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_size.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_swap.d delete mode 100644 42sh/objs/glob/lib_perso/ft_ld_to_tab.d delete mode 100644 42sh/objs/glob/lib_perso/ft_memrealloc.d delete mode 100644 42sh/objs/glob/lib_perso/ft_strjoinf.d delete mode 100644 42sh/objs/glob/lib_perso/ft_strsubf.d delete mode 100644 42sh/objs/glob/lib_perso/ft_tabdel.d delete mode 100644 42sh/objs/glob/lib_perso/ft_tablen.d delete mode 100644 42sh/objs/glob/match_pattern.d delete mode 100644 42sh/objs/hash_table/ft_add_hash.d delete mode 100644 42sh/objs/hash_table/hash.d delete mode 100644 42sh/objs/hash_table/hash_free.d delete mode 100644 42sh/objs/hash_table/hash_str.d delete mode 100644 42sh/objs/hash_table/is_hash.d delete mode 100644 42sh/objs/history/add_str_in_history.d delete mode 100644 42sh/objs/history/history.d delete mode 100644 42sh/objs/history/history_parsing.d delete mode 100644 42sh/objs/history/history_parsing_toolz.d delete mode 100644 42sh/objs/history/history_parsing_toolz_2.d delete mode 100644 42sh/objs/history/list_toolz.d delete mode 100644 42sh/objs/history/surch_in_history.d delete mode 100644 42sh/objs/job-control/builtin_bg.d delete mode 100644 42sh/objs/job-control/builtin_fg.d delete mode 100644 42sh/objs/job-control/builtin_jobs.d delete mode 100644 42sh/objs/job-control/do_job_notification.d delete mode 100644 42sh/objs/job-control/job_addprocess.d delete mode 100644 42sh/objs/job-control/job_cmp_id.d delete mode 100644 42sh/objs/job-control/job_format.d delete mode 100644 42sh/objs/job-control/job_format_head.d delete mode 100644 42sh/objs/job-control/job_free.d delete mode 100644 42sh/objs/job-control/job_getprocess.d delete mode 100644 42sh/objs/job-control/job_getrank.d delete mode 100644 42sh/objs/job-control/job_is_completed.d delete mode 100644 42sh/objs/job-control/job_is_stopped.d delete mode 100644 42sh/objs/job-control/job_kill_all.d delete mode 100644 42sh/objs/job-control/job_notify_change.d delete mode 100644 42sh/objs/job-control/job_notify_new.d delete mode 100644 42sh/objs/job-control/job_remove.d delete mode 100644 42sh/objs/job-control/job_run.d delete mode 100644 42sh/objs/job-control/job_update_id.d delete mode 100644 42sh/objs/job-control/job_update_status.d delete mode 100644 42sh/objs/job-control/job_wait.d delete mode 100644 42sh/objs/job-control/mark_job_as_running.d delete mode 100644 42sh/objs/job-control/process_cmp_pid.d delete mode 100644 42sh/objs/job-control/process_format.d delete mode 100644 42sh/objs/job-control/process_free.d delete mode 100644 42sh/objs/job-control/process_mark_status.d delete mode 100644 42sh/objs/job-control/put_job_in_background.d delete mode 100644 42sh/objs/job-control/put_job_in_foreground.d delete mode 100644 42sh/objs/job-control/sigchld_handler.d delete mode 100644 42sh/objs/job-control/sigint_handler.d delete mode 100644 42sh/objs/job-control/sigtstp_handler.d delete mode 100644 42sh/objs/job-control/sigttin_handler.d delete mode 100644 42sh/objs/job-control/sigttou_handler.d delete mode 100644 42sh/objs/lexer/get_lexer_stack.d delete mode 100644 42sh/objs/lexer/get_reserved_words.d delete mode 100644 42sh/objs/lexer/get_state_global.d delete mode 100644 42sh/objs/lexer/get_state_redir.d delete mode 100644 42sh/objs/lexer/insert_newline.d delete mode 100644 42sh/objs/lexer/lexer_assignement_word.d delete mode 100644 42sh/objs/lexer/lexer_backslash.d delete mode 100644 42sh/objs/lexer/lexer_bquote.d delete mode 100644 42sh/objs/lexer/lexer_comment.d delete mode 100644 42sh/objs/lexer/lexer_curly_brackets.d delete mode 100644 42sh/objs/lexer/lexer_default.d delete mode 100644 42sh/objs/lexer/lexer_delim.d delete mode 100644 42sh/objs/lexer/lexer_dless.d delete mode 100644 42sh/objs/lexer/lexer_dquote.d delete mode 100644 42sh/objs/lexer/lexer_end.d delete mode 100644 42sh/objs/lexer/lexer_great.d delete mode 100644 42sh/objs/lexer/lexer_greatand.d delete mode 100644 42sh/objs/lexer/lexer_init.d delete mode 100644 42sh/objs/lexer/lexer_less.d delete mode 100644 42sh/objs/lexer/lexer_lessand.d delete mode 100644 42sh/objs/lexer/lexer_lex.d delete mode 100644 42sh/objs/lexer/lexer_newline.d delete mode 100644 42sh/objs/lexer/lexer_number.d delete mode 100644 42sh/objs/lexer/lexer_paren.d delete mode 100644 42sh/objs/lexer/lexer_quote.d delete mode 100644 42sh/objs/lexer/lexer_sep.d delete mode 100644 42sh/objs/lexer/lexer_word.d delete mode 100644 42sh/objs/lexer/token_append.d delete mode 100644 42sh/objs/lexer/token_cmp_type.d delete mode 100644 42sh/objs/lexer/token_free.d delete mode 100644 42sh/objs/lexer/token_init.d delete mode 100644 42sh/objs/lexer/token_print.d delete mode 100644 42sh/objs/line-editing/completion.d delete mode 100644 42sh/objs/line-editing/control_c_and_d.d delete mode 100644 42sh/objs/line-editing/copy_cut_paste.d delete mode 100644 42sh/objs/line-editing/ft_prompt.d delete mode 100644 42sh/objs/line-editing/get_key.d delete mode 100644 42sh/objs/line-editing/home_end.d delete mode 100644 42sh/objs/line-editing/lib_line_editing/tool_line.d delete mode 100644 42sh/objs/line-editing/lib_line_editing/tool_line_2.d delete mode 100644 42sh/objs/line-editing/lib_line_editing/toolz.d delete mode 100644 42sh/objs/line-editing/lib_line_editing/toolz2.d delete mode 100644 42sh/objs/line-editing/lib_line_editing/toolz_parseur.d delete mode 100644 42sh/objs/line-editing/lib_line_editing/toolz_termcaps.d delete mode 100644 42sh/objs/line-editing/move_left_and_right.d delete mode 100644 42sh/objs/line-editing/move_to_word.d delete mode 100644 42sh/objs/line-editing/move_up_and_down.d delete mode 100644 42sh/objs/line-editing/print_and_del.d delete mode 100644 42sh/objs/line-editing/queue.d delete mode 100644 42sh/objs/line-editing/readline.d delete mode 100644 42sh/objs/main/data_exit.d delete mode 100644 42sh/objs/main/data_init.d delete mode 100644 42sh/objs/main/data_singleton.d delete mode 100644 42sh/objs/main/ft_putast.d delete mode 100644 42sh/objs/main/main.d delete mode 100644 42sh/objs/main/shell_exit.d delete mode 100644 42sh/objs/main/shell_get_avdata.d delete mode 100644 42sh/objs/main/shell_get_opts.d delete mode 100644 42sh/objs/main/shell_init.d delete mode 100644 42sh/objs/parser/add_case.d delete mode 100644 42sh/objs/parser/add_cmd.d delete mode 100644 42sh/objs/parser/add_condition.d delete mode 100644 42sh/objs/parser/add_file.d delete mode 100644 42sh/objs/parser/add_loop.d delete mode 100644 42sh/objs/parser/add_sep.d delete mode 100644 42sh/objs/parser/add_subshell.d delete mode 100644 42sh/objs/parser/aggregate_sym.d delete mode 100644 42sh/objs/parser/build_tree.d delete mode 100644 42sh/objs/parser/error_syntax.d delete mode 100644 42sh/objs/parser/eval_sym.d delete mode 100644 42sh/objs/parser/ft_parse.d delete mode 100644 42sh/objs/parser/parser_init.d delete mode 100644 42sh/objs/parser/pop_stack.d delete mode 100644 42sh/objs/parser/produce_sym.d delete mode 100644 42sh/objs/parser/push_stack.d delete mode 100644 42sh/objs/parser/read_stack.d delete mode 100644 42sh/objs/parser/tree_wrapper.d diff --git a/42sh/objs/builtin/bt_read_get.d b/42sh/objs/builtin/bt_read_get.d deleted file mode 100644 index 3d96b8dc..00000000 --- a/42sh/objs/builtin/bt_read_get.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/bt_read_get.o: src/builtin/bt_read_get.c \ - includes/builtin_read.h includes/types.h includes/builtin.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/minishell.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/glob.h \ - includes/completion.h includes/hash.h diff --git a/42sh/objs/builtin/bt_read_parse.d b/42sh/objs/builtin/bt_read_parse.d deleted file mode 100644 index 89009e04..00000000 --- a/42sh/objs/builtin/bt_read_parse.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/bt_read_parse.o: src/builtin/bt_read_parse.c \ - includes/builtin_read.h includes/types.h includes/builtin.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/minishell.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/glob.h \ - includes/completion.h includes/hash.h diff --git a/42sh/objs/builtin/bt_read_term.d b/42sh/objs/builtin/bt_read_term.d deleted file mode 100644 index 928d1921..00000000 --- a/42sh/objs/builtin/bt_read_term.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/bt_read_term.o: src/builtin/bt_read_term.c \ - includes/builtin.h includes/types.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/builtin_read.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/builtin/builtin_cd.d b/42sh/objs/builtin/builtin_cd.d deleted file mode 100644 index 4d1c59c9..00000000 --- a/42sh/objs/builtin/builtin_cd.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/builtin/builtin_cd.o: src/builtin/builtin_cd.c includes/builtin.h \ - includes/types.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/builtin_read.h includes/minishell.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/builtin/builtin_echo.d b/42sh/objs/builtin/builtin_echo.d deleted file mode 100644 index 48a2ec11..00000000 --- a/42sh/objs/builtin/builtin_echo.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/builtin_echo.o: src/builtin/builtin_echo.c \ - includes/builtin.h includes/types.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/builtin_read.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/builtin/builtin_env.d b/42sh/objs/builtin/builtin_env.d deleted file mode 100644 index 99743bb9..00000000 --- a/42sh/objs/builtin/builtin_env.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/builtin_env.o: src/builtin/builtin_env.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/builtin/builtin_exit.d b/42sh/objs/builtin/builtin_exit.d deleted file mode 100644 index 6f13cb81..00000000 --- a/42sh/objs/builtin/builtin_exit.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/builtin_exit.o: src/builtin/builtin_exit.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/builtin/builtin_export.d b/42sh/objs/builtin/builtin_export.d deleted file mode 100644 index 5df846e8..00000000 --- a/42sh/objs/builtin/builtin_export.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/builtin_export.o: src/builtin/builtin_export.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/builtin/builtin_hash.d b/42sh/objs/builtin/builtin_hash.d deleted file mode 100644 index f4eb8938..00000000 --- a/42sh/objs/builtin/builtin_hash.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/builtin_hash.o: src/builtin/builtin_hash.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/builtin/builtin_history.d b/42sh/objs/builtin/builtin_history.d deleted file mode 100644 index a60a1c6e..00000000 --- a/42sh/objs/builtin/builtin_history.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/builtin_history.o: src/builtin/builtin_history.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/builtin/builtin_read.d b/42sh/objs/builtin/builtin_read.d deleted file mode 100644 index d5785763..00000000 --- a/42sh/objs/builtin/builtin_read.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/builtin_read.o: src/builtin/builtin_read.c \ - includes/builtin_read.h includes/types.h includes/builtin.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/minishell.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/glob.h \ - includes/completion.h includes/hash.h diff --git a/42sh/objs/builtin/builtin_setenv.d b/42sh/objs/builtin/builtin_setenv.d deleted file mode 100644 index 502946a9..00000000 --- a/42sh/objs/builtin/builtin_setenv.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/builtin_setenv.o: src/builtin/builtin_setenv.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/builtin/builtin_unset.d b/42sh/objs/builtin/builtin_unset.d deleted file mode 100644 index d0d88852..00000000 --- a/42sh/objs/builtin/builtin_unset.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/builtin_unset.o: src/builtin/builtin_unset.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/builtin/builtin_unsetenv.d b/42sh/objs/builtin/builtin_unsetenv.d deleted file mode 100644 index 25dd7671..00000000 --- a/42sh/objs/builtin/builtin_unsetenv.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/builtin_unsetenv.o: src/builtin/builtin_unsetenv.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/builtin/is_builtin.d b/42sh/objs/builtin/is_builtin.d deleted file mode 100644 index 40071c79..00000000 --- a/42sh/objs/builtin/is_builtin.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/builtin/is_builtin.o: src/builtin/is_builtin.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/completion/c_binary.d b/42sh/objs/completion/c_binary.d deleted file mode 100644 index 017f6e2a..00000000 --- a/42sh/objs/completion/c_binary.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/completion/c_binary.o: src/completion/c_binary.c \ - includes/completion.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/glob.h \ - includes/hash.h diff --git a/42sh/objs/completion/c_clear.d b/42sh/objs/completion/c_clear.d deleted file mode 100644 index 51457990..00000000 --- a/42sh/objs/completion/c_clear.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/completion/c_clear.o: src/completion/c_clear.c includes/completion.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/hash.h diff --git a/42sh/objs/completion/c_files.d b/42sh/objs/completion/c_files.d deleted file mode 100644 index d611d285..00000000 --- a/42sh/objs/completion/c_files.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/completion/c_files.o: src/completion/c_files.c includes/completion.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/hash.h diff --git a/42sh/objs/completion/c_init.d b/42sh/objs/completion/c_init.d deleted file mode 100644 index 42812396..00000000 --- a/42sh/objs/completion/c_init.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/completion/c_init.o: src/completion/c_init.c includes/completion.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/hash.h diff --git a/42sh/objs/completion/c_matching.d b/42sh/objs/completion/c_matching.d deleted file mode 100644 index 265147a1..00000000 --- a/42sh/objs/completion/c_matching.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/completion/c_matching.o: src/completion/c_matching.c \ - includes/completion.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/glob.h \ - includes/hash.h diff --git a/42sh/objs/completion/c_misc.d b/42sh/objs/completion/c_misc.d deleted file mode 100644 index 3dde2e26..00000000 --- a/42sh/objs/completion/c_misc.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/completion/c_misc.o: src/completion/c_misc.c includes/completion.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/hash.h diff --git a/42sh/objs/completion/c_output.d b/42sh/objs/completion/c_output.d deleted file mode 100644 index c58c0475..00000000 --- a/42sh/objs/completion/c_output.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/completion/c_output.o: src/completion/c_output.c \ - includes/completion.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/glob.h \ - includes/hash.h diff --git a/42sh/objs/completion/c_parser.d b/42sh/objs/completion/c_parser.d deleted file mode 100644 index 20e78c29..00000000 --- a/42sh/objs/completion/c_parser.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/completion/c_parser.o: src/completion/c_parser.c \ - includes/completion.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/glob.h \ - includes/hash.h diff --git a/42sh/objs/completion/c_pathsolver.d b/42sh/objs/completion/c_pathsolver.d deleted file mode 100644 index a43db912..00000000 --- a/42sh/objs/completion/c_pathsolver.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/completion/c_pathsolver.o: src/completion/c_pathsolver.c \ - includes/completion.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/glob.h \ - includes/hash.h diff --git a/42sh/objs/completion/c_printer.d b/42sh/objs/completion/c_printer.d deleted file mode 100644 index f5c0111d..00000000 --- a/42sh/objs/completion/c_printer.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/completion/c_printer.o: src/completion/c_printer.c \ - includes/completion.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/glob.h \ - includes/hash.h diff --git a/42sh/objs/completion/c_rematch.d b/42sh/objs/completion/c_rematch.d deleted file mode 100644 index 4402b27d..00000000 --- a/42sh/objs/completion/c_rematch.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/completion/c_rematch.o: src/completion/c_rematch.c \ - includes/completion.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/glob.h \ - includes/hash.h diff --git a/42sh/objs/completion/c_sizing.d b/42sh/objs/completion/c_sizing.d deleted file mode 100644 index 6d931b50..00000000 --- a/42sh/objs/completion/c_sizing.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/completion/c_sizing.o: src/completion/c_sizing.c \ - includes/completion.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/glob.h \ - includes/hash.h diff --git a/42sh/objs/completion/c_terminal.d b/42sh/objs/completion/c_terminal.d deleted file mode 100644 index e2fc7d30..00000000 --- a/42sh/objs/completion/c_terminal.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/completion/c_terminal.o: src/completion/c_terminal.c \ - includes/completion.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/glob.h \ - includes/hash.h diff --git a/42sh/objs/completion/completion.d b/42sh/objs/completion/completion.d deleted file mode 100644 index 2e7aca1d..00000000 --- a/42sh/objs/completion/completion.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/completion/completion.o: src/completion/completion.c \ - includes/completion.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/glob.h \ - includes/hash.h diff --git a/42sh/objs/exec/ast_free.d b/42sh/objs/exec/ast_free.d deleted file mode 100644 index a938bba4..00000000 --- a/42sh/objs/exec/ast_free.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/ast_free.o: src/exec/ast_free.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/bad_fd.d b/42sh/objs/exec/bad_fd.d deleted file mode 100644 index 10582e42..00000000 --- a/42sh/objs/exec/bad_fd.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/bad_fd.o: src/exec/bad_fd.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_ampersand.d b/42sh/objs/exec/exec_ampersand.d deleted file mode 100644 index a099a3a2..00000000 --- a/42sh/objs/exec/exec_ampersand.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_ampersand.o: src/exec/exec_ampersand.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_and_if.d b/42sh/objs/exec/exec_and_if.d deleted file mode 100644 index e94f2cac..00000000 --- a/42sh/objs/exec/exec_and_if.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_and_if.o: src/exec/exec_and_if.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_command.d b/42sh/objs/exec/exec_command.d deleted file mode 100644 index d0f0225c..00000000 --- a/42sh/objs/exec/exec_command.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_command.o: src/exec/exec_command.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_default.d b/42sh/objs/exec/exec_default.d deleted file mode 100644 index e2f12d17..00000000 --- a/42sh/objs/exec/exec_default.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_default.o: src/exec/exec_default.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_elif.d b/42sh/objs/exec/exec_elif.d deleted file mode 100644 index 31a808b1..00000000 --- a/42sh/objs/exec/exec_elif.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_elif.o: src/exec/exec_elif.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_else.d b/42sh/objs/exec/exec_else.d deleted file mode 100644 index 7fbf18af..00000000 --- a/42sh/objs/exec/exec_else.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_else.o: src/exec/exec_else.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_if.d b/42sh/objs/exec/exec_if.d deleted file mode 100644 index bfc49041..00000000 --- a/42sh/objs/exec/exec_if.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_if.o: src/exec/exec_if.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_less.d b/42sh/objs/exec/exec_less.d deleted file mode 100644 index 80163f71..00000000 --- a/42sh/objs/exec/exec_less.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_less.o: src/exec/exec_less.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_or_if.d b/42sh/objs/exec/exec_or_if.d deleted file mode 100644 index e47e7589..00000000 --- a/42sh/objs/exec/exec_or_if.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_or_if.o: src/exec/exec_or_if.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_pipe.d b/42sh/objs/exec/exec_pipe.d deleted file mode 100644 index f0e75e4a..00000000 --- a/42sh/objs/exec/exec_pipe.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_pipe.o: src/exec/exec_pipe.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_redir.d b/42sh/objs/exec/exec_redir.d deleted file mode 100644 index e38c21e1..00000000 --- a/42sh/objs/exec/exec_redir.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_redir.o: src/exec/exec_redir.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_semi.d b/42sh/objs/exec/exec_semi.d deleted file mode 100644 index a4e14789..00000000 --- a/42sh/objs/exec/exec_semi.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_semi.o: src/exec/exec_semi.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_until.d b/42sh/objs/exec/exec_until.d deleted file mode 100644 index 892f8a85..00000000 --- a/42sh/objs/exec/exec_until.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_until.o: src/exec/exec_until.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/exec_while.d b/42sh/objs/exec/exec_while.d deleted file mode 100644 index e2156a69..00000000 --- a/42sh/objs/exec/exec_while.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/exec_while.o: src/exec/exec_while.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/fd_is_valid.d b/42sh/objs/exec/fd_is_valid.d deleted file mode 100644 index 82af7a1d..00000000 --- a/42sh/objs/exec/fd_is_valid.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/fd_is_valid.o: src/exec/fd_is_valid.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/ft_exec.d b/42sh/objs/exec/ft_exec.d deleted file mode 100644 index 4d324b14..00000000 --- a/42sh/objs/exec/ft_exec.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/ft_exec.o: src/exec/ft_exec.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/ft_findexec.d b/42sh/objs/exec/ft_findexec.d deleted file mode 100644 index bdef00c4..00000000 --- a/42sh/objs/exec/ft_findexec.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/ft_findexec.o: src/exec/ft_findexec.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/launch_process.d b/42sh/objs/exec/launch_process.d deleted file mode 100644 index f85c0e5d..00000000 --- a/42sh/objs/exec/launch_process.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/launch_process.o: src/exec/launch_process.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/loop_del.d b/42sh/objs/exec/loop_del.d deleted file mode 100644 index 96008067..00000000 --- a/42sh/objs/exec/loop_del.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/loop_del.o: src/exec/loop_del.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/loop_exec.d b/42sh/objs/exec/loop_exec.d deleted file mode 100644 index 289f40e6..00000000 --- a/42sh/objs/exec/loop_exec.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/loop_exec.o: src/exec/loop_exec.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/process_redirect.d b/42sh/objs/exec/process_redirect.d deleted file mode 100644 index 51148225..00000000 --- a/42sh/objs/exec/process_redirect.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/process_redirect.o: src/exec/process_redirect.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/process_reset.d b/42sh/objs/exec/process_reset.d deleted file mode 100644 index 66d081e7..00000000 --- a/42sh/objs/exec/process_reset.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/process_reset.o: src/exec/process_reset.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/process_resetfds.d b/42sh/objs/exec/process_resetfds.d deleted file mode 100644 index 2ee6d106..00000000 --- a/42sh/objs/exec/process_resetfds.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/process_resetfds.o: src/exec/process_resetfds.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/process_setexec.d b/42sh/objs/exec/process_setexec.d deleted file mode 100644 index a0440320..00000000 --- a/42sh/objs/exec/process_setexec.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/process_setexec.o: src/exec/process_setexec.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/process_setgroup.d b/42sh/objs/exec/process_setgroup.d deleted file mode 100644 index a1b5f93e..00000000 --- a/42sh/objs/exec/process_setgroup.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/process_setgroup.o: src/exec/process_setgroup.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/process_setsig.d b/42sh/objs/exec/process_setsig.d deleted file mode 100644 index 79adabd6..00000000 --- a/42sh/objs/exec/process_setsig.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/process_setsig.o: src/exec/process_setsig.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/redirect_dgreat.d b/42sh/objs/exec/redirect_dgreat.d deleted file mode 100644 index 233d1240..00000000 --- a/42sh/objs/exec/redirect_dgreat.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/redirect_dgreat.o: src/exec/redirect_dgreat.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/redirect_dless.d b/42sh/objs/exec/redirect_dless.d deleted file mode 100644 index e982e0a5..00000000 --- a/42sh/objs/exec/redirect_dless.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/redirect_dless.o: src/exec/redirect_dless.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/redirect_great.d b/42sh/objs/exec/redirect_great.d deleted file mode 100644 index b1d05efd..00000000 --- a/42sh/objs/exec/redirect_great.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/redirect_great.o: src/exec/redirect_great.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/redirect_greatand.d b/42sh/objs/exec/redirect_greatand.d deleted file mode 100644 index b49fe193..00000000 --- a/42sh/objs/exec/redirect_greatand.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/redirect_greatand.o: src/exec/redirect_greatand.c \ - includes/exec.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/redirect_less.d b/42sh/objs/exec/redirect_less.d deleted file mode 100644 index 89e46d58..00000000 --- a/42sh/objs/exec/redirect_less.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/redirect_less.o: src/exec/redirect_less.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/redirect_lessand.d b/42sh/objs/exec/redirect_lessand.d deleted file mode 100644 index 8f964246..00000000 --- a/42sh/objs/exec/redirect_lessand.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/redirect_lessand.o: src/exec/redirect_lessand.c includes/exec.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/job_control.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/exec/set_exitstatus.d b/42sh/objs/exec/set_exitstatus.d deleted file mode 100644 index f457b366..00000000 --- a/42sh/objs/exec/set_exitstatus.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/exec/set_exitstatus.o: src/exec/set_exitstatus.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/command_getoutput.d b/42sh/objs/glob/command_getoutput.d deleted file mode 100644 index 9d35c410..00000000 --- a/42sh/objs/glob/command_getoutput.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/command_getoutput.o: src/glob/command_getoutput.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/dir_glob.d b/42sh/objs/glob/dir_glob.d deleted file mode 100644 index 91f9d5d3..00000000 --- a/42sh/objs/glob/dir_glob.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/dir_glob.o: src/glob/dir_glob.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/esc_print.d b/42sh/objs/glob/esc_print.d deleted file mode 100644 index a10646b9..00000000 --- a/42sh/objs/glob/esc_print.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/esc_print.o: src/glob/esc_print.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/expand_bquote.d b/42sh/objs/glob/expand_bquote.d deleted file mode 100644 index dcf407fc..00000000 --- a/42sh/objs/glob/expand_bquote.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/expand_bquote.o: src/glob/expand_bquote.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/expand_brace.d b/42sh/objs/glob/expand_brace.d deleted file mode 100644 index 33dcb5e8..00000000 --- a/42sh/objs/glob/expand_brace.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/expand_brace.o: src/glob/expand_brace.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/expand_esc.d b/42sh/objs/glob/expand_esc.d deleted file mode 100644 index 51558b19..00000000 --- a/42sh/objs/glob/expand_esc.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/expand_esc.o: src/glob/expand_esc.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/expand_var.d b/42sh/objs/glob/expand_var.d deleted file mode 100644 index d3f356b0..00000000 --- a/42sh/objs/glob/expand_var.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/expand_var.o: src/glob/expand_var.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/ft_strsplit_esc.d b/42sh/objs/glob/ft_strsplit_esc.d deleted file mode 100644 index 87445b4a..00000000 --- a/42sh/objs/glob/ft_strsplit_esc.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/ft_strsplit_esc.o: src/glob/ft_strsplit_esc.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/ft_strsplit_spe.d b/42sh/objs/glob/ft_strsplit_spe.d deleted file mode 100644 index efec76f6..00000000 --- a/42sh/objs/glob/ft_strsplit_spe.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/ft_strsplit_spe.o: src/glob/ft_strsplit_spe.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/glob.d b/42sh/objs/glob/glob.d deleted file mode 100644 index 97d1827b..00000000 --- a/42sh/objs/glob/glob.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/glob.o: src/glob/glob.c includes/glob.h includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/is_char_esc.d b/42sh/objs/glob/is_char_esc.d deleted file mode 100644 index dde23a1e..00000000 --- a/42sh/objs/glob/is_char_esc.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/is_char_esc.o: src/glob/is_char_esc.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_back.d b/42sh/objs/glob/lib_perso/ft_ld_back.d deleted file mode 100644 index afc57d2c..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_back.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_back.o: src/glob/lib_perso/ft_ld_back.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_clear.d b/42sh/objs/glob/lib_perso/ft_ld_clear.d deleted file mode 100644 index 6855ddd6..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_clear.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_clear.o: src/glob/lib_perso/ft_ld_clear.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_del.d b/42sh/objs/glob/lib_perso/ft_ld_del.d deleted file mode 100644 index 060ccc53..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_del.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_del.o: src/glob/lib_perso/ft_ld_del.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_front.d b/42sh/objs/glob/lib_perso/ft_ld_front.d deleted file mode 100644 index 13574f83..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_front.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_front.o: src/glob/lib_perso/ft_ld_front.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_new.d b/42sh/objs/glob/lib_perso/ft_ld_new.d deleted file mode 100644 index b7db9543..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_new.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_new.o: src/glob/lib_perso/ft_ld_new.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_order.d b/42sh/objs/glob/lib_perso/ft_ld_order.d deleted file mode 100644 index 8b6ffe0c..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_order.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_order.o: src/glob/lib_perso/ft_ld_order.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_pushback.d b/42sh/objs/glob/lib_perso/ft_ld_pushback.d deleted file mode 100644 index de57e36f..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_pushback.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_pushback.o: src/glob/lib_perso/ft_ld_pushback.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_pushfront.d b/42sh/objs/glob/lib_perso/ft_ld_pushfront.d deleted file mode 100644 index 4bb25bc3..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_pushfront.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_pushfront.o: \ - src/glob/lib_perso/ft_ld_pushfront.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_reverse.d b/42sh/objs/glob/lib_perso/ft_ld_reverse.d deleted file mode 100644 index 2cbfe7ff..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_reverse.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_reverse.o: src/glob/lib_perso/ft_ld_reverse.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_size.d b/42sh/objs/glob/lib_perso/ft_ld_size.d deleted file mode 100644 index e79ba8c1..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_size.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_size.o: src/glob/lib_perso/ft_ld_size.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_swap.d b/42sh/objs/glob/lib_perso/ft_ld_swap.d deleted file mode 100644 index 952177a3..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_swap.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_swap.o: src/glob/lib_perso/ft_ld_swap.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_ld_to_tab.d b/42sh/objs/glob/lib_perso/ft_ld_to_tab.d deleted file mode 100644 index 661420b6..00000000 --- a/42sh/objs/glob/lib_perso/ft_ld_to_tab.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_ld_to_tab.o: src/glob/lib_perso/ft_ld_to_tab.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_memrealloc.d b/42sh/objs/glob/lib_perso/ft_memrealloc.d deleted file mode 100644 index 2a7fd8eb..00000000 --- a/42sh/objs/glob/lib_perso/ft_memrealloc.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_memrealloc.o: src/glob/lib_perso/ft_memrealloc.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_strjoinf.d b/42sh/objs/glob/lib_perso/ft_strjoinf.d deleted file mode 100644 index 43e9fbf9..00000000 --- a/42sh/objs/glob/lib_perso/ft_strjoinf.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_strjoinf.o: src/glob/lib_perso/ft_strjoinf.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_strsubf.d b/42sh/objs/glob/lib_perso/ft_strsubf.d deleted file mode 100644 index 1e156f0b..00000000 --- a/42sh/objs/glob/lib_perso/ft_strsubf.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_strsubf.o: src/glob/lib_perso/ft_strsubf.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_tabdel.d b/42sh/objs/glob/lib_perso/ft_tabdel.d deleted file mode 100644 index ff2f5e53..00000000 --- a/42sh/objs/glob/lib_perso/ft_tabdel.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/glob/lib_perso/ft_tabdel.o: src/glob/lib_perso/ft_tabdel.c \ - includes/glob.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/parser.h includes/ft_readline.h \ - includes/ft_input.h includes/exec.h includes/job_control.h \ - includes/builtin.h includes/builtin_read.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/glob/lib_perso/ft_tablen.d b/42sh/objs/glob/lib_perso/ft_tablen.d deleted file mode 100644 index 7ea8a517..00000000 --- a/42sh/objs/glob/lib_perso/ft_tablen.d +++ /dev/null @@ -1,6 +0,0 @@ -objs/glob/lib_perso/ft_tablen.o: src/glob/lib_perso/ft_tablen.c \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h diff --git a/42sh/objs/glob/match_pattern.d b/42sh/objs/glob/match_pattern.d deleted file mode 100644 index e194a52a..00000000 --- a/42sh/objs/glob/match_pattern.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/glob/match_pattern.o: src/glob/match_pattern.c includes/glob.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/completion.h includes/hash.h diff --git a/42sh/objs/hash_table/ft_add_hash.d b/42sh/objs/hash_table/ft_add_hash.d deleted file mode 100644 index bf1a58cb..00000000 --- a/42sh/objs/hash_table/ft_add_hash.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/hash_table/ft_add_hash.o: src/hash_table/ft_add_hash.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/hash_table/hash.d b/42sh/objs/hash_table/hash.d deleted file mode 100644 index 800ce022..00000000 --- a/42sh/objs/hash_table/hash.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/hash_table/hash.o: src/hash_table/hash.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/hash_table/hash_free.d b/42sh/objs/hash_table/hash_free.d deleted file mode 100644 index 63be677a..00000000 --- a/42sh/objs/hash_table/hash_free.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/hash_table/hash_free.o: src/hash_table/hash_free.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/hash_table/hash_str.d b/42sh/objs/hash_table/hash_str.d deleted file mode 100644 index a76416ca..00000000 --- a/42sh/objs/hash_table/hash_str.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/hash_table/hash_str.o: src/hash_table/hash_str.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/hash_table/is_hash.d b/42sh/objs/hash_table/is_hash.d deleted file mode 100644 index 6e962431..00000000 --- a/42sh/objs/hash_table/is_hash.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/hash_table/is_hash.o: src/hash_table/is_hash.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/history/add_str_in_history.d b/42sh/objs/history/add_str_in_history.d deleted file mode 100644 index a1d8a7eb..00000000 --- a/42sh/objs/history/add_str_in_history.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/history/add_str_in_history.o: src/history/add_str_in_history.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/history/history.d b/42sh/objs/history/history.d deleted file mode 100644 index 57982de7..00000000 --- a/42sh/objs/history/history.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/history/history.o: src/history/history.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/history/history_parsing.d b/42sh/objs/history/history_parsing.d deleted file mode 100644 index 85445519..00000000 --- a/42sh/objs/history/history_parsing.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/history/history_parsing.o: src/history/history_parsing.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/history/history_parsing_toolz.d b/42sh/objs/history/history_parsing_toolz.d deleted file mode 100644 index 0fe8517d..00000000 --- a/42sh/objs/history/history_parsing_toolz.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/history/history_parsing_toolz.o: src/history/history_parsing_toolz.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/history/history_parsing_toolz_2.d b/42sh/objs/history/history_parsing_toolz_2.d deleted file mode 100644 index f17d84c5..00000000 --- a/42sh/objs/history/history_parsing_toolz_2.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/history/history_parsing_toolz_2.o: \ - src/history/history_parsing_toolz_2.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/history/list_toolz.d b/42sh/objs/history/list_toolz.d deleted file mode 100644 index c96548ad..00000000 --- a/42sh/objs/history/list_toolz.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/history/list_toolz.o: src/history/list_toolz.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/history/surch_in_history.d b/42sh/objs/history/surch_in_history.d deleted file mode 100644 index 6a389c3a..00000000 --- a/42sh/objs/history/surch_in_history.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/history/surch_in_history.o: src/history/surch_in_history.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/builtin_bg.d b/42sh/objs/job-control/builtin_bg.d deleted file mode 100644 index 45276f5f..00000000 --- a/42sh/objs/job-control/builtin_bg.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/builtin_bg.o: src/job-control/builtin_bg.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/builtin_fg.d b/42sh/objs/job-control/builtin_fg.d deleted file mode 100644 index 4c70f313..00000000 --- a/42sh/objs/job-control/builtin_fg.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/builtin_fg.o: src/job-control/builtin_fg.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/builtin_jobs.d b/42sh/objs/job-control/builtin_jobs.d deleted file mode 100644 index 24978381..00000000 --- a/42sh/objs/job-control/builtin_jobs.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/builtin_jobs.o: src/job-control/builtin_jobs.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/do_job_notification.d b/42sh/objs/job-control/do_job_notification.d deleted file mode 100644 index fbcbc8ed..00000000 --- a/42sh/objs/job-control/do_job_notification.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/job-control/do_job_notification.o: \ - src/job-control/do_job_notification.c includes/job_control.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_addprocess.d b/42sh/objs/job-control/job_addprocess.d deleted file mode 100644 index 73a11c51..00000000 --- a/42sh/objs/job-control/job_addprocess.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_addprocess.o: src/job-control/job_addprocess.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_cmp_id.d b/42sh/objs/job-control/job_cmp_id.d deleted file mode 100644 index 16f0b3b0..00000000 --- a/42sh/objs/job-control/job_cmp_id.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_cmp_id.o: src/job-control/job_cmp_id.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_format.d b/42sh/objs/job-control/job_format.d deleted file mode 100644 index 020f7849..00000000 --- a/42sh/objs/job-control/job_format.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_format.o: src/job-control/job_format.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_format_head.d b/42sh/objs/job-control/job_format_head.d deleted file mode 100644 index d9c43887..00000000 --- a/42sh/objs/job-control/job_format_head.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_format_head.o: src/job-control/job_format_head.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_free.d b/42sh/objs/job-control/job_free.d deleted file mode 100644 index b38c8f5f..00000000 --- a/42sh/objs/job-control/job_free.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_free.o: src/job-control/job_free.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_getprocess.d b/42sh/objs/job-control/job_getprocess.d deleted file mode 100644 index 94d6b64b..00000000 --- a/42sh/objs/job-control/job_getprocess.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_getprocess.o: src/job-control/job_getprocess.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_getrank.d b/42sh/objs/job-control/job_getrank.d deleted file mode 100644 index 6a17e542..00000000 --- a/42sh/objs/job-control/job_getrank.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_getrank.o: src/job-control/job_getrank.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_is_completed.d b/42sh/objs/job-control/job_is_completed.d deleted file mode 100644 index 01acb475..00000000 --- a/42sh/objs/job-control/job_is_completed.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_is_completed.o: src/job-control/job_is_completed.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_is_stopped.d b/42sh/objs/job-control/job_is_stopped.d deleted file mode 100644 index 99ff0d4f..00000000 --- a/42sh/objs/job-control/job_is_stopped.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_is_stopped.o: src/job-control/job_is_stopped.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_kill_all.d b/42sh/objs/job-control/job_kill_all.d deleted file mode 100644 index 3fcaf708..00000000 --- a/42sh/objs/job-control/job_kill_all.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_kill_all.o: src/job-control/job_kill_all.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_notify_change.d b/42sh/objs/job-control/job_notify_change.d deleted file mode 100644 index 6cf53473..00000000 --- a/42sh/objs/job-control/job_notify_change.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_notify_change.o: src/job-control/job_notify_change.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_notify_new.d b/42sh/objs/job-control/job_notify_new.d deleted file mode 100644 index 53900c61..00000000 --- a/42sh/objs/job-control/job_notify_new.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_notify_new.o: src/job-control/job_notify_new.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_remove.d b/42sh/objs/job-control/job_remove.d deleted file mode 100644 index 545d61d8..00000000 --- a/42sh/objs/job-control/job_remove.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_remove.o: src/job-control/job_remove.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_run.d b/42sh/objs/job-control/job_run.d deleted file mode 100644 index bd23bf28..00000000 --- a/42sh/objs/job-control/job_run.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_run.o: src/job-control/job_run.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_update_id.d b/42sh/objs/job-control/job_update_id.d deleted file mode 100644 index a542008e..00000000 --- a/42sh/objs/job-control/job_update_id.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_update_id.o: src/job-control/job_update_id.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_update_status.d b/42sh/objs/job-control/job_update_status.d deleted file mode 100644 index d557ad2d..00000000 --- a/42sh/objs/job-control/job_update_status.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_update_status.o: src/job-control/job_update_status.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/job_wait.d b/42sh/objs/job-control/job_wait.d deleted file mode 100644 index 11f06005..00000000 --- a/42sh/objs/job-control/job_wait.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/job_wait.o: src/job-control/job_wait.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/mark_job_as_running.d b/42sh/objs/job-control/mark_job_as_running.d deleted file mode 100644 index 58089f19..00000000 --- a/42sh/objs/job-control/mark_job_as_running.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/job-control/mark_job_as_running.o: \ - src/job-control/mark_job_as_running.c includes/job_control.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/process_cmp_pid.d b/42sh/objs/job-control/process_cmp_pid.d deleted file mode 100644 index 35886dc5..00000000 --- a/42sh/objs/job-control/process_cmp_pid.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/process_cmp_pid.o: src/job-control/process_cmp_pid.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/process_format.d b/42sh/objs/job-control/process_format.d deleted file mode 100644 index 7bbf0450..00000000 --- a/42sh/objs/job-control/process_format.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/process_format.o: src/job-control/process_format.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/process_free.d b/42sh/objs/job-control/process_free.d deleted file mode 100644 index 07209bee..00000000 --- a/42sh/objs/job-control/process_free.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/process_free.o: src/job-control/process_free.c \ - includes/job_control.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/process_mark_status.d b/42sh/objs/job-control/process_mark_status.d deleted file mode 100644 index c5fb61ed..00000000 --- a/42sh/objs/job-control/process_mark_status.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/job-control/process_mark_status.o: \ - src/job-control/process_mark_status.c includes/job_control.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/put_job_in_background.d b/42sh/objs/job-control/put_job_in_background.d deleted file mode 100644 index cfa0938a..00000000 --- a/42sh/objs/job-control/put_job_in_background.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/job-control/put_job_in_background.o: \ - src/job-control/put_job_in_background.c includes/job_control.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/put_job_in_foreground.d b/42sh/objs/job-control/put_job_in_foreground.d deleted file mode 100644 index b0322e72..00000000 --- a/42sh/objs/job-control/put_job_in_foreground.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/job-control/put_job_in_foreground.o: \ - src/job-control/put_job_in_foreground.c includes/job_control.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/exec.h \ - includes/minishell.h includes/lexer.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/sigchld_handler.d b/42sh/objs/job-control/sigchld_handler.d deleted file mode 100644 index b6e2b5c3..00000000 --- a/42sh/objs/job-control/sigchld_handler.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/sigchld_handler.o: src/job-control/sigchld_handler.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/sigint_handler.d b/42sh/objs/job-control/sigint_handler.d deleted file mode 100644 index 42ddb498..00000000 --- a/42sh/objs/job-control/sigint_handler.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/sigint_handler.o: src/job-control/sigint_handler.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/sigtstp_handler.d b/42sh/objs/job-control/sigtstp_handler.d deleted file mode 100644 index 8eac50f2..00000000 --- a/42sh/objs/job-control/sigtstp_handler.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/sigtstp_handler.o: src/job-control/sigtstp_handler.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/sigttin_handler.d b/42sh/objs/job-control/sigttin_handler.d deleted file mode 100644 index ac11d282..00000000 --- a/42sh/objs/job-control/sigttin_handler.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/sigttin_handler.o: src/job-control/sigttin_handler.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/job-control/sigttou_handler.d b/42sh/objs/job-control/sigttou_handler.d deleted file mode 100644 index acfd89be..00000000 --- a/42sh/objs/job-control/sigttou_handler.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/job-control/sigttou_handler.o: src/job-control/sigttou_handler.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/lexer/get_lexer_stack.d b/42sh/objs/lexer/get_lexer_stack.d deleted file mode 100644 index 33c4900b..00000000 --- a/42sh/objs/lexer/get_lexer_stack.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/lexer/get_lexer_stack.o: src/lexer/get_lexer_stack.c \ - includes/lexer.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/lexer/get_reserved_words.d b/42sh/objs/lexer/get_reserved_words.d deleted file mode 100644 index bbfb8e21..00000000 --- a/42sh/objs/lexer/get_reserved_words.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/lexer/get_reserved_words.o: src/lexer/get_reserved_words.c \ - includes/lexer.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/lexer/get_state_global.d b/42sh/objs/lexer/get_state_global.d deleted file mode 100644 index 44ee3528..00000000 --- a/42sh/objs/lexer/get_state_global.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/lexer/get_state_global.o: src/lexer/get_state_global.c \ - includes/lexer.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/lexer/get_state_redir.d b/42sh/objs/lexer/get_state_redir.d deleted file mode 100644 index 732027db..00000000 --- a/42sh/objs/lexer/get_state_redir.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/lexer/get_state_redir.o: src/lexer/get_state_redir.c \ - includes/lexer.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/lexer/insert_newline.d b/42sh/objs/lexer/insert_newline.d deleted file mode 100644 index 821da266..00000000 --- a/42sh/objs/lexer/insert_newline.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/insert_newline.o: src/lexer/insert_newline.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_assignement_word.d b/42sh/objs/lexer/lexer_assignement_word.d deleted file mode 100644 index fdecce12..00000000 --- a/42sh/objs/lexer/lexer_assignement_word.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/lexer/lexer_assignement_word.o: src/lexer/lexer_assignement_word.c \ - includes/lexer.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/lexer/lexer_backslash.d b/42sh/objs/lexer/lexer_backslash.d deleted file mode 100644 index ed8c3998..00000000 --- a/42sh/objs/lexer/lexer_backslash.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/lexer/lexer_backslash.o: src/lexer/lexer_backslash.c \ - includes/lexer.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/lexer/lexer_bquote.d b/42sh/objs/lexer/lexer_bquote.d deleted file mode 100644 index 43ee354f..00000000 --- a/42sh/objs/lexer/lexer_bquote.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_bquote.o: src/lexer/lexer_bquote.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_comment.d b/42sh/objs/lexer/lexer_comment.d deleted file mode 100644 index 22fe129f..00000000 --- a/42sh/objs/lexer/lexer_comment.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_comment.o: src/lexer/lexer_comment.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_curly_brackets.d b/42sh/objs/lexer/lexer_curly_brackets.d deleted file mode 100644 index b9f9a7d3..00000000 --- a/42sh/objs/lexer/lexer_curly_brackets.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/lexer/lexer_curly_brackets.o: src/lexer/lexer_curly_brackets.c \ - includes/parser.h includes/minishell.h libft/includes/libft.h \ - libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \ - libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \ - libft/includes/mytime.h libft/includes/get_next_line.h \ - libft/includes/color.h libft/includes/ft_sys.h includes/types.h \ - includes/lexer.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/lexer/lexer_default.d b/42sh/objs/lexer/lexer_default.d deleted file mode 100644 index 585fa28d..00000000 --- a/42sh/objs/lexer/lexer_default.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_default.o: src/lexer/lexer_default.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_delim.d b/42sh/objs/lexer/lexer_delim.d deleted file mode 100644 index bb9c7e94..00000000 --- a/42sh/objs/lexer/lexer_delim.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_delim.o: src/lexer/lexer_delim.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_dless.d b/42sh/objs/lexer/lexer_dless.d deleted file mode 100644 index dcdb441b..00000000 --- a/42sh/objs/lexer/lexer_dless.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_dless.o: src/lexer/lexer_dless.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_dquote.d b/42sh/objs/lexer/lexer_dquote.d deleted file mode 100644 index 01838b82..00000000 --- a/42sh/objs/lexer/lexer_dquote.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_dquote.o: src/lexer/lexer_dquote.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_end.d b/42sh/objs/lexer/lexer_end.d deleted file mode 100644 index 868b431c..00000000 --- a/42sh/objs/lexer/lexer_end.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_end.o: src/lexer/lexer_end.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_great.d b/42sh/objs/lexer/lexer_great.d deleted file mode 100644 index a2180b64..00000000 --- a/42sh/objs/lexer/lexer_great.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_great.o: src/lexer/lexer_great.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_greatand.d b/42sh/objs/lexer/lexer_greatand.d deleted file mode 100644 index 69c8375e..00000000 --- a/42sh/objs/lexer/lexer_greatand.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_greatand.o: src/lexer/lexer_greatand.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_init.d b/42sh/objs/lexer/lexer_init.d deleted file mode 100644 index 4ee3c05b..00000000 --- a/42sh/objs/lexer/lexer_init.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_init.o: src/lexer/lexer_init.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_less.d b/42sh/objs/lexer/lexer_less.d deleted file mode 100644 index ebccd85b..00000000 --- a/42sh/objs/lexer/lexer_less.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_less.o: src/lexer/lexer_less.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_lessand.d b/42sh/objs/lexer/lexer_lessand.d deleted file mode 100644 index e3358721..00000000 --- a/42sh/objs/lexer/lexer_lessand.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_lessand.o: src/lexer/lexer_lessand.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_lex.d b/42sh/objs/lexer/lexer_lex.d deleted file mode 100644 index ad9b5d4e..00000000 --- a/42sh/objs/lexer/lexer_lex.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_lex.o: src/lexer/lexer_lex.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_newline.d b/42sh/objs/lexer/lexer_newline.d deleted file mode 100644 index d11e70b2..00000000 --- a/42sh/objs/lexer/lexer_newline.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_newline.o: src/lexer/lexer_newline.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_number.d b/42sh/objs/lexer/lexer_number.d deleted file mode 100644 index e49baefb..00000000 --- a/42sh/objs/lexer/lexer_number.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_number.o: src/lexer/lexer_number.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_paren.d b/42sh/objs/lexer/lexer_paren.d deleted file mode 100644 index d0f86ab7..00000000 --- a/42sh/objs/lexer/lexer_paren.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_paren.o: src/lexer/lexer_paren.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_quote.d b/42sh/objs/lexer/lexer_quote.d deleted file mode 100644 index bb8ed097..00000000 --- a/42sh/objs/lexer/lexer_quote.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_quote.o: src/lexer/lexer_quote.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_sep.d b/42sh/objs/lexer/lexer_sep.d deleted file mode 100644 index 060a4b6f..00000000 --- a/42sh/objs/lexer/lexer_sep.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_sep.o: src/lexer/lexer_sep.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/lexer_word.d b/42sh/objs/lexer/lexer_word.d deleted file mode 100644 index 393edf7e..00000000 --- a/42sh/objs/lexer/lexer_word.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/lexer_word.o: src/lexer/lexer_word.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/token_append.d b/42sh/objs/lexer/token_append.d deleted file mode 100644 index 367c7fab..00000000 --- a/42sh/objs/lexer/token_append.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/token_append.o: src/lexer/token_append.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/token_cmp_type.d b/42sh/objs/lexer/token_cmp_type.d deleted file mode 100644 index 13aacae7..00000000 --- a/42sh/objs/lexer/token_cmp_type.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/token_cmp_type.o: src/lexer/token_cmp_type.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/token_free.d b/42sh/objs/lexer/token_free.d deleted file mode 100644 index 0357cacc..00000000 --- a/42sh/objs/lexer/token_free.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/token_free.o: src/lexer/token_free.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/token_init.d b/42sh/objs/lexer/token_init.d deleted file mode 100644 index 0f3b7925..00000000 --- a/42sh/objs/lexer/token_init.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/token_init.o: src/lexer/token_init.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/lexer/token_print.d b/42sh/objs/lexer/token_print.d deleted file mode 100644 index c00139ec..00000000 --- a/42sh/objs/lexer/token_print.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/lexer/token_print.o: src/lexer/token_print.c includes/lexer.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/parser.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/line-editing/completion.d b/42sh/objs/line-editing/completion.d deleted file mode 100644 index 5e65f8e8..00000000 --- a/42sh/objs/line-editing/completion.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/completion.o: src/line-editing/completion.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/control_c_and_d.d b/42sh/objs/line-editing/control_c_and_d.d deleted file mode 100644 index d0f99cb6..00000000 --- a/42sh/objs/line-editing/control_c_and_d.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/control_c_and_d.o: src/line-editing/control_c_and_d.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/copy_cut_paste.d b/42sh/objs/line-editing/copy_cut_paste.d deleted file mode 100644 index 4ae03557..00000000 --- a/42sh/objs/line-editing/copy_cut_paste.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/copy_cut_paste.o: src/line-editing/copy_cut_paste.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/ft_prompt.d b/42sh/objs/line-editing/ft_prompt.d deleted file mode 100644 index 0e111e7a..00000000 --- a/42sh/objs/line-editing/ft_prompt.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/ft_prompt.o: src/line-editing/ft_prompt.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/get_key.d b/42sh/objs/line-editing/get_key.d deleted file mode 100644 index acae0b18..00000000 --- a/42sh/objs/line-editing/get_key.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/get_key.o: src/line-editing/get_key.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/home_end.d b/42sh/objs/line-editing/home_end.d deleted file mode 100644 index 9aed3bbc..00000000 --- a/42sh/objs/line-editing/home_end.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/home_end.o: src/line-editing/home_end.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/tool_line.d b/42sh/objs/line-editing/lib_line_editing/tool_line.d deleted file mode 100644 index 4b90a89f..00000000 --- a/42sh/objs/line-editing/lib_line_editing/tool_line.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/line-editing/lib_line_editing/tool_line.o: \ - src/line-editing/lib_line_editing/tool_line.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/tool_line_2.d b/42sh/objs/line-editing/lib_line_editing/tool_line_2.d deleted file mode 100644 index d0b9f168..00000000 --- a/42sh/objs/line-editing/lib_line_editing/tool_line_2.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/line-editing/lib_line_editing/tool_line_2.o: \ - src/line-editing/lib_line_editing/tool_line_2.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/toolz.d b/42sh/objs/line-editing/lib_line_editing/toolz.d deleted file mode 100644 index 08f16b8b..00000000 --- a/42sh/objs/line-editing/lib_line_editing/toolz.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/line-editing/lib_line_editing/toolz.o: \ - src/line-editing/lib_line_editing/toolz.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/toolz2.d b/42sh/objs/line-editing/lib_line_editing/toolz2.d deleted file mode 100644 index c90c4b26..00000000 --- a/42sh/objs/line-editing/lib_line_editing/toolz2.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/line-editing/lib_line_editing/toolz2.o: \ - src/line-editing/lib_line_editing/toolz2.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/toolz_parseur.d b/42sh/objs/line-editing/lib_line_editing/toolz_parseur.d deleted file mode 100644 index f5546aa3..00000000 --- a/42sh/objs/line-editing/lib_line_editing/toolz_parseur.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/line-editing/lib_line_editing/toolz_parseur.o: \ - src/line-editing/lib_line_editing/toolz_parseur.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/lib_line_editing/toolz_termcaps.d b/42sh/objs/line-editing/lib_line_editing/toolz_termcaps.d deleted file mode 100644 index 7b7a9634..00000000 --- a/42sh/objs/line-editing/lib_line_editing/toolz_termcaps.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/line-editing/lib_line_editing/toolz_termcaps.o: \ - src/line-editing/lib_line_editing/toolz_termcaps.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/move_left_and_right.d b/42sh/objs/line-editing/move_left_and_right.d deleted file mode 100644 index c9a30c9d..00000000 --- a/42sh/objs/line-editing/move_left_and_right.d +++ /dev/null @@ -1,11 +0,0 @@ -objs/line-editing/move_left_and_right.o: \ - src/line-editing/move_left_and_right.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/move_to_word.d b/42sh/objs/line-editing/move_to_word.d deleted file mode 100644 index f6a580d0..00000000 --- a/42sh/objs/line-editing/move_to_word.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/move_to_word.o: src/line-editing/move_to_word.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/move_up_and_down.d b/42sh/objs/line-editing/move_up_and_down.d deleted file mode 100644 index ca251284..00000000 --- a/42sh/objs/line-editing/move_up_and_down.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/move_up_and_down.o: src/line-editing/move_up_and_down.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/print_and_del.d b/42sh/objs/line-editing/print_and_del.d deleted file mode 100644 index ed044083..00000000 --- a/42sh/objs/line-editing/print_and_del.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/print_and_del.o: src/line-editing/print_and_del.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/queue.d b/42sh/objs/line-editing/queue.d deleted file mode 100644 index a893ff9e..00000000 --- a/42sh/objs/line-editing/queue.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/queue.o: src/line-editing/queue.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/line-editing/readline.d b/42sh/objs/line-editing/readline.d deleted file mode 100644 index 7b738413..00000000 --- a/42sh/objs/line-editing/readline.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/line-editing/readline.o: src/line-editing/readline.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/main/data_exit.d b/42sh/objs/main/data_exit.d deleted file mode 100644 index a1fac3c9..00000000 --- a/42sh/objs/main/data_exit.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/main/data_exit.o: src/main/data_exit.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/main/data_init.d b/42sh/objs/main/data_init.d deleted file mode 100644 index 49e739da..00000000 --- a/42sh/objs/main/data_init.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/main/data_init.o: src/main/data_init.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/main/data_singleton.d b/42sh/objs/main/data_singleton.d deleted file mode 100644 index 9be60903..00000000 --- a/42sh/objs/main/data_singleton.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/main/data_singleton.o: src/main/data_singleton.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/main/ft_putast.d b/42sh/objs/main/ft_putast.d deleted file mode 100644 index d335f39b..00000000 --- a/42sh/objs/main/ft_putast.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/main/ft_putast.o: src/main/ft_putast.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/main/main.d b/42sh/objs/main/main.d deleted file mode 100644 index 5da61998..00000000 --- a/42sh/objs/main/main.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/main/main.o: src/main/main.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/main/shell_exit.d b/42sh/objs/main/shell_exit.d deleted file mode 100644 index 0d304bf9..00000000 --- a/42sh/objs/main/shell_exit.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/main/shell_exit.o: src/main/shell_exit.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/main/shell_get_avdata.d b/42sh/objs/main/shell_get_avdata.d deleted file mode 100644 index 489615e5..00000000 --- a/42sh/objs/main/shell_get_avdata.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/main/shell_get_avdata.o: src/main/shell_get_avdata.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/main/shell_get_opts.d b/42sh/objs/main/shell_get_opts.d deleted file mode 100644 index b5fe8d72..00000000 --- a/42sh/objs/main/shell_get_opts.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/main/shell_get_opts.o: src/main/shell_get_opts.c \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/main/shell_init.d b/42sh/objs/main/shell_init.d deleted file mode 100644 index bfb3d987..00000000 --- a/42sh/objs/main/shell_init.d +++ /dev/null @@ -1,10 +0,0 @@ -objs/main/shell_init.o: src/main/shell_init.c includes/minishell.h \ - libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \ - libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \ - libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/parser.h includes/ft_readline.h includes/ft_input.h \ - includes/exec.h includes/job_control.h includes/builtin.h \ - includes/builtin_read.h includes/glob.h includes/completion.h \ - includes/hash.h diff --git a/42sh/objs/parser/add_case.d b/42sh/objs/parser/add_case.d deleted file mode 100644 index caa49d65..00000000 --- a/42sh/objs/parser/add_case.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/add_case.o: src/parser/add_case.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_cmd.d b/42sh/objs/parser/add_cmd.d deleted file mode 100644 index 69abecee..00000000 --- a/42sh/objs/parser/add_cmd.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/add_cmd.o: src/parser/add_cmd.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_condition.d b/42sh/objs/parser/add_condition.d deleted file mode 100644 index 81f9912c..00000000 --- a/42sh/objs/parser/add_condition.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/add_condition.o: src/parser/add_condition.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_file.d b/42sh/objs/parser/add_file.d deleted file mode 100644 index 956785ae..00000000 --- a/42sh/objs/parser/add_file.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/add_file.o: src/parser/add_file.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_loop.d b/42sh/objs/parser/add_loop.d deleted file mode 100644 index 8aa90512..00000000 --- a/42sh/objs/parser/add_loop.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/add_loop.o: src/parser/add_loop.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_sep.d b/42sh/objs/parser/add_sep.d deleted file mode 100644 index d28684c3..00000000 --- a/42sh/objs/parser/add_sep.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/add_sep.o: src/parser/add_sep.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/add_subshell.d b/42sh/objs/parser/add_subshell.d deleted file mode 100644 index 3c3dae01..00000000 --- a/42sh/objs/parser/add_subshell.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/add_subshell.o: src/parser/add_subshell.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/aggregate_sym.d b/42sh/objs/parser/aggregate_sym.d deleted file mode 100644 index 0963f76c..00000000 --- a/42sh/objs/parser/aggregate_sym.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/aggregate_sym.o: src/parser/aggregate_sym.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/build_tree.d b/42sh/objs/parser/build_tree.d deleted file mode 100644 index 246fcb51..00000000 --- a/42sh/objs/parser/build_tree.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/build_tree.o: src/parser/build_tree.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/error_syntax.d b/42sh/objs/parser/error_syntax.d deleted file mode 100644 index 867dddf1..00000000 --- a/42sh/objs/parser/error_syntax.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/error_syntax.o: src/parser/error_syntax.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/eval_sym.d b/42sh/objs/parser/eval_sym.d deleted file mode 100644 index deac8211..00000000 --- a/42sh/objs/parser/eval_sym.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/eval_sym.o: src/parser/eval_sym.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/ft_parse.d b/42sh/objs/parser/ft_parse.d deleted file mode 100644 index a1bd3710..00000000 --- a/42sh/objs/parser/ft_parse.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/ft_parse.o: src/parser/ft_parse.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/parser_init.d b/42sh/objs/parser/parser_init.d deleted file mode 100644 index 3d2daa4e..00000000 --- a/42sh/objs/parser/parser_init.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/parser_init.o: src/parser/parser_init.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/pop_stack.d b/42sh/objs/parser/pop_stack.d deleted file mode 100644 index 7fa094af..00000000 --- a/42sh/objs/parser/pop_stack.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/pop_stack.o: src/parser/pop_stack.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/produce_sym.d b/42sh/objs/parser/produce_sym.d deleted file mode 100644 index 4f304113..00000000 --- a/42sh/objs/parser/produce_sym.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/produce_sym.o: src/parser/produce_sym.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/push_stack.d b/42sh/objs/parser/push_stack.d deleted file mode 100644 index cb9ff706..00000000 --- a/42sh/objs/parser/push_stack.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/push_stack.o: src/parser/push_stack.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/read_stack.d b/42sh/objs/parser/read_stack.d deleted file mode 100644 index bfa5ac37..00000000 --- a/42sh/objs/parser/read_stack.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/read_stack.o: src/parser/read_stack.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h diff --git a/42sh/objs/parser/tree_wrapper.d b/42sh/objs/parser/tree_wrapper.d deleted file mode 100644 index 1fc2ef3b..00000000 --- a/42sh/objs/parser/tree_wrapper.d +++ /dev/null @@ -1,9 +0,0 @@ -objs/parser/tree_wrapper.o: src/parser/tree_wrapper.c includes/parser.h \ - includes/minishell.h libft/includes/libft.h libft/includes/lst.h \ - libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \ - libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \ - libft/includes/get_next_line.h libft/includes/color.h \ - libft/includes/ft_sys.h includes/types.h includes/lexer.h \ - includes/ft_readline.h includes/ft_input.h includes/exec.h \ - includes/job_control.h includes/builtin.h includes/builtin_read.h \ - includes/glob.h includes/completion.h includes/hash.h From 7b1d505a5b315b0d899c5e1926502fc273a458ec Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Sat, 25 Feb 2017 00:31:51 +0100 Subject: [PATCH 19/23] gen func ok, todo: multi branch declaration, probleme lexer sur brackets --- 42sh/Makefile | 3 +- 42sh/includes/parser.h | 3 ++ 42sh/sample/func/func01.sh | 6 ++- 42sh/src/main/ft_putast.c | 9 ++++- 42sh/src/main/main.c | 2 +- 42sh/src/parser/add_cmd.c | 6 ++- 42sh/src/parser/add_condition.c | 2 +- 42sh/src/parser/add_func.c | 65 +++++++++++++++++++++++++++++++++ 42sh/src/parser/add_sep.c | 4 +- 42sh/src/parser/add_subshell.c | 2 +- 42sh/src/parser/build_tree.c | 13 +++++-- 42sh/src/parser/ft_parse.c | 4 +- 42sh/src/parser/read_stack.c | 2 +- 13 files changed, 105 insertions(+), 16 deletions(-) create mode 100644 42sh/src/parser/add_func.c diff --git a/42sh/Makefile b/42sh/Makefile index e99bd9a8..e42b63b4 100644 --- a/42sh/Makefile +++ b/42sh/Makefile @@ -6,7 +6,7 @@ # By: wescande +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2016/08/29 21:32:58 by wescande #+# #+# # -# Updated: 2017/02/24 21:33:24 by ariard ### ########.fr # +# Updated: 2017/02/25 00:13:39 by ariard ### ########.fr # # # # **************************************************************************** # @@ -233,6 +233,7 @@ parser/add_file.c\ parser/add_loop.c\ parser/add_sep.c\ parser/add_case.c\ +parser/add_func.c\ parser/aggregate_sym.c\ parser/build_tree.c\ parser/error_syntax.c\ diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index 34290b31..2485e058 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -226,11 +226,14 @@ int add_case_sep(t_btree **ast, t_list **lst); int add_pattern(t_btree **ast, t_list **lst); int add_subshell_cmd(t_btree **ast, t_list **lst); int add_subshell_sep(t_btree **ast, t_list **lst); +int add_func_cmd(t_btree **ast, t_list **lst); +int add_func_sep(t_btree **ast, t_list **lst); int isloop(t_btree **ast, t_list **lst); int isdir(t_btree **ast); int iscase(t_btree **ast, t_list **lst); int iscondition(t_btree **ast, t_list **lst); int issubshell(t_btree **ast, t_list **lst); +int isfunc(t_btree **ast, t_list **lst); int join_ast(t_btree **ast, t_btree **new_node); int gen_node(t_btree **ast); diff --git a/42sh/sample/func/func01.sh b/42sh/sample/func/func01.sh index b3bc2ba1..d559c7d2 100644 --- a/42sh/sample/func/func01.sh +++ b/42sh/sample/func/func01.sh @@ -1,4 +1,6 @@ hello() { - ls | cat - pwd ; cd + yolo() { + echo bonjour + } } + diff --git a/42sh/src/main/ft_putast.c b/42sh/src/main/ft_putast.c index 134e3370..60d40e35 100644 --- a/42sh/src/main/ft_putast.c +++ b/42sh/src/main/ft_putast.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/14 18:18:04 by jhalford #+# #+# */ -/* Updated: 2017/02/24 20:59:07 by ariard ### ########.fr */ +/* Updated: 2017/02/25 00:17:44 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,13 @@ char *ft_putast(void *nodein) { t_astnode *node; node = nodein; + + if (node->type == CLOSE_LIST) + return ("CLOSE_LIST"); + if (node->type == FNAME) + return ("FNAME"); + if (node->type == TK_LBRACE) + return ("TK_LBRACE"); if (node->type == TK_ASSIGNEMENT_WORD) return ("ASSIGNEMENT_WORD"); if (node->type == SUBSHELL) diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index ec5af014..aa10e74b 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/02/24 21:48:51 by ariard ### ########.fr */ +/* Updated: 2017/02/25 00:00:16 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index b1843f82..05f7a70e 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 20:49:15 by ariard #+# #+# */ -/* Updated: 2017/02/24 19:40:07 by ariard ### ########.fr */ +/* Updated: 2017/02/25 00:11:05 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,7 +19,7 @@ int add_cmd(t_btree **ast, t_list **lst) char **my_tab; DG("add cmd"); - if ((token = (*lst)->content)->type == TK_IN) + if ((token = (*lst)->content)->type == TK_IN || token->type == TK_PAREN_OPEN) return (0); else if (!*ast) gen_node(ast); @@ -41,6 +41,8 @@ int add_cmd(t_btree **ast, t_list **lst) return (add_branch(ast, lst)); else if (issubshell(ast, lst)) return (add_subshell_cmd(ast, lst)); + else if (isfunc(ast, lst)) + return (add_func_cmd(ast, lst)); else if ((node = (*ast)->item)->type != TK_DO && node->type != TK_THEN && node->type != TK_PAREN_CLOSE) return (add_cmd(&(*ast)->right, lst)); diff --git a/42sh/src/parser/add_condition.c b/42sh/src/parser/add_condition.c index b95c45ab..abadea9c 100644 --- a/42sh/src/parser/add_condition.c +++ b/42sh/src/parser/add_condition.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/19 18:12:52 by ariard #+# #+# */ -/* Updated: 2017/02/24 15:45:39 by ariard ### ########.fr */ +/* Updated: 2017/02/25 00:11:09 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_func.c b/42sh/src/parser/add_func.c new file mode 100644 index 00000000..6bd17009 --- /dev/null +++ b/42sh/src/parser/add_func.c @@ -0,0 +1,65 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* add_func.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ariard +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2017/02/24 23:43:07 by ariard #+# #+# */ +/* Updated: 2017/02/25 00:28:35 by ariard ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "parser.h" + +int isfunc(t_btree **ast, t_list **lst) +{ + t_astnode *node; + t_token *token; + + node = NULL; + token = (*lst)->content; + if (*ast) + { + node = (*ast)->item; + if (node->type == TK_WORD && token->type == CLOSE_LIST) + node->type = FNAME; + if (node->type == FNAME && node->full == 0) + return (1); + if (isfunc(&(*ast)->right, lst) == 1) + return (1); + } + return (0); +} + +int add_func_cmd(t_btree **ast, t_list **lst) +{ + t_astnode *node; + t_token *token; + + token = (*lst)->content; + node = (*ast)->item; + if (token->type == CLOSE_LIST && node->nest == 0) + return (0); + if ((token->type == TK_CASE || token->type == TK_WHILE || token->type == TK_IF + || token->type == TK_UNTIL || token->type == TK_FOR + || token->type == SUBSHELL || token->type == TK_LBRACE) + && node->type == FNAME) + node->nest++; + if ((token->type == TK_DONE || token->type == TK_ESAC || token->type == TK_FI + || token->type == TK_RBRACE || token->type == TK_PAREN_OPEN) + && node->type == FNAME && node->nest > 0) + node->nest--; + if ((token->type == TK_DONE || token->type == TK_ESAC || token->type == TK_FI + || token->type == TK_RBRACE || token->type == TK_PAREN_OPEN) + && node->type == FNAME && node->nest == 0) + node->full = 1; + return (add_cmd(&(*ast)->right, lst)); +} + +int add_func_sep(t_btree **ast, t_list **lst) +{ + return (add_sep(&(*ast)->right, lst)); +} + + diff --git a/42sh/src/parser/add_sep.c b/42sh/src/parser/add_sep.c index 5a084a01..d30c5c34 100644 --- a/42sh/src/parser/add_sep.c +++ b/42sh/src/parser/add_sep.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 19:12:07 by ariard #+# #+# */ -/* Updated: 2017/02/24 19:40:12 by ariard ### ########.fr */ +/* Updated: 2017/02/25 00:13:07 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -27,6 +27,8 @@ int add_sep(t_btree **ast, t_list **lst) return (add_case_sep(ast, lst)); else if (issubshell(ast, lst)) return (add_subshell_sep(ast, lst)); + else if (isfunc(ast, lst)) + return (add_func_sep(ast, lst)); if (!*ast) gen_node(ast); token = (*lst)->content; diff --git a/42sh/src/parser/add_subshell.c b/42sh/src/parser/add_subshell.c index 3341234e..17e83953 100644 --- a/42sh/src/parser/add_subshell.c +++ b/42sh/src/parser/add_subshell.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/24 18:41:50 by ariard #+# #+# */ -/* Updated: 2017/02/24 23:15:24 by ariard ### ########.fr */ +/* Updated: 2017/02/24 23:38:40 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/build_tree.c b/42sh/src/parser/build_tree.c index 9fdcc75c..47ba3781 100644 --- a/42sh/src/parser/build_tree.c +++ b/42sh/src/parser/build_tree.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:32:59 by ariard #+# #+# */ -/* Updated: 2017/02/24 23:14:00 by ariard ### ########.fr */ +/* Updated: 2017/02/24 23:58:10 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -40,6 +40,9 @@ t_treematch g_treematch[] = {TK_FOR, &add_cmd}, {TK_ASSIGNEMENT_WORD, &add_cmd}, {SUBSHELL, &add_cmd}, + {TK_LBRACE, &add_cmd}, + {TK_RBRACE, &add_cmd}, + {CLOSE_LIST, &add_cmd}, {0, NULL}, }; @@ -47,8 +50,9 @@ static int isseparator(t_token *token, int cache) { if (token->type == TK_NEWLINE && (cache == TK_WHILE || cache == TK_DO || cache == TK_NEWLINE || cache == TK_THEN || cache == TK_IN - || cache == TK_WORD || cache == TK_DSEMI)) + || cache == TK_DSEMI)) return (0); +//check cache == WORD return (1); } @@ -62,8 +66,11 @@ int build_tree(t_btree **ast, t_list **lst) token = (*lst)->content; //check bug de cache case ? // cache = token->type; - if (token->type == TK_PAREN_OPEN && cache != TK_IN && cache != TK_DSEMI) + if (token->type == TK_PAREN_OPEN && cache != TK_IN && cache != TK_DSEMI + && cache != TK_WORD) token->type = SUBSHELL; + if (token->type == TK_PAREN_CLOSE && cache == TK_PAREN_OPEN) + token->type = CLOSE_LIST; while (g_treematch[i].type) { if ((isseparator(token, cache) && g_treematch[i].type == token->type)) diff --git a/42sh/src/parser/ft_parse.c b/42sh/src/parser/ft_parse.c index f971f12f..01f978b8 100644 --- a/42sh/src/parser/ft_parse.c +++ b/42sh/src/parser/ft_parse.c @@ -49,8 +49,8 @@ int ft_parse(t_btree **ast, t_list **token, t_parser *parser) parser->state = SUCCESS; else parser->state = UNDEFINED; -// build_tree(ast, token); -// btree_print(STDBUG, *ast, &ft_putast); + build_tree(ast, token); + btree_print(STDBUG, *ast, &ft_putast); if ((end_instruction(*parser->stack) && !(*token)->next)) insert_linebreak(token); else diff --git a/42sh/src/parser/read_stack.c b/42sh/src/parser/read_stack.c index f5cf146b..ebb6e4d8 100644 --- a/42sh/src/parser/read_stack.c +++ b/42sh/src/parser/read_stack.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 15:32:10 by ariard #+# #+# */ -/* Updated: 2017/02/24 22:59:52 by ariard ### ########.fr */ +/* Updated: 2017/02/25 00:15:00 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ From eeb088708173100842372f8085639e53eab60d7e Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Sat, 25 Feb 2017 19:31:02 +0100 Subject: [PATCH 20/23] commit from un cluster qui marche aka new redir --- 42sh/includes/parser.h | 111 +---------------------------- 42sh/includes/types.h | 110 +++++++++++++++++++++++++++- 42sh/sample/redir/redir.sh | 1 + 42sh/sample/subshell/subshell01.sh | 3 +- 42sh/src/main/main.c | 2 +- 42sh/src/parser/add_cmd.c | 4 +- 42sh/src/parser/add_file.c | 59 +++++++++++---- 42sh/src/parser/add_func.c | 2 +- 42sh/src/parser/add_loop.c | 2 +- 42sh/src/parser/add_sep.c | 4 +- 42sh/src/parser/aggregate_sym.c | 2 +- 42sh/src/parser/build_tree.c | 4 +- 42sh/src/parser/produce_sym.c | 2 +- 42sh/src/parser/tree_wrapper.c | 2 +- 14 files changed, 173 insertions(+), 135 deletions(-) create mode 100644 42sh/sample/redir/redir.sh diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index 2485e058..80ffcebb 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -26,114 +26,6 @@ enum e_parstate SUCCESS, }; -enum e_sym -{ - LINEBREAK = 1, - TK_COMMAND, - TK_LESS, - TK_GREAT, - TK_DLESS, - TK_DGREAT, - TK_LESSAND, - TK_GREATAND, - TK_SEMI, - TK_PIPE, - TK_AND_IF, - TK_OR_IF, - TK_AMP, - TK_PAREN_OPEN, - TK_PAREN_CLOSE, - TK_BQUOTE, - TK_NEWLINE, - TK_WHILE, - TK_DO, - TK_DONE, - TK_IF, - TK_THEN, - TK_FI, - TK_ELIF, - TK_ELSE, - TK_UNTIL, - TK_WORD, - TK_ASSIGNEMENT_WORD = 50, - TK_BANG, - TK_NAME, - TK_FOR, - TK_IO_NUMBER, - TK_DLESSDASH, - TK_LESSGREAT, - TK_SUBSHELL, - TK_CASE, - TK_IN, - TK_ESAC, - TK_CLOBBER, - TK_LBRACE, - TK_RBRACE, - TK_DSEMI, - PROGRAM = 100, - COMPLETE_COMMAND, - COMPLETE_COMMANDS, - LIST, - AND_OR, - PIPELINE, - PIPE_SEQUENCE, - COMMAND, - COMPOUND_COMMAND, - SUBSHELL, - COMPOUND_LIST, - TERM, - FOR_CLAUSE, - NAME, - IN, - WORDLIST, - CASE_CLAUSE, - CASE_LIST, - CASE_LIST_NS, - CASE_ITEM, - CASE_ITEM_NS, - PATTERN, - IF_CLAUSE, - BRACE_CLAUSE, - ELSE_PART, - WHILE_CLAUSE, - UNTIL_CLAUSE, - FUNCTION_DEFINITION, - FUNCTION_BODY, - FNAME, - BRACE_GROUP, - DO_GROUP, - SIMPLE_COMMAND, - CMD_NAME, - CMD_WORD, - CMD_PREFIX, - CMD_SUFFIX, - REDIRECT_LIST, - IO_REDIRECT, - IO_FILE, - FILENAME, - IO_HERE, - HERE_END, - NEWLINE_LIST, - SEPARATOR_OP, - SEPARATOR, - SEQUENTIAL_SEP, - BRACE, - LOOP, - FUNC, - PIPE_SEMI_SEQUENCE, - CMD_SUPERIOR, - AND_OR_MAJOR, - AND_OR_MINOR, - END_COMMAND, - CONDITION, - COMPLETE_CONDITION, - FOR_WORDLIST, - PATTERN_CASE, - FUNC_NAME, - CLOSE_LIST, - ALL = 200, -}; - # define TK_REDIR(x) (TK_LESS <= x && x <= TK_GREATAND) # define MATCH_STACK(x, y) (x == y || y == ALL) @@ -215,6 +107,7 @@ int build_tree(t_btree **ast, t_list **lst); int add_sep(t_btree **ast, t_list **lst); int add_cmd(t_btree **ast, t_list **lst); int add_file(t_btree **ast, t_list **lst); +int add_redir(t_btree **ast, t_list **lst); int add_loop_cmd(t_btree **ast, t_list **lst); int add_loop_sep(t_btree **ast, t_list **lst); int add_loop_condition(t_btree **ast, t_list **lst); @@ -229,7 +122,7 @@ int add_subshell_sep(t_btree **ast, t_list **lst); int add_func_cmd(t_btree **ast, t_list **lst); int add_func_sep(t_btree **ast, t_list **lst); int isloop(t_btree **ast, t_list **lst); -int isdir(t_btree **ast); +int isdir(t_btree **ast, t_list **lst); int iscase(t_btree **ast, t_list **lst); int iscondition(t_btree **ast, t_list **lst); int issubshell(t_btree **ast, t_list **lst); diff --git a/42sh/includes/types.h b/42sh/includes/types.h index f365bd63..95080d63 100644 --- a/42sh/includes/types.h +++ b/42sh/includes/types.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 17:11:48 by jhalford #+# #+# */ -/* Updated: 2017/02/21 16:15:41 by ariard ### ########.fr */ +/* Updated: 2017/02/25 18:47:20 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -51,4 +51,112 @@ typedef struct s_treematch t_treematch; t_data *data_singleton(); +enum e_sym +{ + LINEBREAK = 1, + TK_COMMAND, + TK_LESS, + TK_GREAT, + TK_DLESS, + TK_DGREAT, + TK_LESSAND, + TK_GREATAND, + TK_SEMI, + TK_PIPE, + TK_AND_IF, + TK_OR_IF, + TK_AMP, + TK_PAREN_OPEN, + TK_PAREN_CLOSE, + TK_BQUOTE, + TK_NEWLINE, + TK_WHILE, + TK_DO, + TK_DONE, + TK_IF, + TK_THEN, + TK_FI, + TK_ELIF, + TK_ELSE, + TK_UNTIL, + TK_WORD, + TK_ASSIGNEMENT_WORD = 50, + TK_BANG, + TK_NAME, + TK_FOR, + TK_IO_NUMBER, + TK_DLESSDASH, + TK_LESSGREAT, + TK_SUBSHELL, + TK_CASE, + TK_IN, + TK_ESAC, + TK_CLOBBER, + TK_LBRACE, + TK_RBRACE, + TK_DSEMI, + PROGRAM = 100, + COMPLETE_COMMAND, + COMPLETE_COMMANDS, + LIST, + AND_OR, + PIPELINE, + PIPE_SEQUENCE, + COMMAND, + COMPOUND_COMMAND, + SUBSHELL, + COMPOUND_LIST, + TERM, + FOR_CLAUSE, + NAME, + IN, + WORDLIST, + CASE_CLAUSE, + CASE_LIST, + CASE_LIST_NS, + CASE_ITEM, + CASE_ITEM_NS, + PATTERN, + IF_CLAUSE, + BRACE_CLAUSE, + ELSE_PART, + WHILE_CLAUSE, + UNTIL_CLAUSE, + FUNCTION_DEFINITION, + FUNCTION_BODY, + FNAME, + BRACE_GROUP, + DO_GROUP, + SIMPLE_COMMAND, + CMD_NAME, + CMD_WORD, + CMD_PREFIX, + CMD_SUFFIX, + REDIRECT_LIST, + IO_REDIRECT, + IO_FILE, + FILENAME, + IO_HERE, + HERE_END, + NEWLINE_LIST, + SEPARATOR_OP, + SEPARATOR, + SEQUENTIAL_SEP, + BRACE, + LOOP, + FUNC, + PIPE_SEMI_SEQUENCE, + CMD_SUPERIOR, + AND_OR_MAJOR, + AND_OR_MINOR, + END_COMMAND, + CONDITION, + COMPLETE_CONDITION, + FOR_WORDLIST, + PATTERN_CASE, + FUNC_NAME, + CLOSE_LIST, + ALL = 200, +}; + #endif diff --git a/42sh/sample/redir/redir.sh b/42sh/sample/redir/redir.sh new file mode 100644 index 00000000..521002db --- /dev/null +++ b/42sh/sample/redir/redir.sh @@ -0,0 +1 @@ +ls >> 1 >> 2 >> 3 < 4 < 5 ; pwd > 1 > 2 diff --git a/42sh/sample/subshell/subshell01.sh b/42sh/sample/subshell/subshell01.sh index 244aeed7..f1f04671 100644 --- a/42sh/sample/subshell/subshell01.sh +++ b/42sh/sample/subshell/subshell01.sh @@ -1 +1,2 @@ -(ls | cat && pwd) +(ls | cat +pwd ; ls) diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index aa10e74b..ac3ffd25 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/02/25 00:00:16 by ariard ### ########.fr */ +/* Updated: 2017/02/25 18:25:11 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index 05f7a70e..d372954d 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 20:49:15 by ariard #+# #+# */ -/* Updated: 2017/02/25 00:11:05 by ariard ### ########.fr */ +/* Updated: 2017/02/25 18:50:30 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,7 +23,7 @@ int add_cmd(t_btree **ast, t_list **lst) return (0); else if (!*ast) gen_node(ast); - else if (isdir(ast)) + else if (isdir(ast, lst)) return (add_file(ast, lst)); else if (isloop(ast, lst) == 3) return (add_loop_condition(ast, lst)); diff --git a/42sh/src/parser/add_file.c b/42sh/src/parser/add_file.c index 66f13d1b..d7df98a9 100644 --- a/42sh/src/parser/add_file.c +++ b/42sh/src/parser/add_file.c @@ -6,24 +6,35 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 16:39:05 by ariard #+# #+# */ -/* Updated: 2017/02/18 16:43:28 by ariard ### ########.fr */ +/* Updated: 2017/02/25 19:29:53 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ #include "parser.h" -int isdir(t_btree **ast) +int isdir(t_btree **ast, t_list **list) { t_astnode *node; + t_token *token; - node = (*ast)->item; - if (node->data.redir.word.word) - return (0); - if (node->type == TK_LESS || node->type == TK_GREAT - || node->type == TK_LESSAND || node->type == TK_GREATAND - || node->type == TK_DGREAT || node->type == TK_LESSGREAT - || node->type == TK_CLOBBER) - return (1); + token = (*list)->content; + if (ast) + { + DG("isdir"); + node = (*ast)->item; + if ((node->type == TK_LESS || node->type == TK_GREAT + || node->type == TK_LESSAND || node->type == TK_GREATAND + || node->type == TK_DGREAT) + && token->type == TK_WORD) + return (1); + if ((node->type == TK_LESS || node->type == TK_GREAT + || node->type == TK_LESSAND || node->type == TK_GREATAND + || node->type == TK_DGREAT) + && (token->type == TK_LESS || token->type == TK_GREAT + || token->type == TK_LESSAND || token->type == TK_GREATAND + || token->type == TK_DGREAT)) + return (2); + } return (0); } @@ -31,10 +42,30 @@ int add_file(t_btree **ast, t_list **lst) { t_astnode *node; t_token *token; - + t_redir *redir; + token = (*lst)->content; node = (*ast)->item; - node->data.redir.n = ft_atoi(token->data); - node->data.redir.word.word = ft_strdup(token->data); + if (node->data.wordlist) + { + DG("add file"); + redir = (ft_lstlast(node->data.wordlist))->content; + redir->word.word = token->data; + } return (0); -} +} + +int add_redir(t_btree **ast, t_list **lst) +{ + t_astnode *node; + t_token *token; + t_redir *redir; + + DG("add_redir"); + token = (*lst)->content; + node = (*ast)->item; + redir = ft_memalloc(sizeof(redir)); + redir->type = token->type; + ft_lsteadd(&node->data.wordlist, ft_lstnew(redir, sizeof(redir))); + return (0); +} diff --git a/42sh/src/parser/add_func.c b/42sh/src/parser/add_func.c index 6bd17009..e2eda0fe 100644 --- a/42sh/src/parser/add_func.c +++ b/42sh/src/parser/add_func.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/24 23:43:07 by ariard #+# #+# */ -/* Updated: 2017/02/25 00:28:35 by ariard ### ########.fr */ +/* Updated: 2017/02/25 00:32:00 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_loop.c b/42sh/src/parser/add_loop.c index 5f7ae736..78608a48 100644 --- a/42sh/src/parser/add_loop.c +++ b/42sh/src/parser/add_loop.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 22:17:14 by ariard #+# #+# */ -/* Updated: 2017/02/24 18:47:29 by ariard ### ########.fr */ +/* Updated: 2017/02/25 19:18:01 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_sep.c b/42sh/src/parser/add_sep.c index d30c5c34..a80093f4 100644 --- a/42sh/src/parser/add_sep.c +++ b/42sh/src/parser/add_sep.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 19:12:07 by ariard #+# #+# */ -/* Updated: 2017/02/25 00:13:07 by ariard ### ########.fr */ +/* Updated: 2017/02/25 19:28:47 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -27,6 +27,8 @@ int add_sep(t_btree **ast, t_list **lst) return (add_case_sep(ast, lst)); else if (issubshell(ast, lst)) return (add_subshell_sep(ast, lst)); + else if (isdir(ast, lst) == 2) + return (add_redir(ast, lst)); else if (isfunc(ast, lst)) return (add_func_sep(ast, lst)); if (!*ast) diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index 84a5c5cc..879045ca 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:39:18 by ariard #+# #+# */ -/* Updated: 2017/02/24 23:16:29 by ariard ### ########.fr */ +/* Updated: 2017/02/25 13:53:57 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/build_tree.c b/42sh/src/parser/build_tree.c index 47ba3781..2d8a7e70 100644 --- a/42sh/src/parser/build_tree.c +++ b/42sh/src/parser/build_tree.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:32:59 by ariard #+# #+# */ -/* Updated: 2017/02/24 23:58:10 by ariard ### ########.fr */ +/* Updated: 2017/02/25 19:21:05 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,6 +19,8 @@ t_treematch g_treematch[] = {TK_SEMI, &add_sep}, {TK_GREAT, &add_sep}, {TK_LESS, &add_sep}, + {TK_DGREAT, &add_sep}, + {TK_DLESS, &add_sep}, {TK_OR_IF, &add_sep}, {TK_AND_IF, &add_sep}, {TK_WHILE, &add_cmd}, diff --git a/42sh/src/parser/produce_sym.c b/42sh/src/parser/produce_sym.c index 113696bb..4a2cbad4 100644 --- a/42sh/src/parser/produce_sym.c +++ b/42sh/src/parser/produce_sym.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/09 17:58:34 by ariard #+# #+# */ -/* Updated: 2017/02/24 23:10:35 by ariard ### ########.fr */ +/* Updated: 2017/02/25 13:54:08 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/tree_wrapper.c b/42sh/src/parser/tree_wrapper.c index f667a6fe..ac2d3d5b 100644 --- a/42sh/src/parser/tree_wrapper.c +++ b/42sh/src/parser/tree_wrapper.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/15 18:57:44 by ariard #+# #+# */ -/* Updated: 2017/02/24 16:00:40 by ariard ### ########.fr */ +/* Updated: 2017/02/25 19:10:34 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ From 8c8ee2152e3ce490f2783e8cb016840e2a8cb076 Mon Sep 17 00:00:00 2001 From: "ariard@student.42.fr" Date: Sat, 25 Feb 2017 20:36:27 +0100 Subject: [PATCH 21/23] parsing heredoc doing --- 42sh/file | 2 ++ 42sh/file1 | 0 42sh/includes/types.h | 2 +- 42sh/sample/redir/redir.sh | 2 +- 42sh/src/lexer/lexer_default.c | 2 +- 42sh/src/lexer/lexer_delim.c | 2 +- 42sh/src/lexer/lexer_great.c | 4 +++- 42sh/src/lexer/lexer_greatand.c | 2 +- 42sh/src/lexer/lexer_less.c | 2 +- 42sh/src/lexer/lexer_lessand.c | 2 +- 42sh/src/lexer/lexer_number.c | 3 ++- 42sh/src/lexer/lexer_word.c | 3 ++- 42sh/src/main/main.c | 3 ++- 42sh/src/parser/add_file.c | 8 +++++--- 42sh/wide | 1 + 42sh/yolo | 2 ++ 16 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 42sh/file create mode 100644 42sh/file1 create mode 100644 42sh/wide create mode 100644 42sh/yolo diff --git a/42sh/file b/42sh/file new file mode 100644 index 00000000..1d552218 --- /dev/null +++ b/42sh/file @@ -0,0 +1,2 @@ +ls: feew: No such file or directory +ls: feew: No such file or directory diff --git a/42sh/file1 b/42sh/file1 new file mode 100644 index 00000000..e69de29b diff --git a/42sh/includes/types.h b/42sh/includes/types.h index 95080d63..474b8b7a 100644 --- a/42sh/includes/types.h +++ b/42sh/includes/types.h @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/13 17:11:48 by jhalford #+# #+# */ -/* Updated: 2017/02/25 18:47:20 by ariard ### ########.fr */ +/* Updated: 2017/02/25 19:37:31 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/sample/redir/redir.sh b/42sh/sample/redir/redir.sh index 521002db..8b137891 100644 --- a/42sh/sample/redir/redir.sh +++ b/42sh/sample/redir/redir.sh @@ -1 +1 @@ -ls >> 1 >> 2 >> 3 < 4 < 5 ; pwd > 1 > 2 + diff --git a/42sh/src/lexer/lexer_default.c b/42sh/src/lexer/lexer_default.c index f1781eed..d8799ebe 100644 --- a/42sh/src/lexer/lexer_default.c +++ b/42sh/src/lexer/lexer_default.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/28 18:36:21 by jhalford #+# #+# */ -/* Updated: 2017/02/24 20:43:56 by ariard ### ########.fr */ +/* Updated: 2017/02/25 20:04:41 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_delim.c b/42sh/src/lexer/lexer_delim.c index c7e789f1..026a0f4a 100644 --- a/42sh/src/lexer/lexer_delim.c +++ b/42sh/src/lexer/lexer_delim.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 11:58:44 by jhalford #+# #+# */ -/* Updated: 2017/02/21 22:42:41 by ariard ### ########.fr */ +/* Updated: 2017/02/25 19:56:31 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_great.c b/42sh/src/lexer/lexer_great.c index cce8f831..8bbb462b 100644 --- a/42sh/src/lexer/lexer_great.c +++ b/42sh/src/lexer/lexer_great.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 12:06:35 by jhalford #+# #+# */ -/* Updated: 2017/02/21 21:09:31 by ariard ### ########.fr */ +/* Updated: 2017/02/25 20:12:58 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,6 +21,7 @@ int lexer_great(t_list **alst, t_lexer *lexer) lexer->pos++; if (lexer->str[lexer->pos] == '&') { + DG("lex greatand"); token->type = TK_GREATAND; token_append(token, lexer, 0, 0); lexer->pos++; @@ -28,6 +29,7 @@ int lexer_great(t_list **alst, t_lexer *lexer) } if (lexer->str[lexer->pos] == '>') { + DG("lex great"); token->type = TK_DGREAT; token_append(token, lexer, 0, 0); lexer->pos++; diff --git a/42sh/src/lexer/lexer_greatand.c b/42sh/src/lexer/lexer_greatand.c index 350bbec1..af86cb7f 100644 --- a/42sh/src/lexer/lexer_greatand.c +++ b/42sh/src/lexer/lexer_greatand.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 11:56:58 by jhalford #+# #+# */ -/* Updated: 2017/02/20 20:52:49 by ariard ### ########.fr */ +/* Updated: 2017/02/25 20:11:03 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_less.c b/42sh/src/lexer/lexer_less.c index 241f9ae1..0aa0174c 100644 --- a/42sh/src/lexer/lexer_less.c +++ b/42sh/src/lexer/lexer_less.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 12:06:53 by jhalford #+# #+# */ -/* Updated: 2017/02/20 20:53:06 by ariard ### ########.fr */ +/* Updated: 2017/02/25 20:11:17 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_lessand.c b/42sh/src/lexer/lexer_lessand.c index f411b225..d0e79268 100644 --- a/42sh/src/lexer/lexer_lessand.c +++ b/42sh/src/lexer/lexer_lessand.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 11:58:51 by jhalford #+# #+# */ -/* Updated: 2017/02/09 19:56:29 by jhalford ### ########.fr */ +/* Updated: 2017/02/25 20:11:10 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/lexer/lexer_number.c b/42sh/src/lexer/lexer_number.c index 0508f70f..11e9eb6e 100644 --- a/42sh/src/lexer/lexer_number.c +++ b/42sh/src/lexer/lexer_number.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 12:06:45 by jhalford #+# #+# */ -/* Updated: 2017/02/20 20:53:20 by ariard ### ########.fr */ +/* Updated: 2017/02/25 19:55:30 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,6 +18,7 @@ int lexer_number(t_list **alst, t_lexer *lexer) t_lexstate state; token = (*alst)->content; + token->type = TK_IO_NUMBER; if ((state = get_state_global(lexer))) { lexer->state = state; diff --git a/42sh/src/lexer/lexer_word.c b/42sh/src/lexer/lexer_word.c index 910be7b8..157668ba 100644 --- a/42sh/src/lexer/lexer_word.c +++ b/42sh/src/lexer/lexer_word.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 12:07:11 by jhalford #+# #+# */ -/* Updated: 2017/02/24 21:00:15 by ariard ### ########.fr */ +/* Updated: 2017/02/25 20:10:39 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,6 +19,7 @@ int lexer_word(t_list **alst, t_lexer *lexer) token = (*alst)->content; token->type = TK_WORD; + DG("lexer word"); if ((state = get_state_global(lexer))) { lexer->state = state; diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index ac3ffd25..76e2b3a5 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/02/25 18:25:11 by ariard ### ########.fr */ +/* Updated: 2017/02/25 20:34:27 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -61,6 +61,7 @@ int handle_instruction(int fd) else if (parser.state == ERROR) error_syntax(&token); token = NULL; + ast = NULL; } DG("succesful parsing:"); btree_print(STDBUG, ast, &ft_putast); diff --git a/42sh/src/parser/add_file.c b/42sh/src/parser/add_file.c index d7df98a9..c056049c 100644 --- a/42sh/src/parser/add_file.c +++ b/42sh/src/parser/add_file.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 16:39:05 by ariard #+# #+# */ -/* Updated: 2017/02/25 19:29:53 by ariard ### ########.fr */ +/* Updated: 2017/02/25 20:33:12 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,7 +18,7 @@ int isdir(t_btree **ast, t_list **list) t_token *token; token = (*list)->content; - if (ast) + if (*ast) { DG("isdir"); node = (*ast)->item; @@ -61,7 +61,9 @@ int add_redir(t_btree **ast, t_list **lst) t_token *token; t_redir *redir; - DG("add_redir"); + DG("add redir"); + if (!ast) + gen_node(ast); token = (*lst)->content; node = (*ast)->item; redir = ft_memalloc(sizeof(redir)); diff --git a/42sh/wide b/42sh/wide new file mode 100644 index 00000000..6efd26c6 --- /dev/null +++ b/42sh/wide @@ -0,0 +1 @@ +ls: ewfef: No such file or directory diff --git a/42sh/yolo b/42sh/yolo new file mode 100644 index 00000000..627968d4 --- /dev/null +++ b/42sh/yolo @@ -0,0 +1,2 @@ +ls: wefewf: No such file or directory +ls: wefewf: No such file or directory From a154aa85b68706323f7a33bbfffc15aec2686b24 Mon Sep 17 00:00:00 2001 From: AntoHesse Date: Sat, 25 Feb 2017 22:34:38 +0100 Subject: [PATCH 22/23] eof syntax good --- 42sh/file | 2 -- 42sh/file1 | 0 42sh/src/parser/aggregate_sym.c | 1 + 42sh/test.sh | 1 - 42sh/wide | 1 - 42sh/yolo | 2 -- 6 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 42sh/file delete mode 100644 42sh/file1 delete mode 100644 42sh/test.sh delete mode 100644 42sh/wide delete mode 100644 42sh/yolo diff --git a/42sh/file b/42sh/file deleted file mode 100644 index 1d552218..00000000 --- a/42sh/file +++ /dev/null @@ -1,2 +0,0 @@ -ls: feew: No such file or directory -ls: feew: No such file or directory diff --git a/42sh/file1 b/42sh/file1 deleted file mode 100644 index e69de29b..00000000 diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index 879045ca..afccf9df 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -92,6 +92,7 @@ t_aggrematch g_aggrematch[] = {NEWLINE_LIST, FOR_WORDLIST, SEQUENTIAL_SEP, 0}, //to check + {HERE_END, TK_DLESS, IO_HERE, TK_DLESS}, {IO_HERE, TK_IO_NUMBER, IO_REDIRECT, TK_IO_NUMBER}, {IO_HERE, ALL, IO_REDIRECT, 0}, {FILENAME, TK_LESS, IO_FILE, TK_LESS}, diff --git a/42sh/test.sh b/42sh/test.sh deleted file mode 100644 index cce06da7..00000000 --- a/42sh/test.sh +++ /dev/null @@ -1 +0,0 @@ -{ hello } diff --git a/42sh/wide b/42sh/wide deleted file mode 100644 index 6efd26c6..00000000 --- a/42sh/wide +++ /dev/null @@ -1 +0,0 @@ -ls: ewfef: No such file or directory diff --git a/42sh/yolo b/42sh/yolo deleted file mode 100644 index 627968d4..00000000 --- a/42sh/yolo +++ /dev/null @@ -1,2 +0,0 @@ -ls: wefewf: No such file or directory -ls: wefewf: No such file or directory From 9c0984658ea64a6c40cb40b18f3e0f7e9e8ba886 Mon Sep 17 00:00:00 2001 From: AntoHesse Date: Sun, 26 Feb 2017 01:13:47 +0100 Subject: [PATCH 23/23] exec flow control --- 42sh/Makefile | 6 ++-- 42sh/includes/exec.h | 14 +++++---- 42sh/includes/minishell.h | 2 ++ 42sh/includes/parser.h | 1 + 42sh/includes/types.h | 1 + 42sh/src/exec/{loop_exec.c => exec_case.c} | 22 +++++++------- 42sh/src/exec/exec_case_branch.c | 30 +++++++++++++++++++ 42sh/src/exec/exec_command.c | 4 +-- 42sh/src/exec/exec_elif.c | 11 ++++--- 42sh/src/exec/exec_else.c | 7 +++-- 42sh/src/exec/exec_for.c | 35 ++++++++++++++++++++++ 42sh/src/exec/exec_func.c | 15 ++++++++++ 42sh/src/exec/exec_if.c | 9 ++++-- 42sh/src/exec/exec_until.c | 11 ++++--- 42sh/src/exec/{loop_del.c => exec_var.c} | 21 ++++++------- 42sh/src/exec/exec_while.c | 11 ++++--- 42sh/src/main/data_init.c | 4 ++- 42sh/src/parser/add_cmd.c | 2 +- 42sh/src/parser/add_func.c | 10 ++++++- 42sh/src/parser/aggregate_sym.c | 2 +- 20 files changed, 158 insertions(+), 60 deletions(-) rename 42sh/src/exec/{loop_exec.c => exec_case.c} (64%) create mode 100644 42sh/src/exec/exec_case_branch.c create mode 100644 42sh/src/exec/exec_for.c create mode 100644 42sh/src/exec/exec_func.c rename 42sh/src/exec/{loop_del.c => exec_var.c} (65%) diff --git a/42sh/Makefile b/42sh/Makefile index e42b63b4..5a69ec4f 100644 --- a/42sh/Makefile +++ b/42sh/Makefile @@ -74,12 +74,14 @@ exec/exec_redir.c\ exec/exec_semi.c\ exec/exec_until.c\ exec/exec_while.c\ +exec/exec_var.c\ +exec/exec_for.c\ +exec/exec_case.c\ +exec/exec_case_branch.c\ exec/fd_is_valid.c\ exec/ft_exec.c\ exec/ft_findexec.c\ exec/launch_process.c\ -exec/loop_del.c\ -exec/loop_exec.c\ exec/process_redirect.c\ exec/process_reset.c\ exec/process_resetfds.c\ diff --git a/42sh/includes/exec.h b/42sh/includes/exec.h index 58aabc7a..a115f3cb 100644 --- a/42sh/includes/exec.h +++ b/42sh/includes/exec.h @@ -35,8 +35,6 @@ # define IS_PIPEEND(a) (a & PROCESS_PIPEEND) # define IS_PIPESINGLE(a) ((a & PROCESS_PIPESTART) && (a & PROCESS_PIPEEND)) -# define SCRIPT_LOOP (1 << 0) - # include "libft.h" # include "types.h" # include "job_control.h" @@ -53,7 +51,9 @@ struct s_process int toclose; int status; t_flag attributes; - t_flag script; + t_condition if_branch; + t_condition case_branch; + char *case_pattern; }; struct s_exec @@ -102,7 +102,10 @@ int exec_elif(t_btree **ast); int exec_else(t_btree **ast); int exec_until(t_btree **ast); int exec_default(t_btree **ast); - +int exec_var(t_btree **ast); +int exec_for(t_btree **ast); +int exec_case(t_btree **ast); +int exec_case_branch(t_btree **ast); int launch_process(t_process *p); int process_setexec(t_type type, t_process *p); @@ -128,7 +131,6 @@ void set_exitstatus(int status, int override); void ast_free(void *data, size_t content_size); - - +char **token_to_argv(t_astnode *node); #endif diff --git a/42sh/includes/minishell.h b/42sh/includes/minishell.h index 23c31ae2..fd9768fd 100644 --- a/42sh/includes/minishell.h +++ b/42sh/includes/minishell.h @@ -65,6 +65,8 @@ struct s_data t_comp *comp; t_exec exec; t_jobc jobc; + char **local_var; + t_list *lst_func; }; extern t_stof g_builtins[]; diff --git a/42sh/includes/parser.h b/42sh/includes/parser.h index 80ffcebb..1812e496 100644 --- a/42sh/includes/parser.h +++ b/42sh/includes/parser.h @@ -121,6 +121,7 @@ int add_subshell_cmd(t_btree **ast, t_list **lst); int add_subshell_sep(t_btree **ast, t_list **lst); int add_func_cmd(t_btree **ast, t_list **lst); int add_func_sep(t_btree **ast, t_list **lst); +int add_one_func(t_btree **ast, t_list **lst); int isloop(t_btree **ast, t_list **lst); int isdir(t_btree **ast, t_list **lst); int iscase(t_btree **ast, t_list **lst); diff --git a/42sh/includes/types.h b/42sh/includes/types.h index 474b8b7a..e0f7ade6 100644 --- a/42sh/includes/types.h +++ b/42sh/includes/types.h @@ -34,6 +34,7 @@ typedef union u_astdata t_astdata; typedef union u_word t_word; typedef long long t_type; +typedef int t_condition; typedef struct s_job t_job; typedef struct s_execmap t_execmap; typedef struct s_redirmap t_redirmap; diff --git a/42sh/src/exec/loop_exec.c b/42sh/src/exec/exec_case.c similarity index 64% rename from 42sh/src/exec/loop_exec.c rename to 42sh/src/exec/exec_case.c index cf285ee4..3a2847f8 100644 --- a/42sh/src/exec/loop_exec.c +++ b/42sh/src/exec/exec_case.c @@ -1,27 +1,25 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* loop_exec.c :+: :+: :+: */ +/* exec_if.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2017/01/30 21:02:10 by ariard #+# #+# */ -/* Updated: 2017/01/31 19:27:49 by ariard ### ########.fr */ +/* Created: 2017/02/06 18:07:31 by ariard #+# #+# */ +/* Updated: 2017/02/20 22:31:46 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include "exec.h" -int loop_exec(t_list *list_ast) +int exec_case(t_btree **ast) { + t_astnode *node; + char **av; -// DG("begin exec loop"); -// ft_print_all_ast(*list_ast); - while (list_ast) - { - if (ft_exec((t_btree **)list_ast->content)) - return (1); - list_ast = list_ast->next; - } + data_singleton()->exec.process.case_branch = 0; + node = (*ast)->item; + av = token_to_argv(node); + data_singleton()->exec.process.case_pattern = av[0]; return (0); } diff --git a/42sh/src/exec/exec_case_branch.c b/42sh/src/exec/exec_case_branch.c new file mode 100644 index 00000000..2102769c --- /dev/null +++ b/42sh/src/exec/exec_case_branch.c @@ -0,0 +1,30 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* exec_if.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ariard +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2017/02/06 18:07:31 by ariard #+# #+# */ +/* Updated: 2017/02/20 22:31:46 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "exec.h" + +int exec_case_branch(t_btree **ast) +{ + t_astnode *node; + char **av; + + if (data_singleton()->exec.process.case_branch == 1) + return (0); + node = (*ast)->item; + av = token_to_argv(node); + if (ft_strcmp(av[0], data_singleton()->exec.process.case_pattern) == 1) + { + data_singleton()->exec.process.case_branch = 1; + ft_exec(&(*ast)->right); + } + return (0); +} diff --git a/42sh/src/exec/exec_command.c b/42sh/src/exec/exec_command.c index 558804af..358e5887 100644 --- a/42sh/src/exec/exec_command.c +++ b/42sh/src/exec/exec_command.c @@ -12,7 +12,7 @@ #include "exec.h" -static char **token_to_argv(t_astnode *node) +char **token_to_argv(t_astnode *node) { char **my_tab; int index; @@ -20,7 +20,7 @@ static char **token_to_argv(t_astnode *node) char **content; t_ld *ld; - if (node->type == TK_COMMAND) + if (node->type == TK_WORD || node->type == TK_ASSIGNEMENT_WORD) { ld = node->data.token; my_tab = NULL; diff --git a/42sh/src/exec/exec_elif.c b/42sh/src/exec/exec_elif.c index 235b1938..ffefcdba 100644 --- a/42sh/src/exec/exec_elif.c +++ b/42sh/src/exec/exec_elif.c @@ -14,14 +14,13 @@ int exec_elif(t_btree **ast) { - int test; - - (void)ast; - test = 0; - if (test) + if (data_singleton()->exec.process.if_branch == 1) + return (0); + ft_exec(&(*ast)->left); + if (data_singleton()->exec.process.status == 1) { + data_singleton()->exec.process.if_branch = 1; ft_exec(&(*ast)->right); } - // btree_delone(ast, &ast_free); return (0); } diff --git a/42sh/src/exec/exec_else.c b/42sh/src/exec/exec_else.c index f94735c1..9b31f5c6 100644 --- a/42sh/src/exec/exec_else.c +++ b/42sh/src/exec/exec_else.c @@ -14,7 +14,10 @@ int exec_else(t_btree **ast) { - ft_exec(&(*ast)->right); - //btree_delone(ast, &ast_free); + if (data_singleton()->exec.process.if_branch == 0) + { + data_singleton()->exec.process.if_branch = 1; + ft_exec(&(*ast)->right); + } return (0); } diff --git a/42sh/src/exec/exec_for.c b/42sh/src/exec/exec_for.c new file mode 100644 index 00000000..e1defebc --- /dev/null +++ b/42sh/src/exec/exec_for.c @@ -0,0 +1,35 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* exec_until.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ariard +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2017/02/06 20:42:20 by ariard #+# #+# */ +/* Updated: 2017/02/06 20:42:21 by ariard ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "exec.h" + +int exec_for(t_btree **ast) +{ + t_astnode *node; + t_list *temp; +// char **av = NULL; + char *var; + + + node = (*ast)->item; + temp = node->data.wordlist; + var = temp->content; + builtin_setenv("setenv", (char*[]){var, 0}, data_singleton()->local_var); + while (temp) + { + //process expansion av = token_to_char(temp->content) + builtin_setenv("setenv", (char*[]){var, 0}, data_singleton()->local_var); + ft_exec(&(*ast)->right); + temp = temp->next; + } + return (0); +} diff --git a/42sh/src/exec/exec_func.c b/42sh/src/exec/exec_func.c new file mode 100644 index 00000000..a4a34f66 --- /dev/null +++ b/42sh/src/exec/exec_func.c @@ -0,0 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* exec_while.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ariard +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2017/01/30 17:33:53 by ariard #+# #+# */ +/* Updated: 2017/02/06 22:05:35 by ariard ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "exec.h" + + diff --git a/42sh/src/exec/exec_if.c b/42sh/src/exec/exec_if.c index 667c32de..81aab2a7 100644 --- a/42sh/src/exec/exec_if.c +++ b/42sh/src/exec/exec_if.c @@ -14,7 +14,12 @@ int exec_if(t_btree **ast) { - ft_exec(&(*ast)->right); -// btree_delone(ast, &ast_free); + data_singleton()->exec.process.if_branch = 0; + ft_exec(&(*ast)->left); + if (data_singleton()->exec.process.status == 1) + { + data_singleton()->exec.process.if_branch = 1; + ft_exec(&(*ast)->right); + } return (0); } diff --git a/42sh/src/exec/exec_until.c b/42sh/src/exec/exec_until.c index 62b2a567..6f1e0c33 100644 --- a/42sh/src/exec/exec_until.c +++ b/42sh/src/exec/exec_until.c @@ -14,12 +14,11 @@ int exec_until(t_btree **ast) { - int test; - - test = 0; - while (test++ != 10) + ft_exec(&(*ast)->left); + while (data_singleton()->exec.process.status == 0) + { ft_exec(&(*ast)->right); - -// btree_delone(ast, &ast_free); + ft_exec(&(*ast)->left); + } return (0); } diff --git a/42sh/src/exec/loop_del.c b/42sh/src/exec/exec_var.c similarity index 65% rename from 42sh/src/exec/loop_del.c rename to 42sh/src/exec/exec_var.c index 1bdda0fd..e830950d 100644 --- a/42sh/src/exec/loop_del.c +++ b/42sh/src/exec/exec_var.c @@ -1,27 +1,24 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* loop_del.c :+: :+: :+: */ +/* exec_while.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2017/01/31 22:39:20 by ariard #+# #+# */ -/* Updated: 2017/01/31 23:20:40 by ariard ### ########.fr */ +/* Created: 2017/01/30 17:33:53 by ariard #+# #+# */ +/* Updated: 2017/02/06 22:05:35 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ #include "exec.h" -int loop_del(t_list *list_ast) +int exec_var(t_btree **ast) { - t_list *temp; + t_astnode *node; + char **av; - while (list_ast) - { - btree_del((t_btree **)list_ast->content, &ast_free); - temp = list_ast; - list_ast = list_ast->next; - ft_lstdelone(&temp, NULL); - } + node = (*ast)->item; + av = token_to_argv(node); + builtin_setenv("setenv", av, data_singleton()->local_var); return (0); } diff --git a/42sh/src/exec/exec_while.c b/42sh/src/exec/exec_while.c index cae778e1..d9824950 100644 --- a/42sh/src/exec/exec_while.c +++ b/42sh/src/exec/exec_while.c @@ -14,12 +14,11 @@ int exec_while(t_btree **ast) { - int test; - - test = 10; - while (test--) + ft_exec(&(*ast)->left); + while (data_singleton()->exec.process.status == 1) + { ft_exec(&(*ast)->right); - -// btree_delone(ast, &ast_free); + ft_exec(&(*ast)->left); + } return (0); } diff --git a/42sh/src/main/data_init.c b/42sh/src/main/data_init.c index 12c47e05..4a0f872f 100644 --- a/42sh/src/main/data_init.c +++ b/42sh/src/main/data_init.c @@ -23,7 +23,6 @@ int data_init(void) data->env = ft_sstrdup(environ); data->comp = NULL; data->opts = SH_OPTS_JOBC; - data->exec.process.path = NULL; data->exec.process.av = NULL; data->exec.process.toclose = STDIN; @@ -45,6 +44,9 @@ int data_init(void) data->jobc.first_job = NULL; data->jobc.current_id = 1; + + data->local_var = NULL; + data->lst_func = NULL; if ((term_name = ft_getenv(data->env, "TERM")) == NULL) return (-1); if (tgetent(NULL, term_name) != 1) diff --git a/42sh/src/parser/add_cmd.c b/42sh/src/parser/add_cmd.c index d372954d..d2e3e825 100644 --- a/42sh/src/parser/add_cmd.c +++ b/42sh/src/parser/add_cmd.c @@ -49,7 +49,7 @@ int add_cmd(t_btree **ast, t_list **lst) my_tab = NULL; node = (*ast)->item; node->type = token->type; - if (token->type == TK_WORD) + if (token->type == TK_WORD || token->type == TK_ASSIGNEMENT_WORD) { my_tab = ft_sstradd(my_tab, token->data); my_tab = ft_sstradd(my_tab, (char *)token->esc); diff --git a/42sh/src/parser/add_func.c b/42sh/src/parser/add_func.c index e2eda0fe..ada2a7be 100644 --- a/42sh/src/parser/add_func.c +++ b/42sh/src/parser/add_func.c @@ -23,7 +23,10 @@ int isfunc(t_btree **ast, t_list **lst) { node = (*ast)->item; if (node->type == TK_WORD && token->type == CLOSE_LIST) + { node->type = FNAME; + add_one_func(ast, lst); + } if (node->type == FNAME && node->full == 0) return (1); if (isfunc(&(*ast)->right, lst) == 1) @@ -62,4 +65,9 @@ int add_func_sep(t_btree **ast, t_list **lst) return (add_sep(&(*ast)->right, lst)); } - +int add_one_func(t_btree **ast, t_list **lst) +{ + (void)lst; + ft_lsteadd(&data_singleton()->lst_func, ft_lstnew(ast, sizeof(*ast))); + return (0); +} diff --git a/42sh/src/parser/aggregate_sym.c b/42sh/src/parser/aggregate_sym.c index afccf9df..dba05036 100644 --- a/42sh/src/parser/aggregate_sym.c +++ b/42sh/src/parser/aggregate_sym.c @@ -187,7 +187,7 @@ t_aggrematch g_aggrematch[] = {CLOSE_LIST, PATTERN, CASE_LIST_NS, PATTERN_CASE}, {CLOSE_LIST, FUNC_NAME, FUNCTION_DEFINITION, FUNC_NAME}, {SUBSHELL, ALL, COMPOUND_COMMAND, 0}, - {BRACE_CLAUSE, ALL, COMPOUND_COMMAND, 0}, + {BRACE_CLAUSE, ALL, COMPOUND_COMMAND, 0}, {COMPOUND_COMMAND, ALL, COMMAND, 0}, {AND_OR_MINOR, PIPE_SEMI_SEQUENCE, AND_OR_MAJOR, PIPE_SEMI_SEQUENCE}, {AND_OR_MINOR, LINEBREAK, AND_OR_MAJOR, 0},