1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
IRINA_888 [86]
2 years ago
5

Write a recursive decent algorithm for a java while statement, a Javas if statement , an logical/mathematical expression based o

n the rules you created in your lexical analyzer, and an mathe- matical assignment statement, where statement may be an empty function. Supply the EBNF rule for ea
Computers and Technology
1 answer:
Aleonysh [2.5K]2 years ago
3 0

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

You might be interested in
1000base-t is a standard for achieving throughputs ____ times faster than fast ethernet over copper cable.
meriva
An Average of 10 times faster.

Hope this helps!
3 0
3 years ago
Each object that is created from a class is called a(n) ____________ of the class.
gladu [14]
Instance





-------------------------
7 0
3 years ago
Read 2 more answers
Find the area of the regular hexagon below by using the area formula for triangles.
mojhsa [17]
I think the answer is B. Because if you multiply 6x8 it’s 48 divided by 2 equals 24
5 0
3 years ago
How to make a sad face on keyboard using alt?
forsale [732]
Literally just do a colon and parenthesis :(

:( :-(
8 0
3 years ago
Read 2 more answers
The function known as "Comments" can be displayed during a presentation<br>O True<br>False​
Sonja [21]

Answer:

false

Explanation:

Select the comment icon. on the slide. The Comments pane will open and you can see comments for that slide.

Select Reply to respond to a comment.

Select the Next or Back buttons to go between comments and slides.

3 0
3 years ago
Read 2 more answers
Other questions:
  • 850 cal into joules​
    13·1 answer
  • To move to the bottom of a document window, press the ____ key(s). ALT CTRL PAGE DOWN CTRL PAGE DOWN ALT PAGE DOWN PAGE DOWN
    11·1 answer
  • How do you think your ability to work might be affected if you don’t magnify a document so that text is at a size for you to rea
    9·1 answer
  • Provide Java code to illustrate how to create an array, reference an array, and address an element of an array.
    13·1 answer
  • What important information is needed if you are installing an oem version of windows 7?
    6·1 answer
  • Importance of availability of mobile devices content that is of interest for users.
    12·1 answer
  • Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates R1 = 500 kbps, R2
    14·1 answer
  • Mention five features on the desktop screen​
    5·1 answer
  • The most important part of a computer​
    14·2 answers
  • When right-clicking an object, a ____ menu appears, which contains frequently used commands related to the object.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!