Visit: https://a2zcareers.viden.io
Specifying the translation of a source language construct in terms of attributes of its syntactic components. The basic idea is use the productions to specify a (typically recursive) procedure for translation. For example, consider the production
stmt-list → stmt-list ; stmt
To process the left stmt-list, we
To avoid having to say the right stmt-listwe write the production as
stmt-list → stmt-list1 ; stmt
where the subscript is used to distinguish the two instances of stmt-list.