Re: Building a translator. Want to know if this is feasible...

"Gopi Bulusu" <gopi@sankhya.com>
8 Nov 2002 11:04:26 -0500

          From comp.compilers

Related articles
Building a translator. Want to know if this is feasible... socrates171@yahoo.com (socrates) (2002-11-06)
Re: Building a translator. Want to know if this is feasible... idbaxter@semdesigns.com (Ira Baxter) (2002-11-07)
Re: Building a translator. Want to know if this is feasible... joachim_d@gmx.de (Joachim Durchholz) (2002-11-07)
Re: Building a translator. Want to know if this is feasible... vugluskr@unicorn.math.spbu.ru (Roman Shaposhnick) (2002-11-07)
Re: Building a translator. Want to know if this is feasible... gsc@zip.com.au (Sean Case) (2002-11-08)
Re: Building a translator. Want to know if this is feasible... stanley.chow@cloakware.com (Stanley Chow) (2002-11-08)
Re: Building a translator. Want to know if this is feasible... vbdis@aol.com (VBDis) (2002-11-08)
Re: Building a translator. Want to know if this is feasible... gopi@sankhya.com (Gopi Bulusu) (2002-11-08)
Re: Building a translator. Want to know if this is feasible... JeffKenton@attbi.com (Jeff Kenton) (2002-11-08)
Re: Building a translator. Want to know if this is feasible... lex@cc.gatech.edu (Lex Spoon) (2002-11-12)
Re: Building a translator. Want to know if this is feasible... enrico.santoemma@mail.com (Enrico Santoemma) (2002-11-15)
Re: Building a translator. Want to know if this is feasible... idbaxter@semdesigns.com (Ira Baxter) (2002-11-17)
Re: Building a translator. Want to know if this is feasible... kgw-news@stiscan.com (2002-11-17)
| List of all articles for this month |

From: "Gopi Bulusu" <gopi@sankhya.com>
Newsgroups: comp.compilers
Date: 8 Nov 2002 11:04:26 -0500
Organization: http://groups.google.com/
References: 02-11-013
Keywords: translator
Posted-Date: 08 Nov 2002 11:04:26 EST

"socrates" <socrates171@yahoo.com> wrote
> What I have is very minimal. No compiler for the dead language, no
> text books, only one reference manual and hundreds of program codes
> that used the dead language.
>
> Do you think it's possible to build a translator with such minimal
> resources? And could you give me some pointers on how to start
> building a translator?


This is certainly possible, although translating to a language like C
is probably a better approach (it would be simpler to add C++ or Java
wrappers around the generated C). Here would be a high level approach:


1) Perform an extensive code walkthrough and determine the system level
      functions used and make a list.


2) Create a grammar specification for DL (the dead language) and verify
      the same by parsing the existing DL programs


3) Create a C library for functions identified in (1)


4) Create a translator that uses the grammar from (2) and generates
      the equivalent C code.


A good test for (4) is to build a reverse translator to check that
the generated C code (using library functions from 3) can be translated
back to the original DL (may not always be feasible).


Naturally, there can be a trade-off between steps 3 and 4 (more functions
in the library would decrease the complexity of the translator).


Regards,
gopi
---


Gopi Kumar Bulusu
Sankhya Technologies Private Limited
http://www.sankhya.com
Tel: +91 44 822 7358
Fax: +91 44 822 7357


Post a followup to this message

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