Bottom up evaluation of inherited attributes
. Remove embedded actions from translation scheme
. Make transformation so that embedded actions occur only at the ends of their productions
. Replace each action by a distinct marker non terminal M and attach action at end of M ε
In this section, the method to implement L-attributed definitions in the framework of bottom-up parsing will be shown.
To handle inherited attributes bottom up, the given translation scheme is transformed so that all embedded actions in the transformed translation scheme occur at the right ends of their productions. For this we replace each embedded action in the given scheme by a distinct marker M, a non-terminal and attach action at end of M ->ε .
|