Bug reports and proposals for improvements are welcome.
This is a lexical analyser written in Ada to transform a stream of characters representing an Ada or Java program into a stream of language specific tokens, a token being an element of the language grammar like e.g. an identifier or a reserved word.
Thus the Ada declaration
type Colour is (Red, Green, Blue);
would be returned as the sequence of tokens
Type_A, Identifier_AJ ("Colour"), Is_A, Left_Parenthesis_AJ, Identifier_AJ ("Red"), Comma_AJ, Identifier_AJ ("Green"), Comma_AJ, Identifier_AJ ("Blue"), Right_Parenthesis_AJ, Semicolon_AJ.
Token names are appended by _A, _J, or _AJ depending on the language they are used for.
Last update: 21 November 1998
Java programmers have always missed the ease of constructing enumeration types like Ada's
type Colour is (Red, Green, Blue);
The Enumeration Factory provides a simple to use model to construct Java classes representing such enumerations together with all operations that are available in Ada (like the order functions "<" and "<=" or the attributes 'Image, 'Pos, 'Succ, just to name a few).
Last update: 7 February 1998
(*) The code is shown colorized. This is created by an application of the lexer which is also included in the distribution.