/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/21 15:34:14 by ljiriste #+# #+# */
-/* Updated: 2024/11/26 11:49:20 by ljiriste ### ########.fr */
+/* Updated: 2024/11/28 12:07:58 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include <stdlib.h>
-static const t_token g_empty_token = {.type = "''", .str = NULL};
-
int push_state(t_stack *stack, size_t state_num, t_token token)
{
t_parser_stack_element element;
/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/20 13:23:20 by ljiriste #+# #+# */
-/* Updated: 2024/11/28 11:54:35 by ljiriste ### ########.fr */
+/* Updated: 2024/11/28 12:08:46 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
# include "libft.h"
+static const t_token g_eof_token = {.type = "$", .str = NULL};
+static const t_token g_empty_token = {.type = "''", .str = NULL};
+
void ft_free_token(void *v_token);
void ft_free_rule(void *v_rule);
void ft_free_state(void *v_state);
/* By: ljiriste <ljiriste@student.42prague.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/26 16:35:11 by ljiriste #+# #+# */
-/* Updated: 2024/11/27 11:12:16 by ljiriste ### ########.fr */
+/* Updated: 2024/11/28 15:26:22 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
#include "pt_constructor.h"
+#include "../ft_parse_inner.h"
#include "libft.h"
static void add_shift(t_parser_action *action, const ssize_t *goto_state)
/* By: ljiriste <ljiriste@student.42prague.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/26 16:57:15 by ljiriste #+# #+# */
-/* Updated: 2024/11/28 11:19:11 by ljiriste ### ########.fr */
+/* Updated: 2024/11/28 12:07:50 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
size_t state_number;
} t_generator_state;
-static const t_token g_eof_token = {.type = "$", .str = NULL};
-static const t_token g_empty_token = {.type = "''", .str = NULL};
-
int cmp_token_type(const t_token *token1, const t_token *token2);
int void_cmp_token_type(const void *v_token1, const void *v_token2);
int cmp_rules(