search
Log In

Recent activity by Ravijha

2 answers
1
The minimum number of temporary variables created in 3 address code of the following expression are _____ a+b*c+d-e-a+b*c Assume order of precedence from highest to lowest as: *,+ and - .Consider associativity for + and * are not important but - is left associative.
commented Jun 28, 2019 in Compiler Design 597 views
1 answer
2
2 answers
3
which one of the following string can definitely said to be a token without looking at the next input: +(++,+=) return(return a) *(*=) =(==) ++ , ( ) ‘ ; option e is: plusplus, comma, bracket open, bracket close, single quote ;
commented Jun 24, 2019 in Compiler Design 908 views
1 answer
6
Which of the following is a requirement for LL(1) grammar? Unambiguity No left recursion If $A \to \alpha \mid \beta$ are two productions, then $FIRST(\alpha)$ and $FIRST(\beta)$ are disjoint (i) and (ii) (iii) (i), (ii) and (iii) (ii) and (iii)
answer edited Jun 22, 2019 in Compiler Design 488 views
1 answer
7
Which of the following statements is FALSE? In a SLR(1) parser, it is allowable for both shift and reduce items to be in the same state In a SLR(1) parser, it is allowable for multiple reduce items to be in the same state All SLR(1) grammars are LR(0) All LR(0) grammars are SLR(1)
answered Jun 22, 2019 in Compiler Design 552 views
3 answers
8
Which of the following are decidable? Whether the intersection of two regular languages is infinite Whether a given context-free language is regular Whether two push-down automata accept the same language Whether a given grammar is context-free I and II I and IV II and III II and IV
commented Jun 22, 2019 in Theory of Computation 4.6k views
3 answers
12
When do we count ++(post increment or pre increment) as 1 or 2 token ?
answer edited Jun 22, 2019 in Compiler Design 1.1k views
2 answers
13
#include<stdio.h> int main() { int x, y = 7; x = ++y + ++y + y--; printf("%d\n", x); return 0; } What is the output of this code snippet ? A. 27 B. 26 C. 25 D. Compilation error
commented Jun 22, 2019 in Programming 139 views
2 answers
14
1. L ={ a^n b^m c^x d^y | n=m or x=y} 2. L ={ a^n b^x c^m d^y | n=m or x=y} Classify above in CFL/DCFL?
commented Jun 22, 2019 in Theory of Computation 765 views
2 answers
15
What are different set of characters which are taken as single token in lexical analysis in compiler design? For eg. Charaters under double quotes are taken as single token, post-increment and pre-increment is taken as single token etc.
answered Jun 21, 2019 in Compiler Design 419 views
1 answer
16
The above diagram is Transition Diagrams for identifiers. As we can see that the identifier is said to be accepted if it starts with a letter and ends with a valid delimiter, which includes blank symbol, arithmetic, logical operator, left parenthesis, right parenthesis, +, ... ends with a delimiter and + is a valid delimiter and the error in declaration will not be detected at this stage...
comment edited Jun 21, 2019 in Compiler Design 468 views
4 answers
18
What it the number of tokens in the following line? printf("%d numbers.", &x);
answered Jun 21, 2019 in Compiler Design 563 views
4 answers
22
2 answers
23
If NFA has 'n' states then how DFA can have 2^n states. Please help me in understanding how this is true. As per my understanding every DFA is NFA then how no of states can be more in DFA than nfa Please suggest Thanks
answered Jun 20, 2019 in Theory of Computation 176 views
2 answers
25
1 answer
27
2 answers
28
In operator precedence parsing we have the rule that production cannot have two adjacent non-terminals or an epsilon production, so this production, S--> ab is allowed but not S--> AB, A->a and B->b, though they are giving us the same output. Why so?
answered Jun 20, 2019 in Compiler Design 262 views
10 answers
29
Which of the following statements about parser is/are CORRECT? Canonical LR is more powerful than SLR SLR is more powerful than LALR SLR is more powerful than Canonical LR I only II only III only II and III only
answered Jun 20, 2019 in Compiler Design 3.1k views
2 answers
30
In Operator precedence parsing, precedence relations are defined, i. for all pair of non-terminals. ii. for all pair of terminals. iii. to delimit the handle. iv. only for certain pair of terminals.
answered Jun 20, 2019 in Compiler Design 769 views
...