# HG changeset patch # User meillo@marmaro.de # Date 1202931844 -3600 # Node ID 711aab4863cc8adaab81ae0f0db58d05fc920a13 # Parent 16934645036fcedd7708635325063b49105b706f added man page diff -r 16934645036f -r 711aab4863cc baum.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/baum.1 Wed Feb 13 20:44:04 2008 +0100 @@ -0,0 +1,110 @@ +.TH baum 1 "2008-02-13" "baum 0.1" +.SH NAME +baum \- an esoteric programming language + + + +.SH SYNOPSIS +.B baum +[\-v]\ [\-c]\ + + + +.SH DESCRIPTION +.B baum +is an interpreter for the baum programming language which is an experiment to create an esoteric programming language. + +Source code is a representation of a tree in which every node is a command or data. + +baum is only an experiment and the functionality is (currently) very restricted. + + + + +.SH OPTIONS + +.TP +.BI \-v +Verbose output + +.TP +.BI \-c +Check source file for validity. Return 0 if source code is valid and something else otherwise. + +.TP +.BI \-\-help +Print usage information + +.TP +.BI \-\-version +Print version information + + + + + + +.SH SOURCE CODE + +Source code are plain text files with one node per line representing the tree. The indention controls in which level in the tree the node is. Indention can be made with SPACE or with TAB characters. Every character means one level. + +Empty lines and everything vom the hash symbol (`#') to the end of the line is ignored. + +.B An example that echoes `42': + +.nf +# comment +print(0) + sum(0) #comment + number(40) + number(2) +.fi + + + +.SH CONCEPT + +baum programs are represented as nodes in a tree structure. Nodes are of specific kind and contain a value. + +The tree is processed recursive starting at the root node. Every node controls it's sons and should only know them; while most nodes only use their leftmost son. + +Each node returns a value to it's parent. The internal value of the node could be used in any useful way, but only inside the node. + +All values in the language (return values, expected return values and in-node values) should be of the same type, so that every combination of nodes is possible. + +Nodes can modify the tree, but should do this only on it's brothers or better only through it's rightmost brother. + + +.SH ERRORS + +.TP +.BI 1 +common error + +.TP +.BI 3 +no or more than one source file given + +.TP +.BI 4 +invalid node + +.TP +.BI 127 +invalid command line options + + + +.SH BUGS +Please report if you find some. + + +.SH CREDITS +Ju developed the idea of +.B baum +with me in a conversation. Actually it was his idea to use the tree as basic structure. + + + +.SH AUTHOR +markus schnalke and julian forster