diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-03-31 21:41:33 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-03-31 21:41:33 +0200 |
| commit | b15ab562d74b5111ac7c9bd6e0ec185435902472 (patch) | |
| tree | 664a55a24d7e36a5f56bf1ce7b0ea96751e0cda0 /include | |
| parent | 808d1499f5708ad4eda3612416e62efe6fdff021 (diff) | |
| download | minishell-b15ab562d74b5111ac7c9bd6e0ec185435902472.tar.gz minishell-b15ab562d74b5111ac7c9bd6e0ec185435902472.tar.bz2 minishell-b15ab562d74b5111ac7c9bd6e0ec185435902472.zip | |
Removing ms_ prefix, Removing junk
Diffstat (limited to 'include')
| -rw-r--r-- | include/eval.h (renamed from include/ms_eval.h) | 5 | ||||
| -rw-r--r-- | include/minishell.h | 25 | ||||
| -rw-r--r-- | include/parse.h (renamed from include/ms_parse.h) | 52 |
3 files changed, 18 insertions, 64 deletions
diff --git a/include/ms_eval.h b/include/eval.h index b53b845..ec04ff5 100644 --- a/include/ms_eval.h +++ b/include/eval.h @@ -2,11 +2,12 @@ # define MS_EVAL_H /** -** \file ms_eval.h +** \file eval.h ** \brief Evaluation module */ # include "minishell.h" +# include "ast.h" /** ** \brief Evaluation state struct @@ -38,6 +39,6 @@ typedef struct ** \param ast Abstract syntax tree to evaluate */ -int ms_eval(t_eval_state *state, t_ast *ast); +int eval(t_eval_state *state, t_ast *ast); #endif diff --git a/include/minishell.h b/include/minishell.h index 6a00ca8..4f33951 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -34,9 +34,6 @@ # include "libft_lst.h" # include "libft_util.h" -# include "ms_parse.h" -// # include "ms_eval.h" - /** ** \brief Value of pipe entry if closed */ @@ -62,31 +59,31 @@ typedef t_ftht* t_env; ** path.c */ -t_path ms_path_update(t_path path, char *path_var); +t_path path_update(t_path path, char *path_var); /* ** env.c */ -t_env ms_env_from_array(char **envp); -char **ms_env_to_array(t_env env); +t_env env_from_array(char **envp); +char **env_to_array(t_env env); /* ** builtin*.c - directory with all builtin commands */ -int ms_echo(char **argv); -int ms_cd(t_env env, char **argv); -int ms_pwd(void); -int ms_export(t_env env, char **argv); -int ms_unset(t_env env, char **argv); -int ms_env(t_env env); -int ms_exit(void); +int builtin_echo(char **argv); +int builtin_cd(t_env env, char **argv); +int builtin_pwd(void); +int builtin_export(t_env env, char **argv); +int builtin_unset(t_env env, char **argv); +int builtin_env(t_env env); +int builtin_exit(void); /* ** util.c - various utilitary functions */ -void ms_ht_del_str_entry(t_ftht_entry *entry); +void ht_del_str_entry(t_ftht_entry *entry); #endif diff --git a/include/ms_parse.h b/include/parse.h index 0a33ccf..c9710d7 100644 --- a/include/ms_parse.h +++ b/include/parse.h @@ -1,7 +1,7 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* ms_parse.h :+: :+: :+: */ +/* parse.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ @@ -17,7 +17,7 @@ # include "ast.h" /** -** \file ms_parse.h +** \file parse.h ** \brief Input parsing and AST manipulation ** ** Context free grammar: @@ -33,60 +33,16 @@ ** ``` */ -/** -** \brief AST node tag -** \param TAG_STRING string -** \param TAG_SEP `;` | `|` | `&&` | `||` -** \param TAG_REDIR_OUT `>` -** \param TAG_REDIR_IN `<` -** \param TAG_REDIR_APPEND `>>` -*/ - -// typedef enum -// { -// TAG_STRING, -// TAG_SEP, -// TAG_REDIR_OUT, -// TAG_REDIR_IN, -// TAG_REDIR_APPEND, -// TAG_CMD, -// TAG_LINE, -// } t_ast_tag; - -/** -** \brief AST (Abstract Syntax Tree) -** \param tag tag (type) of node -** \param content substring of the parsed string which corespond to tag -** \param children_num number of children -** \param children children nodes -*/ - -// typedef struct s_ast -// { -// t_tag tag; -// char* content; -// int children_num; -// struct s_ast** children; -// } t_ast; - /* ** lexer.c */ -char **ms_lexer(char *input); +char **lexer(char *input); /* ** parse.c */ -t_ast *ms_parse(char *input); - -/* -** ast.c -*/ - -// t_ast *ms_ast_new(t_tag tag); -// void ms_ast_destroy(t_ast *ast); -// void ms_ast_iter(t_ast *ast, void (*f)(void *f_arg, t_ast *children), void *arg); +t_ast *parse(char *input); #endif |
