/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* 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 ::= | ** ``` */ /* ** parse.c */ t_ret *parse(t_ftlst *input); t_ast *parse_cmd(t_ast *ast, t_ftlst *ret); int parse_cmd_str_true_false(enum e_token_tag tag); #endif