baum

view baum.1 @ 37:29172b6e802a

switched to next version number, updated man page
author meillo@marmaro.de
date Sat, 01 Mar 2008 17:55:42 +0100
parents 2e564bf8599c
children 233ac9bea4f1
line source
1 .TH baum 1 "2008-03-01" "baum 0.3"
2 .SH NAME
3 baum \- an esoteric programming language
7 .SH SYNOPSIS
8 .B baum
9 [\-v]\ <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 \-\-help
32 Print usage information
34 .TP
35 .BI \-\-version
36 Print version information
43 .SH SOURCE CODE
45 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.
47 Empty lines and everything vom the hash symbol (`#') to the end of the line is ignored.
49 .B An example that echoes (and returns) `42':
51 .nf
52 # comment
53 print(0)
54 sum(0) #comment
55 number(40)
56 number(2)
57 .fi
61 .SH CONCEPT
63 baum programs are represented as nodes in a tree structure. Nodes are of specific kind and contain a value.
65 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.
67 Each node returns a value to it's parent. (The root node returns an exit code to the shell.) The internal value of the node could be used in any useful way, but only inside the node.
69 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.
71 Nodes can modify the tree, but should do this only on it's brothers or better only through it's rightmost brother.
74 .SH ERRORS
76 .TP
77 .BI 1
78 common error
80 .TP
81 .BI 3
82 no or more than one source file given
84 .TP
85 .BI 4
86 invalid node
88 .TP
89 .BI 5
90 indention over more than one level
92 .TP
93 .BI 6
94 node name too long, or no value given
96 .TP
97 .BI 127
98 invalid command line options
102 .SH BUGS
103 Please report if you find some.
106 .SH CREDITS
107 Ju developed the idea of
108 .B baum
109 with me in a conversation. Actually it was his idea to use the tree as basic structure.
113 .SH AUTHOR
114 markus schnalke <meillo@marmaro.de> and julian forster