From 9dca7dc98e46d5b29e236f2970072ffaf582e13e Mon Sep 17 00:00:00 2001 From: nass1pro Date: Sun, 12 Apr 2020 17:53:30 +0200 Subject: Added lexer draft --- src/parse/lexer.c | 15 +++++++++++++-- src/parse/parse.c | 12 +++++------- 2 files changed, 18 insertions(+), 9 deletions(-) (limited to 'src/parse') diff --git a/src/parse/lexer.c b/src/parse/lexer.c index 74a3bd4..584ecd7 100644 --- a/src/parse/lexer.c +++ b/src/parse/lexer.c @@ -5,12 +5,23 @@ #include "minishell.h" -char **lexer(char *input) +static char **lex_len(char *input) { - char **out_lex; + int i; + i = 0; + while(input[i] != '\0') + { + lex_comp_cmd(input); + i++; + } +} + +char **lexer(char *input) +{ (void)out_lex; if (!input) return (NULL); + lex_len(input); return (NULL); } diff --git a/src/parse/parse.c b/src/parse/parse.c index ed1aa28..3aa2a30 100644 --- a/src/parse/parse.c +++ b/src/parse/parse.c @@ -5,12 +5,10 @@ #include "parse.h" -t_ast *parse(char *input) +t_ast *parse(char **input) { -/* char **out_lex; */ -/* if (!(out_lex = lexer(input))) */ -/* return (NULL); */ - - (void)input; - return (NULL); + while (input[i] != '\0') + { + + } } -- cgit