Creation of programming languages

This is a discussion on Creation of programming languages within the A Brief History of Cprogramming.com forums, part of the Community Boards category; How does one create a programming language? Do they simple make up a syntax and create a compiler? How does ...

  1. #1
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949

    Creation of programming languages

    How does one create a programming language? Do they simple make up a syntax and create a compiler? How does the compiler make machine code? Thanks for the answers !
    Do not make direct eye contact with me.

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Virtually impossible to answer those questions in one post - or one book for that matter. Look those topics up on www.google.com and have at it. There are a ton of sites that talk about this.

    Randall Hyde's book also talks about how to build compilers, lexical analyzers, etc. You can get it at cs.webster.edu I think. Damn I always forget that link.

    Just look up Randall Hyde's AOA on google and it will pop up.

  3. #3
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    "make up syntax" is a complicated topic but suffice it to say that there are some tests it should pass. Proofs that it'll always work so to speak. This allows a compiler to be written. I hope you aren't on the "I wanna make a compiler" kick. If so, I wish you well
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  4. #4
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    "I wanna make a compiler"
    lol, that is actually one of the projects i have to do my senior year in college for my comp sci major.

  5. #5
    Registered User codegirl's Avatar
    Join Date
    Jun 2003
    Posts
    76
    If you're comp sci major, then I'm sure you'll learn more than you ever wanted to know about such things in a Programming Languages and/or Compilers course.... I know I sure did :P
    My programs don't have bugs, they just develop random features.

  6. #6
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    There's a program on CNet that lets you do this quite easily, but I imagine it's mostly cookie-cutter options type things. I've got a book on assembly that gives you the machine code for all sorts of things. I was going to make a CGI assembler and put it on the web, but I couldn't figure out how to get operands and stuff like that coded in, so I gave up. DOing web programming as a job soon, (like, starting next month - hence the crappy homepage for the time being) I'd love to have something like that, so if anyone solved this problem, like CS majors, please contact me.

  7. #7
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    The problem is not getting operands, the problem is the CISC set. It's so complex and the encoding gets very involved. But it can be done via bit patterns and things like cellular automata. I've not attempted it but you basically break expressions down and find commonalities to them. After a few base expressions, you can then recursively search through them to create new complex expressions - since complex expressions are really just multiple base expressions.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 01:40 PM
  2. Newton + Einstein were wrong!
    By Jez in forum A Brief History of Cprogramming.com
    Replies: 64
    Last Post: 12-14-2004, 01:24 PM
  3. Languages dying
    By Zewu in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 07-29-2003, 10:08 AM
  4. Languages
    By KrAzY CrAb in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 02-18-2003, 11:23 AM
  5. Programming Languages
    By DarkViper in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-12-2002, 01:28 PM

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