I have come across the following question in an exam:
Can inherited attributes be evaluated in bottom-up parsing?
My approach went like this:
Inherited attributes can never be evaluated in bottom-up parsing because the parent node is not constructed during parse yet when we visit the child node. In order to evaluate an inherited attribute of child node we may need the value of parent nodes attributes hence we cannot get the parent nodes attributes as its not yet created hence we can not evaluate the child nodes inherited attributes.
Is my approach wrong? Am I conceptually missing anything?