
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
![Modify the extended BNF (EBNF) in the answer box below to include:
1. if-then-else-end statements (in addition to the if-then statements it already
includes)
2. read statements of the form read į that reads a value and stores it in the variable
with identifier i
3. write statements of the form write e that print the value of the expression e
Notes:
●
●
Tokens must be written in lowercase letters, e.g. if, identifier. (The provided
EBNF shows terminals in a monospaced font, but you do not need to worry about
monospacing for your answers.)
Non-terminals must start with a capital letter, e.g. If, Expression. (The provided
EBNF shows non-terminals in italics, but you do not need to worry about italics
for your answers.)
Program = Statements
Statements = Statement (; Statement)*
Statement = If | While | Assignment
If = if Comparison then Statements |--Choose--
While = while Comparison do Statements end
Assignment = identifier := Expression
Read =
Write =
Comparison = Expression Relation Expression
Relation ==| != | < | <=| > | >=
Expression = Term ((+|-) Term)*
Term Factor ((* | /) Factor)*
Factor= (Expression) | number | identifier
✓end
✓ --Choose--
else Statements
(else Statements)
[else Statements]
else Statements*
(else Statements)*
else Statements+
(else Statements)+](https://content.bartleby.com/qna-images/question/09c2f836-a777-444b-9271-94b360db7692/bbf59bfe-bd22-4fa0-8375-46e19b06dbe1/ylhj9vn_thumbnail.png)
Transcribed Image Text:Modify the extended BNF (EBNF) in the answer box below to include:
1. if-then-else-end statements (in addition to the if-then statements it already
includes)
2. read statements of the form read į that reads a value and stores it in the variable
with identifier i
3. write statements of the form write e that print the value of the expression e
Notes:
●
●
Tokens must be written in lowercase letters, e.g. if, identifier. (The provided
EBNF shows terminals in a monospaced font, but you do not need to worry about
monospacing for your answers.)
Non-terminals must start with a capital letter, e.g. If, Expression. (The provided
EBNF shows non-terminals in italics, but you do not need to worry about italics
for your answers.)
Program = Statements
Statements = Statement (; Statement)*
Statement = If | While | Assignment
If = if Comparison then Statements |--Choose--
While = while Comparison do Statements end
Assignment = identifier := Expression
Read =
Write =
Comparison = Expression Relation Expression
Relation ==| != | < | <=| > | >=
Expression = Term ((+|-) Term)*
Term Factor ((* | /) Factor)*
Factor= (Expression) | number | identifier
✓end
✓ --Choose--
else Statements
(else Statements)
[else Statements]
else Statements*
(else Statements)*
else Statements+
(else Statements)+
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Please answer question. This is pertaining to Java programming language 1-21arrow_forwardProgram Unit Score Calculator Console App Write a Python Console Application program that allows the user to enter the marks for different assessments in a unit, and computes the total mark and grade for the unit. Here is the program logic specification: There are six assessment activities Quiz1, Quiz2, Quiz3, Quiz4, Lab Journal, Major Assignment and Final Exam. The four quizzes are worth 5 marks each, the Lab Journal is worth 10 marks, the Major Assignment is worth 30 marks and the Final Exam is worth 40 marks. The algorithm for computing the total mark for the unit is: Total Mark = Quiz1+Quiz2+Quiz3+Quiz4+Major Assignment+ Lab Journal + Final Exam The following screenshot shows a successful test run:arrow_forwardХ3: inlTol0 Write a function in Java that implements the following logic: Given a number n, return true if n is in the range 1..10, inclusive. Unless "outsideMode" is true, in which case return true if the number is less or equal to 1, or greater or equal to 10. Your Answer: 1 public boolean in1To10(int n, boolean outsideMode) 2 { 3 } H N Marrow_forward
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education