It is a read-eval-print loop that supports a Lisp-like syntax. It is
meant as the top-level for command line oriented applications or for
telnet access into an application (for monitoring, configuration or
debugging). Behind the screens it is a small Lisp interpreter, but the
syntax is tweaked so that it is more suited for top-level commands. Some
examples from the file system command library, these commands imitate
the standard directory browsing commands:
Some examples from the math library:
The Repl supports Lisp expressions, but the outermost
parenthesis for the topmost expression can be omitted for the
convenience of the user so that the commands look like real commands.
But the full power of Lisp expressions can be used if necessary
especially for formulating subexpressions. As a result, Another unconventional concept in the command syntax is the presence of “pairs”. These are syntactical constructs, they look like named parameters and they can be used as such. Again, this is for the convenience of the user. The difference with other Repl’s is that the left side and the right side of a pair can be full expressions. The read-eval-print loop understands basic constructs like tests, loops and so on but all real functionality should be added in command libraries. It is up to the developer to decide which functionality will be included in the loop. A number of command libraries are included, but these are not activated by default. The Repl provides a service to your application, it provides a full blown expression language that you get for free. The only thing you have to do to create an application is to create one or more commands that can be glued together using the Repl commands. The parser will parse lists, pairs and string for you (as a developer), it will evaluate subexpressions and will call your commands. To be honest, the read-eval-print loop is in reality a
read-eval loop. You have to do the printing yourself. It is up to the
commands to decide whether the result should be printed or not. The Project Links
|