[lazarus] Another point

Alexander Mehlhorn (AHM) support at tritontools.com
Sat Feb 19 05:59:51 EST 2000


Hi there,

Another point to my previous e-mail. I did not mean to say use the
mwHighlighters at this stage. What I mean to say is that the current
highlighter structure of mwCustomEdit is not flexible enough for endusers of
Lazarus to create their own highlighters and easely add new keywords. This
means do NOT hardcode the use of a range of highlighters ! Rather create an
interface for people to build their own highlighters and hook them in. (like
the toolsapi) I can imagine the use of highlighting to be extremely
important for more code than just simply Pascal. However for this to be
possible we require a far better inheritance scheme for highlighters than
the current one. I should have some code available for Delphi by the end of
next week ( I require this for some other work of my own therefore Delphi).
I am trying to create the following :
- base class that does the moving along the code stream
- inherited classes that are responsible for defining the identification
tokens of the language
- dynamic creation of hashtables in runtime as compared to the current
Func1..n structure for keywords
- keyword identification done by the base class altought the definition
rests with the inherited class
- a standard tokentype as compared to new tokentypes for every language
- standardizes classes for all language parsers from which then descends the
highlighter unlike
  straight forward highlighter, parser and baseclass in one

90% of the above code is already done. This code will be released opensource
as I have no intention of inlcuing it into the AHM Triton Tools. However the
first person to receive this code will be Martin Waldenburg as still 10% of
it is based on previous functions. After that I will send a message to this
list so people can go and download the source should anyone be interested.
Conversion to Lazarus should be seamless as there are no Windows Controls :)

As I have just received a reply on my previous e-mail : In Delphi we can
install packages that allow us to interface to the internal toolsapi. Is
this functionality available in Lazarus ?

Regards, Alex






More information about the Lazarus mailing list