Home | About | Partners | Contact Us

SourceForge Logo

Quick Links
Building XL
XL Mailing List

Understanding XL
Conceptual overview
XL examples
Inside XL
Concept Programming

In depth
Browse GIT
SourceForge Info

Other projects
GNU Project
The Mozart Project

XLR: Extensible Language and Runtime

The art of turning ideas into code

XL Status

Prev: Error reporting


Next: Abstract syntax tree

There are currently two versions of the XL compiler, one written in XL and one written in C++.

The version written in XL has been bootstrapped around November 2003, and new development is now being made in XL. This is a dirty bootstrap, but it is a practical solution to the severe resource constraints this project has to live with. The status of this compiler is shown below:

Bootstrap library Basic runtime functions needed by bootstrap compilers (very crude) Done
Scanner Scan input text and generate XL tokens Done
Scanner Scannner configuration file (xl.syntax) Done
Parser Generate a parse tree from a stream of tokens Done
Dirty Bootstrap Transform the parse tree into C++ for bootstrap purpose. Done
Translation General mechanisms for translating XL trees. Done
Named symbols Storing and retrieving XL declarations by name. Done
Tree symbols Storing and retrieving XL trees by shape. Done
Compiler symbols Storing and retrieving compiler-private information in symbol tables Done
Type system Type system, comparing types, entering types in the symbol table. Done
Bytecode interface Interface used to generate "low-level" code (bytecode). Done
Declarations Entering declarations in the symbol table. Done
Functions semantics Performing basic semantics on functions. Done
Default arguments Default arguments for functions. Done
Overloading Overload resolution for function calls. Done
Expression reduction Rewriting expression trees to function calls Done
Basic statements Core XL statements (if, while, loop, etc) Done
Automatic type deduction Deducing the type of a variable from the initialization in code like K : variable := 0 Done
For loops Extensible for loops, where for Iterator loop Body expands the Iterator expression according to written form rules Done
Enumerations and sets Enumerations and sets ("flags") To-Do
Generic declarations Parameterized types and functions Done
Implicit generics Functions using generic types in arguments become themselves generic. Done
Generic specialization Specialization of generics for specific instances of the generic To-Do
Generic written forms Written forms to denote generic types Done
Compile-time variadics Compile-time, type-safe variable argument lists. Done
Case statements Extensible case statement. Done
Pragmas Compile-time instructions for the compiler. Done
Plug-in architecture Compiler plug-ins to deal with language extensions. Done
Preprocessor Preprocessor based on tree rewrite rules. Done
Library XL runtime library. In progress
Basic operators XL basic operators (arithmetic, bitwise, bitshifts, etc). Done
Object model XL default object models (classes, dynamic dispatch, memory management) To-Do
Error handling XL default error handling mechanisms. To-Do
Generic algorithms XL basic STL-style algorithms (sorting, finding, iterating). To-Do
Generic containers XL basic STL-style containers (arrays, strings, maps, sets). To-Do
Math libraries XL basic numeric algorithms (matrix and complex arithmetic, transcendental). To-Do
Text libraries XL basic text manipulation library. To-Do
Binary I/O XL basic binary I/O library. To-Do
Text I/O XL basic text I/O library. In progress
Final Bootstrap Final bootstrap of the compiler, where the compiler generates low-level code that does not rely on C++ semantics ("not dirty" bootstrap). To-Do

An earlier version of the XL compiler, written in C++, can be found on the Mozart web site. Its implementation is much more advanced, but the basic syntax tree model made the development of language extensions more difficult than necessary. Moreover, the compiler had grown large enough to make bootstrapping (rewriting it in XL) difficult. This old version is now on hold, though it demonstrates how one can implement some of the advanced capabilities described on this web site. A few examples given on this web site will not compile with the current compiler, but will compile with the old one (sometimes, with syntax adjustments). However, the number of such tests is getting small, since the new compiler is now almost at parity with the old one (and definitely ahead in a few important areas, like plug-ins or preprocessing).

Prev: Error reporting


Next: Abstract syntax tree

Copyright 2008 Christophe de Dinechin (Blog)
E-mail: XL Mailing List (polluted by spam, unfortunately)