Question: From Modern Programming Languages a practical introduction Exercise 1 Give a BNF grammar for each of the languages below. Show that you can derive a
From Modern Programming Languages a practical introduction
Exercise 1 Give a BNF grammar for each of the languages below. Show that you can derive a number of positive examples of the language in the constructed grammar below and also show that you are not able to derive a set of negative examples in the grammar below. (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
