Related articles |
---|
Good practical language and OS agnostic text? compilers@is-not-my.name (2012-04-17) |
Re: Good practical language and OS agnostic text? redbrain@gcc.gnu.org (Philip Herron) (2012-04-18) |
Re: Good practical language and OS agnostic text? cr88192@hotmail.com (BGB) (2012-04-18) |
Re: Good practical language and OS agnostic text? alain@dpt-info.u-strasbg.fr (Alain Ketterlin) (2012-04-18) |
Re: Good practical language and OS agnostic text? derek@knosof.co.uk (Derek M. Jones) (2012-04-18) |
Re: Good practical language and OS agnostic text? compilers@is-not-my.name (2012-04-18) |
Re: Good practical language and OS agnostic text? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-04-18) |
Re: Good practical language and OS agnostic text? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-04-18) |
Re: Good practical language and OS agnostic text? usenet@rwaltman.com (Roberto Waltman) (2012-04-18) |
Re: Good practical language and OS agnostic text? usenet@bitblocks.com (Bakul Shah) (2012-04-18) |
Re: Good practical language and OS agnostic text? cr88192@hotmail.com (BGB) (2012-04-19) |
Re: Good practical language and OS agnostic text? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2012-04-19) |
Re: Good practical language and OS agnostic text? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2012-04-19) |
Re: Good practical language and OS agnostic text? compilers@is-not-my.name (2012-04-19) |
[36 later articles] |
From: | glen herrmannsfeldt <gah@ugcs.caltech.edu> |
Newsgroups: | comp.compilers |
Date: | Wed, 18 Apr 2012 22:43:10 +0000 (UTC) |
Organization: | Aioe.org NNTP Server |
References: | 12-04-019 12-04-024 |
Keywords: | books |
Posted-Date: | 18 Apr 2012 22:10:10 EDT |
Derek M. Jones <derek@knosof.co.uk> wrote:
> On 17/04/2012 22:28, compilers@is-not-my.name wrote:
>> Guys, I'm having a bear of a time finding a good practical language
>> and OS agnostic text on writing a compiler. I'm weak in math and not
>> interested in the theoretical details. I want to understand the hows
>> and whys of compiler writing.
> I always recommend:
> A Retargetable C Compiler: Design and Implementation
> by David R. Hanson and Christopher W. Fraser
So, that makes two (out of about five) of us. (My post comes later.)
Much of the book is about code generation, which, it seems to me,
is not described in as much detail in many other compiler books.
Parsing theory is where much of the theory, and hard to understand
mathematical descriptions, appear, but in the end (back end, in the
case of compilers) it is about code generations.
As far as languages to write compilers in, it is now usual (though
maybe not 50 years ago) to describe parts of the compiler in a
special purpose language. As previously noted, there are flex and
bison to write the front end, though you usually need to know some
C to use them.
For compilers that generate code for more than one target,
(at least gcc and lcc), the back end is usually described through
a language easier for humans to understand. To me, the lcc code
generator is much easier to understand than that of gcc.
You should be able to write a description for a new target
without knowing C, or much of parsing theory. You do need a
good understanding of the instruction set for the target, though.
-- glen
Return to the
comp.compilers page.
Search the
comp.compilers archives again.