/* By: ljiriste <ljiriste@student.42prague.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/27 21:21:54 by ljiriste #+# #+# */
-/* Updated: 2024/05/27 22:57:11 by ljiriste ### ########.fr */
+/* Updated: 2024/06/14 11:20:28 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
t_vec gotos; // t_vec of size_t
} t_parser_state;
+// The states table has the following form:
+//
+// State token[i] token[i+n]
+// j states[j].lookahead[i] states[0].goto[i]
+//
+// The whitespace is not significant and ; should be used as separator
+//
+// The first row contains all the n terminal tokens first
+// and after them all the non-terminal tokens.
+// Every other row contains the (unique) state number and the reduce/shift
+// rule for the appropriate token.
+//
+// The rules table should have the form
+//
+// token[i_1] -> [ token[j_1] [ token[k_1] ... ]]
+// token[i_2] -> [ token[j_2] [ token[k_2] ... ]]
+//
+// Tokens should not contain whitespace as it is used as separator
+
typedef struct s_parsing_table
{
t_vec rules; // t_vec of t_grammar_rule
t_vec states; // t_vec of t_parser_state
+ t_vec tokens; // t_vec of tokens
} t_parsing_table;
#endif // FT_PARSE_H