Now that it’s debugged, here’s some source for a lexer, and associated testapp.
- Matches literal tokens only at the moment, not regexps (which I leave as an exercise to the reader).
- Has Ansi and Unicode and Ordinal (numeric versions).
- Also has some nifty arbitrary size set handling code.
- Is not optimised: Some of the list and transition handling is (relatively) slow compared to compiled lexers. Also an exercise for the reader.
Some of my apps like to use SSL, and use the OpenSSL libraries. The most recent version can be found here:
The source code to this web page parsing program:
Is now available, bugs, unfinished bits and all. You can get the source here.
Delphi has fairly good support for RTTI (reflection). Quite a few of my programs need to stream sets of classes to disk, and read those classes back. This library leverages the RTTI system to provide automatic streaming of classes and published properties, with an extensible API to perform custom streaming.
The source is here. No documentation I’m afraid, you will have to read code and think.
For the past year or so I have been working with an updated port of CoCo/R for Delphi which I made when finding some older implementations did not work well with modern versions of the Delphi compiler and environment.
I would be interested in feedback and comment.
Delphi offers some fairly simple containers: list, queue, hash table, but does not have trees or tries.
I present here a multi-index container which maintains a doubly linked list, with multiple (sorted) indexes into it. The indexes are implemented as AVL trees. You can create custom indexes and perform high speed efficient sorting, searching and iteration.
Unlike the STL, no knowledge of templates is required.