Question: 4. Provide Semantic actions for the do-alternatingly statement Sdo L1 alternatingly L2 until B';' adding markers, which you define, wherever you need them. At run-time

4. Provide Semantic actions for the do-alternatingly statement Sdo L1 alternatingly L2 until B';' adding markers, which you define, wherever you need them. At run-time the execution pattern is (a) Statementlist L1 is executed then B is evaluated, (b) If B is false then Statementlist L2 is executed and B is evaluated, (c) If B is false then Statementlist L1 is executed and B is evaluated, (e) when B evaluates to true control exits the loop. Hint: use a temporary variable t and the update rule t-1 - t to distinguish. 4. Provide Semantic actions for the do-alternatingly statement Sdo L1 alternatingly L2 until B';' adding markers, which you define, wherever you need them. At run-time the execution pattern is (a) Statementlist L1 is executed then B is evaluated, (b) If B is false then Statementlist L2 is executed and B is evaluated, (c) If B is false then Statementlist L1 is executed and B is evaluated, (e) when B evaluates to true control exits the loop. Hint: use a temporary variable t and the update rule t-1 - t to distinguish
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
