Question: BNF -> program -> start stop -> empty | var Identifier = Integer -> . | : Identifier -> + | - | / |

BNF

-> program -> start stop -> empty | var Identifier = Integer -> . | : Identifier -> + | - | / | * | -> % | -> ( ) | Identifier | Number -> -> empty | -> | | | | | -> read Identifier . -> print . -> iff ( ) -> iter ( ) -> let Identifier = . -> < | < < | > | > > | = = | =

In this grammar there is no function call. Suppose we want to change function calls so that they evaluate to some returned data, and this data could be used the

same way as variables are used in expressions (not left of assignment). For example, you could write

x = 2 + F1(5) * 3

which, assuming that F1(5) returns 10, should put 32 into x.

Show changes needed in syntax and explain semantics of function call.

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 Databases Questions!