Efficient Embedding of Strategic Attribute Grammars via Memoization
José Nuno Macedo, Emanuel Rodrigues, Marcos Viera, João Saraiva · 2023
Strategic term re-writing and attribute grammars are two powerful programming techniques widely used in language engineering. The former relies on strategies to apply term re-write rules in defining large-scale language transformations, while the latter is suitable to express context-dependent language processing algorithms. These two techniques can be expressed and combined via a powerful navigation abstraction: generic zippers. This results in a concise zipper-based embedding offering the expressiveness of both techniques.