Abstract syntax tree: Difference between revisions

Content deleted Content added
m See also: -"Language syntax tree" (it's protected deleted :-P)
No edit summary
Line 3:
 
Creating an AST in a [[parser]] for a language described by a [[context free grammar]], as nearly all programming languages are, is straightforward. Most rules in the grammar create a new node with the nodes edges being the symbols in the rule. Rules that do not contribute to the AST, such as grouping rules, merely pass through the node for one of their symbols. Alternatively, a parser can create a full parse tree, and a post-pass over the parse tree can convert it to an AST by removing the nodes and edges not used in the abstract syntax.
 
This is a test to see if this saves.
 
{{compu-stub}}