Question Six (5 marks) Considering the following Grammar: E->E+T | T E->T*T | T-F | T*F | F F->( E ) | id Id->digit Digi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Question Six (5 marks) Considering the following Grammar: E->E+T | T E->T*T | T-F | T*F | F F->( E ) | id Id->digit Digi

Post by answerhappygod »

Question Six (5 marks)
Considering the following Grammar:
E->E+T | T
E->T*T | T-F | T*F | F
F->( E ) | id
Id->digit
Digit->{0,1,2,3,4,5,6,7,8,9}
Generate the following:
(a) Parse Tree (2
marks)
(b) Syntax Tree (2 marks)
(c) Abstract Syntax Tree (AST) (1
mark)
For String: 9*5+2-4
can i please get this in a hour
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply