From 49f510d2d60129526832bfcd9c0f4049962bc80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20B=C3=B6hm?= Date: Mon, 18 May 2009 20:53:42 +0200 Subject: move stuff around and create initial source structure --- doc/demo-funktionen.txt | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 doc/demo-funktionen.txt (limited to 'doc/demo-funktionen.txt') diff --git a/doc/demo-funktionen.txt b/doc/demo-funktionen.txt new file mode 100644 index 0000000..ad16f4b --- /dev/null +++ b/doc/demo-funktionen.txt @@ -0,0 +1,53 @@ + +fun fib[a] + if a < 2 + @1 + @( fib[a-1] + fib[a-2] ) +end + +# main function +fun main[] + sum = 0 + i = 0 + while (i < 10) + sum = sum + fib[i = i + 1] + end + @sum +end + +#------------------------------------------------- alex + +0 : "fib" +1 : "a" + + <[> <]> + + + <(> <[> <]> <[> <]> <)> + + +... + + +#------------------------------------------------- michael + +PROGRAM +| ++- FUNCTION +| + <[> <]> STATEMENT +| + EXPRESSION STATEMENT +| + EXPRESSION OPERATOR EXPRESSION + .... +| + + + ++- FUNCTION +... + +#------------------------------------------------- nutz + + +zwischencode zeug mit annotiertem baum +3-Adress-Code + +#-------------------------------------------------- jana + + +maschinencode / endprodukt -- cgit v1.2.3