LaTeX - PureBasic highlighter for listings

Everything else that doesn't fall into one of the other PB categories.
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

LaTeX - PureBasic highlighter for listings

Post by DarkDragon »

Hello,

I made a highlighter for purebasic with the listings package of LaTeX. The only thing which is not good is the string escaping which isn't optional and the functions are not highlighted, yet:

Code: Select all

%
% Pure Basic definition by Daniel Brall
%
\lst@definelanguage[Pure]{Basic}
  {keywords=[1]{And,Break,CallDebugger,Case,CompilerCase,CompilerDefault,
      CompilerElse,CompilerEndIf,CompilerEndSelect,CompilerIf,
      CompilerSelect,Continue,Data,DataSection,Debug,DebugLevel,
      Declare,DeclareCDLL,DeclareDLL,Default,Define,Dim,
      DisableDebugger,DisableExplicit,Else,ElseIf,EnableASM,
      EnableDebugger,EnableExplicit,End,EndDataSection,
      EndEnumeration,EndIf,EndImport,EndInterface,EndProcedure,
      EndSelect,EndStructure,EndStructureUnion,EndWith,
      Enumeration,Extends,FakeReturn,For,ForEach,ForEver,Global,
      Gosub,Goto,If,Import,ImportC,IncludeBinary,IncludeFile,
      IncludePath,Interface,NewList,Next,OffsetOf,Or,Procedure,
      ProcedureC,ProcedureCDLL,ProcedureDLL,ProcedureReturn,
      Protected,Prototype,Read,Repeat,Restore,Return,Select,
      Shared,SizeOf,Static,Step,Structure,StructureUnion,To,
      Until,Wend,While,With,XIncludeFile},
   sensitive=false,
   comment=[l]\;,
   string=[b]",
   }[keywords,comments,strings]
Just add it to the end of the file "lstlang1.sty" which is in my "[...]/texlive/2008/texmf-dist/tex/latex/listings" folder with texlive.
bye,
Daniel