www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - SciTE / Scintilla syntax highlighting for D - needed

reply Brad Anderson <brad dsource.dot.org> writes:
Does anyone have a copy of Andy Friesen's dscite.zip ??  It appears as 
if his site is down right now.

http://andy.tadan.us/d/dscite.zip

I don't know what's in it, but I'm looking for Scintilla lexer 
(something like LexD.cxx) for D.  Hopefully it's in his package, but if 
not, does anyone else have one?  Ant, I'm looking your direction here.

Thanks,
Brad
Jan 23 2005
next sibling parent Joshua Cearley <jtech ezoob.com> writes:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Brad Anderson wrote:
 Does anyone have a copy of Andy Friesen's dscite.zip ??  It appears as 
 if his site is down right now.
 
 http://andy.tadan.us/d/dscite.zip
 
 I don't know what's in it, but I'm looking for Scintilla lexer 
 (something like LexD.cxx) for D.  Hopefully it's in his package, but if 
 not, does anyone else have one?  Ant, I'm looking your direction here.
 
 Thanks,
 Brad

I experienced the same thing when I was looking for the SciTE files. I use JEdit now, but you can have the tweaked C++ file that I have. It is the same as the default cpp.properties file but it has D in there with it. You will have to add D to your language list. I attached the properties file. -JC
Jan 24 2005
prev sibling parent reply Andy Friesen <andy ikagames.com> writes:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Brad Anderson wrote:
 Does anyone have a copy of Andy Friesen's dscite.zip ??  It appears as 
 if his site is down right now.
 
 http://andy.tadan.us/d/dscite.zip
 
 I don't know what's in it, but I'm looking for Scintilla lexer 
 (something like LexD.cxx) for D.  Hopefully it's in his package, but if 
 not, does anyone else have one?  Ant, I'm looking your direction here.
 
 Thanks,
 Brad

It seems that tadan.us is gone for good. I shall have to make other arrangements with respect to webspace. Anyhow, I never did have a LexD.cxx, just a .properties file. (attached) You'll have to do two things to make it work: Edit your SciTEGlobal.properties file, find the section with a whole lot of 'import' statements, and add 'import dmd' to it. Add an entry to the menu.languages section. It should look like this: menu.language=\ ... &C / C++|c||\ C&#|cs||\ D|dmd||\ <-- &Difference|diff||\ &Eiffel|e||\ -- andy
Jan 23 2005
next sibling parent Brad Anderson <brad dsource.dot.org> writes:
Thanks Andy & Joshua.

I should say that I really don't want to use SciTE, but rather get D as 
a supported language in Scintilla.  Then I can build a SilverCity syntax 
highlighter in Python.

See:
http://projects.edgewall.com/trac/wiki/TracSyntaxColoring
http://projects.edgewall.com/trac/wiki/SilverCityAddLanguage

I'm thinking the properties files you guys supplied won't help me with 
either the Scintilla part or the SilverCity part.

Thoughts?  Volunteers to do this, or at least help in some way?  You'd 
be helping the next version of dsource.org ...

BA


Andy Friesen wrote:
 Brad Anderson wrote:
 
 Does anyone have a copy of Andy Friesen's dscite.zip ??  It appears as 
 if his site is down right now.

 http://andy.tadan.us/d/dscite.zip

 I don't know what's in it, but I'm looking for Scintilla lexer 
 (something like LexD.cxx) for D.  Hopefully it's in his package, but 
 if not, does anyone else have one?  Ant, I'm looking your direction here.

 Thanks,
 Brad

It seems that tadan.us is gone for good. I shall have to make other arrangements with respect to webspace. Anyhow, I never did have a LexD.cxx, just a .properties file. (attached) You'll have to do two things to make it work: Edit your SciTEGlobal.properties file, find the section with a whole lot of 'import' statements, and add 'import dmd' to it. Add an entry to the menu.languages section. It should look like this: menu.language=\ ... &C / C++|c||\ C&#|cs||\ D|dmd||\ <-- &Difference|diff||\ &Eiffel|e||\ -- andy ------------------------------------------------------------------------ # Define SciTE settings for D files. file.patterns.dmd=*.d;*.dmd filter.dmd=D (*.d)|$(file.patterns.dmd)| file.patterns.braces=$(file.patterns.dmd) lexer.$(file.patterns.dmd)=cpp # keywords keywordclass.dmd=this super assert null true false cast new delete throw \ module template void byte ubyte short ushort int uint long ulong \ float double real bit char wchar dchar ifloat idouble ireal cfloat cdouble \ creal function delegate if else while for foreach do switch case default break continue \ synchronized return goto try catch finally with asm struct class interface \ union enum import static virtual final const typedef alias override \ abstract volatile debug deprecated in out inout auto align extern private \ protected public export body invariant unittest version pragma typeid \ typeof is mixin keywords.$(file.patterns.dmd)=$(keywordclass.dmd) # operator overload functions keywords2.$(file.patterns.dmd)=opNeg opCom opPostInc opPostDec \ opAdd opSub opMul opDiv ,pMod opAnd opOr opXor opShl opShr opUShr \ opCat opEquals opCmp opAddAssign opSubAssign opMulAssign opDivAssign \ opModAssign opAndAssign opOrAssign opXorAssign opShlAssign opShrAssign \ opUShrAssign opCatAssign opIndex opSlice opCall opApply \ instance bool # instance is going to disappear from D soon, so make it visible # keywords3 is for doc comment keywords, highlighted in style 17 #CPP doxygen keywords3.$(file.patterns.dmd)=a addindex addtogroup anchor arg attention \ author b brief bug c class code date def defgroup deprecated dontinclude \ e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception \ f$ f[ f] file fn hideinitializer htmlinclude htmlonly \ if image include ingroup internal invariant interface latexonly li line link \ mainpage name namespace nosubgrouping note overload \ p page par param post pre ref relates remarks return retval \ sa section see showinitializer since skip skipline struct subsection \ test throw todo typedef union until \ var verbatim verbinclude version warning weakgroup $ \ & < > # { } word.chars.dmd=$(chars.alpha)$(chars.numeric)_# word.characters.$(file.patterns.dmd)=$(word.chars.dmd) comment.block.dmd=//~ #comment.block.at.line.start.cpp=1 comment.stream.start.dmd=/* comment.stream.end.dmd=*/ comment.box.start.dmd=/* comment.box.middle.dmd= * comment.box.end.dmd= */ fold.comment=1 fold.preprocessor=1 statement.indent.$(file.patterns.dmd)=5 case catch class default do else for if \ finally private protected public struct try union while statement.end.$(file.patterns.dmd)=10 ; statement.lookback.$(file.patterns.dmd)=20 block.start.$(file.patterns.dmd)=10 { block.end.$(file.patterns.dmd)=10 } #autocomplete.cpp.fillups=( # no preprocessor in D #styling.within.preprocessor=1 #preprocessor.symbol.$(file.patterns.dmd)=# #preprocessor.start.$(file.patterns.dmd)=if ifdef ifndef #preprocessor.middle.$(file.patterns.dmd)=else elif #preprocessor.end.$(file.patterns.dmd)=endif # D styles # Default style.dmd.32=$(font.base) # White space style.dmd.0=fore:#808080 # Comment style.dmd.1=$(colour.code.comment.box),$(font.code.comment.box) # Line Comment style.dmd.2=$(colour.code.comment.line),$(font.code.comment.line) # Doc comment style.dmd.3=$(colour.code.comment.doc),$(font.code.comment.doc) # Number style.dmd.4=$(colour.number) # Keyword style.dmd.5=$(colour.keyword),bold # Double quoted string style.dmd.6=$(colour.string) # Single quoted string style.dmd.7=$(colour.char) # UUIDs (only in IDL) style.dmd.8=fore:#804080 # Preprocessor style.dmd.9=$(colour.preproc) # Operators style.dmd.10=$(colour.operator),bold # Identifiers style.dmd.11= # End of line where string is not closed style.dmd.12=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled # Verbatim strings for C# style.dmd.13=fore:#007F00,$(font.monospace),back:#E0FFE0,eolfilled # Regular expressions for JavaScript style.dmd.14=fore:#3F7F3F,$(font.monospace),back:#E0F0FF,eolfilled # Doc Comment Line style.dmd.15=$(colour.code.comment.doc),$(font.code.comment.doc) # Keywords2 style.dmd.16=fore:#B00040 # Comment keyword style.dmd.17=fore:#3060A0,$(font.code.comment.doc) # Comment keyword error style.dmd.18=fore:#804020,$(font.code.comment.doc) # Braces are only matched in operator style braces.dmd.style=10 dc=dmd -g $(FileNameExt) command.compile.*.d=$(dc) command.build.*.d= command.go.*.d=$(FileName).exe # To make the Go command both compile (if needed) and execute, use this setting: #command.go.needs.*.c=g++ $(FileNameExt) -o $(FileName) # Commented out, not sure what significance it has to D at this stage #command.name.0.*.cxx=Indent #command.0.*.cxx=astyle -tapO $(FileNameExt) #command.is.filter.0.*.cxx=1 #command.name.1.*.cxx=Lint #command.1.*.cxx=g++ -W -Wall -Wshadow -Wwrite-strings -Wold-style-cast \ # -Woverloaded-virtual -pedantic -Os -fno-exceptions -fvtable-thunks -c $(FileNameExt) #command.name.2.*.cxx=Execute Selection #command.2.*.cxx=$(CurrentSelection)

Jan 23 2005
prev sibling parent "Ivan Senji" <ivan.senji public.srce.hr> writes:
Andy could you please send me your antlr grammar. I can't seem to
find it and i messed up something in my grammar with new expressions.

Thanks!
Jan 24 2005