Discussion:
Adding a new lexer for use with Notepad++
Keith Smith
2013-08-17 02:15:30 UTC
Permalink
Hello. Hope I have the right group. I have been using Notepad++ for what
seems like forever. I have dabbled with creating my own user defined
languages, but that mechanism is always a bit short on features.

I want to add my own languages to Notepad++. It seems I need to start with
Scintilla.

I have downloaded the source for Notepad++, which is PowerEditor and
Scintilla. Looking through the code I find that all the lexers for
Notepad++ come from Scintilla.

I have looked at the files SciLexer.h and Scintilla.iface. Scintilla.iface
seems to be part of the key to adding a new lexer to Scintilla and thus
Notepad++.

Is there a 'how to on what needs to be 'touched' to add a lexer to
scintilla and then to NotePad++? and how to define a lexer?

Thank you for your help.

Keith Smith
Fairfield, CT
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2013-08-17 02:38:07 UTC
Permalink
Is there a 'how to on what needs to be 'touched' to add a lexer to scintilla and then to NotePad++? and how to define a lexer?
The basics are in http://www.scintilla.org/Lexer.txt

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Keith Smith
2013-08-17 03:48:57 UTC
Permalink
Neil -

Yes Lexer.txt is the basics. I have looked at some examples, such aslexers/LexForth.cxxor
lexers/LexAsm.cxx. They are examples of what is discussed in Lexer.txt.

The examples appear to be similar to how one adds a test to Google
UnitTest. One writes the code, then writes a declaration interface to get
the test included.

LexerModule lmAsm(SCLEX_ASM, LexerAsm::LexerFactoryAsm, "asm",
asmWordListDesc);

So one writes the details in a new LexXXX.cxx file and creates the last
line declaring LexerModule making the appropriate 3 letter substitutions.

Did I miss anything?

What I am now wondering about is include/Scintilla.iface? Do I need to do
anything with this file?

Keith
Post by Keith Smith
Post by Keith Smith
Is there a 'how to on what needs to be 'touched' to add a lexer to
scintilla and then to NotePad++? and how to define a lexer?
The basics are in http://www.scintilla.org/Lexer.txt
Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2013-08-17 22:40:57 UTC
Permalink
What I am now wondering about is include/Scintilla.iface? Do I need to do anything with this file?
You should enumerate all the lexical classes (styles) defined by your language.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...