|how to write a new programming language? firstname.lastname@example.org (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? email@example.com (2003-03-31)|
|Re: how to write a new programming language? firstname.lastname@example.org (Joachim Durchholz) (2003-04-05)|
|Date:||30 Mar 2003 21:14:53 -0500|
|Organization:||Arizona State University|
|Posted-Date:||30 Mar 2003 21:14:53 EST|
I am not a "wizard" yet, but someday I want to be really good at
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
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
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.
> 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
Search the comp.compilers archives again.