small fixes plus debug output for current state
handle unparsable input
correctly classify "no-field" entity definition tokens
correctly process whether there are fields to process in definition
restore state with cleanup after statement processing