2 votes 2 votes Which of the following statements is correct? (A) For any context free grammar there is a parser that takes at most O(n2) to parse a string for n terminals. (B) Recursive descent method can't be used to both parse and implement syntax-directed translation. (C) Software tools for generating parsers directly from grammars often use top-down methods. (D) None of the above. Compiler Design gateforum-test-series compiler-design parsing + – Mk Utkarsh asked Jan 20, 2018 edited Mar 12, 2019 by akash.dinkar12 Mk Utkarsh 451 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply Anu007 commented Jan 20, 2018 reply Follow Share A is correct 0 votes 0 votes suryaprakash commented Jun 12, 2018 reply Follow Share any explanation for that plz 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes They mentioned any CFG it can be (Ambiguous or Unambiguous). So there is one Parser comes into mind that is Operator Precedence parser, which takes O(n^2), it can be reduced to O(2n) by making Function table. option A is correct. Dharmendra Verma answered Nov 3, 2018 Dharmendra Verma comment Share Follow See all 0 reply Please log in or register to add a comment.