Compiler design unit 2 notes

2 Bottom-Up Parsing

Constructing a parse tree for an input string beginning at the leaves and going towards the root is called bottom-up parsing.
A general type of bottom-up parser is a shift-reduce parser.

How is a machine code generated by a compiler?

If machine code is to be generated by the compiler, then the position of each data object relative to a fixed origin must be ascertained.
The compiler has to do the allocation in this case.

Syntax Analysis

2 ROLE OF THE PARSER

What does a compiler do?

Compiler:

  • Is a translator that takes as input a source program written in high level language and converts it into its equivalent target program in machine language.
    In addition to above the compiler also Reports to its user the presence of errors in the source program.
    Facilitates the user in rectifying the errors, and execute the code.

  • Categories

    Compiler design unit 4
    Compiler design unit 1
    Compiler design using python
    Compiler design unit 3 notes
    Compiler design using c++
    Compiler design uses
    Compiler design unit 4 notes
    Compiler design unit 2 ppt
    Compiler design unit 1 pdf
    Compiler design viva questions with answers
    Compiler design video lectures
    Compiler design viva questions geeksforgeeks
    Compiler design virtual machines
    Compiler design vtu notes
    Compiler design vtu syllabus
    Compiler design vtu question papers
    Compiler design virtual lab
    Compiler design viva questions javatpoint
    Compiler design w3schools
    Compiler design weightage in gate