We have a version of a SAS lexer that we have been using, and would be happy to contribute it if there's interest. Given SAS is a proprietary/licensed system, I didn't know if this would be acceptable to include.
There are other proprietary language lexers included with Scintilla like Baan and Progress so that is fine. Scintilla has a permissive open-source license and lexers can be included if the authors are OK with that license applying to their code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Scintilla users expect that all of the code within Scintilla is available under the license of the whole project. Each file should include a reference to the overall license to indicate that use is permitted. This is commonly of the form:
// The License.txt file describes the conditions under which this software may be distributed.
Files may also be dual licensed if that is desired by their authors.
SCI_NAMESPACE was dropped for Scintilla 4.x. Lexers should just include the 'using' without any conditional compilation:
usingnamespaceScintilla;
Both lexers define 3 local functions that are not called and should be removed: IsAWordChar, IsAWordStart, and IsAnOperator.
../lexers/LexSAS.cxx:34:20: warning: unused function 'IsAWordChar' [-Wunused-function]
static inline bool IsAWordChar(const int ch) {
^
../lexers/LexSAS.cxx:38:20: warning: unused function 'IsAWordStart' [-Wunused-function]
static inline bool IsAWordStart(const int ch) {
^
../lexers/LexSAS.cxx:42:20: warning: unused function 'IsAnOperator' [-Wunused-function]
static inline bool IsAnOperator(const int ch) {
^
isoperator takes an int argument so should normally be fed sc.ch directly without a static_cast. The current code may behave strangely if given a Unicode file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Fixed up the suggested items (again, thanks). We have not aligned our main branch to 4.x yet, so keeping these changes in a separate branch: https://github.com/StatTag/scintilla/tree/lexer_fixes (since it was noted SCI_NAMESPACE drop is a 4.x change).
For those looking to integrate, please note that earlier commits reference these two lexers in the following files:
win32/scintilla.mak
win32/deps.mak
cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The lexer IDs were renumbered to continue the sequence.
val SCLEX_STATA=124
val SCLEX_SAS=125
Credit added for "Luke Rasmussen". If you want your institution credited, please specify the desired form of their name(s).
It should be safe to drop the SCI_NAMESPACE check in 3.x (if you want to merge branches) as there is nothing in the "Scintilla" namespace when SCI_NAMESPACE is undefined so "using namespace Scintilla" has no effect.
There are other proprietary language lexers included with Scintilla like Baan and Progress so that is fine. Scintilla has a permissive open-source license and lexers can be included if the authors are OK with that license applying to their code.
I'm not sure that the creator of this feature/proposition is still ok but yes, there's interest (and for 50 students a year too :)
Totally dropped the ball on follow-up, sorry! Our SAS lexer can be found at:
https://github.com/StatTag/scintilla/blob/master/lexers/LexSAS.cxx
We also have one for Stata too:
https://github.com/StatTag/scintilla/blob/master/lexers/LexStata.cxx
Scintilla users expect that all of the code within Scintilla is available under the license of the whole project. Each file should include a reference to the overall license to indicate that use is permitted. This is commonly of the form:
// The License.txt file describes the conditions under which this software may be distributed.
Files may also be dual licensed if that is desired by their authors.
SCI_NAMESPACE was dropped for Scintilla 4.x. Lexers should just include the 'using' without any conditional compilation:
Both lexers define 3 local functions that are not called and should be removed: IsAWordChar, IsAWordStart, and IsAnOperator.
isoperator takes an int argument so should normally be fed sc.ch directly without a static_cast. The current code may behave strangely if given a Unicode file.
I'll get these fixed up - thanks for the helpful feedback!
Fixed up the suggested items (again, thanks). We have not aligned our main branch to 4.x yet, so keeping these changes in a separate branch: https://github.com/StatTag/scintilla/tree/lexer_fixes (since it was noted SCI_NAMESPACE drop is a 4.x change).
For those looking to integrate, please note that earlier commits reference these two lexers in the following files:
win32/scintilla.mak
win32/deps.mak
cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj
Commited as [974bc8].
The lexer IDs were renumbered to continue the sequence.
Credit added for "Luke Rasmussen". If you want your institution credited, please specify the desired form of their name(s).
It should be safe to drop the SCI_NAMESPACE check in 3.x (if you want to merge branches) as there is nothing in the "Scintilla" namespace when SCI_NAMESPACE is undefined so "using namespace Scintilla" has no effect.
Related
Commit: [974bc8]