diff options
Diffstat (limited to 'include/parse.h')
| -rw-r--r-- | include/parse.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/include/parse.h b/include/parse.h new file mode 100644 index 0000000..c9710d7 --- /dev/null +++ b/include/parse.h @@ -0,0 +1,48 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* parse.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/28 09:00:00 by cacharle #+# #+# */ +/* Updated: 2020/02/28 14:57:58 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef MS_PARSE_H +# define MS_PARSE_H + +# include "minishell.h" +# include "ast.h" + +/** +** \file parse.h +** \brief Input parsing and AST manipulation +** +** Context free grammar: +** ``` +** redir_in ::= '<' <string> +** redir_out ::= '>' <string> +** redir_append ::= '>>' <string> +** string ::= '\'' .+ '\'' | '"' .+ '"' | [^ ]+ +** sep ::= '&&' | '||' | '|' | ';' +** expr ::= <redir_in> | <redir_out> | <redir_append> | <string> +** cmd ::= <expr>+ +** line ::= <cmd> <sep> <line> | <cmd> +** ``` +*/ + +/* +** lexer.c +*/ + +char **lexer(char *input); + +/* +** parse.c +*/ + +t_ast *parse(char *input); + +#endif |
