Concepts Of Programming Languages
Concepts Of Programming Languages
12th Edition
ISBN: 9780134997186
Author: Sebesta, Robert W.
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
Sort the generic definitions from the primary key-based definitions of 2NF and 3NF. Give a detailed example to support your claim.
Make this htnl using semantic elements
Separate the main key-based definitions of 2NF and 3NF from the generic definitions using the sorting tool. Please provide a concrete illustration to back up your assertion.
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education