Question: From Modern Programming Languages a practical introduction (2nd Edition) Exercise 1 Give a BNF grammar as we have done in class for each of the
From Modern Programming Languages a practical introduction (2nd Edition)
Exercise 1 Give a BNF grammar as we have done in class for each of the descriptions below. Also show that you can derive a number of positive examples of the language in the constructed grammar and also show that you are not able to derive a set of negative examples in the grammar. (Please check textbook p. 24 for the full description of the questions.)
c) The set of all strings consisting of one or more instances of the letter a.
g) The set of all strings consisting of one or more instances of the letter a with a semicolon after each one.
j) The set of all strings consisting of an open bracket (the symbol [) followed by a list of one or more digits separated by commas, followed by a closing bracket (the symbol ]).
k) The set of all strings consisting of zero or more instances of the letter a, with a comma between each a and next. There should be no comma before the first or after the last.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
