07: (a) State why the following BNF grammar for palindromes (words that are the same in reverse e.g., "noon" or "radar")

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

07: (a) State why the following BNF grammar for palindromes (words that are the same in reverse e.g., "noon" or "radar")

Post by answerhappygod »

07 A State Why The Following Bnf Grammar For Palindromes Words That Are The Same In Reverse E G Noon Or Radar 1
07 A State Why The Following Bnf Grammar For Palindromes Words That Are The Same In Reverse E G Noon Or Radar 1 (76.7 KiB) Viewed 47 times
07: (a) State why the following BNF grammar for palindromes (words that are the same in reverse e.g., "noon" or "radar") is incorrect. Show how it can be fixed by rewriting the BNF rules. Point out the drawbacks of this approach. (5 marks) <palindrome> > cletter> <palindrome) cletter | cletter | (letter> -> abl... I z AB ... Iz | Z (b) Solve the problem in part (a) by adding attribute(s). semantic rule(s) and predicate(s) as necessary, instead of rewriting the BNF rules. (5 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply