From 10ec6292d997ac18803df92469d2ab4ee03166e7 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 13 Sep 2020 17:49:48 +0200 Subject: Refactoring lexer to understand it --- include/lexer.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'include/lexer.h') diff --git a/include/lexer.h b/include/lexer.h index 7e1bf06..7f31699 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/09/11 19:17:06 by charles ### ########.fr */ +/* Updated: 2020/09/13 17:33:53 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -91,25 +91,22 @@ t_tok_lst *tok_lst_uncons(t_tok_lst **tokens); ** lexer.c */ -t_tok_lst *lexer(char *input); -int check_input(char *input); int len_until_sep(char *input); -int check_input_out(char *input); -enum e_tok token_check_stick(t_tok_lst *tok); -enum e_tok token_str_or_quote(t_tok_lst *tok); +int tok_len(char *input); t_tok_lst *create_token_list(char *input, t_tok_lst **lst); -void push_token_enum(t_tok_lst *tok); -void push_token_enum(t_tok_lst *tok); +t_tok_lst *lexer(char *input); +// int check_input_out(char *input); /* -** lexer_utils.c +** utils.c */ -enum e_tok ret_token(char *input, int i); -enum e_tok ret_token_sep_redir_append(char *input, int i); +enum e_tok tok_assign_tag(char *content); +enum e_tok tok_assign_stick(t_tok_lst *tok); +enum e_tok tok_assign_str(t_tok_lst *tok); int lexer_sep(char input); -int lexer_check_between_quote(char *input, int i); int lexer_space(char *input); +int quote_len(char *input, int i); /* -- cgit