Lecture 9 review - PowerPoint PPT Presentation

About This Presentation
Title:

Lecture 9 review

Description:

Title: Array Dependence Analysis and Vectorization with the Chains of Recurrences Framework Author: Robert van Engelen Last modified by: Surfing Created Date – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 4
Provided by: Robertva6
Learn more at: http://www.cs.fsu.edu
Category:

less

Transcript and Presenter's Notes

Title: Lecture 9 review


1
Lecture 9 review
  • What is in the First (a) and Follow (A)?
  • Compute FIRST(X)
  • If X is a terminal then FIRST(X) X
  • If X-gt , add to FIRST(X)
  • If and
    add every none in FIRST( ) to
    FIRST(X). If , add
    to FIRST(X).
  • Compute Follow(A).
  • If S is the start symbol, add to Follow(S).
  • If A-gtaBb, add First(b)- to Follow(B).
  • If A-gtaB or A-gtaBb and bgt , add Follow(A) to
    Follow(B).

2
  • Construct the LL(1) parsing table?
  • With first(a) and follow(A), we can build the
    parsing table. For each production A-gta
  • Add A-gta to MA, t for each t in First(a).
  • If First(a) contains empty string
  • Add A-gta to MA, t for each t in Follow(A)
  • if is in Follow(A), add A-gta to MA,
  • Make each undefined entry of M error.

3
  • LL(1) grammar
  • A grammar whose parsing table has no
    multiply-defined entries is a LL(1) grammar.
  • use one input symbol of lookahead at each step to
    make a parsing decision.
  • No ambiguous or left-recursive grammar can be
    LL(1)
  • A grammar is LL(1) iff for each set of A
    productions, where
  • The
    following conditions hold
Write a Comment
User Comments (0)
About PowerShow.com