473,395 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Making Compiler in C++

Hi,
I have a project on Compiler and I have to implement the code, and I
want some suggestions about how can I make code efficient while
implementing Lexical Analyzer, Parser and Intermediate code generation
and as well as to Optimize the generated code.

Thanks in Advance.
Aug 13 '08 #1
2 1683
le*******@gmail.com wrote:
Hi,
I have a project on Compiler and I have to implement the code, and I
want some suggestions about how can I make code efficient while
implementing Lexical Analyzer, Parser and Intermediate code generation
and as well as to Optimize the generated code.
By using the right tool for the right job. In this case, use a
lexer/parser generator to generate the parser. Feel free to use C++ for
the semantic portions (or grammar annotations).
Aug 13 '08 #2
le*******@gmail.com wrote:
Hi,
I have a project on Compiler and I have to implement the code, and I
want some suggestions about how can I make code efficient while
implementing Lexical Analyzer, Parser and Intermediate code generation
and as well as to Optimize the generated code.

Thanks in Advance.
Try

http://llvm.org/

It has automated all the grungy stuff regarding making a compiler and
has comprehensive info and support of optimisation, and it has a C++ API.

Its cool .. !

also could ask on comp.compilers

regards
Andy Little
Aug 13 '08 #3

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

Similar topics

1
by: Michael Chermside | last post by:
I (Michael Chermside) wrote: > a brace and either way it throws the logic off. I created a > bug in one of > my programs recently just by adding logging. It looked like this: > > if...
7
by: TTA | last post by:
I'm an intermediate C++ programmer. My skills are good but they need to be fine-tuned and my software methodologies in theory are good but I need more practical experience . I am still in...
85
by: masood.iqbal | last post by:
I know that this topic may inflame the "C language Taleban", but is there any prospect of some of the neat features of C++ getting incorporated in C? No I am not talking out the OO stuff. I am...
3
by: Visually Seen # | last post by:
Hey everybody, I want to create my own programming language, using C#. Could anyone give me some tips, advice on this goal? Let's say that in my programming language uses the keyword, integer...
3
by: Peteroid | last post by:
Is it possible to make a public parent class method unavailable (i.e., generate an error at compile time) to a particular child class? For example, say a parent class has a public method Add( )....
351
by: CBFalconer | last post by:
We often find hidden, and totally unnecessary, assumptions being made in code. The following leans heavily on one particular example, which happens to be in C. However similar things can (and...
10
by: JurgenvonOerthel | last post by:
Consider the classes Base, Derived1 and Derived2. Both Derived1 and Derived2 derive publicly from Base. Given a 'const Base &input' I want to initialize a 'const Derived1 &output'. If the...
12
by: Premal | last post by:
Hi, I tried to make delete operator private for my class. Strangely it is giving me error if I compile that code in VC++.NET. But it compiles successfully on VC++6.o. Can anybody give me inputs...
50
by: Juha Nieminen | last post by:
I asked a long time ago in this group how to make a smart pointer which works with incomplete types. I got this answer (only relevant parts included): ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.