baum

view baum.1 @ 18:711aab4863cc

added man page
author meillo@marmaro.de
date Wed, 13 Feb 2008 20:44:04 +0100
parents
children 4e60d96265f0
line source
1 .TH baum 1 "2008-02-13" "baum 0.1"
2 .SH NAME
3 baum \- an esoteric programming language
7 .SH SYNOPSIS
8 .B baum
9 [\-v]\ [\-c]\ <file>
13 .SH DESCRIPTION
14 .B baum
15 is an interpreter for the baum programming language which is an experiment to create an esoteric programming language.
17 Source code is a representation of a tree in which every node is a command or data.
19 baum is only an experiment and the functionality is (currently) very restricted.
24 .SH OPTIONS
26 .TP
27 .BI \-v
28 Verbose output
30 .TP
31 .BI \-c
32 Check source file for validity. Return 0 if source code is valid and something else otherwise.
34 .TP
35 .BI \-\-help
36 Print usage information
38 .TP
39 .BI \-\-version
40 Print version information
47 .SH SOURCE CODE
49 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.
51 Empty lines and everything vom the hash symbol (`#') to the end of the line is ignored.
53 .B An example that echoes `42':
55 .nf
56 # comment
57 print(0)
58 sum(0) #comment
59 number(40)
60 number(2)
61 .fi
65 .SH CONCEPT
67 baum programs are represented as nodes in a tree structure. Nodes are of specific kind and contain a value.
69 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.
71 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.
73 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.
75 Nodes can modify the tree, but should do this only on it's brothers or better only through it's rightmost brother.
78 .SH ERRORS
80 .TP
81 .BI 1
82 common error
84 .TP
85 .BI 3
86 no or more than one source file given
88 .TP
89 .BI 4
90 invalid node
92 .TP
93 .BI 127
94 invalid command line options
98 .SH BUGS
99 Please report if you find some.
102 .SH CREDITS
103 Ju developed the idea of
104 .B baum
105 with me in a conversation. Actually it was his idea to use the tree as basic structure.
109 .SH AUTHOR
110 markus schnalke <meillo@marmaro.de> and julian forster