Mechanism for reformatting a simple source code statement into a compound source code statement
AssigneeSun Microsystems, Inc.
InventorAleksandr M. Kuzmin
Life of this patent
Estimating the term…
Loading patent…
AssigneeSun Microsystems, Inc.
InventorAleksandr M. Kuzmin
Estimating the term…
A mechanism for reformatting a simple source code statement into a compound source code statement is provided. Tokens are identified in unformatted source code, which contains simple statements. A syntax tree is created from the identified tokens. The syntax tree is used to identify one or more simple statements. In processing a particular simple statement, potential statements are identified in the particular simple statement. A tree of blocks, which identifies block levels, is created from the potential statements. An intermediate textual representation is created where each of the potential statements is on a different line. Indentation levels, which correspond to the block levels in the tree of blocks, are associated with each of the potential statements. Formatted source code is created by inserting begin and end block indicators into the intermediate textual representation.
A computer implemented method for transforming a simple statement into a compound statement, comprising:
A computer implemented method for calculating a percentage of code that does not comply with a formatting standard, comprising:
A computer readable medium, comprising:
Dependencies are inferred from the claim text.