Fixed all norme from lexer, parser. minishell and builtins
This commit is contained in:
@@ -72,7 +72,6 @@ typedef struct s_prompt
|
||||
const char *ps2; // secondary prompt string for multiline input
|
||||
} t_prompt;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Main minishell structure containing global state information
|
||||
*
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# include "core.h"
|
||||
# include "parser.h"
|
||||
|
||||
extern void syntax_error_unexpected_token(t_token *token);
|
||||
extern void syntax_error_unexpected_token(t_token *token);
|
||||
extern void malloc_error(void);
|
||||
|
||||
#endif /* ERRORS_H */
|
||||
@@ -42,4 +42,7 @@
|
||||
# include <term.h> // tgetent(3), tgetflag(3), tgetnum(3),
|
||||
// tgetstr(3), tgoto(3), tputs(3)
|
||||
|
||||
void handle_sigint_status(t_minishell *minishell);
|
||||
bool handle_eof(char *line, t_minishell *minishell);
|
||||
|
||||
#endif /* MINISHELL_H */
|
||||
|
||||
@@ -23,19 +23,29 @@
|
||||
|
||||
// parser.c
|
||||
|
||||
extern t_list *parse(char *line, t_minishell *minishell);
|
||||
extern t_list *parse(char *line, t_minishell *minishell);
|
||||
|
||||
// lexer.c
|
||||
|
||||
extern t_list *lex(const char *line);
|
||||
t_token_type get_token_type(const char *str);
|
||||
t_token *token_new(t_token_type type, char *text);
|
||||
t_token *read_token(t_token_type type, const char *line,
|
||||
size_t *i);
|
||||
t_token *read_word(const char *line, size_t *i);
|
||||
|
||||
extern void token_clear(t_token *token);
|
||||
extern t_list *lex(const char *line);
|
||||
|
||||
extern void token_clear(t_token *token);
|
||||
extern t_command *command_new(t_list **tokens);
|
||||
extern void command_clear(t_command *command);
|
||||
extern void command_add_tokens(t_command **command, t_list **tokens);
|
||||
extern bool is_pipe(t_token *token);
|
||||
extern bool is_redirection(t_token *token);
|
||||
void redirection_add(t_list **tokens, t_token *token, t_command **command);
|
||||
void words_add(t_list **tokens, t_command **command);
|
||||
extern bool is_redirection(t_token *token);
|
||||
void redirection_add(t_list **tokens, t_token *token,
|
||||
t_command **command);
|
||||
void words_add(t_list **tokens, t_command **command);
|
||||
|
||||
void expand(t_list **commands, t_minishell *minishell);
|
||||
void redirection_clear(t_redirection *redirection);
|
||||
|
||||
#endif /* PARSER_H */
|
||||
|
||||
Reference in New Issue
Block a user