It is a tree representation of the abstract syntactic structure of text (often source code) written in a formal language.Likewise, a syntactic construct like an if-condition-then statement may be denoted by means of a single node with three branches.However, some language constructs require an arbitrarily large number of children, such as argument lists passed to programs from the command shell.As a result, an AST used to represent code written in such a language has to also be flexible enough to allow for quick addition of an unknown quantity of children.The source code produced should be sufficiently similar to the original in appearance and identical in execution, upon recompilation.The AST is used intensively during semantic analysis, where the compiler checks for correct usage of the elements of the program and the language.