Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Abstract syntax tree » ?

Definition 2.1 University Computer Science — Year 3 · Chapitre 2 — Top-Down Parsing

The abstract syntax tree (AST) of a program is a tree whose nodes are the constructs of the language (an addition, a call, an if statement), each with its operands as children and its span. It omits what the grammar needed only to be unambiguous or easy to parse: parentheses, separators, the chains of nonterminals that encode precedence.

The parse tree and the abstract syntax tree of a + b * c. The AST keeps the operators and their operands and drops the nonterminals that only encoded precedence.
The parse tree and the abstract syntax tree of a + b * c. The AST keeps the operators and their operands and drops the nonterminals that only encoded precedence.
Lire dans le chapitre →