Question: ( 1 5 points ) Suppose language L 2 consists of mathematical expressions that has terminals 0 - 9 and , , + - ,

(15 points) Suppose language L2 consists of mathematical expressions that has terminals 0-9 and ,,+-,**. Assume that the minimum value in an expression is 0 and the maximum value is 9, that is the expression 11-5 would not be possible but the expression 6+9 would be possible.
Some sample expressions in the proper syntax include 4,6+9,2-3+4. Expressions such at 5**+3 would not be.
Do one of the following:
(a) Construct a context-free grammar for L2. Use S as the start symbol and give the 4-tuple.
(b) Construct a pda for the language and give the septuple (transition functions are not needed for this one).
( 1 5 points ) Suppose language L 2 consists of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!