473,761 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

designing of the compilers


Hi guys! I think all of u know about the designing of
compilers. Can any body tell me about the designing of the compilers.
And also tell me the difference between the compilers and Interpreter
which weresically used by the computers.
I want to know about the basic compiler software.

Dec 15 '06 #1
8 2192
pr*********@gma il.com said:
>
Hi guys! I think all of u know about the designing of
compilers. Can any body tell me about the designing of the compilers.
I suggest you take this up in comp.compilers

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Dec 15 '06 #2
ken
hello pransri
well the design of compilers s very interesting and tough as well
the basic difference between a compiler and an intepretor s that
intereptor will check the code line by line and if u find an error on
one line it will report .only after clearing that u will b able to
proceed
but in the case of compilers it compiles the entire code and finally
reports the errors
if u need to kno the basic consepts of a compiler just try to make a
compiler for a simple language
like a compiler for all four basic arithhamatic expressions.... u can
find this text book very useful for this
Compilers: Principles, Techniques, and Tools (Hardcover) by Alfred V.
Aho, Ravi Sethi, Jeffrey D. Ullman

Dec 15 '06 #3

pr*********@gma il.com wrote:
Hi guys! I think all of u know about the designing of
compilers. Can any body tell me about the designing of the compilers.
And also tell me the difference between the compilers and Interpreter
which weresically used by the computers.
I want to know about the basic compiler software.
We are group users, not Donald Knuths...

Dec 15 '06 #4
pr*********@gma il.com wrote:
>
Hi guys! I think all of u know about the designing of
compilers.
("you". Not "u". Please.)

Why do you think we all know about the designing of compilers? This
is a group about the C programming language. /Some/ of us know (some
stuff) about compilers, but compiler design is rarely topical here.
Can any body tell me about the designing of the compilers.
There are books. Lots of books. You might also try comp.compilers
(fairly formal) or comp.programmin g (not so formal).
And also tell me the difference between the compilers and Interpreter
which weresically used by the computers.
"weresicall y"?

(The "difference between compilers and interpreters" is a Flame Zone.)
I want to know about the basic compiler software.
I googled "comp.compi lers FAQ" and the first hit was that very FAQ, and it
has suggested books and a link to an introduction (which I can't speak for
since I didn't follow the link). Start there and ask for help in one of
the groups I mention.

--
Chris "Perikles triumphant" Dollin
"I'm still here and I'm holding the answers" - Karnataka, /Love and Affection/

Dec 15 '06 #5
<pr*********@gm ail.comwrote in message
news:11******** *************@7 9g2000cws.googl egroups.com...
>
Hi guys! I think all of u know about the designing of
compilers. Can any body tell me about the designing of the compilers.
And also tell me the difference between the compilers and Interpreter
which weresically used by the computers.
I want to know about the basic compiler software.
Compiler design at this point in time is a science rather than an art.
Compiling a language involves the theory of finite automata. Essentially, a
finite automaton is a "state machine" with a finite number of states, and
parsing the source code involves using the ordered input stream to drive the
automaton through its states. At any state, if you end up not being able to
make a transition or making an error transition, then the source code is not
a member of the legal language. At this point the parsing and lexical
analysis is all "science".

In fact, YACC is rumored to stand for "yet another compiler compiler".

However, what compiler vendors are less good at is code generation and
optimization. This is science too, but often not applied as well as it can
be.

For starters, here is what may be helpful:

a)Find a local university with a course in finite state automata. Take it.

b)Find a local university with courses in compiler design. Take them.

c)Look up lex and yacc.

d)Search for compiler design textbooks (there are lots of them).

Interpreters have a long history. Most of them are byte-coded for
efficiency.

Here are some URLs:

http://en.wikipedia.org/wiki/Lex_programming_tool

http://en.wikipedia.org/wiki/Parser_generator

http://en.wikipedia.org/wiki/Finite_state_automaton

http://en.wikipedia.org/wiki/Compiler

Dave.

Dec 15 '06 #6
David T. Ashley said:

<snip>
In fact, YACC is rumored to stand for "yet another compiler compiler".
No, it's not a rumour.

Reference: Kernighan and Pike's "The Unix Programming Environment", 1984:
'yacc stands for "yet another compiler-compiler", a comment by its creator,
Steve Johnson, on the number of such programs extant at the time it was
being developed (around 1972). yacc is one of a handful that have
flourished.'

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Dec 15 '06 #7

<pr*********@gm ail.comwrote in message
news:11******** *************@7 9g2000cws.googl egroups.com...
>
Hi guys! I think all of u know about the designing of
compilers. Can any body tell me about the designing of the compilers.
And also tell me the difference between the compilers and Interpreter
which weresically used by the computers.
I want to know about the basic compiler software.

A commonsense, though not technical, difference is that a compiler turns
source code into machine code, whilst an interpreter runs a program that
calculates the program at run time.
Interpreters are much easier to write than compilers. if you are interested
in how to write interpreters, there is one on my website. There is also a
book to go with it.

A compiler is a rather difficult thing to write. To compile a langage like
C, the basic ide is that you convert expressions to reverse Polish notation.
So (a + b) * c becomes

a,b , + c, *

Thgis can then be converted to push a, push b, pop top pop top, add, push
result, push c, pop top pop top, multiply, push result, which can be
rewritten quite easily in machine code.

Needless to say there is a lot more to it than that. However everthing else
is really just a clothing of this basic rule.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.
Dec 16 '06 #8
Malcolm said:
>
<pr*********@gm ail.comwrote in message
news:11******** *************@7 9g2000cws.googl egroups.com...
>>
Hi guys! I think all of u know about the designing of
compilers. Can any body tell me about the designing of the compilers.
And also tell me the difference between the compilers and Interpreter
which weresically used by the computers.
I want to know about the basic compiler software.

A commonsense, though not technical, difference is that a compiler turns
source code into machine code,
A slightly more technical view: a compiler turns source code from some
programming language into some other programming language. It need not be
machine code.

As a trivial example, AFAIK the following is a conforming C compiler (but
not a conforming implementation - for one thing, it doesn't come with all
the necessary documentation!) :

#include <stdio.h>

int main(void)
{
int ch;
while((ch = getchar()) != EOF)
{
putchar(ch);
}
fputs("The code may contain a syntax error or constraint violation.\n",
stderr);
return 0;
}

And, of course, it turns C into C. :-)
whilst an interpreter runs a program that
calculates the program at run time.
Interpreters are much easier to write than compilers.
See above. :-)

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Dec 16 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3173
by: Bill Davidson | last post by:
Hi there, Please forgive me for posting this article on multiple groups. Being new in the newsgroups, I was not sure which group would have been appropriate for my question. Sorry. My Question ----------- I am looking for a list of popular compilers and/or platforms that *do not* support native C++ exceptions. Any pointers in this
12
1892
by: James Brown | last post by:
Hi all, Having problems designing a template-class. I'll describe my scenario first then show what I've come up with so far: Need a class to provide pointer/array-like access to an area of physical memory located on a piece of custom hardware - this memory is only accessible using machine specific i/o so I want to hide all this in a class. I'm imagining
13
16730
by: Charulatha Kalluri | last post by:
Hi, I'm implementing a Matrix class, as part of a project. This is the interface I've designed: class Matrix( )
2
1415
by: Sky Sigal | last post by:
Hello: I'm currently messing around, and need as much feedback/help as I can get, trying to find the most economical/graceful way to build usercontrols that rely on styling to look any good... It's the last part that has got me all frazzled (the 'rely on...to look good')... Let me explain -- and please bear with me as it's a bit longer than my usual questions:
3
1896
by: mystilleef | last post by:
Hello, I need to design a plug-in system for a project. The goal is to allow third party developers interact with an application via plug-ins in a clean and robust manner. At this point I am overwhelmed by my inexperience with designing plug-in systems. Are there any good tutorials on how to design good plug-in systems with Python, or any language? What are the best
10
3322
by: Sruli | last post by:
Hi C++ gurus, I'm developing a software product with a C++ API. My concern is how to design the API so that future versions of the API will be binary compatible with applications that use the older API version. E.g., suppose a customer application calls version 1 of the API. I develop version 2, which has more public methods and variables. How can I make sure that the old application works properly with the new API
3
2102
by: Phocas | last post by:
Hello everyone. I've been using C++ for many years now, and I am starting to work on my first large project which has many different components. Some of these components do extremely performance critical things like scientific computations and ray-tracing. These are done for many iterations so the code should run as fast as possible. On the other hand, I also want the code to make sense to people, be easy to understand and modify,...
1
1317
by: anujaf | last post by:
I'm a VB 6 programmer. I want jump to Web designing. I would like to know what is the best web designing tool which can be intergrated with the ASP .net and what is the best book to learn web designing tools. anuja_lak@yahoo.com
0
1214
by: anujaf | last post by:
I'm a VB 6 programmer. I want jump to Web designing. I would like to know what is the best web designing tool which can be intergrated with the ASP .net and what is the best book to learn web designing tools. <send me a PM>
0
9522
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9336
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9948
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.