1 Write the denotational semantic function of the C if state
1) Write the denotational semantic function of the C if statement.
2) Write an EBNF rule that describes the while statement of C or C++.
Write the recursive-descent subprogram in C or C++ for this rule.
Solution
1)Denotational semnatic: It deals with offering the Mathematical models of a programming languages.it is depending on recursive function concept.
C Epslon(write the epslon symbol) comm ::= skip | L : =A | C ; C
| IF B Then c else C.
2) EBNF Rule:it is a cipher to tell the syntax.explaining the language with a group of grammar rules is extremely agreed.
<while_statement> -> WHILE \' ( \' ( <arithematic_expression> | <logic_expression>) \' ) \'
<block> <block> -> <statement | \'{ \' <statement> { <statement >} \' } \'
