0% found this document useful (0 votes)
5 views3 pages

Help

The document provides a comprehensive list of programming operators, keywords, data types, and special characters used in a coding context. It also includes metrics for analyzing code, such as counts of assignment and comparison operators, keywords, spaces, and lines, along with details on identifiers and their occurrences. Additionally, it outlines methods for calculating various statistics related to code structure and content.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Help

The document provides a comprehensive list of programming operators, keywords, data types, and special characters used in a coding context. It also includes metrics for analyzing code, such as counts of assignment and comparison operators, keywords, spaces, and lines, along with details on identifiers and their occurrences. Additionally, it outlines methods for calculating various statistics related to code structure and content.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

# List of assignment operators

assignment_list = ["=", "+=", "*=", "-=", "%=", "/="]


# List of comparison opeartors
comparison_list = ["==", "!=", ">", "<", ">=", "<="]

# List of keywords
reserve_words = ["pragma", "library", "contract", "is", "function",
"event", "emit", "modifier", "return", "public",
"private", "const", "external", "internal",
"payable", "assert",
"require", "throw", "import", "as", "indexed",
"pure", "view", "memory", "storage", "calldata",
"abstract", "after", "alias", "apply",
"auto", "case", "catch", "copyof", "default",
"define", "final", "immutable", "implements", "in",
"inline", "let", "macro", "match",
"mutable", "null", "of", "override", "partial",
"promise", "reference", "relocatable", "sealed",
"sizeof", "static", "supports", "switch", "try",
"typedef", "typeof", "unchecked"]
# List of operators that is not in assignment and comparison operators
operators_list = ["+", "-", "*", "/", "%", "++", "--", "&&", "||", "!",
"&", "|", "^", "~", "<<", ">>"]

# list of data types


data_types = ['address', 'bool', 'string', 'var', 'int', 'int8',
'int16', 'int24', 'int32', 'int40', 'int48',
'int56', 'int64', 'int72', 'int80', 'int88', 'int96',
'int104',
'int112', 'int120', 'int128', 'int136', 'int144',
'int152', 'int160', 'int168', 'int176', 'int184',
'int192', 'int200', 'int208', 'int216', 'int224',
'int232', 'int240', 'int248',
'int256', 'uint', 'uint8', 'uint16', 'uint24',
'uint32', 'uint40', 'uint48', 'uint56', 'uint64',
'uint72', 'uint80', 'uint88', 'uint96', 'uint104',
'uint112', 'uint120',
'uint128', 'uint136', 'uint144', 'uint152',
'uint160', 'uint168', 'uint176', 'uint184', 'uint192',
'uint200',
'uint208', 'uint216', 'uint224', 'uint232',
'uint240', 'uint248', 'uint256', 'byte', 'bytes',
'bytes1', 'bytes2',
'bytes3', 'bytes4', 'bytes5', 'bytes6', 'bytes7',
'bytes8', 'bytes9', 'bytes10', 'bytes11', 'bytes12',
'bytes13',
'bytes14', 'bytes15', 'bytes16', 'bytes17',
'bytes18', 'bytes19', 'bytes20', 'bytes21', 'bytes22',
'bytes23',
'bytes24', 'bytes25', 'bytes26', 'bytes27',
'bytes28', 'bytes29', 'bytes30', 'bytes31', 'bytes32']
# List of special characters
sp_list = ["=", "+=", "*=", "-=", "%=", "/=", "==", "!=", ">", "<",
">=", "<=", "~", "!", "#", "$", "%", "^", "&",
"*", "(", ")",
" _", "+", ",", "/", "|", "-", "=", "<", ">", "?", "{",
"}", "[", "]", ":", ";", '\t', '\n', " ", '',
'*/', '/*', ]

"No. of Assignment operator(list is provided above)" :


num_assignment / num_lines) , (num_assignment)

"no. of Commas(,)" :(num_commas / num_lines) , (num_commas)

"No. of Periods(.)" :(num_periods / num_lines), (num_periods

"No. of Comparison operators(" list is provided above)":


num_comparison/ num_lines),(num_comparison)

"No. of Spaces" :(num_spaces / num_lines) ,(num_spaces)

"Total count of Indentation(No. of spaces+ no. of tabs):


((num_Indentation + num_spaces) / num_lines) ,
(num_Indentation + num_spaces)

" Total no. of Blank Lines" : No. of blank lines /


num_lines) , No. of blank lines

["No.of Keywords(list of reserve words is provided above)"


:(num_keywords / num_line) ,(num_keywords)

"No.of Operators(operator list is provided above)" :


(num_operators / num_line) , num_operators

“No.of identifiers" :(num_identifiers / num_line)


,(num_identifiers)

“Identifier Lengths" : (sum_len / num_line) , (max_len)

“Occ. of any iden." : (sum_occ / num_line) , (max_occ)


In these two cases the max is calculated as identifier having
maximum length. Similarly in case of occurrence of identifier
Max occ. refers to the “count of an identifier which occurred
many times. for example , max and value are two identifiers
where max occurred 3 times and value occurred 5 times then
max_occ = 5.

“ No. of Loops(for, while, do while)" : number of loops/


num_line) , number of loops

“No. of Conditionals(if)" : (num_if / num_line) , (num_if)

"Occ. of any character" :(sum_occ / num_line) , (max_occ)


Max count is similar to above and sum_occ = occurrence of 1
char + occurrence of 2nd char likewise.

"Parenthesis": (num. of parenthesis)/ num_line) , Total num.


of parenthesis

"Comments": single line comment + multiline comment/num_line)


, single line comment + multiline comment

"No. of Numbers": (number_count / num_line), (number_count)

Line Length" : (sum of (length of lines) / num_line) ,


(len(max_len_lines))
For example length of line1 is 12 and length of line2 is 14 likewise , so sum
of(length of lines) = 12 +14. And max_len_lines will be 14.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy