connectivity/source/parse/sqlbison.y | 69 +++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 30 deletions(-)
New commits: commit fac03549291004a3ab64a0618a7119e2cc906409 Author: Michael Stahl <mst...@redhat.com> Date: Fri Sep 13 14:56:15 2013 +0200 translate german comments in sqlbison.y Change-Id: Ic573e5ae63fdfb3d4ff79eb6d81fe0f4b058d582 diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index ae793e8..fb38373 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -71,8 +71,8 @@ inline connectivity::OSQLInternalNode* newNode(const ::rtl::OUString& _NewValue, const sal_uInt32 nNodeID = 0); -// yyi ist die interne Nr. der Regel, die gerade reduziert wird. -// Ueber die Mapping-Tabelle yyrmap wird daraus eine externe Regel-Nr. +// yyi is the internal number of the rule that is currently being reduced +// This can be mapped to extrnal rule number via the yyrmap. #define SQL_NEW_RULE newNode("", SQL_NODE_RULE, yyr1[yyn]) #define SQL_NEW_LISTRULE newNode("", SQL_NODE_LISTRULE, yyr1[yyn]) #define SQL_NEW_COMMALISTRULE newNode("", SQL_NODE_COMMALISTRULE, yyr1[yyn]) @@ -4652,7 +4652,7 @@ OSQLParseNode* OSQLParser::parseTree(::rtl::OUString& rErrorMessage, m_pParseTree = NULL; m_sErrorMessage = ::rtl::OUString(); - // ... und den Parser anwerfen ... + // start parsing if (SQLyyparse() != 0) { // only set the error message, if it's not already set @@ -4671,16 +4671,12 @@ OSQLParseNode* OSQLParser::parseTree(::rtl::OUString& rErrorMessage, { (*s_pGarbageCollector)->clear(); - // Das Ergebnis liefern (den Root Parse Node): + // return result: + // to work around a bug in MKS YACC return the member m_pParseTree + // instead of Sdbyyval.pParseNode - // OSL_ENSURE(Sdbyyval.pParseNode != NULL,"OSQLParser: Parser hat keinen ParseNode geliefert"); - // return Sdbyyval.pParseNode; - // geht nicht wegen Bug in MKS YACC-erzeugtem Code (es wird ein falscher ParseNode - // geliefert). - - // Stattdessen setzt die Parse-Routine jetzt den Member pParseTree - // - einfach diesen zurueckliefern: - OSL_ENSURE(m_pParseTree != NULL,"OSQLParser: Parser hat keinen ParseTree geliefert"); + SAL_WARN_IF(!m_pParseTree, "connectivity", + "OSQLParser: Parser did not create ParseTree"); return m_pParseTree; } } commit 04e92a626ee01340bc8308566753719274b99edf Author: Michael Stahl <mst...@redhat.com> Date: Fri Sep 13 14:55:10 2013 +0200 fix Apple g++ 4.2.1 unused function warning in sqlbison.y Change-Id: Icc55a6b485341e3be0d3e96f51f41a2bba1629c1 diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index ec236de..ae793e8 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -58,26 +58,17 @@ # pragma GCC diagnostic ignored "-Wunused-function" #endif -static connectivity::OSQLInternalNode* newNode(const sal_Char* pNewValue, - const connectivity::SQLNodeType eNodeType, - const sal_uInt32 nNodeID = 0) -{ - return new connectivity::OSQLInternalNode(pNewValue, eNodeType, nNodeID); -} +inline connectivity::OSQLInternalNode* newNode(const sal_Char* pNewValue, + const connectivity::SQLNodeType eNodeType, + const sal_uInt32 nNodeID = 0); -static connectivity::OSQLInternalNode* newNode(const ::rtl::OString& _NewValue, - const connectivity::SQLNodeType eNodeType, - const sal_uInt32 nNodeID = 0) -{ - return new connectivity::OSQLInternalNode(_NewValue, eNodeType, nNodeID); -} +inline connectivity::OSQLInternalNode* newNode(const ::rtl::OString& _NewValue, + const connectivity::SQLNodeType eNodeType, + const sal_uInt32 nNodeID = 0); -static connectivity::OSQLInternalNode* newNode(const ::rtl::OUString& _NewValue, - const connectivity::SQLNodeType eNodeType, - const sal_uInt32 nNodeID = 0) -{ - return new connectivity::OSQLInternalNode(_NewValue, eNodeType, nNodeID); -} +inline connectivity::OSQLInternalNode* newNode(const ::rtl::OUString& _NewValue, + const connectivity::SQLNodeType eNodeType, + const sal_uInt32 nNodeID = 0); // yyi ist die interne Nr. der Regel, die gerade reduziert wird. @@ -4280,6 +4271,28 @@ using namespace ::com::sun::star::util; using namespace ::osl; using namespace ::dbtools; +connectivity::OSQLInternalNode* newNode(const sal_Char* pNewValue, + const connectivity::SQLNodeType eNodeType, + const sal_uInt32 nNodeID) +{ + return new connectivity::OSQLInternalNode(pNewValue, eNodeType, nNodeID); +} + +connectivity::OSQLInternalNode* newNode(const ::rtl::OString& _NewValue, + const connectivity::SQLNodeType eNodeType, + const sal_uInt32 nNodeID) +{ + return new connectivity::OSQLInternalNode(_NewValue, eNodeType, nNodeID); +} + +connectivity::OSQLInternalNode* newNode(const ::rtl::OUString& _NewValue, + const connectivity::SQLNodeType eNodeType, + const sal_uInt32 nNodeID) +{ + return new connectivity::OSQLInternalNode(_NewValue, eNodeType, nNodeID); +} + + //============================================================ //= a helper for static ascii pseudo-unicode strings //============================================================ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits