Using the knowledge in computational language in JAVA it is possible to write a code that recursive decent algorithm for a java while statement, a Javas if statement , an logical/mathematical expression.
<h3>Writting the code in JAVA:</h3>
<em>M ---> { S } ' # '</em>
<em>S ---> I | W | A | P | C | G</em>
<em>I ---> ' [ ' E ' ? ' { S } ' : ' { S } ' ] ' | ' [ ' E ' ? ' { S } ' ] '</em>
<em>W --- > ' { ' E ' ? ' { S } ' } '</em>
<em>A --- > lower-case ' - ' E ' ; '</em>
<em>P --- > ' < ' E ' ; '</em>
<em>G ---> ' ' . ' lower case ' ; '</em>
<em>C ---> ' < ' upper case ' ; '</em>
<em>E ---> T { ( ' + ' | ' - ' ) T }</em>
<em>T ---> U { ( ' * ' | ' / ' | ' % ' ) U }</em>
<em>U ---> F ' ^ ' U | F</em>
<em>F ---> ' ( ' E ' ) ' | lower case | digit</em>
<em>Here "lower-case" stands for a single lower-case letter, and "upper-case" stands for a single upper-case letter. For a more colorful grammar (in a slightly different form), see colorful grammar.</em>
<em>This grammar (and the language it defines) may look a little strange, but it was designed to have only single-character tokens. In particular it doesn't have any reserved words (key words), though in a sense the upper-case letters are reserved.</em>
<em>Just to help with understanding, here is the intuitive meaning of each of the above non-terminals:</em>
<em>SYMBOL MEANING</em>
<em>M Main Program</em>
<em>S Statement</em>
<em>I If-Then-[Else] Statement</em>
<em>W While Statement</em>
<em>A Assignment Statement</em>
<em>P Put or Print (integer)</em>
<em>C Print Character</em>
<em>G Get (integer)</em>
<em>E Expression (logical or arith)</em>
<em>T Termi</em>
<em>U </em>
<em>F Factor</em>
See more about JAVA at brainly.com/question/12975450
#SPJ1