Tree Traversal-based Evaluation

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2022 Nov 7 23:23
Editor
Edited
Edited
2022 Nov 17 23:19
Refs
Refs
  • Evaluates attributes during parse/syntax tree traversal
  • Makes attribute grammar less expressive
  • But often sufficient in practice
For computing synthesized attributes: postorder traversal of the parse/syntax tree
S-attributed grammar
L-attributed grammar
 
 
 

Depends on the attribute types (inherited vs. synthesized)

For synthesized attributes: postorder traversal of the tree
For inherited attributes: preorder traversal with children ordering
 
 
 
 
 

Recommendations