/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* parser.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/28 09:00:00 by cacharle #+# #+# */ /* Updated: 2020/08/27 18:40:55 by charles ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef PARSE_H # define PARSE_H # include "minishell.h" #include "libft_str.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_parsed *parse(t_tok_lst *input); t_parsed *parse_op(t_tok_lst *input); t_parsed *parse_expr(t_tok_lst *input); t_parsed *parse_cmd(t_tok_lst *input); #endif