Project englishc develops English C Compiler.
English C compiler uses as an input a text file called source code and produces on the standard output converted to C source code.
The Programming language English extends features of the C language:
struct simple tree {
struct simple tree * root;
struct simple tree ** leafs;
};
int count leafs in ( struct simple tree* the tree ) {
struct simple tree** tree iterator;
tree iterator = leafs of the tree;
while ( * tree iterator++ ) ;
return tree iterator - leafs of the tree - 1;
}
int depth of ( my struct simple tree* me ) {
int depth;
struct simple tree* tree iterator;
depth = 0;
tree iterator = my root;
while (tree iterator != 0 ) {
tree iterator = root of tree iterator;
depth++;
}
return depth;
}
void copy (my struct simple tree* me, your struct simple tree* you) {
struct simple tree **first iterator, **second iterator;
my root = your root;
for ( first iterator = my leafs, second iterator = your leafs;
*first iterator++ = *second iterator++;
) ;
}