Discussion
Match each term with what it denotes.
List I
A. token
B. pattern
C. lexeme
D. attribute
List II
1. the actual characters matched in the input
2. a category name such as id or number
3. extra data carried with the token
4. the rule describing the form of a lexeme
Answer: B
Correct answer: A-2, B-4, C-1, D-3
The four terms name four different things and the distinction is worth fixing. A token is the category name the parser sees, such as id or number. A pattern is the rule describing what form a lexeme of that category may take. A lexeme is the actual run of characters matched. And the attribute is the extra information carried along with the token, such as a symbol table pointer.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development