COMPILER SOURCE CODE = COMPILER = MACHINE CODE
. A compiler is a complex machine that bridges the gap between 1.LEXICAL ANALYSIS
human-readable code and computer readable code
. The compiler first divides the source code into TOKENS. It’s
. At low level computers can only a small number of things kind of like a compiler is figuring out what the words are in the
. They can read and write to memory, and they can do math with program.
numbers they are holding
2.SYNTACTIC ANALYSIS
. An executable program is the one generated by a compiler
. The tokens are organized into a hierarchical structure known as
. an executable program is also a list of instructions for the processor a PARSE TREE, which is like figuring out what the gramma is in
to follow, written in binary. the program
. The instructions like… read these bites from memory, jump forward
this many lines, jump back this many lines, but only if this flag is set
3.SEMENTIC ANALYSIS
. The compiler recovers context about the program, including
MACHINE CODE variable function names.
. The machine code is a program expressed in a list of binary . this is the stuff that the compiler needs to keep track of in
instructions. different parts of the program.
. It is also the kind of programing that your computer can read . In our case the only contact we need is the variable (X) and the
main function is not that important.
SOURSE CODE
. The final step is to reverse the parse tree and figure out some
. Source code is a version of a program that a human understands.
machine code that would effectively do the same thing as a
THE FUNCTION OF A COMPILER source code.
Typically the does not go straight from the parse tree to the machine code it first
The compiler’s job is to take the source find the tokens, parses, contextualizes, and generates
code which is Human-readable and turns it
into machine code which is computer-
readable
. A compiler is a complex machine that bridges the gap between 1.LEXICAL ANALYSIS
human-readable code and computer readable code
. The compiler first divides the source code into TOKENS. It’s
. At low level computers can only a small number of things kind of like a compiler is figuring out what the words are in the
. They can read and write to memory, and they can do math with program.
numbers they are holding
2.SYNTACTIC ANALYSIS
. An executable program is the one generated by a compiler
. The tokens are organized into a hierarchical structure known as
. an executable program is also a list of instructions for the processor a PARSE TREE, which is like figuring out what the gramma is in
to follow, written in binary. the program
. The instructions like… read these bites from memory, jump forward
this many lines, jump back this many lines, but only if this flag is set
3.SEMENTIC ANALYSIS
. The compiler recovers context about the program, including
MACHINE CODE variable function names.
. The machine code is a program expressed in a list of binary . this is the stuff that the compiler needs to keep track of in
instructions. different parts of the program.
. It is also the kind of programing that your computer can read . In our case the only contact we need is the variable (X) and the
main function is not that important.
SOURSE CODE
. The final step is to reverse the parse tree and figure out some
. Source code is a version of a program that a human understands.
machine code that would effectively do the same thing as a
THE FUNCTION OF A COMPILER source code.
Typically the does not go straight from the parse tree to the machine code it first
The compiler’s job is to take the source find the tokens, parses, contextualizes, and generates
code which is Human-readable and turns it
into machine code which is computer-
readable