Pearson eText for Concepts of Programming Languages -- Instant Access (Pearson+)
12th Edition
ISBN: 9780135102268
Author: Robert Sebesta
Publisher: PEARSON+
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 3, Problem 5RQ
Explanation of Solution
Differences between a sentence and a sentential form:
A sentence is a sentential form that has only terminal symbols. By terminal symbols we mean literal symbols that can appear in the inputs to or outputs from the creation rules of a new formal grammar that won’t change as per normal grammar rules.
To understand suppose a grammar that is defined by two rules:
A can become AB
A can become BA
Here ‘B’ is a terminal symbol because no rule exists that would change it to something else. On the other hand, ‘A’ has two rules that can change it, so it is nonterminal...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
What is a simple phrase of a sentential form?
When it comes to evaluating expressions, what are the benefits of being able to do so without having to define actions inside the grammar?
What is the difference between static and dynamic semantics?
Chapter 3 Solutions
Pearson eText for Concepts of Programming Languages -- Instant Access (Pearson+)
Ch. 3 - Prob. 1RQCh. 3 - Prob. 2RQCh. 3 - Prob. 3RQCh. 3 - Prob. 4RQCh. 3 - Prob. 5RQCh. 3 - Prob. 6RQCh. 3 - Prob. 7RQCh. 3 - Prob. 8RQCh. 3 - Prob. 9RQCh. 3 - What is the difference between a synthesized and...
Ch. 3 - Prob. 11RQCh. 3 - Prob. 12RQCh. 3 - Prob. 13RQCh. 3 - Prob. 14RQCh. 3 - Prob. 15RQCh. 3 - Prob. 16RQCh. 3 - Prob. 17RQCh. 3 - Prob. 18RQCh. 3 - Prob. 19RQCh. 3 - Prob. 20RQCh. 3 - Prob. 21RQCh. 3 - What does partial correctness mean for a loop...Ch. 3 - Prob. 23RQCh. 3 - Prob. 24RQCh. 3 - Prob. 25RQCh. 3 - Prob. 26RQCh. 3 - Prob. 27RQCh. 3 - Prob. 28RQCh. 3 - Prob. 29RQCh. 3 - The two mathematical models for language...Ch. 3 - Write EBNF descriptions for the following: a. A...Ch. 3 - Prob. 3PSCh. 3 - Prob. 4PSCh. 3 - Prob. 5PSCh. 3 - Prob. 6PSCh. 3 - Prob. 9PSCh. 3 - Prob. 10PSCh. 3 - Prob. 12PSCh. 3 - Prob. 15PSCh. 3 - Prob. 16PSCh. 3 - Prob. 17PSCh. 3 - Prob. 18PSCh. 3 - Compute the weakest precondition for each of the...
Knowledge Booster
Similar questions
- Semantics may be classified into a number of different types, each with its own set of advantages and disadvantages.arrow_forwardWhat is the difference between denotative and connotative language?arrow_forwardChomsky Normal Form: Most useful grammars can be translated into a nor-mal form making answers to questions about the language more transparent.arrow_forward
- Please define "static semantics." Please list BNF-difficult static semantics standards. Thanks.arrow_forwardSeveral different categories of semantics exist, each with its own advantages and disadvantages.arrow_forwardDifferentiate between top-down and buttom-up parsing using typical grammararrow_forward
- A database of Prolog facts for a group of people contains the following two types of facts: male([, , ... ] ). female ([, , ... ] ). age( , ) E.g., male([alex, tom, vic, ...]). E.g., female([ann, sara, ella, ..]). E.g. age(ann, 66). For these facts write the following rules (you may use Prolog library functions): person(, ). gender(, gender>). oldest(, , ). meanAgeM(). count(, , ). Find the name and the age of a person Find the name and the gender (male or female) Find the name/age/gender of the oldest person Find the mean age of male people Find the number of male, female, and total peoplearrow_forwardBuild a context-free grammar. Use the graphic notation to build the grammar that recognizes the IF-THEN-ELSE, in java language and python.arrow_forwardWhat determines whether a language rule is a matter of syntax or of static semantics?arrow_forward
- The translation of the sentence The boy hit the ball into The ball was hit by the boy is done using A. phrase structure rules B. derivational syntax C. case grammar analysis D. transformation rulesarrow_forwardLogic is used in formal methods. Conceptually, propositional and predicate logic are the most common types of logic.arrow_forwardWhat does inferential meanarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage