Re: Good practical language and OS agnostic text?

compilers@is-not-my.name
Thu, 19 Apr 2012 19:05:16 -0000

          From comp.compilers

Related articles
[16 earlier articles]
Re: Good practical language and OS agnostic text? torbenm@diku.dk (2012-04-19)
Re: Good practical language and OS agnostic text? compilers@is-not-my.name (2012-04-19)
Re: Good practical language and OS agnostic text? compilers@is-not-my.name (2012-04-19)
Re: Good practical language and OS agnostic text? compilers@is-not-my.name (2012-04-19)
Re: Good practical language and OS agnostic text? bc@freeuk.com (BartC) (2012-04-19)
Re: Good practical language and OS agnostic text? compiler.ddj@h-rd.org (2012-04-19)
Re: Good practical language and OS agnostic text? compilers@is-not-my.name (2012-04-19)
Re: Good practical language and OS agnostic text? arnold@skeeve.com (2012-04-20)
Re: Good practical language and OS agnostic text? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-04-20)
Re: Good practical language and OS agnostic text? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-04-20)
Re: Good practical language and OS agnostic text? bc@freeuk.com (BartC) (2012-04-20)
Re: Good practical language and OS agnostic text? compilers@is-not-my.name (2012-04-20)
Re: Good practical language and OS agnostic text? compilers@is-not-my.name (2012-04-20)
[21 later articles]
| List of all articles for this month |
From: compilers@is-not-my.name
Newsgroups: comp.compilers
Date: Thu, 19 Apr 2012 19:05:16 -0000
Organization: Compilers Central
References: 12-04-027
Keywords: books
Posted-Date: 19 Apr 2012 23:28:17 EDT

gah@nospam.ugcs.caltech.edu wrote


> You might be right that all books are one (or more) of those three,
> but then you should choose from among those.


If that would have been an option I would have done it by now.


> C is a nice, simple language in which to describe compiler design, and
> also not so bad a language in which to write compilers. Given that,
> it isn't a bad start toward writing one for another language, and/or
> written in another language, unless you don't know C.


I don't know C and it's not a good choice on z/OS. I am familiar with
assembler and I used to know PL/I fairly well and could come up to speed
with it and use it if it would be a good implementation choice. I don't
think it would though, because it requires the IBM runtime which is licensed.


> Both C and Java are fairly simple, and reasonably similar, with much
> of the complication moved to the library. That means a complete
> compiler can be described relatively simply, covering all the
> important ideas. Once you learn those, you will be ready to go on to
> other languages (both for compiling and writing the compiler in).


I really don't like C or Java and I didn't come out and say it because I
don't mean to start a holy war. I have looked at them. C just doesn't have
much value on z/OS. Java is too limiting in other ways. I am familiar with
the older languages and never was interested in much of anything that came
later although I have some experience with modern scripting languages.


> You don't say what language you are interested in.


I am not exactly sure. I was considering a subset PL/I or PL/M variant or
maybe even a new language. Even a super Pascal or Modula-something would be
interesting to me.


> There are some complications to writing Fortran compilers not covered in
> most books. Both Fortran and PL/I don't have reserved words, which
> requires special handling by the compiler. Fixed form Fortran ignores
> blanks, which requires a special lexical analysis technique, but most of
> compiler theory is in parsing, which is reasonably language independent.


I think Fortran would be hard because I couldn't write the libraries needed
due to my lack of mathematical background. F77 would be an interesting
project, the latest Fortran is way more complicated than I would attempt.


PL/I is interesting because I have access to old and new PL/I compilers and
good doc for z/OS. I figured I could develop the grammar from the manuals
but I know it would be a huge project, more than I have the time and ability
to do and a better PL/I than I or many people could write already exists,
so there's not much point in it.


> It seems to me natural that a pseudo-code description will be more
> theoretical, and harder to understand, than one using a well-known
> high-level language.


That's a bit of a tautology. If the well-known language is something /you/
know then yes! Otherwise..


Post a followup to this message

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