Author Topic: adding a lexer  (Read 8906 times)

Offline virtuosonic

  • Multiple posting newcomer
  • *
  • Posts: 18
    • virtuosonic at sf_net
adding a lexer
« on: May 07, 2011, 07:18:07 am »
hi, i'm trying to write a lexer for rpm, i writed a scintilla lexer (not finished), CodeBlocks_lexer_properties xml file, and i even see the log saying loading, but i don't see it in the highlight mode menu

Scanning for lexers in C:\Documents and Settings\gabriel\Datos de programa\CodeBlocks/share/codeblocks/lexers/...
Found 0 lexers
Scanning for lexers in C:\Documents and Settings\gabriel\Mis documentos\C++\codeblocks-svn\src\devel/share/codeblocks/lexers/...
Found 44 lexers
Loading lexer_A68k
Loading lexer_ada
Loading lexer_angelscript
Loading lexer_bash
Loading lexer_batch
Loading lexer_bibtex
Loading lexer_caml
Loading lexer_cg
Loading lexer_cpp
Loading lexer_css
Loading lexer_d
Loading lexer_diff
Loading lexer_f77
Loading lexer_fortran
Loading lexer_glsl
Loading lexer_gm
Loading lexer_haskell
Loading lexer_hitasm
Loading lexer_html
Loading lexer_latex
Loading lexer_lisp
Loading lexer_lua
Loading lexer_make
Loading lexer_masm
Loading lexer_matlab
Loading lexer_nsis
Loading lexer_OgreCompositor
Loading lexer_OgreMaterial
Loading lexer_pascal
Loading lexer_perl
Loading lexer_postscript
Loading lexer_prg
Loading lexer_properties
Loading lexer_python
Loading lexer_rc
Loading lexer_rpm
Loading lexer_ruby
Loading lexer_smalltalk
Loading lexer_sql
Loading lexer_squirrel
Loading lexer_vbscript
Loading lexer_verilog
Loading lexer_vhdl
Loading lexer_xml

did i forgot something
language:C++, jesusonic
libraries:WX, Stk, Vst
virtuosonic at sf_net

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: adding a lexer
« Reply #1 on: May 07, 2011, 09:40:00 am »
did i forgot something
How to tell? You didn't attach the files to this post.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline virtuosonic

  • Multiple posting newcomer
  • *
  • Posts: 18
    • virtuosonic at sf_net
Re: adding a lexer
« Reply #2 on: May 07, 2011, 10:29:24 am »
here are the files
language:C++, jesusonic
libraries:WX, Stk, Vst
virtuosonic at sf_net

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: adding a lexer
« Reply #3 on: May 07, 2011, 11:25:33 am »
You have some makefiles and Scintilla files to modify when you want your lexer to be compiled with CB.
Kernel Extremist - PedroM power ©

Offline virtuosonic

  • Multiple posting newcomer
  • *
  • Posts: 18
    • virtuosonic at sf_net
Re: adding a lexer
« Reply #4 on: May 07, 2011, 11:46:52 am »
here is my modified project file (only the windows one), don't get disappointed i have even tested this lexer i'm only starting
« Last Edit: May 07, 2011, 11:48:49 am by virtuosonic »
language:C++, jesusonic
libraries:WX, Stk, Vst
virtuosonic at sf_net

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: adding a lexer
« Reply #5 on: May 07, 2011, 04:31:18 pm »
Ok, I don't use CB to compile itself...
Kernel Extremist - PedroM power ©

Offline virtuosonic

  • Multiple posting newcomer
  • *
  • Posts: 18
    • virtuosonic at sf_net
Re: adding a lexer
« Reply #6 on: May 08, 2011, 02:45:21 am »
when i change the index of the lexer in the xml file to another lexer, like bash (62), it show in the menu
language:C++, jesusonic
libraries:WX, Stk, Vst
virtuosonic at sf_net

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: adding a lexer
« Reply #7 on: May 08, 2011, 09:31:45 am »
Did you fix wxSCI_LEX_LAST in sdk/wxscintilla/include/wx/wxscintilla.h:497, so your lexers index is below or equal it ?

Offline virtuosonic

  • Multiple posting newcomer
  • *
  • Posts: 18
    • virtuosonic at sf_net
Re: adding a lexer
« Reply #8 on: May 08, 2011, 10:22:44 am »
 :D thanks, now i can start the real work!
« Last Edit: May 08, 2011, 10:24:54 am by virtuosonic »
language:C++, jesusonic
libraries:WX, Stk, Vst
virtuosonic at sf_net