CONCEPTS OF PROGRAM...(PEARSON CHANNEL)
CONCEPTS OF PROGRAM...(PEARSON CHANNEL)
12th Edition
ISBN: 9780136680758
Author: Sebesta
Publisher: PEARSON
Expert Solution & Answer
Book Icon
Chapter 3, Problem 15PS

Explanation of Solution

Consider the following BNF:

<program> -> begin <stmt_list> end

<stmt_list> -> <stmt>

  | <stmt> ; <stmt_list>

<stmt> -> <var> = <expression>

<var>- A | B | C

<expression> - <var> + <var>

  |<var> - <var>

  |<var>

Conversion of the given BNF into the EBNF is as follow:

Enclosing an entity in curly braces indicates that it can be used indefinitely or left altogether as stated in section 3.3.2 of the book.

  • So <stmt_list> can be defined as <stmt> or {<stmt>} use indefinitely after a <stmt>.
  • Therefore, write the first two productions as:

<program> -> begin <stmt_list> end

<stmt_list> -> <stmt>{<stmt>}

  • The next two productions are same as given since no EBNF rule applies to them...

Blurred answer
Students have asked these similar questions
The mail merge process has ____ steps. Question 19Select one: a. five b. six c. seven d. eight
If you created a main document based on an existing document entitled "Confirmation Letter," what default filename would Word give the main document? Question 14Select one: a. Confirmation Letter-1 b. Confirmation Letter-merge c. Document1 d. MergedDocument1
Click the ____ option button in the Mail Merge task pane to use an Outlook contact list as a data source for a merge. Question 11Select one: a. Use Outlook contacts list b. Select from Outlook contacts c. Select Contacts d. Mail Merge Recipients
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
CMPTR
Computer Science
ISBN:9781337681872
Author:PINARD
Publisher:Cengage
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage