If i forget to put an empty line at the end of any of my files my program gets a syntax error. The problem is my grammar expects a newline to end the current line. Since a newline doesnt exist bison generates a syntax error bc it does not finish the rule.
How do i solve this? I tried making <> return MY_EOF BUT when i do that lex crashes a horrible death. I guess theres code in its default EOF that i am not calling. and i have no idea what functions they may be. Using EOF create the error symbol EOF is used, but is not defined as a token and has no rules