q explain about token count - software


Q. Explain about token count - software metrics?

Token count:- A program is considered to be series of tokens and if we count the number of tokens, some interesting results may emerge. Tokens are classified as either operators or operands. All software science measures are functions of the counts of these tokens.

Variables, constants and even labels are operands. Operators consist of arithmetic symbols such as +, -. /, * and command names such as "while", "for", "printf", special symbols such as : =, braces, parentheses, and even function names such as "eof".

The size of the vocabulary of a program which consists of the number of unique tokens to build a program is defined as:-

n =n1 + n2

Where, n : vocabulary of a program.

n1: number of unique operators

n2: number of unique operands.

Request for Solution File

Ask an Expert for Answer!!
Software Engineering: q explain about token count - software
Reference No:- TGS0326880

Expected delivery within 24 Hours