2-1: "Internals of GCC"

The very first thing that the podcaster said it is that the real name for GCC is Gnu Compiler Collection, it is important to know this because at the end it is the jargon of Computer Science and general culture among the computer scientific.

So, let's start. First of all, we need to remember all the stages when we want to build a compiler in order to know how GCC internally works. So, the first thing that we will cover in this blog entry it is the lexical analysis; in this stage the compiler will strip down all the characters or character stream into a token stream this is, that the compiler will check if that tokens are reserved words or are variables that will be token in that program.

In order to keep the second phase simple enough in this phase you create the abstract syntax tree (this is how we need to create the tree in order to produce or compute the operations in the order they are provided). In the third phase, like the podcaster said, the compiler needs to check if the variables were decelerated in the earlier phases in order to compute the operations (in this phase the tokens acquire meanings to the compiler, other than that word was a simple token). Last but not least, the final phase is the code generation (a translation from a higher order language into a low order language, i. e. from C - higher language to Machine Code - low language).

Now talking specifically of the GCC, we need to put on the table that this compiler has a lot of advantages, like it is flexible, portable; this means, you can have it on a Linux Computer, on a MacOS Computer even on a Windows Computer. Also, it accepts different source files inputs like ADA, Fortran, C++, C, to name a few.


Comentarios

Entradas populares de este blog

1-2: Making Compiler Design Relevant for Students

2-2: Mother of Compilers

1-3:“The Hundred-Year Language”