Home > Compilers & Interpreters, Projects > The project ‘YAFL’ (Yet Another Free Language).

The project ‘YAFL’ (Yet Another Free Language).

This project refers to the development of the procedural programming language YAFL (Yet Another Free Language) as well as its interpreter. The programming language YAFL is a tool for teaching the basic principles of procedural programming to secondary school students and beginners in general.

This project is Free Software (software published under the GNU General Public License). If you wish to improve the interpreter or the programming language you are free to do so as long as you mention the original designers of this project.

Specifically, the interpreter of YAFL consists of the following subsystems:

  1. Lexical Analyzer
  2. Syntactical Analyzer
  3. Symbol Table
  4. Virtual Machine
  5. Program Generator

I quote below a small program which, of course, does not perform any real function and exists only to show you some of the features supported by the YAFL.

/* program written in YAFL. */
  integer i, j, k, l;
  input j;
  k := 2**j;
  output k;

  i := !(2+4 >= 1) || !!(4 > 1);
  output i;

  i := !!!(!2+4);
  output i;

  i := 4;
  l := 6;

  /* swap values without temporary variable. */
  i := i ^ l;
  l := l ^ i;
  i := i ^ l;

  output i;
  output l;

  output 2|4&12;
  output 4 << 4;
  output 4^4;

  output !(3**2);

  i := 1;

  while i = 16 {
    if (i >= 5) {
      output i;
    else {

    i := i+1;

For more information you can get the project itself:


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: