forums › forums › SQLyog › SQLyog Localization and Source Code Discussions › Scilexer.dll
- This topic is empty.
-
AuthorPosts
-
-
August 9, 2010 at 8:55 am #31224
vishal.pr
MemberHi,
The Scintilla control will style the characters based on the style we give (http://www.scintilla.org/ScintillaDoc.html#Styling). Normally this is done by writing a lexer for the language of choice and then setting the lexer language (http://www.scintilla.org/ScintillaDoc.html#Lexer). The Scintilla version SQLyog uses is 1.72 and thus it uses a different MySQL lexer as compared to the version 2.22. You can check the LexMySQL.cxx and LexMySQL.h for details. Also please take a look at http://www.scintilla.org/Lexer.txt to know more about how to write a lexer.
Regards,
Vishal
-
August 14, 2010 at 4:20 pm #31225
jan marco alkema
MemberVishal, Thank you, for your good advise/feedback —)
//Checked out revision 263, XP, VS2005:
LexMySQL.cxx and LexMySQL.h are not included in http://sourceforge.net/projects/scintilla/files/scintilla/1.72/scintilla172.zip/download I included both files from revision 263. I put entry “LINK_LEXER(lmMySQL);” in file 'KeyWords.cxx'.
The obtained DLL 'SciLexer.dll' works properly in SQLYog!
I prefer to link a static build version of scintilla172 in SQLYog
I build scintilla172 als library output, and linkt it in SQLYog, I changed in WinMain.cpp linenumber 123:
#ifdef STATIC_BUILD
Scintilla_LinkLexers();
Scintilla_RegisterClasses(hinstance);
#else
VERIFY(hsci = ::LoadLibrary(L”SciLexer.dll”));
if(!hsci)
{
DisplayErrorText(GetLastError(), “Error loading SciLexer.dll”);
VERIFY(FreeLibrary(hsci));
return 0;
}
#endif
Static build version works properly also (in 32 bits),
Greeting Jan Marco
-
-
AuthorPosts
- You must be logged in to reply to this topic.