CodeWorker

A while ago, I posted about AutoGen, a Guile (Scheme) based code generator (link to AutoGen homepage).

CodeWorker is another code generator that takes a bit of a different approach.

Here’s my impression of the differences between these code generators…

Autogen CodeWorker
Template language Guile (Scheme) CodeWorker scripting language (sort of resembles PHP)
Data description language AutoGen definitions or AutoGen XML Can define your own language and parser using extended BNF syntax

If you have experience with these and want to add your thoughts, please comment below.

For my AutoGen post, I provided some sample files that illustrated using the tool to generate a simple C++ “Employee” class. Below I provide the equivalent files for CodeWorker:

  • tiny-bnf.cwp – extended BNF syntax for simple C++ish data definition language that declares classes and their attributes.
  • employee.tml – data definition that adheres to above BNF language description.
  • employee.h.cwt – Template for C++ .h file.
  • employee.cpp.cwt – Template for C++ .cpp file.
  • employee.cws – “Leader script” that drives the generation of the .h and .cpp files.

Enjoy.

See also

The Pragmatic Programmer: From Journeyman to Master

One thought on “CodeWorker

Leave a Reply

Your email address will not be published. Required fields are marked *