Features a compiler for a small manageable subset of
Java ideal for
teaching and
research (Action Semantics).
If you've ever dreamed of pruning Java back, forking it,
and growing it yourself with a new set of features
(e.g. functional)
[
O'Reilly Java3 Article,
LTU Java Critique
]
this seems like a good place to start.
Developing a JOOS Compiler Using a SableCC Framework
(Alaoui, 2000)
provides a detailed description of the Java implementation of JOOS.
There are no packages, interfaces, exceptions, mixed statements and declarations,
or switch statements,
"fields can only be protected, methods and constructors can only be public;
methods cannot be overloaded, only constructors can;
arrays are not supported (this can be made up for by using Vector objects);
the main method is the only allowable static member in a class;
primitive types for real numbers are not supported."
External declarations, similar to C's, allow you to use
Java libraries and even add Java language
features to JOOS:
"JOOS also provides its own library of precompiled class files for interfacing to functionality
supported only in Java (e.g. constants, static methods and static fields)."
There even seems to be a logical place to insert an Abstract Syntax Tree editor for source code transformation and refactoring like
Intentional Programming does.
Abstract Syntax Trees's are "built by the parser, using the semantic actions specified
in the grammar file...
The compiler then performs the usual passes on the AST,
and each pass is explicitly and manually implemented as a
recursive descent of the syntax tree." (Alaoui, 4-5)
Posted to OOP by jon fernquest on 8/23/02; 2:24:48 AM
|
|