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
A transcript must bear a(n)___ to be considered official
harkovskaia [24]
A transcript must have a signature or school stamp. 
7 0
3 years ago
Read 2 more answers
What is the range of the well-known ports used by tcp and udp?
melamori03 [73]
/etc/services on my CentOS machine goes up to 49000. Reserved ports are less than 1024.

Well known and reserved ports are two different things. Well known ports only need a registration with IANA. Reserved ports, on *nixes, requires root for a deamon to bind to the port.
8 0
3 years ago
Mathematics and computer science share many concepts, such as recursion.
Virty [35]
The answer is B.

Read the answer I posted for your other question on the factorial of 7.
5 0
2 years ago
What is Hadoop?
balu736 [363]

Answer:

software framework for supporting distributed data processing and storage.

Explanation:

3 0
3 years ago
Ana is a music lover. She loves to download songs and videos on her computer every time she hears a new song. One day, her compu
o-na [289]

Answer:

Storage outage

As many new songs are released to the Internet every day, Anna might have download thousands of them, which made her computer ran out of storage and RAM(random access memory )

5 0
2 years ago
Other questions:
  • Write a converter program for temperatures. This program should prompt the user for a temperature in Celsius. It should then con
    10·1 answer
  • What is html?
    9·2 answers
  • Write a function called printbackwards() that will work with a c++ string
    14·1 answer
  • GUI stands for "___ user interface."
    9·2 answers
  • "Write a class named Car that has the following data attributes:" _ _year_model (for the car’s year model) _ _make (for the make
    12·1 answer
  • A ________ algorithm is a method of locating a specific item of information in a larger collection of data.
    8·1 answer
  • Which of these is the term used to describe the location of an Internet page? A) social network B) Web address C) blog D) net
    6·2 answers
  • If you have 60fps on your laptop tell me one way you can go to 240fps
    14·2 answers
  • Question in photo below
    13·2 answers
  • After a group sets a project schedule, members should be prepared to
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!