Update to not use the small parse table map
This commit is contained in:
parent
531134f575
commit
544711e05c
1022 changed files with 45894 additions and 90152 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/29 11:35:51 by rparodi #+# #+# */
|
||||
/* Updated: 2024/08/03 15:18:33 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/08/04 14:17:01 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -39,6 +39,8 @@ void ft_free_utils(t_state *s)
|
|||
mem_free(s->str_input);
|
||||
if (s->env)
|
||||
hmap_env_free(s->env);
|
||||
if (s->tmp_var)
|
||||
hmap_env_free(s->tmp_var);
|
||||
ts_parser_delete(s->parser);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/28 14:40:38 by rparodi #+# #+# */
|
||||
/* Updated: 2024/08/03 16:18:41 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/08/04 14:15:02 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -114,13 +114,13 @@ t_node parse_str(t_state *state)
|
|||
|
||||
void exec_shcat(t_state *state)
|
||||
{
|
||||
t_program_result prog_res;
|
||||
|
||||
prog_res = (t_program_result){.exit = 0};
|
||||
/* t_program_result prog_res; */
|
||||
/* */
|
||||
/* prog_res = (t_program_result){.exit = 0}; */
|
||||
print_node_data(&state->current_node, 0);
|
||||
free_node(state->current_node);
|
||||
if (state->ast != NULL && run_program(&state->ast->data.program, state, &prog_res))
|
||||
printf("Error when execting the Command \n");
|
||||
/* if (state->ast != NULL && run_program(&state->ast->data.program, state, &prog_res)) */
|
||||
/* printf("Error when execting the Command \n"); */
|
||||
ast_free(state->ast);
|
||||
}
|
||||
|
||||
|
|
@ -157,7 +157,7 @@ void ft_take_args(t_state *state)
|
|||
line_history_add(state->str_input);
|
||||
state->current_node = parse_str(state);
|
||||
exec_shcat(state);
|
||||
ft_exit(state, 42);
|
||||
/* ft_exit(state, 42); */
|
||||
mem_free(state->str_input);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue