1 / 6

Homework #4

Homework #4. J. H. Wang Nov. 15, 2011. Homework #4. Chap. 5 5.2 Chap. 6 6.1 6.2 6.23. Chap. 5

beata
Download Presentation

Homework #4

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. Homework #4 J. H. Wang Nov. 15, 2011

  2. Homework #4 • Chap. 5 • 5.2 • Chap. 6 • 6.1 • 6.2 • 6.23

  3. Chap. 5 • 5.2: Construct the LL(1) parse table for the following grammar: Expr - Expr | ( Expr ) | Var ExprTail ExprTail - Expr | λ Var id VarTail VarTail  ( Expr ) | λ

  4. Chap. 6 • 6.1: Build the CFSM for the following grammar: Prog Block $ Block  begin StmtList end StmtList  StmtList semi Stmt | Stmt Stmt  Block | Var assign Expr Var id | id lb Expr rb Expr Expr plus T | T T  Var | lp Expr rp

  5. 6.2: Show the LR parse table for the CFSM constructed in 6.1. • 6.23: Complete the SLR(1) construction for the grammar shown in Fig. 6.26. Show the resulting parse table.

  6. Submission • Hand-written exercises: hand in your paper version in class • Due: two weeks (Dec. 6, 2011)

More Related