From 957434ecd3c8170aafc145263b0090863ceadba3 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 19 Aug 2020 16:37:13 +0200 Subject: Removing glob, Rewritting preprocessing with escape and interpolation only --- include/lexer.h | 19 +++++++++++++++---- include/ms_glob.h | 36 ------------------------------------ 2 files changed, 15 insertions(+), 40 deletions(-) delete mode 100644 include/ms_glob.h (limited to 'include') diff --git a/include/lexer.h b/include/lexer.h index f40db56..27910a5 100644 --- a/include/lexer.h +++ b/include/lexer.h @@ -6,7 +6,7 @@ /* By: nahaddac +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/06/19 10:51:26 by nahaddac #+# #+# */ -/* Updated: 2020/07/20 11:07:13 by nahaddac ### ########.fr */ +/* Updated: 2020/08/19 13:41:08 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -53,13 +53,24 @@ int lexer_sep(char input); int lexer_verif_entre_cote(char *input, int i); int lexe_space(char *input); + +t_token *push_token_enum(t_token *lst_token); + +t_ftlst *lexe_trim_out(t_ftlst *lst); + +/* +** token.c +*/ + t_token *token_new(enum e_token_tag tag, char *content); t_token *token_new_until(enum e_token_tag tag, char *content, int n); void token_destroy(t_token *token); void token_destroy_lst(t_ftlst *tokens); void token_destroy_lst2(t_ftlst *tokens1, t_ftlst *tokens2); -t_token *push_token_enum(t_token *lst_token); - -t_ftlst *lexe_trim_out(t_ftlst *lst); +enum e_token_tag token_tag(t_ftlst *token_lst); +void token_set_tag(t_ftlst *token_lst, enum e_token_tag tag); +char *token_content(t_ftlst *token_lst); +void token_set_content(t_ftlst *token_lst, char *content); +void token_set_contentf(t_ftlst *token_lst, char *content); #endif diff --git a/include/ms_glob.h b/include/ms_glob.h deleted file mode 100644 index e340c45..0000000 --- a/include/ms_glob.h +++ /dev/null @@ -1,36 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* ms_glob.h :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: charles +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2020/04/05 11:45:11 by charles #+# #+# */ -/* Updated: 2020/07/15 12:12:22 by charles ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#ifndef MS_GLOB_H -# define MS_GLOB_H - -# include -# include -# include -# include - -# include "libft_str.h" -# include "libft_vec.h" - -# include "minishell.h" - -struct s_glob_param -{ - char *pattern; - t_ftvec *matches; -}; - -t_ftvec *glob_matches(char *pattern); -char *ms_glob(char *pattern); -char *ms_globf(char *pattern); - -#endif -- cgit