Results 1 to 4 of 4

Thread: can i make a compiler w/ VC++?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2001
    Posts
    421

    Question

    I know it's possible to make a program that compiles things into .exe's but does anyone know how to do this? If so, can you send me some source please? Thanks.
    [vbcode]
    ' comment
    Rem remark
    [/vbcode]

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I think it would be a lot of source code. You need to know the assembly language for the machine your compiler will run on, and you need to establish how a C (or C++) statement is represented in assembly instructions. You compile the C code down to assembly, then assemble the assembly code to binary machine code.

    It's far more complicated than that when it comes to optimisations though. You also need error checking to make sure it's valid code.
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    Guest
    1. Yes a compiler can be made with any language and any compiler.

    2. I found some very good text on how to make one in pascal, and it was actually kind of easy to follow, but i dont have it anymore sorry. If i can find it, ill give you the link.

  4. #4
    Addicted Member
    Join Date
    Jan 2001
    Location
    Little Rock, Ar
    Posts
    151

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width