100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary The function of a compiler R153,00   Add to cart

Summary

Summary The function of a compiler

 5 views  0 purchase

This document describes the function of a compiler

Preview 1 out of 1  pages

  • August 4, 2022
  • 1
  • 2022/2023
  • Summary
All documents for this subject (7)
avatar-seller
ngxinjanaazille
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller ngxinjanaazille. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R153,00. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67474 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R153,00
  • (0)
  Buy now