Question: 4 - EBNF to BNF Conversion (25 points) Rewrite the following partial EBNF grammar in BNF notation. You are allowed to create new non-terminals in

4 - EBNF to BNF Conversion (25 points) Rewrite the following partial EBNF grammar in BNF notation. You are allowed to create new non-terminals in order to define the LHS non-terminals properly. You do not need to create rules for the non-terminals arglist, newline, name, classdef, and funcdef. You only use them in your grammar. decorator: '@' dotted_name ['('[arglist] '' ] newline dotted_name: name {'' name } decorated: decorators (classdef funcdef) decorators: decorator decorator } 4 - EBNF to BNF Conversion (25 points) Rewrite the following partial EBNF grammar in BNF notation. You are allowed to create new non-terminals in order to define the LHS non-terminals properly. You do not need to create rules for the non-terminals arglist, newline, name, classdef, and funcdef. You only use them in your grammar. decorator: '@' dotted_name ['('[arglist] '' ] newline dotted_name: name {'' name } decorated: decorators (classdef funcdef) decorators: decorator decorator }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
