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
kifflom [539]
3 years ago
15

In C++ the declaration of floating point variables starts with the type name float or double, followed by the name of the variab

le, and terminates with a semicolon. It is possible to declare multiple variables separated by commas in one statement. The following statements present examples, float z; double z, w; The following partial grammar represents the specification for C++ style variable declaration. In this grammar, the letters z and w are terminals that represent two variable names. The non-terminal S is the start symbol. S=TV; V=CX X = , VIE T = float double C = z w 1 - Determine Nullable values for the LHS and RHS of all rules. Please note, your answer includes all Nullable functions for LHS and RHS, in addition to the resulting values. (25 points)

Engineering
1 answer:
zubka84 [21]3 years ago
4 0

Answer:

The given grammar is :

S = T V ;

V = C X

X = , V | ε

T = float | double

C = z | w

1.

Nullable variables are the variables which generate ε ( epsilon ) after one or more steps.

From the given grammar,

Nullable variable is X as it generates ε ( epsilon ) in the production rule : X -> ε.

No other variables generate variable X or ε.

So, only variable X is nullable.

2.

First of nullable variable X is First (X ) = , and ε (epsilon).

L.H.S.

The first of other varibles are :

First (S) = {float, double }

First (T) = {float, double }

First (V) = {z, w}

First (C) = {z, w}

R.H.S.

First (T V ; ) = {float, double }

First ( C X ) = {z, w}

First (, V) = ,

First ( ε ) = ε

First (float) = float

First (double) = double

First (z) = z

First (w) = w

3.

Follow of nullable variable X is Follow (V).

Follow (S) = $

Follow (T) = {z, w}

Follow (V) = ;

Follow (X) = Follow (V) = ;

Follow (C) = , and ;

Explanation:

You might be interested in
If you want to obtain a Class E license before you turn 18, you must______. A. be in compliance with school attendance requireme
Makovka662 [10]

Answer:

The correct option is;

A. be in compliance with school attendance requirements

Explanation:

The requirements to acquire a special restricted driver's license for driver's license for under under 18 that have had a beginner's for up to 180 days include a minimum of 40 hours driving practice 10 of which should be in the dark. The application for the conditional drivers license is to be signed by the parent or guardian and the application is to be accompanied with proof of acceptable school attendance

At 17, after holding the special restricted drivers licence for a year without issues you can obtain the full drivers license.

7 0
3 years ago
I need help with this I dont know the word ​
DiKsa [7]

Would it be Unit?

...............

5 0
3 years ago
Read 2 more answers
You are using a Jupyter Notebook to explore data in a DataFrame named productDF. You want to write some inline SQL by using the
defon
You need to explain it more simple as everyone is clueless
7 0
3 years ago
A mass of 5 kg of saturated liquid-vapor mixture of water is contained in a piston-cylinder device at 125 kPa. Initially, 2 kg o
arlik [135]
A because it is the best one
5 0
3 years ago
Question 40 and the next Question 41
TEA [102]

Answer:

there's no photo? but I'm willing to help

8 0
2 years ago
Other questions:
  • List the thermal conductivities of five
    15·1 answer
  • A freshly annealed glass containing flaws of maximum length of 0.1 microns breaks under a tensile stress of 120 MPa. If a sample
    13·1 answer
  • A lake with a surface area of 525 acres was monitored over a period of time. During onemonth period the inflow was 30 cfs (ie. f
    5·1 answer
  • You have been assigned to design an open cylindrical storage tank 4 meters tall with a diameter of 8 meters to be made out of A-
    13·1 answer
  • Who is using welding symbols to to communicate the detailed information necessary for welders to complete the weld?
    6·1 answer
  • Find the dryness fraction, specific volume and internal energy of steam at 7bar nd enthalpy 2600kj/kh. (0.921,0.2515m³/kg , 2420
    5·1 answer
  • g A smooth pipeline with a diameter of 5 cm carries glycerin at 20 degrees Celsius. The flow rate in the pipe is 0.01 m3/s. What
    15·1 answer
  • How can you contribute to achieved the mission of NSTP during pandemic in your society?
    7·1 answer
  • In a series circuit, resistance is the simple _____ of all resistors in the circuit.
    5·1 answer
  • The toggle (t) flip-flop has one input, clk, and one output, q. on each rising edge of clk, q toggles to the complement of its p
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!