1. Pierre-Marie de Rodat
  2. PMLogo

Overview

PMLogo
======

PMLogo is a very simple implementation of a logo-like language interpreter used
to draw images with low-level primitives.

It is written in Python2 and use Pygame.


Language
========

This language (the PMLogo language?) is designed to be handled by a LL(1)
parser. Its syntax can therefore seem quite cumbersome, but nevermind. ;-)

The language is a not-so-well-thought-work-in-progress, so there will first be
only examples, but no grammar.

program
parameters
    screen_width 400
    screen_height 300
modules
code
do
    call color 0 0 0 .
    call rect 0 0 screen_width screen_height .
    set size = 0
    if call <= screen_width screen_height .
    do
        set size = screen_width
    else
        set size = screen_height
    done

    set i = 0
    set step = 10
    while call < i size .
    do
        set light = call / call * i 255 . 255 .
        call color light light light .
        call rect i i step step .
        set i = call + i step .
        call sleep 500 .
    done
done