Added states to the lexing rules to make them match the correct things at the correct time.
Added missing function declaration.
Removed printf debugging.