Easy is based on Brainf***, and therefore the "base" instructions look
very similar (but remember, you don't actually have to write these
"base" instructions; they're all called automatically):
< Move the pointer to the position one step "lower".
> Move the pointer to the position one step "higher".
+ Increment the value at the pointer.
- Decrement the value at the pointer.
. Input.
, Output.
[ If the value at the pointer is zero, jump to the corresponding ].
] If the value at the pointer is non-zero, jump to the corresponding [.
: Accept "special input".
We don't need the details right now; let's get to the good stuff.
Easy has only one instruction: RUN. You cannot RUN more than once; RUN
automatically exits the program once finished. (See how easy that is?)
You don't actually have to write the program, though; the compiler will
automatically compile the following program into an executable:
RUN
Now, you're probably wondering what this instruction *does*. RUN loads
the following Brainf*** "base" program into memory and runs it:
:
See how simple that is? Now, let's see what this "base" instruction
does: it accepts any Brainf*** symbol (if something else is used, the
RUN command ends itself) and uses it as a "base" instruction which then
is put before the : in the "base" program. The new "base" instruction
is then executed.
What . and , actually do is left as an exercise to the reader.
Now, let's look at a sample program written in Easy:
RUN ; the "output" "base" instruction is to be interpreted in this case
to mean to output "Hello world!", and the user must type , followed by
a non-Brainf*** symbol in order for this program to work properly.
The compiler does not actually read this comment, therefore what this
program does depends both on whether the user followed the instructions
and just how many calories were burned by that reader who did the
exercising.
This language is, of course, Turing-complete, as it can simulate any
Brainf*** program.
I, ihope, the creator of this language, hereby release it into the
public domain.
(That sounded weird. Ah well...)
If I understand correctly, Easy is not a compiler, but an interpretor; no ?
@-salutations
--
Michel Claveau
site : http://mclaveau.com