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

@@ -1,16 +1,16 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parser.h :+: :+: :+: */
/* tokenizer.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nalebrun <nalebrun@student.s19.be> +#+ +:+ +#+ */
/* By: nalebrun <nalebrun@student.s19.be> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/15 13:30:12 by nalebrun #+# #+# */
/* Updated: 2025/01/15 13:30:12 by nalebrun ### ########.fr */
/* Created: 2025/01/15 13:30:12 by nalebrun #+# #+# */
/* Updated: 2025/01/20 13:15:34 by nalebrun ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef TOKENIZER_H
#ifndef TOKENIZER_H
# define TOKENIZER_H
# include "../includes/minishell.h"
@@ -20,7 +20,7 @@ typedef enum e_token
UNSET,
OPERATOR,
WORD
} t_token;
} t_token;
typedef struct s_node
{
@@ -29,12 +29,17 @@ typedef struct s_node
enum e_token token;
} t_node;
t_node *tokenize(char *str);
t_node *create_node(char *val, t_token token);
int add_node_back(t_node *head, char *val, t_token token);
void free_linked_list(t_node *stack);
t_token get_token(char *str);
int create_node_after(t_node *elem, char *val);
void debug_linked_list(t_node *head, char *msg);
t_node *tokenize(char *str);
t_node *create_node(char *val, t_token token);
int add_node_back(t_node *head, char *val, t_token token);
int merge_with_next_node(t_node *node);
void free_linked_list(t_node *stack);
t_token get_token(char *str);
int create_node_after(t_node *elem, char *val);
char *copy_meta_xor(char *val, int *copied, int rev);
int is_meta(char c);
int is_sticked(char *val);
void debug_linked_list(t_node *head, char *msg);
#endif