How do i write a compiler

This is a discussion on How do i write a compiler within the C++ Programming forums, part of the General Programming Boards category; Could anyone tell me how to write a compiler. If possible could anyone give me a link to writing a ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    69

    How do i write a compiler

    Could anyone tell me how to write a compiler. If possible could anyone give me a link to writing a compiler preferably in c/c++. I decided i wanted to write a compiler just for the heck of it thanks if u can help!

  2. #2
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    its not just im gonnna make a compiler. most people have a phd in computers. searhc google if you really wan t make one. i saw a ten poage tutorial there once. i donwlaoded it but ive lost it
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,699
    Making a compiler isn't truly that hard. But I also don't know what sort of compiler you are making. Compiling assembly code into an exe is really straight forward. C/C++, Pascal, Fortran (and all the others) is a little more challenging because the compiler is expected to generate the assembly code. JAVA, J#, and C# and all those languages shouldn't be too hard to compile.

  4. #4
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    i found my tutorial onmy computer for writng a compiler, i cant attach it to th baord cause fo its size, e-mail me or aim me and ill send it to u
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  5. #5
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    You can find some tools to write a compiler or to construct your own language here:
    www.thefreecountry.com/developercity

  6. #6
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Posts
    5,439
    Making a compiler isn't truly that hard.
    Trivial, huh?
    Code:
    int main(void){srand(time(0));for(double l=rand(),l0=0,l00=0;;l0+=0.1){for(double l000=0;l000
    <1;l000+=.001,l+=((double)rand()/RAND_MAX)/0x64,l00+=((sin(l*0x8*atan(l0)*l000-(l0*0x8*atan
    (l)))*0.5)+0.5)){l00-=floor(l00);for(size_t l0000=0,l00000=(size_t)(0x50*(l00));l0000<l00000;++l0000
    )putchar(0x20);putchar(0x61+(int)((double)rand()/RAND_MAX*0x1a));putchar('\n');}}return 0;}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Which Compiler?
    By Bladactania in forum C Programming
    Replies: 10
    Last Post: 02-11-2009, 12:32 AM
  2. [resolved] internal compiler error...
    By bling in forum C++ Programming
    Replies: 2
    Last Post: 12-10-2008, 11:57 AM
  3. read write lock in C#
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 04-16-2008, 08:49 AM
  4. Have you ever written a compiler?
    By ammar in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 12-27-2004, 06:10 AM
  5. compiler gone haywire?!
    By patito12 in forum C Programming
    Replies: 5
    Last Post: 11-13-2004, 05:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21