Compiler-compiler: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Removed parameters. | Use this bot. Report bugs. | Suggested by Dominic3203 | Category:Parsing | #UCB_Category 18/30
TREE-META: remove redundant snausages
Line 137:
{{main|TREE-META}}
 
TREE-META introduced tree building operators ''':'''<''node_name''> and '''['''<''number''>''']''' moving the output production transforms to unparsed rules. The tree building operators were used in the grammar rules directly transforming the input into an [[abstract syntax tree]]. Unparse rules are also test functions that matched tree patterns. Unparse rules are called from a grammar rule when an [[abstract syntax tree]] is to be transformed into output code. The building of an [[abstract syntax tree]] and unparse rules allowed local optimizations to be performed by analyzing the parse tree.
 
Moving of output productions to the unparse rules made a clear separation of grammar analysis and code production. This made the programming easier to read and understand.