Re: Are transpiling techniques different than compiling techniques?

gah4 <gah4@u.washington.edu>
Sun, 17 Oct 2021 08:37:55 -0700 (PDT)

          From comp.compilers

Related articles
[6 earlier articles]
Re: Are transpiling techniques different than compiling techniques? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2021-10-14)
Re: Are transpiling techniques different than compiling techniques? 480-992-1380@kylheku.com (Kaz Kylheku) (2021-10-16)
Re: Are transpiling techniques different than compiling techniques? 480-992-1380@kylheku.com (Kaz Kylheku) (2021-10-16)
Re: Are transpiling techniques different than compiling techniques? tkoenig@netcologne.de (Thomas Koenig) (2021-10-16)
Re: Are transpiling techniques different than compiling techniques? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2021-10-16)
Re: Are transpiling techniques different than compiling techniques? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2021-10-17)
Re: Are transpiling techniques different than compiling techniques? gah4@u.washington.edu (gah4) (2021-10-17)
Re: Are transpiling techniques different than compiling techniques? gah4@u.washington.edu (gah4) (2021-10-17)
| List of all articles for this month |
From: gah4 <gah4@u.washington.edu>
Newsgroups: comp.compilers
Date: Sun, 17 Oct 2021 08:37:55 -0700 (PDT)
Organization: Compilers Central
References: 21-10-017 21-10-019 21-10-026
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="43611"; mail-complaints-to="abuse@iecc.com"
Keywords: Fortran, history, comment
Posted-Date: 17 Oct 2021 14:38:47 EDT
In-Reply-To: 21-10-026

On Saturday, October 16, 2021 at 10:48:14 AM UTC-7, Kaz Kylheku wrote:


(snip on the word transpiler)


> It isn't; that's just a word used by some web programming hipsters.
> Transpilers are everywhere, because browsers are stuck with Javascript
> as their lowest-level target language*, and it sucks so terribly that
> people want to use almost anything else. The bar is quite low; it's easy
> to write toy languages that spit out Javascript, so it has become a kind
> of popular sport, and from there came "transpiling".


In the 1970's, programs to improve Fortran were common,
with Ratfor and Mortran as two examples.
(That is, Fortran IV or Fortran 66.)


The ones I know were written as macro processors, where macros
match some strings in the input data, along with arguments, and replace
them with new strings. At least for the Mortran processor, macros can
create or modify macros. A fairly simple processor, then, allows for a
somewhat complicated language.


One problem, though, is that such processors don't fully parse
the input. Syntax errors in the input produce some strange output,
and strange errors from the final compiler.


It does seem that there are some macro processors for use with Javascript.
[Ratfor used a yacc grammar, which is why early versions of yacc could produce
ratfor output. As you note, it didn't understand all of Fortran so it let
syntax errors through, which is why I did my PDP-10 hack to put the source
line numbers in the Fortran output, to help figure out where the bug is.
I later wrote a full Fortran 77 parser which was awful. No wonder they
didn't try to do it in ratfor. -John]


Post a followup to this message

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