From 26ddbd7146f65a2cf100713f422a9ab5b1890620 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 14 Jun 2020 10:36:53 +0200 Subject: Changing ast related struct and fixing functions accordingly --- include/parser.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 include/parser.h (limited to 'include/parser.h') diff --git a/include/parser.h b/include/parser.h new file mode 100644 index 0000000..80d039b --- /dev/null +++ b/include/parser.h @@ -0,0 +1,48 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* parser.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/28 09:00:00 by cacharle #+# #+# */ +/* Updated: 2020/06/14 10:31:20 by charles ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef PARSE_H +# define PARSE_H + +# include "minishell.h" +# include "ast.h" + +/* +** \file parse.h +** \brief Input parsing and AST manipulation +** +** Context free grammar: +** ``` +** redir_in ::= '<' +** redir_out ::= '>' +** redir_append ::= '>>' +** string ::= '\'' .+ '\'' | '"' .+ '"' | [^ ]+ +** sep ::= '&&' | '||' | '|' | ';' +** expr ::= | | | +** cmd ::= + +** line ::= | +** ``` +*/ + +/* +** lexer.c +*/ + +// char **lexer(char *input); + +/* +** parse.c +*/ + +t_ret *parse(t_ftlst *input); + +#endif -- cgit