From: Panu A Kalliokoski On Thu, 31 May 2001, markus.kliegl wrote: > ENSI Brainfuck > ~~~~~~~~~~~~~~ Ha ha! I'm going to revise the standard! This is ENSI Brainfuck, v1.2: > 0. Overview of the language Brainfuck There are things. Things are arbitrary symbols. The things of brainfuck have a relation <(2), which is discrete, transitive, serial and asymmetric. This is called a "discrete order". > There's an array a and a pointer p. An array is a collection of things where every thing has a name. Names are things that have a discrete order. A pointer is a name. > Brainfuck has eight standard commands: + - > < [ ] , . > Use of any other characters in a brainfuck source file results in > undefined behaviour. > > 1. Array-Size > The array-size is implementation-dependant. The size of an array means the maximum number of names that can be in such a relation to given names min and max such that <(min,name) and <(name,max). The array size is implementation-dependent but must be at least 3. > 2. Pointer and Array-Element initializations. > The initial pointer and array-element values are > implementation-dependant. But all array-elements (the things in the array) must initially be the same. This value is called "the initial value". In the following commands, the "current thing" means the thing in the array a that has the name p. > 3. The '+' command > Use of the '+' command results in undefined behaviour. However, an implementation is required to change the current thing (c) to be such a thing (c') that <(c,c') and that there is no thing d such that <(c,d) and <(d,c'). > 4. The '-' command > Use of the '-' command results in implemenation-dependant behaviour. However, an implementation is required to change the current thing (c) to be such a thing (c') that <(c',c) and that there is no thing d such that <(c',d) and <(d,c). > 5. The '>' command > Use of the '>' command results in undefined behaviour. However, an implementation is required to change the thing p to such a thing p' that <(p,p') and that there is no thing q such that <(p,q) and <(q,p'). > 6. The '<' command > Use of the '<' command results in undefined behaviour. However, an implementation is required to change the thing p to such a thing p' that <(p',p) and that there is no thing q such that <(p',q) and <(q,p). > 7. The '.' command > Use of the '.' command results in implemenation-dependant behaviour. However, the implementation must ensure that the end user (tm) of the program somehow becomes aware of the current thing. > 8. The ',' command > Use of the ',' command results in undefined behaviour. sic! > 9. The '[' command > Use of the '[' command results in undefined behaviour. This command begins a loop. For the definition of loops, see the comprehension standard (ENSI-1994/10/28-02:34:55). > 10. The ']' command > Use of the ']' command results in undefined behaviour. This command ends a loop. For the definition of loops, see the apprehension standard (ENSI-1994/10/27-15:04:27). Panu Kalliokoski