Compiler Design
#1

CSE302:Compiler Design

[attachment=18124]
Top-Down Parsing
Finding a leftmost derivation for an
input string
Recursive-descent parsing
Predictive parsing for LL(1) grammars
Non-recursive version


An Example
Balanced parentheses
S → ( S ) S | ε
Input string: ( )
Parsing stack Input buffer Action
… … …
This process reflects the rightmost derivation
but in a reverse order
Right-sentential forms
Grammars are always augmented with a new
start symbol
When to shift and when to reduce depend
on the parsing states



The LR(0) Parsing Algorithm
LR(0) parsing cannot handle a
grammar that in its DFA there is a
state s
s contains a shift item A → α.Xβ and a
complete item B → δ.
s contains two complete items A → γ.
and B → δ.



Another Example
A → ( A ) | a
LR(0) items, NFA, and DFA
Schematic view for parsing ((a))
Reply
#2

Compiler design


.ppt   Compiler.ppt (Size: 166 KB / Downloads: 5)

What is a Compiler?

Example of tasks of compiler
1. Add two numbers
2. Move numbers from one location to another
3. Move information between CPU and memory

Lexical Analysis

First phase of compiler
isolate words/tokens

Example of tokens:
key words – while, procedure, var, for,..
identifier – declared by the programmer
Operators – +, -, *, /, <>, …
Numeric – numbers such as 124, 12.35, 0.09E-23, etc.
Character constants
Special characters
Comments

Syntax Analysis

What is Syntax Analysis?
Second phase of the compiler
Also called Parser

What is the Parsing Problem?

How is the Parsing problem solved?

Example
Process to construct a Pushdown Machine
Build a table with each column labeled by a terminal symbol (and endmarker ) and each row labeled by a nonterminal or terminal symbol (and bottom marker )
For each grammar rule of the form A  a, fill in the cell in row A and column a with with: REP(ra), retain, where r represents  reversed
Fill in the cell in row a and column a with pop, advance, for each terminal symbol a.
Fill in the cell in row  and column  with Accept.
Fill in all other cells with Reject.
Initialize the stack with  and the starting terminal.


Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Tagged Pages: compiler design seminar topics, general seminor topics on compiler design,
Popular Searches: compiler design, code generation compiler design, code generation in compiler design, code generation algorithm in compiler design, code generation in compiler design ppt, compiler design in java tutorial, thesis topics on design compiler,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  design and manufacturing of tilting conveyor seminar addict 1 2,392 18-03-2016, 04:35 PM
Last Post: computer science crazy
  DESIGN AND FABRICATION OF AN AQUA SILENCER seminar addict 2 5,899 07-04-2015, 11:53 AM
Last Post: Kishore1
  Design and manufacture of White Metal Thrust Bearing seminar details 1 1,702 14-02-2013, 12:41 PM
Last Post: Guest
  Modern VLSI Design seminar addict 1 3,506 13-12-2012, 12:44 PM
Last Post: seminar details
  EMBEDDED DESIGN FOR POWER SAVING SYSTEM FOR POWER OPTIMIZATION project uploader 4 2,695 10-11-2012, 11:53 AM
Last Post: seminar details
  DESIGN AND IMPLEMENTATION OF LASER BASED HOME SECURITY SYSTEM seminar addict 1 2,379 22-10-2012, 02:29 PM
Last Post: seminar details
  VLSI Design and Implementation of Low Power MAC Unit with Block Enabling Technique project uploader 1 1,662 02-10-2012, 01:09 PM
Last Post: seminar details
  VLSI design of median filter seminar paper 1 1,590 02-10-2012, 01:09 PM
Last Post: seminar details
  Trends in Low-Power VLSI Design project uploader 1 2,114 02-10-2012, 01:08 PM
Last Post: seminar details
  Introduction to VLSI Design ppt seminar paper 1 2,196 02-10-2012, 01:08 PM
Last Post: seminar details

Forum Jump: