¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

Study Guide

Patrick Clarke 16 preguntas

Hacer el test

Preguntas del test (16)

  1. 1Which of the following is NOT a top-down parsing?
    1. ARecursive descent parsing
    2. BBacktracking
    3. CLL(1) parsing
    4. DNone of above
  2. 2Which of the following is true for parser generator?
    1. AThe input of a parser generator is a token stream
    2. Bthe output of a parser generator is a abstract syntax tree(AST)
    3. CCFG of a programming language is part of the input to a parser generator.
    4. DFlex is a parser generator
  3. 3Which of the following is NOT true for parser

    i. the parser is to process a token stream.
    ii. One of the major responsibilities of parser is to detect syntax error.
    ii. The output of parser is an abstract syntax tree.
    1. Ai
    2. Bi,ii
    3. Ci,ii,iii
    4. Dii,iii
    5. Eiii
    6. FNone of above
  4. 4Grammer that produce more than one parse tree for same sentence:
    1. Ais ambiguous
    2. Bis unambiguous
    3. Chas syntax errors
    4. Dis no LL(1) grammer
  5. 5Which of the following is WRONG?
    1. AA CFG grammar is said to be ambiguous if for a sentence, there is a leftmost derivation and a rightmost derivation.
    2. BA CFG grammar is said to be ambiguous if for a sentence, there are two leftmost derivations.
    3. CA CFG grammar is said to be ambiguous if for a sentence, there are two rightmost derivations.
    4. DA CFG grammar is said to be ambiguous if for a sentence, there are two different parse tree representation.
  6. 6The context free grammer S --> SS|0S1|1SO|e generates
    1. AEqual number of 0's and 1's
    2. BUnequal number of 0's and 1's
    3. CNumber of 0's followed by any number of 1's
    4. DNone of the mentioned.
  7. 7Which of these does not belong to CFG?
    1. ATerminal Symbol
    2. BNon-Terminal Symbol
    3. CStart Symbol
    4. DEnd Symbol
  8. 8Which of the following derivations does a LL(1) parser use while parsing an input string? The input is assumed to be scanned in left to right order?
    1. ALeftmost derivation
    2. BRightmost derivation
    3. CNone of above
  9. 9Assume X (terminal or non-terminal) is the top symbol in the stack, and c is the next symbol in the input in LL(1) parsing, which of the following indicates an syntax error?

    i.X is any terminal other and c
    ii.X is a non-terminal, but the cell M[X,c] in the parsing table is empty.
    iii.X is any non-terminal other than c,
    iv.X is a non-terminal, but the cell M[X,c] in the parsing table is not empty.
    1. Ai
    2. Bi and iii
    3. Ciii and iv
    4. Di. ii. iii. and iv
    5. ENone of above
  10. 10Assume FIRST (A) = {b,c,d,epsilon} for a non-terminal A, what's the result of FIRST(aAe) where a and e are terminals?
    1. A{a,b,c,d,e}
    2. B{b,c,d}
    3. C{a,e}
    4. D{a}

Información

Descripción
Test sobre Study Guide, creado por Patrick Clarke el 30/10/2018.
Idioma
English
Visitas
29
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?