Are you an EPFL student looking for a semester project?
Work with us on data science and visualisation projects, and deploy your project as an app on top of Graph Search.
This lecture covers the concept of syntax trees, distinguishing between parse trees and abstract syntax trees (AST). It explains how a pretty printer can take an AST and output the leaves of a concrete parse tree. The lecture also delves into the syntax of a while language given by a context-free grammar, detailing the structure of programs, statements, and expressions. Additionally, it explores the creation of AST classes for statements and expressions, providing examples of different grammar rules and AST nodes. The lecture concludes with discussions on ambiguous grammars, expression grammar ambiguities, grammar layering by priorities, left associativity, and left vs. right associativity in expressions.