Concrete Parse Tree to AST

I parse some language (let's say MS Excel formulas), and I got a concrete parse tree. Are there any specific algorithms to convert it to AST? Are any methods or technics around? Or it is better (faster? simplier?) to build AST directly? Any information is highly appreciated.
Thanks.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Directly to AST

Normally, you create an AST directly. The parse tree doesn't really exist as a data structure. It is just the execution trace of your parser.