Werner's home on the Web

Documenting your code with AWK and Markdown

Here I present a d.awk 1, an AWK script to generate documentation from Markdown-formatted comments in C, C++, JavaScript, Java and C# and any other language that uses the /* */ comment syntax.

/**
 * My Project
 * ==========
 *
 * This is some _Markdown documentation_ in a
 * `source file`.
 */
int main(int argc, char *argv[]) {
    printf("hello, world");
    return 0;
}

wregex - How Regular Expression Engines Work

Tags: code

In 2007 I wrote a regular expression engine that I called wregex. I’ve now cleaned up the code and placed it on GitHub.

This essay is a description of how it is implemented. I think that if you understand the concepts you will never be puzzled by a pattern again.

A Bitmap Library

Tags: graphics code

(The source code of which is on GitHub)

I thought it is about time to write something about my library of C functions for manipulating bitmap images. It has been with me for many years and I’ve used it in a lot of my hobby projects.

So here I will give a broad overview of the library and then I might write more about the specific points of interest at a later date.

Why Jatalog

Tags: datalog code

I recently posted an entry on my Jatalog project, which is a Java implementation of the Datalog deductive database system. I thought I could elaborate on why I created it.