Draw The Transition Diagram Based On The Set Of Items Obtained In See Fig 4 31 P 244 2165277
0. E’ -à E
1. E –à E + T
2. E –à E – T
3. E –à T
4. T -à T*F
5. T -à T/F
6. T -à F
7. F -à i
8. F -à n
9. F -à (E)
“i” and “n” represent identifiers and numbers, respectively.
Given the above grammar,
1) generate the set of items (use the algorithm in Fig. 4.32, p245) ), i.e., I0, .. In.
2) Draw the transition diagram based on the set of items obtained in ( see Fig. 4.31, p.244).
3) Compute FOLLOW (A), for each nonterminal A ( see Sect. 4.4.2)
4) Construct the ACTION and GOTO tables (use the algorithm 4.46, p. 253).
Please follow the following order: G = < N, T>, N = {E, T, F}, T = { i, n, (, +, -, *, /, ) }
Document Preview:
Homework # 1 CIS 474/574 (Yoon) Winter, 2017 Upload your solution by March 7 (T), 2017 E’ -? E E –? E + T E –? E – T E –? T T -? T*F T -? T/F T -? F F -? i F -? n F -? (E) “i” and “n” represent identifiers and numbers, respectively. Given the above grammar, 1) generate the set of items (use the algorithm in Fig. 4.32, p245) ), i.e., I0, .. In. Draw the transition diagram based on the set of items obtained in ( see Fig. 4.31, p.244). Compute FOLLOW (A), for each nonterminal A ( see Sect. 4.4.2) Construct the ACTION and GOTO tables (use the algorithm 4.46, p. 253). You need to complete the homework so that you can start working on the next programming project. Please follow the following order: G = , N = {E, T, F}, T = { i, n, (, +, -, *, /, ) }
Attachments:
homework-1.doc
hw1474.2.PNG
cis474.3.PNG
474.4.PNG
cis-474.5.PNG