I want to parse a file from argv into a LIST of TOKENs. The only problem is, whenever I try to free the value of the existing token inside of LEXER so I can write a new value to it, the program will abruptly crash. I have shortened the code to around 150 relevant lines (including helpful comments and debug prints and excluding error checking to reduce line count). I am compiling with gcc on windows 10 using gcc -m32 -O2 test.c -pedantic -Wall -o test.exe and running using .\test.exe test.
Expected output (excluding debug stuff):
id 2
id 2
16 3
16 3
69 3
Actual output (excluding debug stuff):
id 2
id 2
16 3
Any tips or hints will be greatly appreciated.