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
ericar80 began watching pmderodat/PMLogo
654924c - Fixed the README’s example.
0839e33 - Added an AST printer that produce valid indented code.
208cda9 - Added an AST basic and empty visitor.
63b6df9 - Fixed 'if' and 'else' AST nodes building in the parsing. Both are now built with Instructions AST nodes instead of just lists of Instruction AST ...
95f0173 - Fixed AST id building. Parsing used to build AST id nodes containing tokens. Id nodes are now built with text instead.
0fd0d22 - Finished identifiers parsing. The set and the parameter statements parsing used to yield id tokens instead of id AST nodes. This is now fixed.
ee89deb - Fixed the function calling parsing. The function calling parsing used to take an identifier as the called function and used to badly build the AST. ...