Author Topic: Tiny fix in lexer_masm.xml and questions on lexers  (Read 3582 times)

MarioS

  • Guest
Tiny fix in lexer_masm.xml and questions on lexers
« on: January 21, 2007, 01:38:29 pm »

Hello C::B-Developers,

in lexers/lexer_masm.xml file, the follwing statement

                <Style name="Extended instruction"
                        index="15"
                        fg="0,0,0"/>

should have index="14" since

#define SCE_ASM_EXTINSTRUCTION 14

in scintilla/include/SciLexer.h .

Revision: svn 3504, Jan 18 2007 16:27:51 - wx2.6.3 (Windows, unicode)

I am sorry, if this post doesnt fit into this forum but I cant reach berlios.de at the moment and I didnt want to spend too much time on this tiny issue (almost isnt worth a patch file).

BTW, I have implemented two new lexers for a realtime language and a special 68k/powerpc assembler but I am not sure whether and where I should submit the code. The best way would be to add them as a plugin. Is there any way to use the external lexer interface in the scintilla source tree from within a C::B plugin? In case of a static implementation, do I have to contact the scintilla coders?

Unfortunately, when adding new lexers (with higher indexes), a statement at line 183 in sdk/editorcolourset.cpp makes life a little harder:

HighlightLanguage EditorColourSet::AddHighlightLanguage(int lexer, const wxString& name)
{
   if (lexer <= wxSCI_LEX_NULL ||
            lexer > wxSCI_LEX_FREEBASIC ||               // *arrg* !
            name.IsEmpty())
    {
        return HL_NONE;
    }

But anyway. Well done, folks!

Kind regards,
Mario