DL/SQL is a declarative programming language that utilizes SQL database for operation.
The syntax used within DL/SQL was inspired by LISP and bash, so it may take some getting used to. However, once you get the hang of it, you'll find that it is a remarkably flexible and powerful system. For example, the expression (* (+ 2 4 (#FACT 4)) 3) means (2 + 4 + fact(4)) * 3, where fact is a user-defined function for factorial.
DL/SQL uses a prefix (polish) notation with compulsory bracketing. This means that in front of any name of a function, there must be an opening bracket, and after the last parameter of the function, there must be a closing bracket. This rule makes it simple to implement variable-length argument lists.
To get DL/SQL up and running for real deployment, you will need to alter the core to suit your specific needs. Fortunately, the core is flexible and easily extendable. At present, DL/SQL uses MySQL as its backend, but it can easily be ported to PostgreSQL by changing only a few calls to the database.
There are only two API calls you need to be aware of: rpn_init() clears all of the cached values (i.e., sets the counted bit to false), and rpn_eval($expression) evaluates the entered DL/SQL expression. To use the DL/SQL interpreter, you will need to include the file rpnparser.phtml in your project. For easy implementation, the file include/setup.phtml contains all of the necessary components for connecting to the database and setting up the directories. If you don't include this file, you will need to do all of these things yourself, which could be time-consuming and difficult.
Version 1.0.1: N/A