Page 1 of 2
What do you think of LCC ?
Posted: Tue Dec 09, 2008 6:08 am
by david
I want to develop a C compiler.
You know, GCC is very big, It is hard to read its code.
TCC is very good, but no book talks about it, it is hard to understand it.
LCC also opens source, and there is a book talk about it,(A Retargetable C Compiler: Design and Implementation) , but it needs $55.99 in amazon.com.
I can not find the book in my city, maybe i must buy it in amazon.com.
but i want to know how is LCC.
Re: What do you think of LCC ?
Posted: Tue Dec 09, 2008 6:13 am
by david
I want to know how does a compiler work.
and improve my assemble language.
Re: What do you think of LCC ?
Posted: Tue Dec 09, 2008 6:17 am
by Solar
david wrote:I want to know how does a compiler work.
Would you look at the Linux source to figure out how an OS works?
Would that teach you how an OS
could work?
Same for compilers. Don't look at the source, look at the books that those people
read. Google "dragon book compiler". or
click here.
Re: What do you think of LCC ?
Posted: Tue Dec 09, 2008 7:20 am
by DeletedAccount
Also have good look at Writh's books and articles . I learned a lot from him and also the tiger Book
Regards
Shrek
Re: What do you think of LCC ?
Posted: Tue Dec 09, 2008 7:34 am
by DeletedAccount
gee 55$ for a book
. Its too much , I guess hacking the source is the cheaper way out
.
If the source code is well written and commented well , then you might be able to do way without the books . I learned about XNA programming this way , the books were way too expensive so downlded the books source code from the site and figured out the contents of the books without actually reading them
.
However the authour here seems to be very smart , there are no comments in the source code
.But the source is quite readable , i think its possible to understand the entire thing with some exertion from your side.
Regards
Shrek
Re: What do you think of LCC ?
Posted: Tue Dec 09, 2008 10:51 am
by Combuster
Many of my college books are past the $50 (even past €50).
Good thing the book I have on compiler stuff is from my university (
pdfs, be free! )
Re: What do you think of LCC ?
Posted: Tue Dec 09, 2008 11:07 am
by DeletedAccount
Hi,
However here in India , low price Asian Editons are available , so the cost is around only 10$ or less . I also buy second hand books , which are much cheaper
. My rooms is therefore flooded with books .
Regards
Shrek
Re: What do you think of LCC ?
Posted: Tue Dec 09, 2008 5:41 pm
by tantrikwizard
Shrek wrote:...However the authour here seems to be very smart , there are no comments in the source code...
The code says exactly what its doing more accurately than a bunch of comments, i dont like a bunch of misdocumented comments cluttering up my crystal clear source code.
Re: What do you think of LCC ?
Posted: Tue Dec 09, 2008 9:00 pm
by david
I bought the dragon book in internet yesterday.(english second edition)
Engish is a foreign language for me, mybe it is a little difficult to read it.
who developped a compiler before, Would you like to talk about it , and give me some advices.
Re: What do you think of LCC ?
Posted: Tue Dec 09, 2008 9:45 pm
by DeletedAccount
tantrikwizard wrote:Shrek wrote:...However the authour here seems to be very smart , there are no comments in the source code...
The code says exactly what its doing more accurately than a bunch of comments, i dont like a bunch of misdocumented comments cluttering up my crystal clear source code.
That sums up the value of comments , code written by you might be crystal clear to you , but not necesserily for someone else .
Regards
Shrek
Re: What do you think of LCC ?
Posted: Wed Dec 10, 2008 3:54 am
by Solar
...and your code is only clear on the how, but not on what or why.
Re: What do you think of LCC ?
Posted: Wed Dec 10, 2008 5:13 am
by Khaoticmind
Solar wrote:...and your code is only clear on the how, but not on what or why.
thats why my bootloader looks more like a book than a piece of code
If you have interest check it out here:
http://code.google.com/p/the-kos/source ... t/boot.asm
Going back on-topic...
I plan on writing an compiler down the road, I've the dragon book but never got the time to fully read it
Knowing the LCC has a book and is well documented, i might be trying to look at its code when time comes
Re: What do you think of LCC ?
Posted: Wed Dec 10, 2008 9:33 am
by tantrikwizard
david wrote:...who developed a compiler before, Would you like to talk about it , and give me some advices...
Ive used Gold parser (
http://www.devincook.com/goldparser/) to create a C# sort of compiler and assembler before. Someone in IRC recently turned me on to ANTLR (
http://www.antlr.org) I've not used it but it looks promising. Those groups would be a better place for info on compilers.
Re: What do you think of LCC ?
Posted: Wed Dec 10, 2008 10:28 am
by i586coder
david wrote:
Engish is a foreign language for me, mybe it is a little difficult to read it.
HI,
To the best of my knowledge most chinese people speak english well,
,...,& sorry to say that,most valuable books around computer science written in english ,so you need to improve your english skills
CheerS,
a.T.d
Re: What do you think of LCC ?
Posted: Wed Dec 10, 2008 12:11 pm
by DeletedAccount
Hi,
I seriously urge you to take a look at your own posts . Most prominently , this one
http://forum.osdev.org/viewtopic.php?f=11&t=18503 .
Regards
Shrek