PLACE |
spec |
hows |
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).
ABC Ada Algol 60 Algol 68 AWK Bash BASIC BCPL C C with Lex & Yacc C++ C# Cilk CLU D Dylan Eiffel Erlang Euphoria Factor Falcon Fortran Go Haskell Icon Io Java JavaScript Julia K Lisp Logo Lua ML Nial Oberon Objective-C OmniMark Oz Pascal Perl PHP Pop-11 PostScript Prolog Pure Python REBOL Refal Rexx Ruby Rust Scala Scheme SETL Smalltalk Snobol Tcl TXL U Vim script
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.
boykobbatgmaildotcom