Instead of using a lemon %fallback directive, have the tokenizer try to figure

out whether an instance of "WINDOW" should be TK_WINDOW or TK_ID.

FossilOrigin-Name: 022079cb0d67be5ac0a50dd9a4d41ee55ce8df681ecd0a544170d75fc8649978
This commit is contained in:
dan
2018-06-29 17:44:52 +00:00
parent 04a8e0cd54
commit 59ff42516c
7 changed files with 208 additions and 23 deletions
+14
View File
@@ -1068,3 +1068,17 @@ void Parse(
#endif
return;
}
/*
** Return the fallback token corresponding to canonical token iToken, or
** 0 if iToken has no fallback.
*/
int ParseFallback(int iToken){
#ifdef YYFALLBACK
if( iToken<sizeof(yyFallback)/sizeof(yyFallback[0]) ){
return yyFallback[iToken];
}
#endif
return 0;
}