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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user