What do I need to read in in order to :
- understand the specs of an already made programming language
- Design a programming language
- Design a compiler and assembler for that language
- make an architecture of a processor
Asked By : Eng_Boody
Answered By : Ahmed Hamdy
I know you mean, it is not an easy task, yet you can do it.
For point 1: You can do that by:
- Quick reading the documentation of the programming language you want to learn.
- Practice on the topics you want to get the maximum benefits of.
- Mainly all of the programming languages have a lot of common specs, you can map the language you want to learn to a language you already learned.
- From my experience, each programming language has its own uniqueness, the thing it is adding. I think you should focus on that spec of the language. Like C and pointers, Ruby on Rails and Meta Programming, ... etc
For point 2: Designing a programming language is not an easy task, you need to consider what your programming language will add, are what it adds already there in another programming language? Why people will use it? What is the problem your programming language will solve?.
If you answered all of the above questions, then let's move on to see wow are you going to make it.
There are a lot of online courses about programming language design.
First of all the structure; will it use compiler or interpreter, will it have a virtual machine or it will will run natively on the OS, what will be the steps of building and running the code
Does the programming language will be high level or low level or middle?
- Does it will be OOP or Structural programming, or a good mux like Scala?
- What will be the syntax like? How to terminate the line?
- Handling call by reference and call by value
- A lot of aspects remaining, honestly I don't know all of them...
For point 3: If you want to design a compiler, then there is a whole life out there, this science already settled, you will have to make the grammar tree and the dependency. You studied Assembler before, there is another course for compiler, it is basicly the same concept but it is harder because you will have grammar here.
Many many courses are out there specially for the purpose you want, just search with keyword compilers.
For point 4: This point is out of the above scope, it is on the other side, if you are concerned about creating a new programming language, then you shouldn't worry about the processor architecture unless your language is a low level programming language. Mainly, it is another track if you want to design your own architecture, there are many steps to design a processor's architecture:
- Thinking about the design itself, is it will be dual or single core, down this processes based on pipeline, ...etc.
- Drawing the design.
- Writing the design with one of hardware describing language like VHDL, Verilog.
- Synthes the design and make sure it will work
- Simulation phase
- Deploy the design on FPGA (There may be other boards...) This will allow you to test your design on hardware too not only software tests.
- You are done and you can start making the specific hardware for your design
- There are courses for this matter, you should first study architecture courses, then studying VLSI, people are pursuing master degree in the VLSI and how to design the architecture
I am not an expert in all of that, but I answered it from my humbled experiences, I hope I benefits you, if I have anything more, I will edit the answer to add it isA.
Please feel free to discuss anything with me.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/35706
0 comments:
Post a Comment
Let us know your responses and feedback