An NFA's transition function returns
A Boolean value
A state
A set of states
An edge
Can a DFA simulate NFA
No
Yes
Sometimes
Depends on NFA
In Flex, which of the following specifies an exclusive start condition HELLO?
%s HELLO
%x HELLO
%%x HELLO
%%s HELLO
In C++, which of the following is NOT considered as a static semantic error
Variables used without declaration
Redefinition of variables in the same scope
The number of arguments in a function call doesn't match the number of parameters in the function definition
Types of operands of an operator are not compatible
None of the above
Which of the following files is generated by Flex?
tiger.ll
tiger.yy
lex.yy.cc
tokens.h
tiger.tab.cc
Which one of the following is not a stage of the compilation process?
Syntax Analysis
Semantic Analysis
Scanner Generator
Lexical Analysis
The lexical analyzer takes _______ as input and produces a stream of ______ as output.
Token, source program
Either of the two
Source program, tokens
None of the mentioned
The scanner generator takes _______ as input and produces ______ as output.
Regular expressions, tokens
Regular expressions, scanner
Lexeme, scanner
Token, scanner
Which of the following is NOT a feature of compiler?
Scan the entire program first and translate into machine code
To detect syntax errors
Optimize the generated code
Execution time is more comparing with pure interpreter
Which of the following pairs of regular expressions are equivalent?
1(01)* and (10)*1
x(xx)* and (xx)*x
x+ and x+x*
All of the mentioned
The language of the regular expression (x | y)(x |y) is the set_____.
{xy, xy}
{xx, xy, yx, yy}
{x,y}
{x, y, xy}
The language of the regular expression x | y is the set ______.
{x, y}
{xy}
{x}
{y}