Question: (10 points) Consider a fictitious programming language containing only two numerical types integer and real), in which arbitrarily long (possibly empty) 1-dimensional arrays of numbers

(10 points) Consider a fictitious programming language containing only two numerical types integer and real), in which arbitrarily long (possibly empty) 1-dimensional arrays of numbers are declared, instantiated, and initialized in a single statement, two of which are given below: integer [] numbers = { 1, 5, 7, 9, 10 }; reall) reals = { 2.0, 3.35, 1.24, 54.145, -4.9 }; Write an EBNF grammar with as its start symbol that can generate all and only the syntactically correct array declarations of this form. Instead of creating rules to generate the set of all possible identifiers (variable names), integer constants, and floating point constants, your grammar must refer to the non-terminals
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
