Squaak: A Simple Language

Squaak is a case-study language described in the Parrot Compiler Tools
tutorial at http://www.parrotblog.org/2008/03/targeting-parrot-vm.html.

Note that Squaak is NOT an implementation Squeak; it has nothing to do
with any SmallTalk implementation.

Squaak demonstrates some common language constructs, but at the same
time is currently lacking some other, seemingly simple features. For instance,
Squaak does not have break or continue statements (or equivalents
in your favorite syntax). Once PCT has built-in support for these, they
will be added.

Squaak has the following features:

   * global and local variables
   * basic types: integer, floating-point and strings
   * aggregate types: arrays and hash tables
   * operators: +, -, /, *, %, <, <=, >, >=, ==, !=, .., and, or, not
   * subroutines and parameters
   * assignments and various control statements, such as "if" and "while" and "return"
   * library functions: print, read

A number of common (more advanced) features are missing.
Most notable are:

   * classes and objects
   * exceptional control statements such as break and continue
   * advanced control statements such as switch
   * closures (nested subroutines and accessing local variables in an outer scope)

Squaak is designed to be a simple showcase language, to show the use of the
Parrot Compiler Tools for implementing a language.

In order to use Squaak:

 $ make

Running Squaak in interactive mode:

 $ ../../parrot squaak.pbc

Running Squaak with a file (for instance, the included Game of Life example):

 $ ../../parrot squaak.pbc examples/life.sq

Bug reports and improvements can be sent to the maintainer or Parrot porters
mailing list.


