search
Log In
5 votes
2.6k views

Which of the following is used for grouping of characters into tokens (in a computer) ?

  1. A parser
  2. Code optimizer
  3. Code generator
  4. Scanner
in Compiler Design
recategorized by
2.6k views

3 Answers

2 votes

Answer is option (D) Scanner. A scanner or lexical analyzer reads the program from left to right, organize them into tokens and pass those tokens to the next level.

0 votes

Ans: D Scanner is also known as lexical analyzer

0 votes
scanner (lexical analyser)

Related questions

0 votes
1 answer
1
349 views
Which of the following is the most general phase structured grammar ? Regular Context-sensitive Context free None of the above
asked Sep 16, 2016 in Compiler Design makhdoom ghaya 349 views
1 vote
1 answer
2
1.3k views
In an absolute loading scheme, which loader function is accomplished by a loader ? Re-allocation Allocation Linking Loading
asked Sep 16, 2016 in Compiler Design makhdoom ghaya 1.3k views
0 votes
4 answers
3
252 views
Consider the following statements related to compiler construction: Lexical Analysis is specified by context-free grammars and implemented by pushdown automata. Syntax Analysis is specified by regular expressions and implemented by finite-state machine. Which of the above statement(s) is/are correct? Only I Only II Both I and II Neither I nor II
asked Mar 24 in Compiler Design jothee 252 views
8 votes
1 answer
4
1.5k views
How many tokens will be generated by the scanner for the following statement ? $x = x ∗ (a + b) - 5$; $12$ $11$ $10$ $07$
asked Jul 25, 2016 in Compiler Design makhdoom ghaya 1.5k views
...