The following links lead to implementations of the calculator in the respective languages. Each implementation is accompanied by an explanation.
In some languages, there are more than one implementations of the calculator, but most of them are ‘hidden’ as HTML comments (one has to read the page sources in order to find them).
The program text is displayed in colour, like good text editors do. This not only improves readability by making the lexical structure of a program more discernible, but also assists the reader in guessing the roles that the different tokens play in the language. The following classes of tokens are being discriminated between:
Colour encoding lets one instantly observe, e. g., that:
There are cases where classifying a certain token according to the above set can be decided in more than one way or not at all, or the choice made is disputable, but in general colouring helps a lot.