From: <ibr...@us...> - 2011-04-22 13:03:28
|
Revision: 3950 http://tora.svn.sourceforge.net/tora/?rev=3950&view=rev Author: ibre5041 Date: 2011-04-22 13:03:22 +0000 (Fri, 22 Apr 2011) Log Message: ----------- Fixes for compilation on MSVC Express 2010 Modified Paths: -------------- branches/tora-trotl/sandbox/tsqlparse.h branches/tora-trotl/sandbox/tsqlparse.tcc branches/tora-trotl/sandbox/tsqlparseoracle.cpp Modified: branches/tora-trotl/sandbox/tsqlparse.h =================================================================== --- branches/tora-trotl/sandbox/tsqlparse.h 2011-04-22 13:01:51 UTC (rev 3949) +++ branches/tora-trotl/sandbox/tsqlparse.h 2011-04-22 13:03:22 UTC (rev 3950) @@ -215,27 +215,27 @@ public: enum StatementType { - SELECT, - UPDATE, - DELETE, - INSERT, - CREATE, - DROP, - ALTER, - BEGIN, - DECLARE, - OTHER + S_SELECT, + S_UPDATE, + S_DELETE, + S_INSERT, + S_CREATE, + S_DROP, + S_ALTER, + S_BEGIN, + S_DECLARE, + S_OTHER }; enum ParserState { - ERROR = -1, - INIT = 0, - LEXER, - PARSER + P_ERROR = -1, + P_INIT = 0, + P_LEXER, + P_PARSER }; - Statement(const QString &statement) : _mStatement(statement), _mState(INIT), _mAST(NULL), _mEnd(NULL) + Statement(const QString &statement) : _mStatement(statement), _mState(P_INIT), _mAST(NULL), _mEnd(NULL) {}; ~Statement() {}; Modified: branches/tora-trotl/sandbox/tsqlparse.tcc =================================================================== --- branches/tora-trotl/sandbox/tsqlparse.tcc 2011-04-22 13:01:51 UTC (rev 3949) +++ branches/tora-trotl/sandbox/tsqlparse.tcc 2011-04-22 13:03:22 UTC (rev 3950) @@ -1,8 +1,14 @@ +#ifdef __GCC__ +#define __weak_symbol__ __attribute__ ((weak)) +#else +#define __weak_symbol__ +#endif + namespace SQLParser { - const char* SQLParser::Token::TokenType2Text[] __attribute__((weak)) = { + const char* SQLParser::Token::TokenType2Text[] __weak_symbol__ = { "UNASSIGNED" ,"ROOT" ,"FAILURE" Modified: branches/tora-trotl/sandbox/tsqlparseoracle.cpp =================================================================== --- branches/tora-trotl/sandbox/tsqlparseoracle.cpp 2011-04-22 13:01:51 UTC (rev 3949) +++ branches/tora-trotl/sandbox/tsqlparseoracle.cpp 2011-04-22 13:03:22 UTC (rev 3950) @@ -124,7 +124,7 @@ OracleStatement::OracleStatement(const QString &statement) : Statement(statement) { - _mStatementType = SELECT; + _mStatementType = S_SELECT; parse(); }; @@ -169,12 +169,12 @@ if (tstream == NULL) { // TODO throw here - _mState = ERROR; + _mState = P_ERROR; throw ParseException(); exit(ANTLR3_ERR_NOMEM); } this->lexerTokenVector = tstream->getTokens(tstream); - _mState = LEXER; + _mState = P_LEXER; // Finally, now that we have our lexer constructed, we can create the parser // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |