[antlr-interest] LPG WAS Retaining comments

Gerald B. Rosenberg gbr at newtechlaw.com
Tue Mar 18 13:26:05 PDT 2008


At 01:08 PM 3/18/2008, Daniels, Troy \(US SSA\) wrote:

>So what is the difference between a parse tree and an AST?  If there's a
>wiki page that explains it, a link is a fine answer.

An AST differs from a parse tree (also known as a concrete syntax 
tree) by omitting nodes and edges for syntax rules that do not affect 
the semantics of the program. Only significant programming language 
constructs are included. The classic example of such an omission is 
grouping parentheses, since in an AST the grouping of operands is 
implicit in the tree structure.

http://en.wikipedia.org/wiki/Abstract_syntax_tree
http://en.wikipedia.org/wiki/Parse_tree 



More information about the antlr-interest mailing list