Author Topic: Sintax Highlit - How to add new languages?  (Read 18976 times)

Offline PerryWerneck

  • Multiple posting newcomer
  • *
  • Posts: 21
Sintax Highlit - How to add new languages?
« on: November 22, 2005, 07:02:46 pm »
 
   Hi Folks,

   Well, I'm not sure if it's the right forum to post this message but since I'm planning to add "REXX" support in codeblocks and, to start it I need some directions. How comples is to add a sintax highliting in codeblocks? I saw some files in the "lexers" folder but I'm not sure if it's necessary only change them probably there other changes, or not?
---
Perry Werneck
Brasilia - DF - Brazil

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Sintax Highlit - How to add new languages?
« Reply #1 on: November 22, 2005, 07:19:49 pm »
Um... you need to edit the XML files. You need to read the scintilla lexers' sourcecode to see what codes are for what and stuff.

Offline PerryWerneck

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Sintax Highlit - How to add new languages?
« Reply #2 on: November 22, 2005, 09:13:55 pm »

   Hi,

   The first test is ok!! I was able to change the lexer adding the rexx commands and it's working. Still having some problems since rexx isn't case sensitive but I'll read the documentation.

   Thanks!!!
---
Perry Werneck
Brasilia - DF - Brazil

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Sintax Highlit - How to add new languages?
« Reply #3 on: November 22, 2005, 10:23:23 pm »
Still having some problems since rexx isn't case sensitive but I'll read the documentation.
If you setup the index in the lexer file correctly (assuming that wxScintillx supports REXX natively) the editor should handle this correctly. See "wxscintilla.h" for what languages are supported and which index has to be used. FYI: There is a Fortran lexer which works similar because Fortran is also case in-sensitive.

Morten.
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 mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Sintax Highlit - How to add new languages?
« Reply #4 on: November 22, 2005, 11:07:28 pm »
...and don't forget to share the lexer when you 're done ;)
Be patient!
This bug will be fixed soon...

Offline PerryWerneck

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Sintax Highlit - How to add new languages?
« Reply #5 on: November 23, 2005, 12:24:44 pm »
   That's the problem! Scintilla doesn't support rexx :(

   I sucessfully changed the c/c++ lexer and it's working fine if I use only lower case characters. It's still a work in progress but I can share it if there's some other person using rexx.

If you setup the index in the lexer file correctly (assuming that wxScintillx supports REXX natively) the editor should handle this correctly. See "wxscintilla.h" for what languages are supported and which index has to be used. FYI: There is a Fortran lexer which works similar because Fortran is also case in-sensitive.

...and don't forget to share the lexer when you 're done ;)
---
Perry Werneck
Brasilia - DF - Brazil