Fix infinite recursion
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 18 Jul 2024 11:32:26 +0000 (13:32 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Sun, 21 Jul 2024 18:21:22 +0000 (20:21 +0200)
commitd8e560f8909ddbba58f5e35eacac4b73b18aa124
tree2627c67280670082240823ac974aa592f3e5160e
parent376a73dcacc1e030794cd64766bcc2d8e78d146e
Fix infinite recursion

The previous commit solved some wierd things around the add_first
function. These were created because of my misunderstanding of the
process but also (almost) prevented infinite recursion.

The infinite recurson is caused when a search for a first (nonterminal)
tokens encounteres the original token, because then it searches for it
again and is able to again find the token along the search.

The solution is to make the algorithm log what nonterminals it already
went through so that it does not try to find their first tokens during
the search for their first tokens.
ft_parse/ft_parsing_table_generate.c