edited by
485 views
0 votes
0 votes
In backpatching , what does the N mean in semantic  rule for syntax rule ?

1.E1 or NE2

2.E1 and NE2

3.Not E1

a) It refer to the  index of the first statement of second expression

b)  It refer to the  index of the first statement of first  expression

c) it refer to the merging of list of 2 statements of 2 expression

d) it refer to creation of index of 2 statement
edited by

1 Answer

0 votes
0 votes
Here N is a marker nonterminal  in the grammar causes a semantic action to pick up, at appropriate times, the index of the
next instruction to be generated.

Consider semantic action E→E1 or NE2

If E1 is true, then E is also true

If E1 is false, however, we must next test E2 .This target is obtained using the marker nonterminal N.  That nonterminal produces, as a synthesized attribute N , the index of the next instruction, just before E2 code starts being generated.

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
0 answers
2
0 votes
0 votes
1 answer
4
Ebrahim asked Jan 12
215 views
Q1. For the following grammar N - AB | BA A - a | CAC B - b | CBC C - a | b Find the FIRST and FOLLOW