Tg

Introduction
Tg is a postfix-expression programming language created by User:SteloKim. It is, as yet, incomplete.

Tg is quite simple. A Postfix program consists of a list of operators and operands.

Tg uses lazy evaluation and type inference.

Usage

 * Compile to a.out:


 * Compile and run:


 * Compile the standard input and run:

Examples
10 20 + display newline; 1 1 = 2 0 / 3 cdr 10 ? display newline;; "Hello, world!" display newline;; 3 x 2 * x \ display newline;; 3 4 x y + y \ x \ display newline;; "Tg" "Hello, " display str display ; "!" display ; newline ; str \ ; => 30 3 Hello, world! 6 7 Hello, Tg!

Implementation
Currently, Tg is implemented in OCaml. It produces an OCaml code as an intermediate language and then compiles it to get a binary.

Tg compiler source code

Tg compiler source code(20080616)

Tg compiler source code(20121113)