baum

diff baum.1 @ 18:711aab4863cc

added man page
author meillo@marmaro.de
date Wed, 13 Feb 2008 20:44:04 +0100
parents
children 4e60d96265f0
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/baum.1	Wed Feb 13 20:44:04 2008 +0100
     1.3 @@ -0,0 +1,110 @@
     1.4 +.TH baum 1 "2008-02-13" "baum 0.1"
     1.5 +.SH NAME
     1.6 +baum \- an esoteric programming language
     1.7 +
     1.8 +
     1.9 +
    1.10 +.SH SYNOPSIS
    1.11 +.B baum
    1.12 +[\-v]\ [\-c]\ <file>
    1.13 +
    1.14 +
    1.15 +
    1.16 +.SH DESCRIPTION
    1.17 +.B baum
    1.18 +is an interpreter for the baum programming language which is an experiment to create an esoteric programming language.
    1.19 +
    1.20 +Source code is a representation of a tree in which every node is a command or data.
    1.21 +
    1.22 +baum is only an experiment and the functionality is (currently) very restricted.
    1.23 +
    1.24 +
    1.25 +
    1.26 +
    1.27 +.SH OPTIONS
    1.28 +
    1.29 +.TP
    1.30 +.BI \-v
    1.31 +Verbose output
    1.32 +
    1.33 +.TP
    1.34 +.BI \-c
    1.35 +Check source file for validity. Return 0 if source code is valid and something else otherwise.
    1.36 +
    1.37 +.TP
    1.38 +.BI \-\-help
    1.39 +Print usage information
    1.40 +
    1.41 +.TP
    1.42 +.BI \-\-version
    1.43 +Print version information
    1.44 +
    1.45 +
    1.46 +
    1.47 +
    1.48 +
    1.49 +
    1.50 +.SH SOURCE CODE
    1.51 +
    1.52 +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.
    1.53 +
    1.54 +Empty lines and everything vom the hash symbol (`#') to the end of the line is ignored.
    1.55 +
    1.56 +.B An example that echoes `42':
    1.57 +
    1.58 +.nf
    1.59 +# comment
    1.60 +print(0)
    1.61 +	sum(0)  #comment
    1.62 +		number(40)
    1.63 +		number(2)
    1.64 +.fi
    1.65 +
    1.66 +
    1.67 +
    1.68 +.SH CONCEPT
    1.69 +
    1.70 +baum programs are represented as nodes in a tree structure. Nodes are of specific kind and contain a value.
    1.71 +
    1.72 +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.
    1.73 +
    1.74 +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.
    1.75 +
    1.76 +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.
    1.77 +
    1.78 +Nodes can modify the tree, but should do this only on it's brothers or better only through it's rightmost brother.
    1.79 +
    1.80 +
    1.81 +.SH ERRORS
    1.82 +
    1.83 +.TP
    1.84 +.BI 1
    1.85 +common error
    1.86 +
    1.87 +.TP
    1.88 +.BI 3
    1.89 +no or more than one source file given
    1.90 +
    1.91 +.TP
    1.92 +.BI 4
    1.93 +invalid node
    1.94 +
    1.95 +.TP
    1.96 +.BI 127
    1.97 +invalid command line options
    1.98 +
    1.99 +
   1.100 +
   1.101 +.SH BUGS
   1.102 +Please report if you find some.
   1.103 +
   1.104 +
   1.105 +.SH CREDITS
   1.106 +Ju developed the idea of
   1.107 +.B baum
   1.108 +with me in a conversation. Actually it was his idea to use the tree as basic structure.
   1.109 +
   1.110 +
   1.111 +
   1.112 +.SH AUTHOR
   1.113 +markus schnalke <meillo@marmaro.de> and julian forster