oirfeodent:
> > Compile your code with —std=gnu++03 to to avoid C++11 features. atoi is in stdlib.h
> Done. I am using mingw32-make to compile... hope it doesn't matter.
While the inline initialisation was removed, these fields still need to be initialised in the constructor. Use Cppcheck to find these sorts of problems.
http://cppcheck.sourceforge.net
Classes with names that may clash like WordListAbridged should be in an unnamed namespace. The cpp lexer puts all its classes except for the actual lexer in an unnamed namespace to avoid the possibility of clashes.
> > In WordListSet, there is a case statement that exists to produce a pointer to the particular word list. Then there is another case statement that refers to each of these by name. Just use the pointer.
>
> Implemented to the extent of my understanding. Hope it is fine.
(strchr(wl, '~') > 0) ? WordListAbridgedN->kwAbridged = true : WordListAbridgedN->kwAbridged = false;
This is fairly weird as it is using the ternary operator for flow control instead of as an expression. Try
WordListAbridgedN->kwAbridged = strchr(wl, '~') != NULL;
fold.cpp.syntax.based is owned by the cpp lexer so should not be reused by other lexers which should define their own names of the form fold.<lexer>.* or lexer.<lexer>.*. styling.within.preprocessor is also owned by cpp - it was defined before the lexer.<lexer>.* naming convention.
stdlib.h goes before string.h - see scripts/HeaderOrder.txt.
The baan.properties file sets global preferences like edge.mode. Language properties files should only set properties that are scoped to that language like keywords.$(file.patterns… and style.<lexer>… All the settings in the language properties files are dumped into one set so setting edge.colour may affect every other language or may be ignored because another language set it last.
Neil