Patch #883 2006-03-02 17:03

mortenmacfly

Matlab lexer (patch)
Download
883-Matlab_lexer_pa.patch (12.4 KB)
Category
Lexer
Status
Accepted
Close date
2006-03-03 09:07
Assigned to
 
Index: sdk/resources/lexers/lexer_matlab.xml
===================================================================
--- sdk/resources/lexers/lexer_matlab.xml    (revision 0)
+++ sdk/resources/lexers/lexer_matlab.xml    (revision 0)
@@ -0,0 +1,207 @@
+<?xml version="1.0"?>
+<!DOCTYPE CodeBlocks_lexer_properties>
+<CodeBlocks_lexer_properties>
+        <Lexer name="Matlab"
+                index="32"
+                filemasks="*.m,*.mdl">
+                <Style name="Default"
+                        index="0"
+                        fg="0,0,0"
+                        bg="255,255,255"
+                        bold="0"
+                        italics="0"
+                        underlined="0"/>
+                <Style name="Comment"
+                        index="1"
+                        fg="160,160,160"/>
+                <Style name="Number"
+                        index="2"
+                        fg="240,0,240"/>
+                <Style name="Keyword"
+                        index="8"
+                        fg="0,0,160"
+                        bold="1"/>
+                <Style name="User keyword"
+                        index="9,10"
+                        fg="0,160,0"
+                        bold="1"/>
+                <Style name="String"
+                        index="3,4,5"
+                        fg="0,0,255"/>
+                <Style name="Label"
+                        index="13"
+                        fg="0,0,255"/>
+                <Style name="Continuation"
+                        index="14"
+                        fg="0,0,255"/>
+                <Style name="Preprocessor"
+                        index="11"
+                        fg="0,160,0"/>
+                <Style name="Operator"
+                        index="6,12"
+                        fg="255,0,0"/>
+                <Style name="Selection"
+                        index="-99"
+                        bg="192,192,192"/>
+                <Style name="Active line"
+                        index="-98"
+                        bg="255,255,160"/>
+                <Style name="Breakpoint line"
+                        index="-2"
+                        bg="255,160,160"/>
+                <Style name="Debugger active line"
+                        index="-3"
+                        bg="160,160,255"/>
+                <Style name="Compiler error line"
+                        index="-4"
+                        bg="255,128,0"/>
+                <Style name="Matching brace highlight"
+                        index="34"
+                        fg="255,0,0"
+                        bold="1"
+                        underlined="1"/>
+                <Style name="No matching brace highlight"
+                        index="35"
+                        bg="255,0,0"/>
+                <Keywords>
+                        <Set index="0"
+                                value="break case catch continue else elseif end
+                                       for function global if otherwise persistent
+                                       return switch try while"/>
+                        <Set index="1"
+                                value="abs acos acosh acot acoth acsc acsch actxcontrol
+                       actxserver addframe addpath airy alim all allchild
+                       alpha alphamap angle ans any area asec asech asin
+                       asinh assignin atan atanh atan2 audioplayer
+                       audiorecorder auread auwrite avifile aviinfo aviread
+                       axes axis balance bar barh bar3 bar3h base2dec beep
+                       besselh besseli besselk besselj bessely beta betainc
+                       betaln bicg bicgstab bin2dec bitand bitcmp bitget
+                       bitmax bitor bitset bitshift bitxor blanks blkdiag box
+                       brighten builtin bvp4c bvpget bvpinit bvpset
+                       bvpval calendar camdolly camlight camlookat camorbit
+                       campan campos camproj camroll camtarget camup camva
+                       camzoom capture cart2pol cart2sph cat caxis
+                       cd cdf2rdf cdfinfo cdfread ceil cell cell2struct
+                       celldisp cellfun cellplot cellstr cgs char checkin
+                       checkout chol cholinc cholupdate cla clabel class clc
+                       clear clf clipboard clock close closereq cmopts colamd
+                       colmmd colorbar colordef colormap ColorSpec colperm
+                       comet comet3 compan compass complex computer cond
+                       condeig condest coneplot conj contour contour3
+                       contourc contourf contourslice contrast conv conv2
+                       convhull convhulln convn copyfile copyobj corrcoef cos
+                       cosh cot coth cov cplxpair cputime cross csc csch
+                       csvread csvwrite cumprod cumsum cumtrapz curl
+                       customverctrl cylinder daspe
download for full patch...
mortenmacfly 2006-03-02 17:06

This is a lexer to support the Matlab language. Please note: The additional keywords currently using an index which is not yet supported by scintilla. A feature request has been posted to the scintilla dev team for support. It really makes sense to seperate "default" keywords from "additional" ones and "toolbox specific" ones. The patch can be applied to any revision since it creates two new files. Hence it has been created on revision 2113.

With regards, Morten.