Related articles |
---|
how to write a new programming language? ahabma@yahoo.com (2003-03-30) |
Re: how to write a new programming language? Nonahin@yaHoo.coM (LeeB) (2003-03-30) |
Re: how to write a new programming language? torbenm@diku.dk (2003-03-31) |
Re: how to write a new programming language? joachim_d@gmx.de (Joachim Durchholz) (2003-04-05) |
From: | LeeB <Nonahin@yaHoo.coM> |
Newsgroups: | comp.compilers |
Date: | 30 Mar 2003 21:14:53 -0500 |
Organization: | Arizona State University |
References: | 03-03-175 |
Keywords: | practice |
Posted-Date: | 30 Mar 2003 21:14:53 EST |
I am not a "wizard" yet, but someday I want to be really good at
building compilers.
Here is my recommendation for getting started:
0) know C or C++...and understand pointers.
1) download, read, learn, play with 'flex'.
flex is free software and it allows you
to take a bunch of characters and form
tokens.
2) download, read, learn, play with 'bison'.
bison is free software and it allows you
to take a bunch of tokens and form
statements and meaningful blocks of code.
3) know about your basic data structures,
like hash tables and trees.
4) write many "programs" in your imaginary language.
When you have a good idea of what you would like
it to be like, you can express it in the regular
expressions and BNF notation with flex and bison
(respectively).
5) you may want to start with a simple language first.
i.e., implement a primitive calculator language or
something. Also, you may want to build an INTERPRETER
first, because to write compilers you must understand
machine language to write COMPILERS.
Good luck,
LeeB
> To copmiler wizards ..
> If I would like to create a new language from scartch. What should I
> do? which tools would help me?
> Thanks in advance.
> [I'd look for freely available compilers or interpreters for languages
> like yours and read the code. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.