Method and apparatus for approximate generation of source code cross-reference information
First Claim
1. A method of parsing source code to extract cross-references and other source code browsing information, the method comprising steps of:
- in a first pass, performing an approximate parse of the source code to extract the cross-references that are resolvable, as well as the browsing information;
in a second pass, applying heuristics to a list of cross-references that remained unresolved after the first pass, to generate more complete cross-references to the source code.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for quickly and efficiently generating approximate cross-reference information from source code uses a fuzzy parser in a first pass to process all source code files linearly to resolve cross-references where possible and provide a list of unresolved cross-references and other accumulated knowledge to a separate type resolver. Fast pattern matching is used for the parsing. In a second pass, the type resolver uses this accumulated knowledge which is essentially a class hierarchy, to resolve the type of identifiers using heuristics to make best guesses when required. Separating the fuzzy parser from the type resolver facilitates the process. The method trades absolute accuracy for robustness and speed. This permits the method to be used to parse very large bodies of software.
19 Citations
21 Claims
-
1. A method of parsing source code to extract cross-references and other source code browsing information, the method comprising steps of:
-
in a first pass, performing an approximate parse of the source code to extract the cross-references that are resolvable, as well as the browsing information;
in a second pass, applying heuristics to a list of cross-references that remained unresolved after the first pass, to generate more complete cross-references to the source code. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system for parsing source code to extract cross-references and other source code browsing information, comprising:
-
a processing unit;
a memory;
a program module stored in the memory, the program module being executable by the processing unit to perform in a first linear pass, an approximate parse of the source code to resolve cross-references that are resolvable in the first linear pass, as well as to extract other information useful for browsing the source code; and
, in a second linear pass, to apply heuristics to a list of unresolved cross-references produced during the first linear pass to generate a more complete model of cross-references and the other information useful for browsing the source code. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15)
-
-
16. A computer readable medium storing computer executable instructions for parsing source code to extract cross-references and other source code browsing information, comprising:
-
instructions for performing an approximate parse of the source code in a first pass to resolve resolvable cross-references and extract browsing information; and
instructions for applying heuristics to a list of unresolved cross-references in a second pass, to generate a more complete model of the cross-references and other browsing information for the source code. - View Dependent Claims (17, 18, 19, 20, 21)
-
Specification