Source code line counting system and method
First Claim
1. A source code line counting system, comprising:
- a computer readable storage medium; and
a software counting tool stored on the computer readable storage medium and operable to parse a first file containing computer source code to create a token stream in response to one of a plurality of sets of configuration data, wherein the computer source code in the file was written in one of a plurality of computer languages that may be processed by the software counting tool, wherein each set of configuration data comprises keywords for one or more of the plurality of computer languages, create a list of statements in response to the token stream, and generate a count value in response to the list of statements.
1 Assignment
0 Petitions
Accused Products
Abstract
One aspect of the invention is a method of counting lines of source code. One of a plurality of sets of configuration data is selected wherein each set of the plurality of sets of configuration data is associated with at least one computer language. Collectively the plurality of sets of configuration data are associated with a plurality of computer languages and the selected set of configuration data comprises the keywords for a first computer language. A first file is parsed wherein the first file contains computer source code written in the first computer language to create a first token stream in response to the selected set of configuration data. A first list of statements is created in response to the first token stream and a count value is generated in response to the first list of statements.
24 Citations
37 Claims
-
1. A source code line counting system, comprising:
-
a computer readable storage medium; and
a software counting tool stored on the computer readable storage medium and operable to parse a first file containing computer source code to create a token stream in response to one of a plurality of sets of configuration data, wherein the computer source code in the file was written in one of a plurality of computer languages that may be processed by the software counting tool, wherein each set of configuration data comprises keywords for one or more of the plurality of computer languages, create a list of statements in response to the token stream, and generate a count value in response to the list of statements. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 36)
-
-
13. A method of counting lines of source code, comprising:
-
selecting one of a plurality of sets of configuration data, wherein each set of the plurality of sets of configuration data is associated with at least one computer language, wherein, collectively, the plurality of sets of configuration data are associated with a plurality of computer languages, wherein the selected set of configuration data comprises the keywords for a first computer language, parsing a first file containing computer source code written in the first computer language to create a first token stream in response to the selected set of configuration data, creating a first list of statements in response to the first token stream, and generating a count value in response to the first list of statements.
-
-
23. A source code line counting system, comprising:
-
a computer readable storage medium; and
a software counting tool stored on the computer readable storage medium comprising;
a plurality of configuration files, each associated with one or more of a plurality of computer languages, a tokenizer operable to parse a file containing computer source code written in a first computer language to create a token stream, wherein the parser is operable to parse source code written in any of the plurality of computer languages, wherein the parser creates the token stream in response to the configuration file associated with the first computer language;
a first statement builder operable to create a list of statements in response to the token stream, and a counter operable to generate a count value in response to the list of statements.
-
-
29. A method of measuring changes in source code comprising:
-
parsing a first file containing computer source code to create a first token stream, creating a first list of statements in response to the first token stream, parsing a second file containing computer source code to create a second token stream, creating a second list of statements in response to the second token stream, and comparing the first list of statements to the second list of statements to generate at least one count responsive to a comparison between the first list of statements and the second list of statements.
-
-
35. A source code line counting system, comprising:
-
a computer readable storage medium; and
a software counting tool stored on the computer readable storage medium and operable to parse a first file containing computer source code to create a first token stream, create a first list of statements in response to the first token stream, parse a second file containing computer source code to create a second token stream, create a second list of statements in response to the second token stream, and compare the first list of statements to the second list of statements to generate at least one count responsive to a comparison between the first list of statements and the second list of statements.
-
-
37. A source code line counting system, comprising:
-
a computer readable storage medium;
a plurality of sets of configuration data, each set associated with at least one computer language, the plurality collectively associated with different computer languages; and
a software counting tool stored on the computer readable storage medium and operable to receive a source code file, and compute a statistical measure related to the number of lines of source code in the source code file using the one of the plurality of sets of configuration data associated with the computer language that the source code in the source code file was written in.
-
Specification