Advertisement

Making a new programming language...

Started by January 21, 2002 03:50 AM
4 comments, last by Maiku 22 years, 10 months ago
On SourceForge I found some projects that included the group creating their own programming language. Now sorry if this is a complete newbie question, but how are new programming languages made?
It all starts with a dream...
Advertisement
Making a "new programming language" usually translates to building a compiler. That's quite an involved subject - our Compilers course at university spanned two terms, and we still only got the "basics" of a compiler.

There are several good books on the subject (Modern Compiler Implementation in C/Java/ML is the textbook we used).

Basically, you start off with a "Lexer" - something that converts a text-file into something more computer-readable. Then, a "Parser" converts the output of a lexer to an abstract syntax tree (have I lost you yet?). Then, the compiler back-end converts the abstract syntax tree into a stream of assembler commands, using various techniques.

If you want to learn more about it, I suggest you try to find a book about it, or search the net for a compiler tutorial, I think there are a few around.


Edited by - MadKeithV on January 21, 2002 7:11:11 AM
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
trying to learn a language is one thing but making a whole new one?!

very ambitious! but I wish you good luck
Why would you want to? Be sure that it has a use, or do it just for fun

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
I don''t want to make one.. I was just curious on how they were made.

This topic is closed to new replies.

Advertisement