1 / 3

Properties of LL(1)

Properties of LL(1). No ambiguous or left recursive grammar can be LL(1). Grammar G is LL(1) iff whenever A   |  are two distinct productions of G and: For no terminal a do both  and  derive strings beginning with a . FIRST(  )FIRST()=

koko
Download Presentation

Properties of LL(1)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Properties of LL(1) • No ambiguous or left recursive grammar can be LL(1). • Grammar G is LL(1) iff whenever A| are two distinct productions of G and: • For no terminal a do both  and  derive strings beginning with a. FIRST()FIRST()= • At most one of  and  can derive the empty string. • If , the  does not derive any string beginning with a terminal in FOLLOW(A). FIRST(FOLLOW(A))FIRST(FOLLOW(A))= *

  2. LL(1) Grammars: Example

  3. Non-LL(1) Grammar: Example

More Related