*** Welcome to piglix ***

Treelang


Treelang is a "toy" programming language distributed with the GNU Compiler Collection (GCC) to demonstrate the features of its code-generation backend. It was developed by Tim Josling, based on a language called Toy created by Richard Kenner. During the GCC 4.3 release cycle, a patch was committed to remove the language, because of high maintenance costs outweighing its benefits and also because it was no longer considered a good front-end example by GCC developers.

Treelang is loosely based on the C programming language, but omits complex features such as pointers, arrays, and records. It has never been completed, although there were plans to gradually add more demonstrative features.

From the documentation distributed with GCC:

The following example is from the Treelang documentation, modified by adding the main function, and is included to give an impression of the Treelang syntax and semantics:

Note that C-style comments (with the /* */ syntax) are not legal in Treelang.

As a simple, C-like language, Treelang is interoperable with C and C++ with some minor datatype caveats. The designated filename extension for Treelang source code files is .tree. Treelang source code can be compiled by invoking gcc normally or as gtreelang. Both invocations run the Treelang frontend (internally labelled tree1) and produce machine code as output. Treelang can also issue some warning messages.


...
Wikipedia

...