Engine: fix bug when entering error mode
Adjust interface
Fix generated interface when using external-tokens
TableBackend: fix generated matching code when using external-tokens