Here are some of the components I've written or co-authored in my spare
time to make life easier or simply for the fun of it. This software
is available for free (mostly under the terms of the GNU
General Public License (GPL)):
Most of this came up, when I try to write a Pascal compiler for my
own. But don't expect too much of them, they are just in a pre-alpha state,
comments and messages are partly in german and last but not least some
files lack!
-
A Unit that helps in profiling (uses the Pentium
TimeStampCounter)
Compile with Delphi 1.0 (Don't use it on 32-bit without reviewing sources !!).
-
A Unit for Assertions.
-
Some AWK and SED scripts: Ref2html.awk, ExTokDef.awk,
ebnf2y.sed, PXref.awk, FreeKeyPositions.awk, ITrace.awk, RTFDiff.bash, PWDGen.dpr.
-
Ref2Html.awk: syntax-highlite a YRef generated crossreference by using html-format.
YRef is a simple crossreferencer for Yacc files; sources of YRef are in A.Graef's TPLY package.
Some screenshots from output of Ref2Html.awk.
As it is an awk-script, colors shown are customizeable. Only problem is that the resulting
html-file is large.
-
ExTokDef: extract Token-definitons in the TPYacc generated Pascal sources
into a separate include file.
Usefull, if you want to have stuff like
const ILLEGAL = 257;
const IDENTIFIER = 258;
const UNITNAMEID = 259;
const IMMCHAR_ID = 260;
const LabelID = 261;
const _AND_ = 262;
const _ARRAY_ = 263;
const _AS_ = 264;
const _ASM_ = 265;
go into a separate file.
-
ebnf2y.sed: Now I finished a sed script to convert Ebnf to yacc input.
Use at your own risk:
2002-01-08: Version 0.3: ebnf2y.sed
An offspring named Ebnf2tex.sed (also in Scripts.zip)
was used by me to convert EBNF grammar files for use with the LaTeX-package Rail in order to
produce railroad diagrams.
-
PXref.awk: generate cross reference of identifiers in a program (for Pascal/Delphi).
-
FreeKeyPositions.awk: "The licenses for most software are designed to take
away your freedom to share and change it." (GPL)
Some gperf-programmers made me angry refusing to introduce a "--key-positions=1,2,$-1,$"
switch, such that Borland Delphi-keywords can be properly processed by gperf.
return asso_values[(unsigned char)str[len - 1]+1] +
asso_values[(unsigned char)str[len - 2]] +
asso_values[(unsigned char)str[1]] +
asso_values[(unsigned char)str[0]];
Here is my answer to them all: Fuck you!
-
ITrace.awk: Instrument Pascal/Delphi source files for tracing or profiling
by using an AWK-script. Only a skeleton for experimentation. Method: simple keyword
replacement. The routines for writing profile data, evaluation and a graphical front-end lack.
Inspired by an article in PascalNewsletter (Jan-Erik Rosinowski: PUTTING THE SPURS TO PASCAL.
In: Pascal NewsLetter, Issue #4, July 1990, Editor: Pete Davis. See also the update of the article.)
-
RTFDiff.bash: A Bash script file for playing with diff. Ever wondered, how
ComponentSoftware CS-RCS handles this coloring
of diff's? It's just in the GNU-diff switches!
-
PWDGen.dpr: My attempt to generate pseudo-random passwords. Can only run on Pentium-machines.
Uses Blum-Blum-Shub and works awfully slow. Compiler: Borland/Inprise Delphi 4.0
-
Pperfhsh.zip: My own lousy experiments with perfect hashed keyword-table-lookup.
Should compile with Turbo Pascal 6.0. See
http://groups.yahoo.com/group/DelphiGrammar/files/faq.txt for other attempts on perfect
hashing.
-
PythTrip.pas: Calculates pythagoreian triples fast. A popular homework for students.
Formulas were given, but comments are in german. Compile with Borland Delphi 1.0 or 4.0.
Give proper credit!
I can't take any responsibility for using that tools; they are here only
as a hint - how some things can be tackled - not as fully bullet-proof
tools.
Back to my homepage
Updated 07.Juli.2005