Give a right-linear grammar to generate each of the following:
(a) All identifiers of lowercase letters that either begin or end in a (or both).
(b) The set of all integers and real numbers in decimal notation. No leading zeros should be generated and real numbers must have at least one digit on both sides of the decimal point. For instance, 3, +3, -3, 0, +0, -0, 0.00328, -100.46, and +100.000 are in the language, but 100., +, -, 003 are not
First we will make finite automata for this language then using this FA will make right linear grammar.
a).
Get Answers For Free
Most questions answered within 1 hours.