From: <ibr...@us...> - 2013-04-12 15:46:56
|
Revision: 4618 http://sourceforge.net/p/tora/code/4618 Author: ibre5041 Date: 2013-04-12 15:46:42 +0000 (Fri, 12 Apr 2013) Log Message: ----------- Modified Paths: -------------- branches/tora3/extlibs/parsing.cpp/PLSQLGuiLexer.g branches/tora3/extlibs/parsing.cpp/UserGuiTraits.hpp branches/tora3/src/parsing/PLSQLGuiLexer.cc branches/tora3/src/parsing/PLSQLGuiLexer.hpp branches/tora3/src/parsing/tsqllexeroracle2.cc branches/tora3/src/tests/test4window.cpp Modified: branches/tora3/extlibs/parsing.cpp/PLSQLGuiLexer.g =================================================================== --- branches/tora3/extlibs/parsing.cpp/PLSQLGuiLexer.g 2013-04-09 14:11:48 UTC (rev 4617) +++ branches/tora3/extlibs/parsing.cpp/PLSQLGuiLexer.g 2013-04-12 15:46:42 UTC (rev 4618) @@ -91,6 +91,8 @@ 'CALL' | 'DECLARE' | 'BEGIN' | + 'PROCEDURE' | + 'FUNCTION' | 'CREATE'; OTHER_COMMAND_INTRODUCER: @@ -416,7 +418,7 @@ 'FORCE' | /* FORCE_KEY: */ 'FROM' | /* SQL92_RESERVED_FROM:*/ 'FULL' | /* FULL_KEY: */ - 'FUNCTION' | /* FUNCTION_KEY: */ + //'FUNCTION' | /* FUNCTION_KEY: */ 'GLOBAL' | /* GLOBAL_KEY: */ 'GOTO' | /* SQL92_RESERVED_GOTO:*/ //'GRANT' | /* SQL92_RESERVED_GRANT:*/ @@ -569,7 +571,7 @@ 'PRECISION' | /* PRECISION_KEY: */ 'PRESENT' | /* PRESENT_KEY: */ 'PRIOR' | /* SQL92_RESERVED_PRIOR:*/ - 'PROCEDURE' | /* SQL92_RESERVED_PROCEDURE:*/ + //'PROCEDURE' | /* SQL92_RESERVED_PROCEDURE:*/ 'PUBLIC' | /* SQL92_RESERVED_PUBLIC:*/ 'QUERY' | /* QUERY_KEY: */ 'RAISE' | /* RAISE_KEY: */ Modified: branches/tora3/extlibs/parsing.cpp/UserGuiTraits.hpp =================================================================== --- branches/tora3/extlibs/parsing.cpp/UserGuiTraits.hpp 2013-04-09 14:11:48 UTC (rev 4617) +++ branches/tora3/extlibs/parsing.cpp/UserGuiTraits.hpp 2013-04-12 15:46:42 UTC (rev 4618) @@ -80,6 +80,8 @@ typedef antlr3::Traits<PLSQLGuiLexer, EmptyParser, UserTraits> PLSQLGuiLexerTraits; typedef antlr3::Traits<MySQLGuiLexer, EmptyParser, UserTraits> MySQLGuiLexerTraits; +typedef antlr3::Traits<MySQLGuiLexer, EmptyParser, UserTraits> OraclePLSQLLexerTraits; +typedef antlr3::Traits<MySQLGuiLexer, EmptyParser, UserTraits> OraclePLSQLParserTraits; }; Modified: branches/tora3/src/parsing/PLSQLGuiLexer.cc =================================================================== (Binary files differ) Modified: branches/tora3/src/parsing/PLSQLGuiLexer.hpp =================================================================== (Binary files differ) Modified: branches/tora3/src/parsing/tsqllexeroracle2.cc =================================================================== --- branches/tora3/src/parsing/tsqllexeroracle2.cc 2013-04-09 14:11:48 UTC (rev 4617) +++ branches/tora3/src/parsing/tsqllexeroracle2.cc 2013-04-12 15:46:42 UTC (rev 4618) @@ -283,6 +283,8 @@ { bool exitLoop = false; bool createFound = start->getText().compare("CREATE", Qt::CaseInsensitive) == 0; + bool functionFound = start->getText().compare("FUNCTION", Qt::CaseInsensitive) == 0; + bool procedureFound = start->getText().compare("PROCEDURE", Qt::CaseInsensitive) == 0; bool declareFound = start->getText().compare("DECLARE", Qt::CaseInsensitive) == 0; bool beginFound = start->getText().compare("BEGIN", Qt::CaseInsensitive) == 0; unsigned blockDepth = 1; @@ -291,13 +293,14 @@ { i++; QString txt = i->getText(); - if( declareFound) + if( declareFound || functionFound || procedureFound) { i = i.consumeUntil(PLSQLGuiLexer::PLSQL_COMMAND_INTRODUCER); if(i->getText().compare("BEGIN", Qt::CaseInsensitive) != 0) exitLoop = true; } + // loop until pair paren is found if(parenDepth) { while(true) @@ -315,6 +318,10 @@ switch( i->getOrigTokenType()) { + case PLSQLGuiLexer::PLSQL_COMMAND_INTRODUCER: + i = findEndToken(i); + i++; + break; case PLSQLGuiLexer::R_IF: i = i.consumeUntil(PLSQLGuiLexer::R_THEN); case PLSQLGuiLexer::R_LOOP: Modified: branches/tora3/src/tests/test4window.cpp =================================================================== --- branches/tora3/src/tests/test4window.cpp 2013-04-09 14:11:48 UTC (rev 4617) +++ branches/tora3/src/tests/test4window.cpp 2013-04-12 15:46:42 UTC (rev 4618) @@ -96,12 +96,12 @@ void Test4Window::parsingStarted() { - statusbar->showMessage("Parsing started", 200); + statusbar->showMessage("Parsing started", 2000); } void Test4Window::parsingFinished() { - statusbar->showMessage("Parsing finished", 200); + statusbar->showMessage("Parsing finished", 2000); } void Test4Window::load() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |