User forums > Using Code::Blocks

New syntax highlighting lexer (Motorola 68000 asm)

<< < (2/5) > >>

Folco:
I have written a patch which handles better number for 68k assembly.
This patch modifies the file src/sdk/wxscintilla/src/scintilla/lexers/LexAsm.cxx

Additions :
'$' : hexa numbers
'%' : binary numbers
'#' : immediate values
'-' : negative
'~' : logical not

All the symbols can be used together, if the syntax is correct (incorrect numbers won't be colorized).

The archive with the lexer, the sample file, the patch and the readme are available here : http://www.mirari.fr/fgP1

MortenMacFly:

--- Quote from: Folco on October 18, 2010, 10:33:45 pm ---This patch modifies the file src/sdk/wxscintilla/src/scintilla/lexers/LexAsm.cxx

--- End quote ---
As you've modified the scintilla core you should consider to send this patch to the scintilla developers (mailing list), too...?!

Folco:
Morten, my patch is really ugly... I don't use MASM, so it's not a problem for me to break its highlighting, but this is not a clean way to propose it for upstream...

In fact, I really think that to do the job properly, I should add a totally new lexer, dedicated to 68k syntax.

I have listed the files I will have to change to perform that. Related files are :
wxscintilla/Lex68k.lo (file to create)
wxscintilla/Makefile (4 entries to modify)
wxscintilla/Makefile.am
wxscintilla/Makefile.in
wxscintilla/build/Makefile (1 entry to modify)
wxscintilla/build/wxscintilla.dsp
wxscintilla/scr/scintilla/lexers/Lex68k.cxx (file to create)
wxscintilla/include/ws/scintilla.h
What of these files are auto-generated, is there other things to modify ?
$(CB_src)/Makefile ? $(CB_src)/configure ?

I have also seen a wxscintilla/src/scintilla/lexers/.svn/ directory, which also contains lexer*.cxx and some other files... What about this hidden directory ??? Some changes to do here ?


(Sorry for these questions, but I am not a real programer, just an amateur. I usually use a toolchain for 68k programming on embedded devices, I am not used to modify such big projects, and I don't use autotools...)


EDIT ->
wxscintilla/Lex*.lo -> seem to be auto-generates
wxscintilla/Makefile.am -> I think I must modify this
wxscintilla/Makefile.in -> autogenerated
wxscintilla/build/Makefile -> I think I must modify these files
wxscintilla/build/wxscintilla.dsp -> don't care about it, MS project file
wxscintilla/scr/scintilla/lexers/Lex68k.cxx -> write from scratch
wxscintilla/include/ws/scintilla.h -> add new entries

Folco:
At the moment, I have done modifications in these files :

--- Code: ---Makefile.am          replace in    wxscintilla/
Makefile             replace in    wxscintilla/build/
wxscintilla.h        replace in    wxscintilla/include/wx/
Lex68k.cxx           add in        wxscintilla/src/scintilla/lexers/
lexer_68k.xml        add in        CBsrc/src/sdk/ressources/lexers
lexer_68l.sample     add in        CBsrc/src/sdk/ressources/lexers
Scintilla.iface      replace in    wxscintilla/src/scintilla/include
SciLexer.h           replace in    wxscintilla/src/scintilla/include
--- End code ---
I don't know if there is other things to do.

MortenMacFly:

--- Quote from: Folco on October 19, 2010, 11:45:57 am ---EDIT ->
wxscintilla/Lex*.lo -> seem to be auto-generates
wxscintilla/Makefile.am -> I think I must modify this
wxscintilla/Makefile.in -> autogenerated
wxscintilla/build/Makefile -> I think I must modify these files
wxscintilla/build/wxscintilla.dsp -> don't care about it, MS project file
wxscintilla/scr/scintilla/lexers/Lex68k.cxx -> write from scratch
wxscintilla/include/ws/scintilla.h -> add new entries

--- End quote ---
Relevant are only:
wxscintilla/Makefile.am -> I think I must modify this
wxscintilla/scr/scintilla/lexers/Lex68k.cxx -> write from scratch
wxscintilla/include/ws/scintilla.h -> add new entries

...and the Code::Blocks project files if you add sources.

Ignore the others.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version