Call: +44 (0)7759 277220 Call
PFCLScript

PFCLScript

Introduction

PFCLScript is a simple scripting language currently implemented in PL/SQL. The project started out as a way to show that it is possible to do extreme programming in PL/SQL. My first language was C and C can be used for system level projects such as writing operating systems like Unix or Windows or to write compilers and interpreters or to create multi-tasking software or virtual machines...

I like PL/SQL and have been programming it for around 30 years at the time this page is written in 2024. I write a lot of PL/SQL and have given away a lot of scripts and free tools written in PL/SQL, many on this site and also with the materials of my training classes. I wanted to show that PL/SQL can also be used to do system level programming and as I said I called it Extreme PL/SQL. There are plans to write more low level tools/code/things in PL/SQL if and as time allows.

This first project started out as an implementation of an interpreter written in PL/SQL to parse and execute a simple version of the BASIC programming language. As I created the PL/SQL I kept notes of all of the development so that the complete story of the development and design of the language and the interpreter can be added to this site as a set of blogs or chapters of a book even though its not a printed book.

These chapters or articles will be added to my blog and also links added to this page which will act as an index page for all interpreter and compiler articles and possibly more complex or Extreme PL/SQL. The plan is to convert the interpreter to a compiler that emits assembly language that is itself then assembled into a binary form and then executed in a virtual machine for a self designed CPU. All of this to be written in PL/SQL of course. The interpreter exists and the script language - PFCLScript - is evolving from a simple version of BASIC to a much more rounded language with better control constructs and functions.

Why?

Why did i want to do this project?

As I said I write code in C and one of the things we have done is written parsers for PL/SQL in C using Lex and Yacc for our PL/SQL code security analyser and also for our PL/SQL obfuscator. One part of those applications and also part of our database scanner for Oracle security is the use of the Lua programming language. We write a lot of checks in Lua and we have embedded Lua into our C code. This is a design feature of Lua; to be able to embed the language into your own applications and extend the language to add your own calls to your own code.

This is exactly what I wanted to do with this scripting language. I want to provide a stand alone script language that can be used to extend PL/SQL applications including those in APEX. I want a user of a PL/SQL language based application to be able to extend the application not through screens of settings or parameters or... but be able to do that through scripts. We could use PL/SQL to extend an application BUT this is a risk for security. If we embed a script parser into an application then we limit how the script interacts with the whole application.

This is what we will achieve with this script interface; allow it to be embedded into any PL/SQL application

Article Series

There are a few articles already released that refer to this project. These are listed here and may be extended outside of the main article series - some may not be directly about languages, interpreters or compilers but they are part of the development:

Here is the list of articles / chapters for the development of the PFCLScript language and the development. As articles are added to the blog a link will be added here. This list is an indication of the articles to come but they may change slightly before release and additonal ones could be added:

Future

I plan to do more with this scripting language. The obvious thing is to convert to a complier and generate ASM and then assemble that into a binary and then provide a virtual machine in PL/SQL to execute that binary. This will allow more Extreme PL/SQL programming but most likely better speed of execution.

NOTE: I reserve the right to release this as a commercial product.... or not....