Recent questions tagged compiler-design

2 votes
1 answer
1622
If a is a terminal and S, A, B are three non-terminals, then which of the following are regular grammars?(a) S → ε, A → aS|b(b) A → aB|a, B → bA|b(c) A → Ba|Ba...
3 votes
3 answers
1623
1 votes
2 answers
1632
1 votes
2 answers
1633
Which of the following is true while converting CFG to an LL(1) grammar?Removing left recursion aloneFactoring the grammar aloneRemoving left recursion and factoring the ...
2 votes
3 answers
1635
In which file the compiler manage various objects, which are used in windows programming?Control FileBinary FileText FileObj File
0 votes
1 answer
1636
If a grammar is LALR(1), then it is necessarily,a. LR(1)b. SLR(1)c. LL(0)d. LL(1)
8 votes
2 answers
1637
12 votes
5 answers
1638
Recursive descent parsing is an example ofTop-down parsersBottom-up parsersPredictive parsersNone of the above
2 votes
0 answers
1639
5 votes
3 answers
1640
A top-down parser generatesRightmost DerivationRightmost derivation in reverseLeftmost derivationLeftmost derivation in reverse
10 votes
2 answers
1641
Peephole optimization is form ofLoop optimizationLocal optimizationConstant foldingData flow analysis
0 votes
1 answer
1642
E → number | E '+' E | E '×' E This grammar is fed to a YACC tool for parsing.What will be the output for expression 3×2+1? /* How to solve this? please explain*...
24 votes
1 answer
1644
0 votes
1 answer
1645
1 votes
3 answers
1647
Consider the following grammar , and test whether the grammar is LL(1) or not.S → 1AB | ∈A → 1AC | 0CB → OSC → 1
1 votes
1 answer
1648
1 votes
2 answers
1649
Consider the following grammarE → E+T/TT → T*F/FF → id/(E)Calculate Lead and Last for every Non terminal.