parser V[chepa combien]

This commit is contained in:
Nathan Lebrun
2025-01-20 13:24:33 +01:00
parent 81e0c7c4ee
commit b319c2129f
6 changed files with 178 additions and 73 deletions

View File

@@ -3,19 +3,21 @@
/* ::: :::::::: */
/* parse.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nalebrun <nalebrun@student.s19.be> +#+ +:+ +#+ */
/* By: nalebrun <nalebrun@student.s19.be> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/15 08:23:41 by nalebrun #+# #+# */
/* Updated: 2025/01/15 08:23:41 by nalebrun ### ########.fr */
/* Created: 2025/01/15 08:23:41 by nalebrun #+# #+# */
/* Updated: 2025/01/20 13:15:47 by nalebrun ### ########.fr */
/* */
/* ************************************************************************** */
#include "tokenizer/tokenizer.h"
void truncate_comment(char *str)
void truncate_comment(char *str)
{
int i;
int i;
if (!str)
return ;
i = 0;
while (str[i])
{
@@ -28,18 +30,18 @@ void truncate_comment(char *str)
}
}
int main (int ac, char **av)
int main(int ac, char **av)
{
t_node *lst;
char *expanded;
(void)ac;
t_node *lst;
truncate_comment(av[1]);
lst = tokenize(av[1]);
expanded = expander(av[1]);
lst = tokenize(expanded);
if (!lst)
return (1);
// debug_linked_list(lst);
return (free(expanded), 1);
ft_free(expanded);
debug_linked_list(lst, "Tokenized");
free_linked_list(lst);
// free la list wesh
}