Thread: Making a compiler.

  1. #16
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Originally posted by Perica
    Hey,

    the only one that worked is the one that Magos wrote, i use MS VC++ 6 by the way.

    But i got a question, how come when you do strcmp, do you check if the strings are equall to 0??
    If the strings are equal, strcmp returns 0. If the first string is "larger" than the second, strcmp returns a positive integer (showing which element that differs). If the first string is "smaller" than the second, strcmp returns a negative integer (showing which element that differs, you have to use abs() on this since its negative).
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  2. #17
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    thanks,

    now, what is a parser?

  3. #18
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    Parsing is a set of techniques for going from a grammer
    to a runnable language. There are programs that
    do this automatically http://dinosaur.compilertools.net/

  4. #19
    eat my shorts!
    Join Date
    Apr 2002
    Posts
    294
    Perica do not ever think of even making a compiler cuz it is gona take you forever (ie: about 3 - 5 years).
    But if you still want to, then learn the basic concept of C or C++ (C++ prefered), and then move up the difficulty ladder. Then some day you will know by yourself that if you are able to make a compiler (and that day is really really far).


    I am not discouraging you but... well...

  5. #20
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    compilers are easy. comedy is difficult.
    .sect signature

  6. #21
    Registered User
    Join Date
    Sep 2002
    Posts
    70
    I don't care how long it takes,

    But where do i start?

  7. #22
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    You can use LEX and YACC to build your own compiler.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dev C++ Compiler, Indentation?
    By Zeusbwr in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2004, 06:13 AM
  2. lcc win32 compiler download problems
    By GanglyLamb in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 08-01-2004, 07:39 PM
  3. OpenScript2.0 Compiler
    By jverkoey in forum C++ Programming
    Replies: 3
    Last Post: 10-30-2003, 01:52 PM
  4. Compiler Design... Anyone That Can Help!
    By ComputerNerd888 in forum C++ Programming
    Replies: 3
    Last Post: 09-27-2003, 09:48 AM
  5. help with making Borland C++ compiler work
    By Masada in forum C++ Programming
    Replies: 3
    Last Post: 06-29-2003, 11:02 AM