KEY FEATURES.
A TRANSLATION SCHEME is a context-free grammar in which semantic rules are embedded within the right sides of the productions.
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
(6) |
Production | Semantic Rule |
A ![]() |
A.str := a |
A ![]() |
A.str := B.str |
A ![]() |
A.str := concat(B.str, C.str, " f") |
It is possible to speed up translations from L to L' by considering the following translation scheme.
A |
![]() |
a { output(a) } |
A |
![]() |
(B) { } |
A |
![]() |
B f C { output(f) } |
We illustrate the notions of syntax tree and translation scheme with the expression a + (a + d )*(b - c).