I found the issue. I was importing p_logical_operation into another parser whose lexer didn't have the 'NOT' token defined. So, the error was slightly misleading, but the error was on my part.
p_logical_operation
'NOT'