DL/SQL iconDL/SQL 1.0.1

DL/SQL is a declarative programming language based on top of a SQL database.
DL/SQL is declarative, turing-complete programming language based on top of SQL database. The main idea is to store both program and data in one SQL table and make all the computations in it.

The current version of interpreter written in PHP contains quasi-lazy evaluation and simple caching.

The syntax was inspired by LISP and bash. Sounds strange? For example,

(* (+ 2 4 (#FACT 4)) 3)


means (2 + 4 + fact(4)) * 3 where fact is user-defined function for factorial.

As you've probably noticed, DL/SQL has got prefix (polish) notation with compulsory bracketing. That means, in front any name of function there must be opening bracket and after last parameter of a function there must be closing bracket. With this rule it's really easy to implement variable-length argument lists.

For real deployment it's necessary to change the core according to your needs - some special constructions are always necessary. Fortunatelly the core is flexible and easily extendable. Right now DL/SQL uses MySQL as its backend. There're only several calls to DB, changing them is work for few minutes so porting DL/SQL to let's say PostgreSQL is piece of cake.

There're only two API calls:

rpn_init()

clears all the cached values (actually sets the counted bit to false).

rpn_eval($expression)

evaluates entered DL/SQL expression. For using DL/SQL interpreter it's necessary to include file rpnparser.phtml in your project. For easy implementation I also advise you to include file include/setup.phtml which contains all the necassary stuff for connecting to database and setting the directories. Without this file, you'll have to do all the things yourself!

last updated on:
April 14th, 2005, 21:59 GMT
price:
FREE!
developed by:
Mr. Zdeeck
license type:
BSD License 
category:
ROOT \ Programming \ Interpreters

FREE!

In a hurry? Add it to your Download Basket!

user rating 21

UNRATED
3.4/5
 

0/5

Add your review!

SUBMIT