Construct a phrase-structure grammar that generates all


Question: a) Construct a phrase-structure grammar that generates all signed decimal numbers, consisting of a sign, either + or -; a nonnegative integer; and a decimal fraction that is either the empty string or a decimal point followed by a positive integer, where initial zeros in an integer are allowed.

b) Give the Backus-Naur form of this grammar.

c) Construct a derivation tree for -31.4 in this grammar.

Solution Preview :

Prepared by a verified Expert
Computer Engineering: Construct a phrase-structure grammar that generates all
Reference No:- TGS02372739

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)