Why is it important for a grammar to be unambiguous

Assignment Help Computer Engineering
Reference no: EM133703012

1) What is the difference between syntax and semantics?

2) Why is it important for a grammar to be unambiguous?

3) Show that the following grammar is ambiguous - show two distinct parse
trees for one terminal string.
<expr> -> <expr> + <expr> | <expr> * <expr> | ( <expr> ) | a | b| c

4) Show that the following grammar is ambiguous - show two distinct parse
trees for one terminal string.
E-> E + E | id

5) Write in grammar for the language consisting of strings over the alphabet {a,b}
where all strings start with the letter a and can have a's and b's after.

6) Write in grammar for the language over the alphabet {a,b,c} consisting of
strings that start and end with the letter a and have a's b's c's in between.

7) Write in grammar for the language over the alphabet {a,b,c} consisting of
strings where every b is immediately followed by the letter c

8) Write an EBNF statement for a C++ float constant.

9) Compute the weakest precondition for the following assignment statement
given the postcondition.
y = 2y - 1 { y > 1}

10) Compute the weakest precondition for the sequence of statements:

(Statement 1) b = 2b + 1;

(Statement 2) b = b-3{b < 0}

11) Compute the weakest precondition for the selection construct.
if (a == 5)
b = 2b + 1
else
b = 2b;
{b > 1}

Reference no: EM133703012

Questions Cloud

Differences in standard of proof between criminal-civil : Briefly, discuss the differences in "standard of proof" between criminal, civil, and administrative hearings.
Describe two social determinants of health : Describe two social determinants of health (other than culture) impacting Thuy's perinatal experience. Provide a rationale for your response.
What is one implication of the theory for the resolution : Applying Social Identity Theory, what is one implication of theory for resolution of intergroup conflicts? When discussing implication of Social Identity Theory
Manage order information : Include attributes like orderID, customer, products, and the order total. Implement methods to generate order summaries, update order status, and manage order
Why is it important for a grammar to be unambiguous : What is the difference between syntax and semantics and Why is it important for a grammar to be unambiguous?
Shows difference between abstract idea and practical reality : Social theory is an important analytical tool because it: shows the differences between abstract ideas and practical reality. Leads to the discovery of the trut
What is the influenza incidence rate : the nursing home reported 14 new cases of influenza and 4 new cases of pneumonia during the second week of January. What is the influenza incidence rate?
Response to the tipoc security for an it system : Compose a thoughtful response to the tipoc, Security For an IT system, security requirements are those which protect data from falling into the wrong hands
How can software developers improve software quality : Develop a narrated presentation proposal that covers these points: What is software quality? Types of software testing

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd