Link to home
Start Free TrialLog in
Avatar of kashifmasood
kashifmasood

asked on

Syntax Analyzer(Parser) for C++

What Parsing technique is used in Turbo C++ Compiler.
What type of error recovery is used in Turbo C++ Compiler.
Is any site you know from where i can find Source Code of Compiler or even Parser of Turbo/Borland C++ coded in C++.
Avatar of scrapdog
scrapdog
Flag of United States of America image

I think if you pay Borland $1000000, they might let you *peek* at the source code...
Avatar of messiah
messiah

Intense parsing
Intense error recovery

$1,000,000 might get you a glimpse, but if you are ready and willing, go to the president of Borland with a cigar and go from there.

Trying to write a compiler is tedious and a pain in the ass. Once you get past the parsing, you have to generate decent optimized asm code out of the language, it's not an easy task.
I tried writing my own INTERPRETER, that is, there were no EXEs.  Wow, what a pain.  It worked okay, even fairly fast, but it was not worth the effort (the language was more cryptic that assembly and it was slower than BASIC)! :-)

What do you want to accomplish?  If this is for fun, then by all means try it, but otherwise, I fail to see the point :-)
Who cares?  If you really want to dive into a good C++ compiler's source, check out gcc.  Pick up a good book on compiler design too.  You could get lost in there for years.
Avatar of kashifmasood

ASKER

Adjusted points to 150
Dear Friends
 I will be fair and thankful in the case of satisfactory answer

http://www.first.gmd.de/cogent/catalog/

This site doesn't have a C++ compiler that I know of, but it contains some useful info that might be of interest to you.
Visual Parse++ looks promising.  Check out:

http://www.sand-stone.com/frvpdesc.htm

Search the web for bison, lex, flex, yacc, byacc, and you'll
find other parsing tools, as well.

Chances are good that Borland uses its own custom parser.
Chances are also good that you won't find out.  :)

Avatar of ozo
If you get a job programming for Borland, they might pay you to peek at the source code.
ozo - haha good way to put it :-)
ASKER CERTIFIED SOLUTION
Avatar of mnguyen021997
mnguyen021997

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
messaih's aswer is better than mnguyen