Concepts Of Programming Languages
Concepts Of Programming Languages
12th Edition
ISBN: 9780134997186
Author: Sebesta, Robert W.
Publisher: Pearson,
Expert Solution & Answer
Book Icon
Chapter 4, Problem 13RQ

Explanation of Solution

The reason named constants are used:

The lexical analyzers collect the characters of the input string and group them into logical groups according to the pattern matching rules. These logical groupings are called as lexemes.

Lexical analyzer assigns some internal (numeric) codes to the lexemes (logical groupings) according to their structure. Instead of assigning numeric codes, named constants are used for token codes due to the following reasons:

  • Gives better readability to the code...

Blurred answer
Students have asked these similar questions
What is the difference between and ?
In c++. Read all instructions.
Building Arena models: A few years ago, I was in a group involved with building industrial facilities. A team of consultants visited us to make a presentation about improving the building process. They had a demonstration in the form of a game. We were divided into two teams of four and sat four in a row at a table. Person 1 was given 100 poker chips. The game process was Person 1 would roll a single die. Whatever the number was, he or she would pass that number of chips to Person 2. Person 2 would roll the die, and • If the number of the roll is less than or equal to the chips in front of Person 2, the number of the die roll is passed to the next person. Any remaining chips stay in place, to be passed on another turn when possible.• If the roll on the die is greater than the number of the chips in front of Person 2, all the chips are passed, but the difference in what could be passed is lost on that turn. For example, if Person 2 has 3 chips and rolls a “1,” then one chip is passed.…
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Text book image
    CMPTR
    Computer Science
    ISBN:9781337681872
    Author:PINARD
    Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
CMPTR
Computer Science
ISBN:9781337681872
Author:PINARD
Publisher:Cengage