System for ensuring the accuracy of file structures in a source-to-source computer program translator
First Claim
Patent Images
1. A method for translating a source program into a target program, the method comprising:
- parsing a source program written in a first computer language to determine whether a line includes a macro definition;
creating a first list having a partition associated with the determined macro definition; and
using the partition to generate a target program of a second computer language, wherein said second computer language is different from said first computer language.
5 Assignments
0 Petitions
Accused Products
Abstract
A system for identifying the file structure of a computer program, preserving the file structure of the code after translation of source code from one high-level computer language to another, combining pieces of a source file that were generated in different translation sessions, and ensuring textual consistency of each piece of generated code in the resultant code files.
-
Citations
6 Claims
-
1. A method for translating a source program into a target program, the method comprising:
-
parsing a source program written in a first computer language to determine whether a line includes a macro definition;
creating a first list having a partition associated with the determined macro definition; and
using the partition to generate a target program of a second computer language, wherein said second computer language is different from said first computer language. - View Dependent Claims (2, 3, 4)
generating a second list of partitions; and
performing a consistency check between the first and second lists.
-
-
3. The method of claim 2, wherein the step of parsing includes:
-
converting the source program to a stream of tokens;
creating a syntax tree from the tokens;
using a virtual source production mechanism to create a first portion of virtual source code; and
wherein the step of creating a first list having a partition includes the substep of;
using one or more tokens to create the partition.
-
-
4. The method of claim 3, further comprising:
-
extracting partition templates from the source program;
assembling the partition templates into a target language code file; and
using the target language code file to generate the target program.
-
-
5. An apparatus for translating a source program into a target program, the apparatus comprising:
-
instructions for parsing a source program written in a first computer language to determine whether a line includes a macro definition;
instructions for creating a first list having a partition associated with the determined macro definition; and
instructions for using the partition to generate a target program of a second computer language, wherein the second computer language is different from the first computer language.
-
-
6. A computer readable media for storing instructions for a process executable on a computer system for translating a source program into a target program, the computer-readable media including:
-
instructions for parsing a source program written in a first computer language to determine whether a line includes a macro definition;
instructions for creating a first list having a partition associated with the determined macro definition; and
instructions for using the partition to generate a target program of a second computer language, wherein the second computer language is different from the first computer language.
-
Specification