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
REY [17]
3 years ago
14

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= , V|E
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.
2. Using the Nullable values that you calculated in part 1, and using the FIRST sets that you calculated in part 2, determine the FOLLOW sets for all non-terminals, i.e. LHS of the rules. Please note, your answer includes all FOLLOW relations in addition to the resulting sets.
Engineering
1 answer:
Aliun [14]3 years ago
7 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

Explanation:

You might be interested in
An experimentalist claims that, based on his measurements, a heat engine receives 300 Btu of heat from a source of 900 R, conver
lesya [120]

Answer:

Hook's law holds good up to. A elastic limit. B. plastic limit. C.yield point. D.Breaking point

3 0
3 years ago
Sarah needs to create an architectural drawing for a museum building with an inclined surface. Which presentation view will be t
prohojiy [21]

Answer: auxiliary

Explanation: got it right

7 0
2 years ago
He is going ___ in the hot air ballon​
Vladimir [108]

no artical shoul be used here

5 0
2 years ago
Which view of an architectural design displays the complex interior features of an object concealed by hidden lines
Klio2033 [76]

Answer:

Cutting-plane View

Explanation:

5 0
3 years ago
2) The switch in the circuit below has been closed a long time. At t=0, it is opened.
saul85 [17]

Answer:

  il(t) = e^(-100t)

Explanation:

The current from the source when the switch is closed is the current through an equivalent load of 15 + 50║50 = 15+25 = 40 ohms. That is, it is 80/40 = 2 amperes. That current is split evenly between the two parallel 50-ohm resistors, so the initial inductor current is 2/2 = 1 ampere.

The time constant is L/R = 0.20/20 = 0.01 seconds. Then the decaying current is described by ...

  il(t) = e^(-t/.01)

  il(t) = e^(-100t) . . . amperes

8 0
3 years ago
Other questions:
  • Estimate the quantity of soil to be excavated from the borrow pit​
    12·1 answer
  • In Florida a curb indicates and area where parking is prohibited
    15·2 answers
  • The input power for a thermostat is wired to the
    8·1 answer
  • QUESTIONS
    12·1 answer
  • Determine the total condensation rate of water vapor onto the front surface of a vertical plate that is 10 mm high and 1 m in th
    8·2 answers
  • Is normally a large red cable connected to the battery
    11·2 answers
  • Please help! timed test. This about electrical control. Please be serious.
    15·1 answer
  • Are there engineering students here?​
    5·2 answers
  • Stress that acts in the plane of a cut section, rather than at right angles to the section is called:_______
    6·1 answer
  • 5. Which of the following is false about onStep?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!