By Neng-Fa Zhou Attribute Grammars 4 Recall the yacc program –Parse a given expression –Evaluate it expr : expr '+' expr {$$ = $1 + $3;} | expr '-' expr.
ISBN 0-321-19362-8 Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
Attribute Grammars