20100928

20100928 - = CS 441 Fall 2010 JWJ Pre-class notes do not...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
============================ CS 441 Fall 2010 -- JWJ Pre-class notes - do not distribute Tuesday, September 28, 2010 ============================ Scope: ------ LL(1) grammars and LL(1) parsing Outline: ------- Model for LL(1) parsing. Constructing LL(1) parse tables. Configurations Review of recursive-descent parsing =================================== Grammar S -> a S b | S b | b B B -> b B B | b B a | epsilon a) is this grammar suitable for Recursive-descent parsing? b) compute nullable symbols c) compute FIRST and FOLLOW sets d) write parse procedures for the nonterminal symbols. c) what is the sequence of calls? Removing left recursion (the case of immediate left recursion) For each rule of the form A --> A alpha_1 | . .. | A alpha_n | beta_1 | . .. | beta_m where: * A is a left-recursive nonterminal * alpha is a sequence of nonterminals and terminals that is not null * beta is a sequence of nonterminals and terminals that does not start with A. replace the A-production by the production:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 3

20100928 - = CS 441 Fall 2010 JWJ Pre-class notes do not...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online