diff options
Diffstat (limited to 'include/parser.h')
| -rw-r--r-- | include/parser.h | 48 |
1 files changed, 48 insertions, 0 deletions
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 <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* 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 ::= '<' <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_ret *parse(t_ftlst *input); + +#endif |
