We use cookies to give you the best experience possible. By continuing we’ll assume you’re on board with our cookie policy

See Pricing

What's Your Topic?

Hire a Professional Writer Now

The input space is limited by 250 symbols

What's Your Deadline?

Choose 3 Hours or More.
Back
2/4 steps

How Many Pages?

Back
3/4 steps

Sign Up and See Pricing

"You must agree to out terms of services and privacy policy"
Back
Get Offer

Typography and Keyword End

Hire a Professional Writer Now

The input space is limited by 250 symbols

Deadline:2 days left
"You must agree to out terms of services and privacy policy"
Write my paper

Exercise 1 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: ::= ab |

There are often many correct answers.
a. The set of all strings consisting of zero or more as.
b. 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.

Don't use plagiarized sources. Get Your Custom Essay on
Typography and Keyword End
Just from $13,9/Page
Get custom paper

c. The set of all strings consisting of one or more as.

d. The set of all strings consisting of one or more digits. (Each digit is one of the characters 0 through 9.) e. The set of all strings consisting of zero or more as with a semicolon after each one. f. The set of all strings consisting of the keyword begin, followed by zero or more statements with a semicolon after each one, followed by the keyword end.

Use the non-terminal for statements, and do not give productions for it. g. The set of all strings consisting of one or more as with a semicolon after each one. h. The set of all strings consisting of the keyword begin, followed by one or more statements with a semicolon after each one, followed by the keyword end. Use the non-terminal for statements, and do not give productions for it. i. The set of all strings consisting of one or more as, with a comma between each a and the next. (There should be no comma before the first or after the last.)

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 as, with a comma between each a and the next. (There should be no comma before the first or after the last.) l. The set of all strings consisting of an open bracket (the symbol [) followed by a list of zero or more digits separated by commas, followed by a closing bracket (the symbol ]).

Exercise 2 Give an EBNF grammar for each of the languages of Exercise 1. Use the EBNF extensions wherever possible to simplify the grammars. A few more metasymbols can be added to BNF to help with common patterns of language definition. For example, [, ], {, }, (, and ) might be added: 1. [ something ] in the right-hand side of a production means that the something inside is optional. 2. { something } in the right-hand side of a production means that the something inside can be repeated any number of times (zero or more). 3. Parentheses are used to group things on the right-hand side so that |, [], and {} can be used in the same production unambiguously.

Cite this Typography and Keyword End

Typography and Keyword End. (2016, Jun 22). Retrieved from https://graduateway.com/typography-and-keyword-end/

Show less
  • Use multiple resourses when assembling your essay
  • Get help form professional writers when not sure you can do it yourself
  • Use Plagiarism Checker to double check your essay
  • Do not copy and paste free to download essays
Get plagiarism free essay

Search for essay samples now

Haven't found the Essay You Want?

Get my paper now

For Only $13.90/page