baum
annotate baum.1 @ 31:4e60d96265f0
removed -c option completely; updated man page; new error code 5
author | meillo@marmaro.de |
---|---|
date | Fri, 22 Feb 2008 14:57:04 +0100 |
parents | 711aab4863cc |
children | 2e564bf8599c |
rev | line source |
---|---|
meillo@31 | 1 .TH baum 1 "2008-02-22" "baum 0.2" |
meillo@18 | 2 .SH NAME |
meillo@18 | 3 baum \- an esoteric programming language |
meillo@18 | 4 |
meillo@18 | 5 |
meillo@18 | 6 |
meillo@18 | 7 .SH SYNOPSIS |
meillo@18 | 8 .B baum |
meillo@31 | 9 [\-v]\ <file> |
meillo@18 | 10 |
meillo@18 | 11 |
meillo@18 | 12 |
meillo@18 | 13 .SH DESCRIPTION |
meillo@18 | 14 .B baum |
meillo@18 | 15 is an interpreter for the baum programming language which is an experiment to create an esoteric programming language. |
meillo@18 | 16 |
meillo@18 | 17 Source code is a representation of a tree in which every node is a command or data. |
meillo@18 | 18 |
meillo@18 | 19 baum is only an experiment and the functionality is (currently) very restricted. |
meillo@18 | 20 |
meillo@18 | 21 |
meillo@18 | 22 |
meillo@18 | 23 |
meillo@18 | 24 .SH OPTIONS |
meillo@18 | 25 |
meillo@18 | 26 .TP |
meillo@18 | 27 .BI \-v |
meillo@18 | 28 Verbose output |
meillo@18 | 29 |
meillo@18 | 30 .TP |
meillo@18 | 31 .BI \-\-help |
meillo@18 | 32 Print usage information |
meillo@18 | 33 |
meillo@18 | 34 .TP |
meillo@18 | 35 .BI \-\-version |
meillo@18 | 36 Print version information |
meillo@18 | 37 |
meillo@18 | 38 |
meillo@18 | 39 |
meillo@18 | 40 |
meillo@18 | 41 |
meillo@18 | 42 |
meillo@18 | 43 .SH SOURCE CODE |
meillo@18 | 44 |
meillo@18 | 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. |
meillo@18 | 46 |
meillo@18 | 47 Empty lines and everything vom the hash symbol (`#') to the end of the line is ignored. |
meillo@18 | 48 |
meillo@18 | 49 .B An example that echoes `42': |
meillo@18 | 50 |
meillo@18 | 51 .nf |
meillo@18 | 52 # comment |
meillo@18 | 53 print(0) |
meillo@18 | 54 sum(0) #comment |
meillo@18 | 55 number(40) |
meillo@18 | 56 number(2) |
meillo@18 | 57 .fi |
meillo@18 | 58 |
meillo@18 | 59 |
meillo@18 | 60 |
meillo@18 | 61 .SH CONCEPT |
meillo@18 | 62 |
meillo@18 | 63 baum programs are represented as nodes in a tree structure. Nodes are of specific kind and contain a value. |
meillo@18 | 64 |
meillo@18 | 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. |
meillo@18 | 66 |
meillo@18 | 67 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. |
meillo@18 | 68 |
meillo@18 | 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. |
meillo@18 | 70 |
meillo@18 | 71 Nodes can modify the tree, but should do this only on it's brothers or better only through it's rightmost brother. |
meillo@18 | 72 |
meillo@18 | 73 |
meillo@18 | 74 .SH ERRORS |
meillo@18 | 75 |
meillo@18 | 76 .TP |
meillo@18 | 77 .BI 1 |
meillo@18 | 78 common error |
meillo@18 | 79 |
meillo@18 | 80 .TP |
meillo@18 | 81 .BI 3 |
meillo@18 | 82 no or more than one source file given |
meillo@18 | 83 |
meillo@18 | 84 .TP |
meillo@18 | 85 .BI 4 |
meillo@18 | 86 invalid node |
meillo@18 | 87 |
meillo@18 | 88 .TP |
meillo@31 | 89 .BI 5 |
meillo@31 | 90 indention over more than one level |
meillo@31 | 91 |
meillo@31 | 92 .TP |
meillo@18 | 93 .BI 127 |
meillo@18 | 94 invalid command line options |
meillo@18 | 95 |
meillo@18 | 96 |
meillo@18 | 97 |
meillo@18 | 98 .SH BUGS |
meillo@18 | 99 Please report if you find some. |
meillo@18 | 100 |
meillo@18 | 101 |
meillo@18 | 102 .SH CREDITS |
meillo@18 | 103 Ju developed the idea of |
meillo@18 | 104 .B baum |
meillo@18 | 105 with me in a conversation. Actually it was his idea to use the tree as basic structure. |
meillo@18 | 106 |
meillo@18 | 107 |
meillo@18 | 108 |
meillo@18 | 109 .SH AUTHOR |
meillo@18 | 110 markus schnalke <meillo@marmaro.de> and julian forster |