Consider the grammar defined by the following production
A → B – C
B → D | B – D
C → E + C | E
D → id
E → id
Which one of the following is TRUE?1
+ is right associate while – is left associative
2
+ is left associate while – is right associative
3
+ and – both are right associative
4
+ and – both are left associative