|Depot4 - Easy to use parser/translator generator for Java and Oberon email@example.com (J.Lampe) (1997-07-04)|
|Date:||4 Jul 1997 14:51:08 -0400|
|Organization:||Techn. University Dresden|
|Keywords:||parse, tools, Java, Oberon|
Depot4 - A simple to use translator generator
NOW available in two versions for JAVA and OBERON
Depot4 is an extensible translator-generator. It is easy to use
without special knowledge from compiler design. Some basic ideas of
formal language theory and familiarity with the EBNF should be
enough. Depot4 is well suited for text to text translation, but one of
its unique features is that it can easily be extended to more
elaborated objects, e.g., styled texts, drawings etc.
The Depot4 software was developed at TU Dresden, Dept. of
Mathematics/Subd. Scientific Computing.
There are - the software
- the sources
- a online manual
- a demo (Netscape only)
and it is free!
The prior aim of Depot4 is simple use. This is achieved by nonterminal
based modularization and recursive transaltion based description. The
latter will be illustrated by a small example:
To avoid misunderstanding, distinguish the implementation of a
translator from its use (application). Implementation will result in
an executable procedure/class, which afterwards may be applied to
perform some further translation. Translations are described by means
of a meta-language called Ml4, which is, in fact, an extension of EBNF
formalism. ExampleTask: Invert a list of numbers, e.g., "1, 2, 3"
into "3; 2; 1"
Step 1: Describe the translator
The expression before the "->" sign defines the source of the
translation. It is follwed by an expression giving the wanted
result - the target production. ('num' is a supplied terminal,
its translation 'num_' is the accepted number itself.)
NumList = num [ ',' NumList ] -> [ NumList_ '; ' ] num_.
Step 2: Implement the translator by executing the TRANSLATE command
Now this toy translator is ready for use. This is the end of
implementation! Usually there are, of course, more than one
It follows the use of the implemented translator.
Step 3: Tell the system, which translator to use. Translators are
identified by their root productions. Here it's 'NumList'.
Step 4: Apply the translator to some list of numbers, e.g., 1,2,3,4.
and execute the USE command.
That's really complete.
To be honest: Depot4 offers very simple solutions for simple problems.
However, it may help you in solving hard problems - such as C to
Pascal - but they will keep hard.
Dept. Mathem./Techn. Univ. Dresden (Germany)
Return to the
Search the comp.compilers archives again.