![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Aug 2005
Location: Norway
Posts: 56
Rep Power: 0
![]() |
Hello Folks! One question about Compiler-compiler
Hello!
This is my second thread here. My first thread was wrong placed and little messed up. So, I'm new here! But I have a question! Is Compiler-compiler used to let you make your own Compilers? Excuse my English. I'm from Norway.
__________________
Heh. |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Yes, generally in conjunction with other tools such as lexical analyzers. Welcome.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
|
welcome ... i never heard about a compiler-compiler.
__________________
From the bottom of the stone steps... ...i'm calling still. |
|
|
|
|
|
#4 |
|
Programmer
Join Date: Jul 2005
Location: Germany
Posts: 69
Rep Power: 4
![]() |
Welcome,
and i think this is topic is the wrong place for your question again ![]() i think what u mean is a parser generator. It takes more to build a compiler than parsing correct syntax (lexical-analysis,semantic-actions and so on). Usually compilerbuilders build a "dirty" compiler in a different language than the one the compiler is supposed to compile. They then use this dirty compiler to compile a compiler written in the language the compiler is supposed to compile. This is called boot-strapping. So this dirty compiler is what i call a compiler-compiler gg
__________________
-= C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do succeed, you will blow away your whole leg. =- Bjarne Stroustrup |
|
|
|
|
|
#5 |
|
Programmer
Join Date: Aug 2005
Location: Norway
Posts: 56
Rep Power: 0
![]() |
I read some place that Pascal was built for making Compilers.
My dream is to make a powerfull Compiler, there is one goal: To make your own Compilers.
__________________
Heh. |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
One of the early Unix utilities was YACC, which stands for "Yet Another Compiler Compiler."
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#7 |
|
Programmer
Join Date: Jul 2005
Location: Germany
Posts: 69
Rep Power: 4
![]() |
@DaWei nomen est (not allways) omen.
I think the naming is a bit confusing as , and i'm sure u know that, yacc which is a predecessor of bison just eats in grammar-files and spits out a parser written in C. It does not a compile a compiler or things like that. The grammarsyntax is very similar to BNF or EBNF i believe, though my bison-times are over for a fair few years by now. I don't know it for sure but i think yacc produces a bottom-up (shift-reduce)-parser as it is capable of handling left-recursion as far as i'm concerned. But again you do not have a full-blown compiler just by generating a parser.
__________________
-= C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do succeed, you will blow away your whole leg. =- Bjarne Stroustrup |
|
|
|
|
|
#8 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|