Operating Systems Concepts - Engineering

Q1:

The action of parsing the source program into the proper syntactic classes is known as

A syntax analysis

B lexical analysis

C interpretation analysis

D general syntax analysis

E None of the above

ANS:B - lexical analysis

1. Lexical analysis is correct since input is Source program (and not sequence of tokens).

2. Maybe syntactic class refers to type of token (like identifier, keyword etc).

Eg. A = 5;//source program.

(Token category, Token value) -> (identifier, a), (Assignment Op, =), (integer literal, 5).