Tiny Language

Tiny Language is a C/C++ library to simulate a single-tape turing machine inline. More flexibility to be added later. Documentation can be found in the github repo.

Examples:

  1. mov_right: moves the value in the current cell to the adjacent right cell.
    TM mov_right()
    {
      LOOP
      { D R U L }
    }
  2. copy_right: copies the value in the current cell to the adjacent right cell.
    TM copy_right()
    {
      LOOP
      { D R U R U L L }
      LOOP
      { R R D L L U }
    }
  3. right_until_empty: moves the pointed right until an empty cell occurs.
    TM right_until_empty()
    {
      LOOP
      { R }
    }

You may find the complete code on the github repository.

Advertisements

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 )

w

Connecting to %s