diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-10 00:52:04 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-10 03:15:12 +0200 |
commit | f220c3913a167b0d9702aca2b623839abe8665f1 (patch) | |
tree | 5e7949af95834ee50e16d30aa0bb79b7170873c9 /include/connectivity/sqlparse.hxx | |
parent | 6eb9c378f43e5f507d53d60d060becf4bb7615b8 (diff) |
make SQL grammar Generalised LR
This fixes parsing failures, like e.g.
warn:legacy.osl:30429:1:dbaccess/source/core/api/SingleSelectQueryComposer.cxx:783: OSingleSelectQueryComposer::getColumns: could not parse the column retrieval statement!
when opening query "Balance" of https://bugs.freedesktop.org/attachment.cgi?id=71964
OTOH, since we have reduce/reduce conflicts, we might have true
ambiguities in our grammar. This change makes the parsing fail
in the presence of full-expression ambiguities instead of making
a ~arbitrary choice.
Change-Id: I88574da91045dd52f198f193c78d144302f298a4
Diffstat (limited to 'include/connectivity/sqlparse.hxx')
-rw-r--r-- | include/connectivity/sqlparse.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/connectivity/sqlparse.hxx b/include/connectivity/sqlparse.hxx index 892d3ecb8db5..33884e5e2a71 100644 --- a/include/connectivity/sqlparse.hxx +++ b/include/connectivity/sqlparse.hxx @@ -170,7 +170,7 @@ namespace connectivity OSQLParseNode* buildDate(sal_Int32 _nType,OSQLParseNode*& pLiteral); bool extractDate(OSQLParseNode* pLiteral,double& _rfValue); void killThousandSeparator(OSQLParseNode* pLiteral); - OSQLParseNode* convertNode(sal_Int32 nType,OSQLParseNode*& pLiteral); + OSQLParseNode* convertNode(sal_Int32 nType,OSQLParseNode*const& pLiteral); // makes a string out of a number, pLiteral will be deleted OSQLParseNode* buildNode_STR_NUM(OSQLParseNode*& pLiteral); OSQLParseNode* buildNode_Date(const double& fValue, sal_Int32 nType); @@ -238,9 +238,9 @@ namespace connectivity sal_Int16 buildComparsionRule(OSQLParseNode*& pAppend,OSQLParseNode* pLiteral); // pCompre will be deleted if it is not used - sal_Int16 buildPredicateRule(OSQLParseNode*& pAppend,OSQLParseNode* pLiteral,OSQLParseNode*& pCompare,OSQLParseNode* pLiteral2 = NULL); + sal_Int16 buildPredicateRule(OSQLParseNode*& pAppend,OSQLParseNode* const pLiteral,OSQLParseNode*const & pCompare,OSQLParseNode* pLiteral2 = NULL); - sal_Int16 buildLikeRule(OSQLParseNode*& pAppend,OSQLParseNode*& pLiteral,const OSQLParseNode* pEscape); + sal_Int16 buildLikeRule(OSQLParseNode* const& pAppend,OSQLParseNode*& pLiteral,const OSQLParseNode* pEscape); sal_Int16 buildStringNodes(OSQLParseNode*& pLiteral); #else #endif |