before pull
This commit is contained in:
parent
2e137390be
commit
55b72823cb
17 changed files with 33 additions and 17 deletions
5
42sh/.gitignore
vendored
5
42sh/.gitignore
vendored
|
|
@ -13,3 +13,8 @@ debug
|
||||||
*.swn
|
*.swn
|
||||||
STDBUG
|
STDBUG
|
||||||
STDEBUG
|
STDEBUG
|
||||||
|
display_env
|
||||||
|
read_on_stdin
|
||||||
|
write_on_stderr
|
||||||
|
write_on_stdout
|
||||||
|
write_on_stdout_and_stderr
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
# By: wescande <wescande@student.42.fr> +#+ +:+ +#+ #
|
# By: wescande <wescande@student.42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2016/08/29 21:32:58 by wescande #+# #+# #
|
# Created: 2016/08/29 21:32:58 by wescande #+# #+# #
|
||||||
# Updated: 2017/03/10 17:40:02 by gwojda ### ########.fr #
|
# Updated: 2017/03/12 15:48:20 by ariard ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
|
|
|
||||||
1
42sh/fewefwfew
Normal file
1
42sh/fewefwfew
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
cat: weffwe: No such file or directory
|
||||||
1
42sh/file
Normal file
1
42sh/file
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ffewfe2
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/10 13:07:44 by jhalford #+# #+# */
|
/* Created: 2016/11/10 13:07:44 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/10 19:59:56 by ariard ### ########.fr */
|
/* Updated: 2017/03/12 01:01:44 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/13 17:11:48 by jhalford #+# #+# */
|
/* Created: 2016/12/13 17:11:48 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/11 16:40:08 by jhalford ### ########.fr */
|
/* Updated: 2017/03/12 01:01:33 by ariard ### ########.fr */
|
||||||
/* Updated: 2017/03/07 18:35:11 by jhalford ### ########.fr */
|
/* Updated: 2017/03/07 18:35:11 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
|
||||||
2
42sh/new_file_stderr_and_stdout
Normal file
2
42sh/new_file_stderr_and_stdout
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
TOKEN201703111831_1
|
||||||
|
TOKEN201703111831_2
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
|
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/07 18:59:11 by wescande #+# #+# */
|
/* Created: 2017/03/07 18:59:11 by wescande #+# #+# */
|
||||||
/* Updated: 2017/03/07 21:20:53 by wescande ### ########.fr */
|
/* Updated: 2017/03/11 20:47:05 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -32,4 +32,3 @@ int word_is_assignment(char **content)
|
||||||
}
|
}
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/02/24 20:28:13 by ariard #+# #+# */
|
/* Created: 2017/02/24 20:28:13 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/07 18:36:23 by jhalford ### ########.fr */
|
/* Updated: 2017/03/11 20:48:34 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -32,6 +32,6 @@ int lexer_assignement_word(t_list **alst, t_lexer *lexer)
|
||||||
return (lexer_lex(alst, lexer));
|
return (lexer_lex(alst, lexer));
|
||||||
if ((lexer->state = get_state_redir(lexer)))
|
if ((lexer->state = get_state_redir(lexer)))
|
||||||
return (lexer_lex(alst, lexer));
|
return (lexer_lex(alst, lexer));
|
||||||
lexer->state = ft_isdigit(c) ? NUMBER : ASSIGNEMENT_WORD;
|
lexer->state = ASSIGNEMENT_WORD;
|
||||||
return(lexer_lex(alst, lexer));
|
return(lexer_lex(alst, lexer));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/03 12:06:45 by jhalford #+# #+# */
|
/* Created: 2016/12/03 12:06:45 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/10 13:12:43 by jhalford ### ########.fr */
|
/* Updated: 2017/03/11 20:48:19 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/03 12:07:11 by jhalford #+# #+# */
|
/* Created: 2016/12/03 12:07:11 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/08 23:36:13 by ariard ### ########.fr */
|
/* Updated: 2017/03/11 20:46:32 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */
|
/* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/11 19:56:53 by ariard ### ########.fr */
|
/* Updated: 2017/03/11 20:05:07 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ int handle_instruction(int fd)
|
||||||
return (error_syntax(&token, &parser, &ast));
|
return (error_syntax(&token, &parser, &ast));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ft_show_heredoc_data(&ast);
|
// ft_show_heredoc_data(&ast);
|
||||||
btree_print(STDBUG, ast, &ft_putast);
|
btree_print(STDBUG, ast, &ft_putast);
|
||||||
if (ft_exec(&ast))
|
if (ft_exec(&ast))
|
||||||
return (1);
|
return (1);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/02/15 20:49:15 by ariard #+# #+# */
|
/* Created: 2017/02/15 20:49:15 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/11 15:34:23 by ariard ### ########.fr */
|
/* Updated: 2017/03/11 20:07:57 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -74,8 +74,13 @@ int add_cmd(t_btree **ast, t_list **lst)
|
||||||
|
|
||||||
i = -1;
|
i = -1;
|
||||||
while (++i < 19)
|
while (++i < 19)
|
||||||
|
{
|
||||||
if (g_distrostree[i].test(ast, lst) == 1)
|
if (g_distrostree[i].test(ast, lst) == 1)
|
||||||
|
{
|
||||||
|
DG("add to %d", i);
|
||||||
return (g_distrostree[i].add(ast, lst));
|
return (g_distrostree[i].add(ast, lst));
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!*ast)
|
if (!*ast)
|
||||||
gen_node(ast);
|
gen_node(ast);
|
||||||
else if (no_del_token(ast, lst))
|
else if (no_del_token(ast, lst))
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/02/17 16:39:05 by ariard #+# #+# */
|
/* Created: 2017/02/17 16:39:05 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/11 19:57:02 by ariard ### ########.fr */
|
/* Updated: 2017/03/11 20:36:19 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -52,7 +52,10 @@ int isdir_word(t_btree **ast, t_list **list)
|
||||||
node = (*ast)->item;
|
node = (*ast)->item;
|
||||||
if (token->type == TK_WORD && node->type == REDIR)
|
if (token->type == TK_WORD && node->type == REDIR)
|
||||||
{
|
{
|
||||||
node->type = node->cache;
|
if (node->cache != TK_NEWLINE)
|
||||||
|
node->type = node->cache;
|
||||||
|
else
|
||||||
|
node->type = CMD;
|
||||||
node->cache = 0;
|
node->cache = 0;
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/11 14:54:18 by ariard #+# #+# */
|
/* Created: 2017/03/11 14:54:18 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/11 15:54:52 by ariard ### ########.fr */
|
/* Updated: 2017/03/11 20:05:41 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/11 15:58:38 by ariard #+# #+# */
|
/* Created: 2017/03/11 15:58:38 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/11 16:05:58 by ariard ### ########.fr */
|
/* Updated: 2017/03/12 00:50:41 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/08 16:21:05 by ariard #+# #+# */
|
/* Created: 2017/03/08 16:21:05 by ariard #+# #+# */
|
||||||
/* Updated: 2017/03/11 19:40:43 by ariard ### ########.fr */
|
/* Updated: 2017/03/11 20:01:42 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue