Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!nerds-end From: compilers@is-not-my.name Newsgroups: comp.compilers Subject: Re: Good practical language and OS agnostic text? Date: Thu, 19 Apr 2012 19:05:16 -0000 Organization: Compilers Central Lines: 57 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-04-044@comp.compilers> References: <12-04-027@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1334892497 87840 64.57.183.58 (20 Apr 2012 03:28:17 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Fri, 20 Apr 2012 03:28:17 +0000 (UTC) Keywords: books Posted-Date: 19 Apr 2012 23:28:17 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:587 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..