2

I have seen attribute grammars for a small handful of tasks:

  • Parsing simple arithmetical expressions
  • Type checking
  • Checking that a variable is initialized
  • anbncn (seems to be a favorite toy example)...

and that's about it.

What are some practical uses of attribute grammars outside of the field of compilers? I've seen CFG's being used in program synthesis, computational biology, computational linguistics, and computational music - are attribute grammars anywhere near as useful?

In addition, I'd appreciate some more theoretical intuition about what kinds of context-sensitive languages can be made parseable using attribute grammars, and what are beyond the reach of such grammars.

lightning
  • 225
  • 1
  • 7

0 Answers0