a) Explain what the productions are in a grammar if the Backus−Naur form for productions is as follows: 〈 exp r e s s i o n 〉 : : = ( 〈 exp r e s s i o n 〉 ) | 〈 exp r e s s i o n 〉 + 〈 exp r e s s i o n 〉 | 〈 exp r e s s i o n 〉 + 〈 exp r e s s i o n 〉 | 〈 var i a b l e 〉 〈 var i a b l e 〉 : : = x | y b) Find a derivation tree for ( x * y ) + x in this grammar.
a) Explain what the productions are in a grammar if the Backus−Naur form for productions is as follows: 〈 exp r e s s i o n 〉 : : = ( 〈 exp r e s s i o n 〉 ) | 〈 exp r e s s i o n 〉 + 〈 exp r e s s i o n 〉 | 〈 exp r e s s i o n 〉 + 〈 exp r e s s i o n 〉 | 〈 var i a b l e 〉 〈 var i a b l e 〉 : : = x | y b) Find a derivation tree for ( x * y ) + x in this grammar.
Solution Summary: The author explains that the con free grammar can be described using Backus-Naur form instead of using all the productions separately.
a) Explain what the productions are in a grammar if the Backus−Naur form for productions is as follows:
〈
exp
r
e
s
s
i
o
n
〉
:
:
=
(
〈
exp
r
e
s
s
i
o
n
〉
)
|
〈
exp
r
e
s
s
i
o
n
〉
+
〈
exp
r
e
s
s
i
o
n
〉
|
〈
exp
r
e
s
s
i
o
n
〉
+
〈
exp
r
e
s
s
i
o
n
〉
|
〈
var
i
a
b
l
e
〉
〈
var
i
a
b
l
e
〉
:
:
=
x
|
y
b) Find a derivation tree for
(
x
*
y
)
+
x
in this grammar.
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, subject and related others by exploring similar questions and additional content below.