syntax highlighting

33 views
Skip to first unread message

Peter Lorenz

unread,
Sep 26, 2016, 6:19:08 PM9/26/16
to scintilla-interest
Hi,

I want to use the lexer of Binutils to parse linker scripts.
In Binutils is already the original lex linker script lexer which is doing this very well.

But I read about the own lexer, which scintilla provides and I am thinking how to circumvent the scintilla lexer. Does anybody know how to do that?

If there is already a linker script syntax highlighter, I would be very grateful to use this one.


cheers,
Peter



Neil Hodgson

unread,
Sep 27, 2016, 12:07:51 AM9/27/16
to scintilla...@googlegroups.com
Peter Lorenz:

> But I read about the own lexer, which scintilla provides and I am thinking how to circumvent the scintilla lexer. Does anybody know how to do that?

There are several guides to writing a lexer for Scintilla such as
https://bitbucket.org/StarFire/scintilla-doc/downloads/Scintilla-var'aq-Tutorial.pdf
You can also lex the source in your application by responding to SCN_STYLENEEDED notifications from Scintilla.

> If there is already a linker script syntax highlighter, I would be very grateful to use this one.

I don’t know of any although the cpp lexer for C-like languages appears to work OK.

Neil

Reply all
Reply to author
Forward
0 new messages