Which is not true about syntax and semantic parts of a computer language
Syntax analysis checks for the syntax of the source program while the semantic analysis, deals with checking of semantic (meaning) of the source program output by syntax analysis phase and input to semantic analysis phase.
Note: The syntax checking is responsibility of the programmer while semantic analys is is checked at the runtime.
Left factoring is the process of factoring out the common
Left factoring is the process of removing the non-determinism from the grammar by factoring out the common prefixes of the alternates.
Operator-precedence parsing method is a parsing method. Which of the following statement is false about it?
1. It is bottom-up parsing method.
2. It must contains ε-production.
3. It doesn’t contains two adjacent nonterminal symbols.
Rules of operator precedence grammar is given as:
1. It must not contain any null-production.
2. It must not contain two adjacent non-terminal symbols.
If conversion from one type to another type is done automatically by the compiler then, it is called
If compiler automatically converts one type of from to another type then it is called implicit conversion or coercions, else if not done automatically, then it is called explicit conversion.
Which of the following derivations does a top- down parser use while parsing as input string? The input is assumed to be scanned in left to right order
Top down parser uses left to right, left most derivation.
Which of the following statements is true?
The canonical LR parser is the most powerful parser that can recognize more grammars than other parsers.
A bottom-up parser generates
Bottom-up parsing recognizes the text’s lowest level small details first, before its mod-level structures and leaving the highest-level overall structure to last. It is some times done by backtracking and much more commonly by a shift-reduce parser such as LALR parser.
A top-down parser generates
Top-down parsing is the parsing strategy which one first looks at the highest level of the parse tree and works down the parse tree by using the rewriting rules of formed grammar. LL parsers are the parsers that the top-down parsing strategy.
Which of the following grammar is LR(1)
If we create LL (1) items, we will find out that (a) and (b) both are LR(1).
Which of the following parsers is the most powerful?
CLR > LALR > SLR