What are the Error-recovery actions in a lexical analyzer?
1. Deleting an
extraneous character
2. Inserting a
missing character
3. Replacing
an incorrect character by a correct character
4. Transposing
two adjacent characters
What is a sentinel? What is its usage?
What is the need for separating
the analysis phase into lexical analysis and parsing?
(Or) What are the issues of lexical
analyzer?
Simpler design is perhaps the most important
consideration. The separation of lexical analysis from syntax analysis
often allows us to simplify one or the other of these phases.
Compiler efficiency is improved.
Compiler portability is enhanced.
What is Lexical Analysis?
The first
phase of compiler is Lexical Analysis. This is also known as linear analysis in
which the stream of characters making up the source program is read from
left-to-right and grouped into tokens that are sequences of characters having a
collective meaning.
What are the Error-recovery actions in a lexical analyzer?
1. Deleting an
extraneous character
2. Inserting a
missing character
3. Replacing
an incorrect character by a correct character
4.
Transposing two adjacent characters
What is recognizer?
What are the cousins of
compiler?
The following are the cousins of compilers
i.
Preprocessors
ii. Assemblers
iii. Loaders
iv. Link
editors.
What are the main two parts of
compilation? What are they performing?
The
two main parts are
Analysis part breaks up the source
program into constituent pieces and creates
an intermediate representation of the source program.
Synthesis part constructs the desired target
program from the intermediate representation
State some compiler
construction tools?
i. Parse generator
ii. Scanner generators
iii. Syntax-directed
translation engines
iv. Automatic code generator
v. Data flow engines.
What is a Symbol table?
A Symbol table
is a data structure containing a record for each identifier, with fields for the attributes of the
identifier. The data structure allows us to find the record for each identifier
quickly and to store or retrieve data from that record quickly.
No comments:
Post a Comment