RE: Query: Writing a translator for an extended version of C++ (Paul Cahill)
Wed, 27 Apr 1994 10:49:46 GMT

          From comp.compilers

Related articles
Query: Writing a translator for an extended version of C++ (1994-04-13)
RE: Query: Writing a translator for an extended version of C++ (1994-04-27)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Paul Cahill)
Summary: Solution to translation problem with C++
Keywords: translator, tools, parse
Organization: DIALix Services, Perth, Western Australia
References: 94-04-093
Date: Wed, 27 Apr 1994 10:49:46 GMT (Raju Pandey) writes:
> I am working on including a set of concurrency and synchronization
> mechanisms to C++. I am looking at techniques for implementing a
> translator that will transform the extended C++ code to C++. My focus at
> this point is more on verifying the suitability of the language
> constructs, and less on their efficient implementation. Hence, I am
> looking for mechanisms that will allow me to build this translator quickly
> (by utilizing existing tools, and source code).

Hi, I saw this article and thought I should let people know about LADE which
will meet the needs of people with this kind of problem.

The LADE product is a LAnguage Definition Environment for developing
language processors such as compilers, translators and interpreters. This
environment consists of a set of tools which aid programmers in dealing
with the increasing role of languages in their work. The LADE core product
is made up of three main components:-

1. llg - LADE lexer generator,
2. lpg - LADE parser generator, and
3. ltg LADE translator generator.

The LADE lexical generator takes a lexer specification as input to produce
a lexical analyzer C++ class. The LADE parser generator takes a LADE
grammar specification as input and produces a parse tree (C++ class
hierarchy). The LADE translator generator takes a translator
specification as input and using the parse tree produced by the parser
generator and other C++ classes (including user generated code) produces a
translator class.

You can use LADE to produce a parser and compiler for a language which you
define. LADE uses the C++ language to implement the language processor for
the new language which you define. LADE offers several significant
advantages over existing language development environments which include:

1. Inherited attributes which can be passed down the parsing tree.
2. Synthesized attributes which can be constructed at lower levels of
      the parsing tree and passed up.
3. Grammars can be overloaded (horizontal) or extended (vertical) to allow
      for variations in different versions of a language while preserving the
      existing grammar for languages already defined. e.g. handling K&R C and
      Ansi C.
4. Automatic error handling.
5. Allows unbounded look ahead.
6. Provides an object oriented approach to language definition.

These are but some of the advantages of LADE and if you require further
detail, I would a demonstration license of LADE can be provided on request
for your evaluation. The demonstration comes with fully executable
binaries plus full documentation and a tutorial.

Also available are several existing grammars which include Ansi C, Ansi
2.0 C++ (C++ AT) and SQL DDL. Other grammars can be provided on request.

The C++ AT product is partially produced by Xorian's LADE Language
Definition Environment which is a GUI driven LALR(1) parser which uses C++
grammar specified in an extended form of BNF grammar. The output of LADE
is C++ source code which when compiled generates a C++ parser. When this
parser is executed, C++ source code is translated into a set of Objects
which can then be queried to produce analysis information or for any
purpose required by the user. The current version of grammar supports the
translation of C++ 2.1 source code and is currently being upgraded to
support C++ 3.0.

Prophecy Technologies has utilized the C++ AT for our C++ Design Capture
product which translates C++ source code into OOSD/C++ and OMT design
diagrams suitable for the Interactive Development Environments OOSD/C++
and OMT design editors. We have currently reverse engineered libraries
such as the X11 Interviews library.

The LADE product is currently fully supported for Solaris 4.1.3 and is
partially supported on HP-UX (no GUI). The demonstration version is available
for the Solaris version.

I hope this information is of assistance and I look forward to any
interrested replies.
Paul Cahill
Prophecy Technologies Pty Ltd
(Western Australian Branch)
17 Greenhill Court, Kallaroo, Perth Phone: +61 9 307 8141
Western Australia Fax: +61 9 307 8131

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.