{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

S s s 2 s s s 3 s winter 2013 uw

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: UW CSE 401 (Michael Ringenburg) 14 LL(1) Property CSE341: Programming CSE341: Programming Languages Languages •  A grammar has the LL(1) property if, for all Lecture 1 Lecture 1 Course Course Mechanics Mechanics non- terminals A, if producVons ML Variable Bindings M a Variable Bindings A ::= α L nd A ::= β both appear in the grammar, Dan Grossman he cGrossman then it is t Dan ase that Fall 2011 FIRST(α) FIRST(β) = ØFall 2011 •  If a grammar has the LL(1) property, we can build a predicVve parser for it that uses 1- symbol lookahead Winter 2013 UW CSE 401 (Michael Ringenburg) 15 LL(k) Parsers CSE341: Programming Languages C •  An SE341: arser LL(k) p Programming Languages Lecture 1 Lecture 1 –  Scans the input LeP to right Course Course Mechanics Mechanics –  Constructs a LePmost derivaVon ML Variable Bindings ML Variable Bindings –  Looking ahead at most k symbols Grossman Dan Grossman nough f •  1- symbol lookahead is eDan all 2011 or F Fp 2011 many pracVcal allrogramming language features Winter 2013 UW CSE 401 (Michael Ringenburg) 16 Table- Driven LL(k) Parsers CSE341: Programming CSE341: Programming Languages Languages •  As with LR(k), a table-...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online