Recent questions tagged compiler-design

1 votes
0 answers
511
How to represent array expressions using DAG?for example a=b[i]+c[j]how to represent this using DAG?
0 votes
0 answers
512
What is the SDT to eliminate redundant parenthesis from infix expressions with * and +? what is the concept behind removal of redundant parenthesis and how to start?
0 votes
1 answer
514
Can lookahead symbol be epsilon in LR(1) parsing?andpls give the LR(1) diagram for the following grammar?A->AB | aB->*AC | Cb | ∈C->+ABc | ∈
0 votes
0 answers
515
1 votes
1 answer
517
What language is generated by the following grammer?S→ a | S+S | SS | S* | (S)
1 votes
2 answers
518
Match the followingList 1Link timeload timecompile timeRun timeList 2 A. Resolving references B. Relocation C. Token Recognition D. Activation record
1 votes
1 answer
519
$L=\{x^n:n \in N\} \cup\{x^ny^n|n \in N\}$This language does not have LL(k) parser while being deterministic context free.Why?
0 votes
3 answers
520
fro(int I=0; I <5;I++);what kind of compilation error is this ?
0 votes
1 answer
521
0 votes
1 answer
522
Construct the predictive parsing table for the grammar and tell whether the grammar is LL(1) or notS (L) / aL L, S / S
0 votes
1 answer
523
For any context-free grammar there is a parser that takes at most O (n$^3$ )time to parse a string of n terminals.True or False?
0 votes
1 answer
524
is it always true or not???STATEMENT → in LR(0) Parsing i1 is a final state,there is a shift move. it always give S/R conflict.Explain with example.
13 votes
4 answers
525
Which one of the following kinds of derivation is used by LR parsers?LeftmostLeftmost in reverseRightmostRightmost in reverse
0 votes
0 answers
530
In exam if they are mentioning LR(1) parserThen which parser to consider:SLR(1) / LALR(1) / CLR(1)
0 votes
0 answers
531
Which phase of the compiler detects the error?#include<stdio.h>int main(){printf(“%d”,2..3);return 0;}I think lexical analyzer am i correct?
0 votes
0 answers
532
I am having difficulty in finding the type of errors like if given a statement, if I have to tell which type of error it is ( syntax or semantic). Can anyone help me with...
1 votes
0 answers
533
0 votes
2 answers
534
b = b + cd = b + db = b – de = d + bThe minimum number of nodes and edges present in the DAG representation of above basic block respectively are ?4 and 55 and 46 and 6...
0 votes
1 answer
537
consider the grammar G: S->A|B A->a|c B->b|c where {S,A,B} are non-terminals,{a,b,c} are terminals.Does LR(1) can parse all strings that are generated by gr...
6 votes
2 answers
538
If we merge states in LR(1) parser to form a LALR(1) parser, we may introduceshift-reduce conflictreduce-reduce conflictno extra conflictboth shift-reduce as well as redu...
0 votes
1 answer
539
Which reference book you guys use for Compiler Design?What are the research prospect in this domain?
0 votes
1 answer
540
If we have more than 1 parse tree,but one is LMD and other is RMD , Is Grammar Ambiguous?There are no other parse tree other than these two.