EBK CONCEPTS OF PROGRAMMING LANGUAGES
EBK CONCEPTS OF PROGRAMMING LANGUAGES
12th Edition
ISBN: 9780135102251
Author: Sebesta
Publisher: VST
Expert Solution & Answer
Book Icon
Chapter 4, Problem 15RQ

Explanation of Solution

Top-down Parser:

A grammar which has the following characteristics cannot be used as the basis for a top-down parser:

  1) A grammar with direct or indirect left recursion.

  2) A grammar which fails in pairwise disjointness test.

1) A grammar with direct or indirect left recursion:

  • Example for grammar with direct left recursion: AA+B, where in a rule for a particular non terminal, the non-terminal on the LHS comes on the leftmost symbol on its RHS too.
  • Example for grammar with indirect left recursion: - ABaA, AAb, where in a rule for a particular non terminal, the non-terminal comes as the leftmost symbol on its RHS can be expanded to get a string which in turn can be expanded (using rule for the left most symbol) to get that particular non terminal itself on the left most part.

In a grammar with left recursion, the first non-terminal when expanded from RHS we get the same non terminal of LHS in the grammar rule directly or indirectly. In a top down parsing since the next sentential form is obtained by expanding the left most non terminal, presence of left recursion results in indefinite recursive calls...

Blurred answer
Students have asked these similar questions
Can you find an example order DFS explores the vertices in the graph included assuming DFS starts at vertex 4. The adjacency lists are in ascending order by the numeric label of the vertices.
Please original work What is differences between big data and data warehousing, which one is better for analytics, why it is better, and what would you think an example of when it would be a better choice. Please cite in text references and weblinks
Identify the most applicable web analytics that a B2C (business to consumer) company should be monitoring at its website. Describe three or more metrics, provide a description of each, and explain why you believe they are important?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
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