retagged by
603 views
2 votes
2 votes

Which of these is NOT true about Abstract Syntax Tree (AST)?

  1. An  AST is usually the result of the syntax analysis phase of a compiler.
  2. AST has no impact on the final output of the compiler.
  3. AST is a tree representation of the abstract syntactic structure of source code written in a programming language.
  4. AST is also used in program analysis and program transformation systems.
retagged by

2 Answers

Best answer
4 votes
4 votes
as AST have direct impact on the final output of the compiler .
selected by
1 votes
1 votes

An  AST is usually the result of the syntax analysis phase of a compiler.

True, AST is drawn at the end of syntax analysis phase to find any syntax error in program.

AST has no impact on the final output of the compiler.

Wrong, It does have. Assume you missed semicolon in program, this is the phase where compiler gets warning to show you about error.

AST is a tree representation of the abstract syntactic structure of source code written in a programming language.

True, It's a code represented as tree.

AST is also used in program analysis and program transformation systems.

True, As explained above it is the one who helps analyses the program and gives syntax error according to programming language definitions.

Answer:

Related questions

3 votes
3 votes
1 answer
1
Bikram asked Nov 25, 2016
762 views
The least number of temporary variables required to create a $3$ address code sequence for the statement $L= P + R$ is ________.
3 votes
3 votes
1 answer
2
2 votes
2 votes
2 answers
4
Bikram asked Nov 25, 2016
663 views
Consider the following grammar:$S \rightarrow L = P \mid P$$L \rightarrow ^*P \mid id$$P \rightarrow L$The above grammar is:AmbiguousSLR(1)LALR(1)None of the above