1 / 11

ICS 482 Natural Language Processing SLR Parsing

ICS 482 Natural Language Processing SLR Parsing. Muhammed Al-Mulhem March 1, 2009. Constructing SLR Table. Constructing SLR Table. SLR Table - Example. Let us construct the SLR table for the augmented expression grammar. E’ → E E → E + T | T T → T * F | F F → ( E ) | id.

lilly
Télécharger la présentation

ICS 482 Natural Language Processing SLR Parsing

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. ICS 482Natural Language ProcessingSLR Parsing Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem

  2. Constructing SLR Table Dr. Muhammed Al-Mulhem

  3. Constructing SLR Table Dr. Muhammed Al-Mulhem

  4. SLR Table - Example • Let us construct the SLR table for the augmented expression grammar. E’ → E E → E + T | T T → T * F | F F → ( E ) | id Dr. Muhammed Al-Mulhem

  5. SLR Table - Example • Assign numbers to the grammar rules 0) E’ → E 1) E → E + T 2) E → T 3) T → T * F 4) T → F 5) F → ( E ) 6) F → id Dr. Muhammed Al-Mulhem

  6. SLR Table - Example • The first item I0 E’ → ■ E E → ■ E + T E → ■ T T → ■ T * F T → ■ F F → ■ ( E ) F → ■ id • The FSA with all sets of items for the grammar is shown next. Dr. Muhammed Al-Mulhem

  7. SLR Table - Example Dr. Muhammed Al-Mulhem

  8. SLR Table - Example Dr. Muhammed Al-Mulhem

  9. SLR Table - Example Dr. Muhammed Al-Mulhem

  10. SLR Table - Example E’ → E E → E + T E → T T → T * F T → F F → ( E ) F → id Dr. Muhammed Al-Mulhem

  11. SLR Table - Example Dr. Muhammed Al-Mulhem

More Related