diff options
| author | 2015-11-25 16:48:41 -0500 | |
|---|---|---|
| committer | 2015-11-25 16:48:41 -0500 | |
| commit | 8e640722c62692818ab840d50b3758f89a41a54e (patch) | |
| tree | 38197eb1688a5afc338081ea17e15f938976e422 /SQLiteStudio3/coreSQLiteStudio/parser/lempar.c | |
| parent | 9618f0ebbf4b88045247c01ce8c8f58203508ebf (diff) | |
Imported Upstream version 3.0.7upstream/3.0.7
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/parser/lempar.c')
| -rw-r--r-- | SQLiteStudio3/coreSQLiteStudio/parser/lempar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/lempar.c b/SQLiteStudio3/coreSQLiteStudio/parser/lempar.c index 4f9cd5c..2d0e610 100644 --- a/SQLiteStudio3/coreSQLiteStudio/parser/lempar.c +++ b/SQLiteStudio3/coreSQLiteStudio/parser/lempar.c @@ -717,7 +717,11 @@ static void yy_reduce( { tokens.clear(); const char* fieldName = yyTokenName[yypParser->yystack[i].major]; - if (parserContext->isManagedToken(yypParser->yystack[i].minor.yy0)) + + // Adding token being subject of this reduction. It's usually not includes in the inherited tokens, + // although if inheriting from simple statements, like "FAIL" or "ROLLBACK", this tends to be redundant with the inherited tokens. + // That's why we're checking if it's not contained in the inherited tokens and add it only then. + if (parserContext->isManagedToken(yypParser->yystack[i].minor.yy0) && !yypParser->yystack[i].tokens->contains(yypParser->yystack[i].minor.yy0)) tokens += yypParser->yystack[i].minor.yy0; tokens += *(yypParser->yystack[i].tokens); |
