Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Formal Languages and Finite Automata Answer question carefully & correctly for a thumbs up. Some info which might help: 6. Show that the grammar below

Formal Languages and Finite Automata

Answer question carefully & correctly for a thumbs up.

image text in transcribed

Some info which might help:

image text in transcribed

image text in transcribed

6. Show that the grammar below (written with BNF notation) is ambiguous. | ::= if Bool > then Bool> - true | false ::= I si l sa Parse trees can be used to give meaning to words in context free languages. Use your example to give two different meanings to a word in this grammar. The terminals (or token of the grammar are: and do else false fi if mod not od or read skip then true while write abcdefghijklm n opqrstu v wxyz ABCDEF GHIJKLMNOPQR STUVWX Y Z 012 3 456 789 The productions of the grammar are | ; | | | := Kif statement> Kread statement> :- if then else fi = while do od - skip := read ( ) :- write () ::- , := | or :: and := | ( ) | not ::= | boolean factor expression ter - * ::=1=-1 boolean atom> atom> Kidentifier> letter := | ( mo :=true | false := | |identifier> letter> | | |identifier digit> :- then else | sstunnitil stmt2 true | false Construct parses for the word

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions