Unit -2 Flashcards

(21 cards)

1
Q

What is Syntax Analysis?

A

Syntax Analysis is the process of analyzing the syntax of a given input to ensure it conforms to the rules of a formal grammar.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the role of the Parser?

A

The Parser is responsible for analyzing the structure of the input and ensuring it follows the syntax rules defined by the grammar.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Syntax Error Handling?

A

Syntax Error Handling involves detecting and managing errors that occur during the parsing process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are Error-Recovery Strategies?

A

Error-Recovery Strategies are techniques used to recover from syntax errors and continue parsing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Context Free Grammar (CFG)?

A

Context Free Grammar (CFG) is a type of formal grammar that consists of a set of production rules used to generate strings in a language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Derivation Tree?

A

A Derivation Tree is a tree representation of the derivation of a string from a grammar.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Left Most Derivation?

A

Left Most Derivation is a method of deriving a string by always expanding the leftmost non-terminal first.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Right Most Derivation?

A

Right Most Derivation is a method of deriving a string by always expanding the rightmost non-terminal first.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Ambiguity in Context Free Grammar?

A

Ambiguity in Context Free Grammar occurs when a string can be derived in multiple ways, leading to different parse trees.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Left Factoring?

A

Left Factoring is a technique used to eliminate ambiguity by restructuring grammar rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Parsing?

A

Parsing is the process of analyzing a string of symbols according to the rules of a formal grammar.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Top-Down Parsing?

A

Top-Down Parsing is a parsing strategy that starts from the root of the parse tree and works down to the leaves.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Bottom-up Parsing?

A

Bottom-up Parsing is a parsing strategy that starts from the leaves of the parse tree and works up to the root.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Recursive-Descent Parsing?

A

Recursive-Descent Parsing is a top-down parsing technique that uses a set of recursive procedures to process the input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are Predictive Parsers?

A

Predictive Parsers are a type of recursive-descent parser that uses lookahead to make parsing decisions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Nonrecursive Predictive Parsing?

A

Nonrecursive Predictive Parsing is a parsing technique that does not use recursion, often implemented with a stack.

17
Q

What is the Construction of Predictive Parsing Table?

A

The Construction of Predictive Parsing Table involves creating a table that guides the parsing process based on lookahead tokens.

18
Q

What is Left Recursion?

A

Left Recursion occurs when a non-terminal in a grammar can eventually lead to itself as the leftmost symbol in a production.

19
Q

What is the Elimination of Left Recursion?

A

Elimination of Left Recursion is the process of restructuring grammar to remove left recursion, making it suitable for top-down parsing.

20
Q

What is LL(1) Grammar?

A

LL(1) Grammar is a type of context-free grammar that can be parsed by a top-down parser using one lookahead token.

21
Q

What are Heuristics in Error Recovery?

A

Heuristics in Error Recovery are rules of thumb used to guide the recovery process during syntax error handling.