Milestones

2: testsuite and runtime library

Status

Note: GCC Algol 60 is still being developed on stock 32bit x86 system. I will try to suit the compiler for other targets if I'll get them in hands.

New since 0.1:

  • On tools side: unfortunately, treecc had to go; compiler is now written in C + flex + yacc combo.
  • On lexer side: no news.
  • On parser side: support for array access operator.
  • On code generator side: support for all types of literals; support for declarations of variables of all types, including multidimensional arrays; all operators supported, including multidimensional array access; support for labels; name mangling for builtin functions.
  • Runtime library: the first take on libga60 was integrated into buildsystem; it only includes several functions to test compiler: exit, puts, abs, sign; also ** operator is implemented via call to runtime library.
  • Testsuite: in place, alive and kicking.
  • Documentation: refined thesis outline, which still serves mostly as to-write list; sample chapter about options has been written; not sure if I'm not dwelling into extensive detail in the wrong place.

Example program

The following program demonstrates most milestone criteria features:

'begin'
  'real' a;
  a := 2.5;
  exit (entier (a ** a));
'end';

1: basic algol 60 frontend

Links

Status

  • On lexical side: whole Algol 60 is supported.
  • On parser side: nested blocks; variable declarations of all types, except for functional; labels, but not goto command; arithmetic, relational, logical and conditional expressions, but no array access; integer, real, string, boolean literals; variable references and function calls; general assignment statement.
  • On code generator side: nested blocks; integer variable declarations; few arithmetic expressions; integer literals; variable references and function calls, but only exit function is known to work; simplified assignment statement in variable := expression form.
  • Testsuite is in semibroken state: it's here, but no automatic means of testing are available. Milestone 2 requires gcc dejagnu testsuite support.
  • Documentation: thesis outline, which serves as gradually filled to-write list, is in place. No actual text is written as of yet.

Example program

The following program demonstrates most milestone criteria features:

'begin'
  'integer' a;
  a := 16;
  exit (a + 2);
'end';

Attachments