Concepts of Programming Languages (11th Edition)
Concepts of Programming Languages (11th Edition)
11th Edition
ISBN: 9780133943023
Author: Robert W. Sebesta
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
Explain real number literals briefly.
Subschema may be used in the following ways:
As it relates to methods, what is the difference between passing primitive data types versus passing objects?
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
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT