Exercise 1 Give a BNF grammar for each with the languages below. For example , a proper answer for " the set of all strings including zero or more concatenated copies of the chain ab” would be this sentence structure::: = stomach |

There are frequently many right answers.

a. The pair of all strings consisting of zero or more as.

b. The set of every strings including an uppercase letter and then zero or maybe more additional personas, each which is either a great uppercase letter or one of many digits zero through 9. c. The set of every strings consisting of one or more since.

d. The set of most strings consisting of one or more numbers. (Each digit is one of the character types 0 through 9. ) e. The set of most strings composed of zero or even more as with a semicolon after each one particular. f. The set of every strings comprising the key word begin, then zero or maybe more statements using a semicolon after each one particular, followed by the keyword end. Use the non-terminal for claims, and do not provide productions for this. g. The set of most strings composed of one or more much like a semicolon after each one. l. The pair of all strings consisting of the keyword commence, followed by a number of statements having a semicolon after each one particular, followed by the keyword end. Use the nonterminal for assertions, and do not give productions for it. i. The set of almost all strings including one or more because, with a comma between every single a as well as the next. (There should be not any comma prior to first or after the last. ) j. The set of almost all strings consisting of an open mount (the image [) followed by a directory of one or more numbers separated by commas, accompanied by a shutting bracket (the symbol ]). k. The set of all strings consisting of absolutely no or more because, with a comma between every a as well as the next. (There should be simply no comma before the first or after the last. ) l. The set of most strings consisting of an open bracket (the image [) followed by a listing of zero or more digits separated by interruption, followed by a closing clump (the sign ])....

Tags:

Essay about COUN5004 U03A1 Template

Marketing Organizing Approach - Nestle Essay