Give a BNF grammar for each of the languages below. For example, a correct answer for "the set of all strings consisting
Posted: Mon Jun 06, 2022 1:14 pm
Give a BNF grammar for each of the languages below. For example, a correct answer for "the set of all strings consisting of zero or more concatenated copies of the string "ab" would be this grammar: <S>:= ab <S> | <empty>
5. (2 points) The set of all strings consisting of an uppercase letter followed by zero or more additional characters, each of which is either an uppercase letter or one of the digits 0 through 9.
6. (3 points) Show that your grammar can derive the following sentences: ο Α Ο Ο Ὁ ο ΛΑ A1 AA1 Α1Α
<S> :: a <S> | a (3 points) Show that your grammar can derive the following sentences: o a 0 aa. o aaa
5. (2 points) The set of all strings consisting of an uppercase letter followed by zero or more additional characters, each of which is either an uppercase letter or one of the digits 0 through 9.
6. (3 points) Show that your grammar can derive the following sentences: ο Α Ο Ο Ὁ ο ΛΑ A1 AA1 Α1Α
<S> :: a <S> | a (3 points) Show that your grammar can derive the following sentences: o a 0 aa. o aaa