strlang – a simple language for string manipulation

strlang is a programming language I created with the goal of making string manipulation simple and straightforward.  It is an imperative language with a minimalist syntax.  The language and its compiler were written as part of the Programming Languages and Translators (COMS 4115) course at Columbia University in Fall 2011.


  1. Basic data types are strings, numbers and maps (sets of key-value pairs)
  2. Full-set of operators for arithmetic, string manipulation (including basic regular expressions) and map construction
  3. C-like structure including functions, loops, conditionals and expressions
  4. No keywords


The strlang compiler performs syntax and static-semantic checking.  Valid programs are compiled to a linearized form of C++ (only one block per function, all operands are stored in variables, loops and conditionals are simplified to labels and jumps).  The compiler itself is written in OCaml and comes with a testsuite.  It relies on the C++ STL for its underlying data-types, and the PCRE library for regular expression support.

Documentation, including a tutorial and a language reference manual, is included in the source distribution.  Building strlang requires a current OCaml distribution.  To use it, you will also need a working C++ compiler and STL installation as well as an installation of the PCRE library.

Overview: strlang-slides.pdf – 1.4MB
Download: strlang-0.1.tar.gz – 1.5MB

Comments are closed.