1-2: Making Compiler Design Relevant for Students
It is incredible to think about all the potential that learning all the phases of how to build a compiler have. In the paper, the author talks a lot about of the importance of learning this topic. The paper starts saying that most of the students thinks that making a compiler it is a thing that they will not ever use in the future and how wrong they were.
I liked a lot of how the author let us know that we can use all the knowledge learned in this subject to solve real life problems it is amazing. One of the examples that I found interesting was the translator of LaTeX syntax to HTML syntax. The interesting part is the way the author put this, he says that we need to think this as a translation problem; the first step in order to solve this problem is to get the RegEx expression in order to start making the tokens and go to the next phase of the creation of a compiler. The real difficult problem was to process all the special syntax of the LaTeX (things like tables, references and images), in this precise moment I do not have any clue of how to solve this problem, but I am pretty sure that I will get the necessary knowledge in order to solve it (sooner or later).
Also, I think it is necessary to enumerate the phases the author describe in order to build a compiler:
- Lexical Analysis and Parsing: in this phase you get all the respective tokens. These tokens are obtained by using RegEx in order to get them. Before getting the tokens, the next step is imposing the structure on the sequence of words and punctuation obtained in the tokenization.
- Semantic Analysis: refers to the computation and propagation of information that is not part of the context-free syntax of the language.
- Code Generation: is the process of traversing the tree representation of a program to generate assembly or machine code for the target machine.
- Optimization: last but not least, optimization stands for code transformation in order to make the program run faster.
In this moment I am excited enough that in this course I will have the opportunity to build a small compiler (because is the final project of this subject).
Comentarios
Publicar un comentario