diff options
| author | nyamatongwe <unknown> | 2007-12-31 23:56:11 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2007-12-31 23:56:11 +0000 | 
| commit | 042e31c6f734d8867d3ec1dbaac0eb9c253a5856 (patch) | |
| tree | b4efc606bdcf84f0ec13115d47fb7922aa34ed01 | |
| parent | 9ba30ef6b9b2e91ec2034be50850bab0e3e393e7 (diff) | |
| download | scintilla-mirror-042e31c6f734d8867d3ec1dbaac0eb9c253a5856.tar.gz | |
Added Magik lexer.
| -rw-r--r-- | gtk/makefile | 10 | ||||
| -rw-r--r-- | gtk/scintilla.mak | 3 | ||||
| -rw-r--r-- | include/SciLexer.h | 18 | ||||
| -rw-r--r-- | include/Scintilla.iface | 20 | ||||
| -rw-r--r-- | macosx/makefile | 14 | ||||
| -rw-r--r-- | src/KeyWords.cxx | 1 | ||||
| -rw-r--r-- | src/LexMagik.cxx | 447 | ||||
| -rw-r--r-- | vcbuild/SciLexer.dsp | 4 | ||||
| -rw-r--r-- | win32/makefile | 10 | ||||
| -rw-r--r-- | win32/scintilla.mak | 3 | ||||
| -rw-r--r-- | win32/scintilla_vc6.mak | 3 | 
11 files changed, 516 insertions, 17 deletions
| diff --git a/gtk/makefile b/gtk/makefile index ddebd07f2..74b3da5f7 100644 --- a/gtk/makefile +++ b/gtk/makefile @@ -68,11 +68,11 @@ LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.o \  LexConf.o LexCPP.o LexCrontab.o LexCsound.o LexCSS.o LexD.o LexEiffel.o \  LexErlang.o LexEScript.o LexFlagship.o LexForth.o LexFortran.o LexGAP.o \  LexGui4Cli.o LexHaskell.o LexHTML.o LexInno.o LexKix.o LexLisp.o LexLout.o \ -LexLua.o LexMatlab.o LexMetapost.o LexMMIXAL.o LexMPT.o LexMSSQL.o LexNsis.o \ -LexOpal.o LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o LexPOV.o \ -LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o LexScriptol.o \ -LexSmalltalk.o LexSpecman.o LexSpice.o LexSQL.o LexTADS3.o LexTCL.o LexTeX.o \ -LexVB.o LexVerilog.o LexVHDL.o LexYAML.o +LexLua.o LexMagik.o LexMatlab.o LexMetapost.o LexMMIXAL.o LexMPT.o LexMSSQL.o \ +LexNsis.o LexOpal.o LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o \ +LexPOV.o LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o \ +LexScriptol.o LexSmalltalk.o LexSpecman.o LexSpice.o LexSQL.o LexTADS3.o \ +LexTCL.o LexTeX.o LexVB.o LexVerilog.o LexVHDL.o LexYAML.o  #--Autogenerated -- end of automatically generated section  all: $(COMPLIB) diff --git a/gtk/scintilla.mak b/gtk/scintilla.mak index dcf346ead..64b8c354b 100644 --- a/gtk/scintilla.mak +++ b/gtk/scintilla.mak @@ -179,6 +179,7 @@ LEXOBJS=\  	$(DIR_O)\LexLisp.obj \  	$(DIR_O)\LexLout.obj \  	$(DIR_O)\LexLua.obj \ +	$(DIR_O)\LexMagik.obj \  	$(DIR_O)\LexMatlab.obj \  	$(DIR_O)\LexMetapost.obj \  	$(DIR_O)\LexMMIXAL.obj \ @@ -424,6 +425,8 @@ $(DIR_O)\LexLout.obj: ..\src\LexLout.cxx $(LEX_HEADERS)  $(DIR_O)\LexLua.obj: ..\src\LexLua.cxx $(LEX_HEADERS) +$(DIR_O)\LexMagik.obj: ..\src\LexMagik.cxx $(LEX_HEADERS) +  $(DIR_O)\LexMatlab.obj: ..\src\LexMatlab.cxx $(LEX_HEADERS)  $(DIR_O)\LexMetapost.obj: ..\src\LexMetapost.cxx $(LEX_HEADERS) diff --git a/include/SciLexer.h b/include/SciLexer.h index 2354aa876..1325c6ea2 100644 --- a/include/SciLexer.h +++ b/include/SciLexer.h @@ -99,6 +99,7 @@  #define SCLEX_ABAQUS 84  #define SCLEX_ASYMPTOTE 85  #define SCLEX_R 86 +#define SCLEX_MAGIK 87  #define SCLEX_AUTOMATIC 1000  #define SCE_P_DEFAULT 0  #define SCE_P_COMMENTLINE 1 @@ -1203,6 +1204,23 @@  #define SCE_R_IDENTIFIER 9  #define SCE_R_INFIX 10  #define SCE_R_INFIXEOL 11 +#define SCE_MAGIK_DEFAULT 0 +#define SCE_MAGIK_COMMENT 1 +#define SCE_MAGIK_HYPER_COMMENT 16 +#define SCE_MAGIK_STRING 2 +#define SCE_MAGIK_CHARACTER 3 +#define SCE_MAGIK_NUMBER 4 +#define SCE_MAGIK_IDENTIFIER 5 +#define SCE_MAGIK_OPERATOR 6 +#define SCE_MAGIK_FLOW 7 +#define SCE_MAGIK_CONTAINER 8 +#define SCE_MAGIK_BRACKET_BLOCK 9 +#define SCE_MAGIK_BRACE_BLOCK 10 +#define SCE_MAGIK_SQBRACKET_BLOCK 11 +#define SCE_MAGIK_UNKNOWN_KEYWORD 12 +#define SCE_MAGIK_KEYWORD 13 +#define SCE_MAGIK_PRAGMA 14 +#define SCE_MAGIK_SYMBOL 15  #define SCLEX_ASP 29  #define SCLEX_PHP 30  //--Autogenerated -- end of section automatically generated from Scintilla.iface diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 0ca831b59..d4e380526 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1991,6 +1991,7 @@ val SCLEX_PROGRESS=83  val SCLEX_ABAQUS=84  val SCLEX_ASYMPTOTE=85  val SCLEX_R=86 +val SCLEX_MAGIK=87  # When a lexer specifies its language as SCLEX_AUTOMATIC it receives a  # value assigned in sequence from SCLEX_AUTOMATIC+1. @@ -3256,6 +3257,25 @@ val SCE_R_OPERATOR=8  val SCE_R_IDENTIFIER=9  val SCE_R_INFIX=10  val SCE_R_INFIXEOL=11 +# Lexical state for SCLEX_MAGIKSF +lex MagikSF=SCLEX_MAGIKSF SCE_MAGIK_ +val SCE_MAGIK_DEFAULT=0 +val SCE_MAGIK_COMMENT=1 +val SCE_MAGIK_HYPER_COMMENT=16 +val SCE_MAGIK_STRING=2 +val SCE_MAGIK_CHARACTER=3 +val SCE_MAGIK_NUMBER=4 +val SCE_MAGIK_IDENTIFIER=5 +val SCE_MAGIK_OPERATOR=6 +val SCE_MAGIK_FLOW=7 +val SCE_MAGIK_CONTAINER=8 +val SCE_MAGIK_BRACKET_BLOCK=9 +val SCE_MAGIK_BRACE_BLOCK=10 +val SCE_MAGIK_SQBRACKET_BLOCK=11 +val SCE_MAGIK_UNKNOWN_KEYWORD=12 +val SCE_MAGIK_KEYWORD=13 +val SCE_MAGIK_PRAGMA=14 +val SCE_MAGIK_SYMBOL=15  # Events diff --git a/macosx/makefile b/macosx/makefile index 73342ce3e..50df23095 100644 --- a/macosx/makefile +++ b/macosx/makefile @@ -68,11 +68,11 @@ LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.o \  LexConf.o LexCPP.o LexCrontab.o LexCsound.o LexCSS.o LexD.o LexEiffel.o \  LexErlang.o LexEScript.o LexFlagship.o LexForth.o LexFortran.o LexGAP.o \  LexGui4Cli.o LexHaskell.o LexHTML.o LexInno.o LexKix.o LexLisp.o LexLout.o \ -LexLua.o LexMatlab.o LexMetapost.o LexMMIXAL.o LexMPT.o LexMSSQL.o LexNsis.o \ -LexOpal.o LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o LexPOV.o \ -LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o LexScriptol.o \ -LexSmalltalk.o LexSpecman.o LexSpice.o LexSQL.o LexTADS3.o LexTCL.o LexTeX.o \ -LexVB.o LexVerilog.o LexVHDL.o LexYAML.o +LexLua.o LexMagik.o LexMatlab.o LexMetapost.o LexMMIXAL.o LexMPT.o LexMSSQL.o \ +LexNsis.o LexOpal.o LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o \ +LexPOV.o LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o \ +LexScriptol.o LexSmalltalk.o LexSpecman.o LexSpice.o LexSQL.o LexTADS3.o \ +LexTCL.o LexTeX.o LexVB.o LexVerilog.o LexVHDL.o LexYAML.o  #--Autogenerated -- end of automatically generated section  # The LEXOBJS have to be treated specially as the functions in them are not called from external code @@ -95,10 +95,10 @@ COMPLIB=DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o \          TCarbonEvent.o TView.o ScintillaCallTip.o $(EXTOBS) \  	$(LEXOBJS) -$(STATICLIB): $(COMPLIB)  +$(STATICLIB): $(COMPLIB)  	$(LIBTOOL) -static -o $@ $^ -$(DYNAMICLIB): $(COMPLIB)  +$(DYNAMICLIB): $(COMPLIB)  	$(CC) -dynamic -o $@ $(DYN_FLAGS) $^  # Generate header files from Scintilla.iface diff --git a/src/KeyWords.cxx b/src/KeyWords.cxx index 29538d57b..976b13fdf 100644 --- a/src/KeyWords.cxx +++ b/src/KeyWords.cxx @@ -187,6 +187,7 @@ int Scintilla_LinkLexers() {  	LINK_LEXER(lmLot);  	LINK_LEXER(lmLout);  	LINK_LEXER(lmLua); +	LINK_LEXER(lmMagikSF);  	LINK_LEXER(lmMake);  	LINK_LEXER(lmMatlab);  	LINK_LEXER(lmMETAPOST); diff --git a/src/LexMagik.cxx b/src/LexMagik.cxx new file mode 100644 index 000000000..c47458fea --- /dev/null +++ b/src/LexMagik.cxx @@ -0,0 +1,447 @@ +// Scintilla source code edit control +/** + * @file LexMagik.cxx + * Lexer for GE(r) Smallworld(tm) MagikSF + */ +// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org> +// The License.txt file describes the conditions under which this software may be distributed. + +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <stdio.h> +#include <stdarg.h> + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "windows.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +/** + * Is it a core character (C isalpha(), exclamation and question mark) + * + * \param  ch The character + * \return True if ch is a character, False otherwise + */ +static inline bool IsAlphaCore(int ch) { +    return (isalpha(ch) || ch == '!' || ch == '?'); +} + +/** + * Is it a character (IsAlphaCore() and underscore) + * + * \param  ch The character + * \return True if ch is a character, False otherwise + */ +static inline bool IsAlpha(int ch) { +    return (IsAlphaCore(ch) || ch == '_'); +} + +/** + * Is it a symbolic character (IsAlpha() and colon) + * + * \param  ch The character + * \return True if ch is a character, False otherwise + */ +static inline bool IsAlphaSym(int ch) { +    return (IsAlpha(ch) || ch == ':'); +} + +/** + * Is it a numerical character (IsAlpha() and 0 - 9) + * + * \param  ch The character + * \return True if ch is a character, False otherwise + */ +static inline bool IsAlNum(int ch) { +    return ((ch > '0' && ch < '9') || IsAlpha(ch)); +} + +/** + * Is it a symbolic numerical character (IsAlNum() and colon) + * + * \param  ch The character + * \return True if ch is a character, False otherwise + */ +static inline bool IsAlNumSym(int ch) { +    return (IsAlNum(ch) || ch == ':'); +} + +/** + * The lexer function + * + * \param  startPos Where to start scanning + * \param  length Where to scan to + * \param  initStyle The style at the initial point, not used in this folder + * \param  keywordslists The keywordslists, currently, number 5 is used + * \param  styler The styler + */ +static void ColouriseMagikDoc(unsigned int startPos, int length, int initStyle, +                           WordList *keywordlists[], Accessor &styler) { +    styler.StartAt(startPos); + +    WordList &keywords = *keywordlists[0]; +    WordList &pragmatics = *keywordlists[1]; +    WordList &containers = *keywordlists[2]; +    WordList &flow = *keywordlists[3]; +    WordList &characters = *keywordlists[4]; + +	StyleContext sc(startPos, length, initStyle, styler); + + +	for (; sc.More(); sc.Forward()) { + +    repeat: + +        if(sc.ch == '#') { +            if (sc.chNext == '#') sc.SetState(SCE_MAGIK_HYPER_COMMENT); +            else sc.SetState(SCE_MAGIK_COMMENT); +            for(; sc.More() && !(sc.atLineEnd); sc.Forward()); +            sc.SetState(SCE_MAGIK_DEFAULT); +            goto repeat; +        } + +        if(sc.ch == '"') { +            sc.SetState(SCE_MAGIK_STRING); + +            if(sc.More()) +            { +                sc.Forward(); +                for(; sc.More() && sc.ch != '"'; sc.Forward()); +            } + +            sc.ForwardSetState(SCE_MAGIK_DEFAULT); +            goto repeat; +        } + +	    // The default state +	    if(sc.state == SCE_MAGIK_DEFAULT) { + +	        // A certain keyword has been detected +	        if (sc.ch == '_' && ( +                    sc.currentPos == 0 || !IsAlNum(sc.chPrev))) { +	            char keyword[50]; +	            memset(keyword, '\0', 50); + +	            for( +                    int scanPosition = 0; +                    scanPosition < 50; +                    scanPosition++) { +	                char keywordChar = static_cast<char>( +                        tolower(styler.SafeGetCharAt( +                            scanPosition + +                                static_cast<int>(sc.currentPos+1), ' '))); +                    if(IsAlpha(keywordChar)) { +                        keyword[scanPosition] = keywordChar; +                    } else { +                        break; +                    } +	            } + +                // It is a pragma +	            if(pragmatics.InList(keyword)) { +	                sc.SetState(SCE_MAGIK_PRAGMA); +	            } + +	            // it is a normal keyword like _local, _self, etc. +	            else if(keywords.InList(keyword)) { +	                sc.SetState(SCE_MAGIK_KEYWORD); +	            } + +                // It is a container keyword, such as _method, _proc, etc. +	            else if(containers.InList(keyword)) { +	                sc.SetState(SCE_MAGIK_CONTAINER); +	            } + +	            // It is a flow keyword, such as _for, _if, _try, etc. +	            else if(flow.InList(keyword)) { +	                sc.SetState(SCE_MAGIK_FLOW); +	            } + +	            // Interpret as unknown keyword +	            else { +	                sc.SetState(SCE_MAGIK_UNKNOWN_KEYWORD); +	            } +	        } + +            // Symbolic expression +	        else if(sc.ch == ':' && !IsAlNum(sc.chPrev)) { +	            sc.SetState(SCE_MAGIK_SYMBOL); +	            bool firstTrip = true; +	            for(sc.Forward(); sc.More(); sc.Forward()) { +	                if(firstTrip && IsAlphaSym(sc.ch)); +	                else if(!firstTrip && IsAlNumSym(sc.ch)); +	                else if(sc.ch == '|') { +	                    for(sc.Forward(); +                            sc.More() && sc.ch != '|'; +                            sc.Forward()); +	                } +	                else break; + +	                firstTrip = false; +	            } +	            sc.SetState(SCE_MAGIK_DEFAULT); +	            goto repeat; +	        } + +            // Identifier (label) expression +	        else if(sc.ch == '@') { +	            sc.SetState(SCE_MAGIK_IDENTIFIER); +	            bool firstTrip = true; +	            for(sc.Forward(); sc.More(); sc.Forward()) { +	                if(firstTrip && IsAlphaCore(sc.ch)) { +	                    firstTrip = false; +	                } +	                else if(!firstTrip && IsAlpha(sc.ch)); +	                else break; +	            } +	            sc.SetState(SCE_MAGIK_DEFAULT); +	            goto repeat; +	        } + +	        // Start of a character +            else if(sc.ch == '%') { +                sc.SetState(SCE_MAGIK_CHARACTER); +                sc.Forward(); +                char keyword[50]; +	            memset(keyword, '\0', 50); + +	            for( +                    int scanPosition = 0; +                    scanPosition < 50; +                    scanPosition++) { +	                char keywordChar = static_cast<char>( +                        tolower(styler.SafeGetCharAt( +                            scanPosition + +                                static_cast<int>(sc.currentPos), ' '))); +                    if(IsAlpha(keywordChar)) { +                        keyword[scanPosition] = keywordChar; +                    } else { +                        break; +                    } +	            } + +	            if(characters.InList(keyword)) { +	                sc.Forward(strlen(keyword)); +	            } else { +	                sc.Forward(); +	            } + +                sc.SetState(SCE_MAGIK_DEFAULT); +                goto repeat; +            } + +            // Operators +	        else if( +                sc.ch == '>' || +                sc.ch == '<' || +                sc.ch == '.' || +                sc.ch == ',' || +                sc.ch == '+' || +                sc.ch == '-' || +                sc.ch == '/' || +                sc.ch == '*' || +                sc.ch == '~' || +                sc.ch == '$' || +                sc.ch == '=') { +                sc.SetState(SCE_MAGIK_OPERATOR); +            } + +            // Braces +            else if(sc.ch == '(' || sc.ch == ')') { +                sc.SetState(SCE_MAGIK_BRACE_BLOCK); +            } + +            // Brackets +            else if(sc.ch == '{' || sc.ch == '}') { +                sc.SetState(SCE_MAGIK_BRACKET_BLOCK); +            } + +            // Square Brackets +            else if(sc.ch == '[' || sc.ch == ']') { +                sc.SetState(SCE_MAGIK_SQBRACKET_BLOCK); +            } + + +	    } + +	    // It is an operator +	    else if( +            sc.state == SCE_MAGIK_OPERATOR || +            sc.state == SCE_MAGIK_BRACE_BLOCK || +            sc.state == SCE_MAGIK_BRACKET_BLOCK || +            sc.state == SCE_MAGIK_SQBRACKET_BLOCK) { +	        sc.SetState(SCE_MAGIK_DEFAULT); +	        goto repeat; +	    } + +	    // It is the pragma state +	    else if(sc.state == SCE_MAGIK_PRAGMA) { +	        if(!IsAlpha(sc.ch)) { +	            sc.SetState(SCE_MAGIK_DEFAULT); +                goto repeat; +	        } +	    } + +	    // It is the keyword state +	    else if( +            sc.state == SCE_MAGIK_KEYWORD || +            sc.state == SCE_MAGIK_CONTAINER || +            sc.state == SCE_MAGIK_FLOW || +            sc.state == SCE_MAGIK_UNKNOWN_KEYWORD) { +	        if(!IsAlpha(sc.ch)) { +	            sc.SetState(SCE_MAGIK_DEFAULT); +	            goto repeat; +	        } +	    } +	} + +	sc.Complete(); +} + +/** + * The word list description + */ +static const char * const magikWordListDesc[] = { +    "Accessors (local, global, self, super, thisthread)", +    "Pragmatic (pragma, private)", +    "Containers (method, block, proc)", +    "Flow (if, then, elif, else)", +    "Characters (space, tab, newline, return)", +    "Fold Containers (method, proc, block, if, loop)", +    0}; + +/** + * This function detects keywords which are able to have a body. Note that it + * uses the Fold Containers word description, not the containers description. It + * only works when the style at that particular position is set on Containers + * or Flow (number 3 or 4). + * + * \param  keywordslist The list of keywords that are scanned, they should only + *         contain the start keywords, not the end keywords + * \param  The actual keyword + * \return 1 if it is a folding start-keyword, -1 if it is a folding end-keyword + *         0 otherwise + */ +static inline int IsFoldingContainer(WordList &keywordslist, char * keyword) { +    if( +        strlen(keyword) > 3 && +        keyword[0] == 'e' && keyword[1] == 'n' && keyword[2] == 'd') { +        if (keywordslist.InList(keyword + 3)) { +            return -1; +        } + +    } else { +        if(keywordslist.InList(keyword)) { +            return 1; +        } +    } + +    return 0; +} + +/** + * The folding function + * + * \param  startPos Where to start scanning + * \param  length Where to scan to + * \param  keywordslists The keywordslists, currently, number 5 is used + * \param  styler The styler + */ +static void FoldMagikDoc(unsigned int startPos, int length, int, +    WordList *keywordslists[], Accessor &styler) { + +    bool compact = styler.GetPropertyInt("fold.compact") != 0; + +    WordList &foldingElements = *keywordslists[5]; +    int endPos = startPos + length; +    int line = styler.GetLine(startPos); +    int level = styler.LevelAt(line) & SC_FOLDLEVELNUMBERMASK; +    int flags = styler.LevelAt(line) & ~SC_FOLDLEVELNUMBERMASK; + +    for( +        int currentPos = startPos; +        currentPos < endPos; +        currentPos++) { +            char currentState = styler.StyleAt(currentPos); +            char c = styler.SafeGetCharAt(currentPos, ' '); +            int prevLine = styler.GetLine(currentPos - 1); +            line = styler.GetLine(currentPos); + +            // Default situation +            if(prevLine < line) { +                styler.SetLevel(line, (level|flags) & ~SC_FOLDLEVELHEADERFLAG); +                flags = styler.LevelAt(line) & ~SC_FOLDLEVELNUMBERMASK; +            } + +            if( +                ( +                    currentState == SCE_MAGIK_CONTAINER || +                    currentState == SCE_MAGIK_FLOW +                ) && +                c == '_') { + +                char keyword[50]; +                memset(keyword, '\0', 50); + +                for( +                    int scanPosition = 0; +                    scanPosition < 50; +                    scanPosition++) { +                    char keywordChar = static_cast<char>( +                        tolower(styler.SafeGetCharAt( +                            scanPosition + +                                currentPos + 1, ' '))); +                    if(IsAlpha(keywordChar)) { +                        keyword[scanPosition] = keywordChar; +                    } else { +                        break; +                    } +                } + +                if(IsFoldingContainer(foldingElements, keyword) > 0) { +                    styler.SetLevel( +                        line, +                        styler.LevelAt(line) | SC_FOLDLEVELHEADERFLAG); +                    level++; +                } else if(IsFoldingContainer(foldingElements, keyword) < 0) { +                    styler.SetLevel(line, styler.LevelAt(line)); +                    level--; +                } +            } + +            if( +                compact && ( +                    currentState == SCE_MAGIK_BRACE_BLOCK || +                    currentState == SCE_MAGIK_BRACKET_BLOCK || +                    currentState == SCE_MAGIK_SQBRACKET_BLOCK)) { +                if(c == '{' || c == '[' || c == '(') { +                    styler.SetLevel( +                        line, +                        styler.LevelAt(line) | SC_FOLDLEVELHEADERFLAG); +                    level++; +                } else if(c == '}' || c == ']' || c == ')') { +                    styler.SetLevel(line, styler.LevelAt(line)); +                    level--; +                } +            } +        } + +} + +/** + * Injecting the module + */ +LexerModule lmMagikSF( +    SCLEX_MAGIK, ColouriseMagikDoc, "magiksf", FoldMagikDoc, magikWordListDesc); + diff --git a/vcbuild/SciLexer.dsp b/vcbuild/SciLexer.dsp index 3798e2ea1..3fcaeccc6 100644 --- a/vcbuild/SciLexer.dsp +++ b/vcbuild/SciLexer.dsp @@ -290,6 +290,10 @@ SOURCE=..\src\LexLua.cxx  # End Source File  # Begin Source File +SOURCE=..\src\LexMagik.cxx +# End Source File +# Begin Source File +  SOURCE=..\src\LexMatlab.cxx  # End Source File  # Begin Source File diff --git a/win32/makefile b/win32/makefile index b41e32f3c..3ab8557fc 100644 --- a/win32/makefile +++ b/win32/makefile @@ -56,11 +56,11 @@ LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.o \  LexConf.o LexCPP.o LexCrontab.o LexCsound.o LexCSS.o LexD.o LexEiffel.o \  LexErlang.o LexEScript.o LexFlagship.o LexForth.o LexFortran.o LexGAP.o \  LexGui4Cli.o LexHaskell.o LexHTML.o LexInno.o LexKix.o LexLisp.o LexLout.o \ -LexLua.o LexMatlab.o LexMetapost.o LexMMIXAL.o LexMPT.o LexMSSQL.o LexNsis.o \ -LexOpal.o LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o LexPOV.o \ -LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o LexScriptol.o \ -LexSmalltalk.o LexSpecman.o LexSpice.o LexSQL.o LexTADS3.o LexTCL.o LexTeX.o \ -LexVB.o LexVerilog.o LexVHDL.o LexYAML.o +LexLua.o LexMagik.o LexMatlab.o LexMetapost.o LexMMIXAL.o LexMPT.o LexMSSQL.o \ +LexNsis.o LexOpal.o LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o \ +LexPOV.o LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o \ +LexScriptol.o LexSmalltalk.o LexSpecman.o LexSpice.o LexSQL.o LexTADS3.o \ +LexTCL.o LexTeX.o LexVB.o LexVerilog.o LexVHDL.o LexYAML.o  #--Autogenerated -- end of automatically generated section  SOBJS	= ScintillaWin.o ScintillaBase.o Editor.o CharClassify.o Decoration.o \ diff --git a/win32/scintilla.mak b/win32/scintilla.mak index cbd91ae27..bdfd8460e 100644 --- a/win32/scintilla.mak +++ b/win32/scintilla.mak @@ -149,6 +149,7 @@ LEXOBJS=\  	$(DIR_O)\LexLisp.obj \  	$(DIR_O)\LexLout.obj \  	$(DIR_O)\LexLua.obj \ +	$(DIR_O)\LexMagik.obj \  	$(DIR_O)\LexMatlab.obj \  	$(DIR_O)\LexMetapost.obj \  	$(DIR_O)\LexMMIXAL.obj \ @@ -375,6 +376,8 @@ $(DIR_O)\LexLout.obj: ..\src\LexLout.cxx $(LEX_HEADERS)  $(DIR_O)\LexLua.obj: ..\src\LexLua.cxx $(LEX_HEADERS) +$(DIR_O)\LexMagik.obj: ..\src\LexMagik.cxx $(LEX_HEADERS) +  $(DIR_O)\LexMatlab.obj: ..\src\LexMatlab.cxx $(LEX_HEADERS)  $(DIR_O)\LexMetapost.obj: ..\src\LexMetapost.cxx $(LEX_HEADERS) diff --git a/win32/scintilla_vc6.mak b/win32/scintilla_vc6.mak index 5764fd1cc..a013a2628 100644 --- a/win32/scintilla_vc6.mak +++ b/win32/scintilla_vc6.mak @@ -151,6 +151,7 @@ LEXOBJS=\  	$(DIR_O)\LexLisp.obj \  	$(DIR_O)\LexLout.obj \  	$(DIR_O)\LexLua.obj \ +	$(DIR_O)\LexMagik.obj \  	$(DIR_O)\LexMatlab.obj \  	$(DIR_O)\LexMetapost.obj \  	$(DIR_O)\LexMMIXAL.obj \ @@ -377,6 +378,8 @@ $(DIR_O)\LexLout.obj: ..\src\LexLout.cxx $(LEX_HEADERS)  $(DIR_O)\LexLua.obj: ..\src\LexLua.cxx $(LEX_HEADERS) +$(DIR_O)\LexMagik.obj: ..\src\LexMagik.cxx $(LEX_HEADERS) +  $(DIR_O)\LexMatlab.obj: ..\src\LexMatlab.cxx $(LEX_HEADERS)  $(DIR_O)\LexMetapost.obj: ..\src\LexMetapost.cxx $(LEX_HEADERS) | 
