PHP Classes
elePHPant
Icontem

DFL: Parse and run DFL language programs

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Screenshots Screenshots   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-06-07 (6 years ago) RSS 2.0 feedNot enough user ratingsTotal: 278 All time: 6,917 This week: 1,146Up
Version License PHP version Categories  
dfl 1.0The PHP License4.2.0Emulators
Description Author  

This class can be used to parse and run DFL language programs.

It can take a file with a program in the DFL language to parse the program code and execute its statements.

The class provided debugging support by outputting details of processing of the DFL programs.

Innovation Award  
PHP Programming Innovation award nominee
April 2008
Number 3


Prize: One copy of the Zend Studio
DFL is programming language created originally to write bot daemons for IRC.

This class implements a pure PHP implementation of the DFL language parser and run-time engine.

Manuel Lemos
Picture of Debug
Name: Debug <contact>
Classes: 4 packages by
Country: United States United States
Age: 25
All time rank: 37142 in United States United States
Week rank: 337 Up38 in United States United States Up
Innovation award
Innovation award
Nominee: 4x

Details provided by the author  
___________.__           ________          _____                        .___
\__    ___/|  |__   ____ \______ \   _____/ ____\____    ____  ____   __| _/
  |    |   |  |  \_/ __ \ |    |  \_/ __ \   __\\__  \ _/ ___\/ __ \ / __ | 
  |    |   |   Y  \  ___/ |    `   \  ___/|  |   / __ \\  \__\  ___// /_/ | 
  |____|   |___|  /\___  >_______  /\___  >__|  (____  /\___  >___  >____ | 
                \/     \/        \/     \/           \/     \/    \/     \/ 
-----------------------------------------------------------------------------
 _____  ______ _      
|  __ \|  ____| |     
| |  | | |__  | |     
| |  | |  __| | |     
| |__| | |    | |____ 
|_____/|_|    |______|
                       Language Processing Engine
              [http://thedefaced.org/dfl] <-- Documentation Wiki
-----------------------------------------------------------------------------

******** DFL Basics ********

DFL (TheDefaced Language) is a programming language created by TheDefaced Security Team. It is built around the standard of application development, however the DFL Engine has the ability to stretch much further.

DFL contains the DFL Engine, which is a parsing engine that processes data it obtains from a predefined file, as well as executes and evaluates the information parsed.

The DFL language is read with the engine, and as it is parsed, information is tallied and recorded for the usage of debugging. 

The language itself consists of the delimiting of execution among lines. Each line in DFL code is read by the DFL Engine and the engine determines whether the line should be evaluated. An example of a line that the engine doesn't evaluate are comments.

Lines that are evaluated possess statements. These statements contain 2 elements, a register and a arguments.

Registers are oriented before arguments, but these registers cannot be modified themselves. For more information, view the page that explains this.

An example of a line of DFL would be as following: 

---------- DFL CODE ----------
FNC echo STR echo $args;
------------------------------

FNC and STR are examples of registers. The FNC allows for its second argument to be processed as a statement. When a register submits data to the DFL Engine for processing as a statement, not only will that statement in question be added to the stack buffer, but it will return the value of this statement to the stack before it.

Frequently, registers that accept multiple arguments allow for the last argument passed to be processed as a statement, and the execution of the register can use the return of that statement to process its own functionality.

The standard Hello World! DFL code is as follows:

---------- DFL CODE ----------
FNC echo STR echo $args;
RUN echo STR Hello World!
------------------------------

Since DFL has a small runtime requirement a low memory necessity, it can process information that other languages process must faster, sometimes in fractions of fractions of seconds.

Since there are no predefined functions, the hassle of loading each function, most of which may be unnecessary, the high packed library of the language can provide the tools necessary to execute the same functions.

Also, DFL, unlike a lot of other languages that process sets of characters as "tokens", and processes them and parses them. DFL, however, processes the information by sets of delimited data and expectations. By doing so, there is a major loss in time required for processing and less memory required for execution. 

******** Registers ********

A register is a three character long internal processing function that is built in with the DFL Engine. Registers receive arguments that are passed to them within statements.

The following is a list of registers:

FNC,VAR,RUN,STR,ERR,ARR,INC,DEP,EVL,RET and DEL.

A register's placement in a statement can be avoided using methods. Methods do no overrule the execution of registers; however methods do provide for an alternative execution.

******** More ********

View the rest of the documentation at http://thedefaced.org/dfl/. The Wiki is an extensive source for documentation of the language.
Screenshots  
  • dfl_cli_screenshot.jpg
  Files folder image Files  
File Role Description
Plain text file dfl.class.php Class The DFL Class
Plain text file README Doc. Readme
HTML file example.html Doc. Example Code, Output, and Debugging Console

 Version Control Unique User Downloads Download Rankings  
 0%Total:278All time:6,917
 This week:0This week:1,146Up