An Ada and Java Lexer


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

would be returned as the sequence of tokens

Token names are appended by _A, _J, or _AJ depending on the language they are used for.

Last update: 21 November 1998


Enumerations in Java

Java programmers have always missed the ease of constructing enumeration types like Ada's

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.


Contributed by: Christoph Karl Walter Grein
Contributed on: December 9, 1998
License: Public Domain
Back