Method and system for controlling the generation of program statements
First Claim
1. A method of generating statements in a program, comprising:
- (a) providing a plurality of statements;
(b) processing the statements by performing, for each statement;
(i) determining whether the processed statement is a buffering directive including a statement operand, wherein the buffering directive comprises an instruction to buffer the statement operand into a memory area to alter an order in which the statements are processed;
(ii) writing the statement operand of the buffering directive into the memory area after determining that the processed statement is a buffering directive; and
(iii) generating the processed statement into a data stream after determining that the processed statement is not a buffering directive; and
(c) generating the statements stored in the memory area into the data stream after generating the plurality of statements that are not buffering directives into the data stream.
1 Assignment
0 Petitions
Accused Products
Abstract
Disclosed is a system for processing program statements, such as statements included in a macro. An assembler program is provided a plurality of statements with an input file. The assembler program processes the statements. For each statement the assembler program determines whether the processed statement is a buffering directive including a statement operand. If the assembler program determines that the processed statement is a buffering directive, the assembler program writes the statement operand of the buffering directive into a memory area. Otherwise, the assembler program generates the processed statement into a data stream. The assembler program generates the statements stored in the memory area into the data stream after processing the statements associated with the macro.
-
Citations
32 Claims
-
1. A method of generating statements in a program, comprising:
-
(a) providing a plurality of statements;
(b) processing the statements by performing, for each statement;
(i) determining whether the processed statement is a buffering directive including a statement operand, wherein the buffering directive comprises an instruction to buffer the statement operand into a memory area to alter an order in which the statements are processed;
(ii) writing the statement operand of the buffering directive into the memory area after determining that the processed statement is a buffering directive; and
(iii) generating the processed statement into a data stream after determining that the processed statement is not a buffering directive; and
(c) generating the statements stored in the memory area into the data stream after generating the plurality of statements that are not buffering directives into the data stream. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
determining whether the operand statement is a variable expression;
substituting one of the parameters for the variable expression after determining that the operand statement is a variable expression, wherein the step of writing the statement operand into the memory area comprises writing the substituted parameter into the memory area; and
writing the statement operand of the buffering directive into the memory area after determining that the operand statement is not a variable expression.
-
-
6. The method of claim 3, wherein the step of providing a plurality of statements associated with the macro comprises the steps of processing a call to the macro and providing a definition of the called macro including a plurality of statements.
-
7. The method of claim 6, wherein the called macro is a first macro, wherein the step of processing each statement further comprises the steps of:
-
processing a call to a second macro;
suspending the processing of the statements in the first macro;
processing the statements in the second macro by performing, for each statement, the steps of;
(i) determining whether the processed statement is a buffering directive including a statement operand;
(ii) writing the statement operand of the buffering directive into a memory area after determining that the processed statement is a buffering directive; and
(iii) generating the processed statement into a data stream after determining that the processed statement is not a buffering directive; and
resuming the processing of the statements in the first macro after processing all the statements in the second macro, wherein the step of generating the statements into the data stream comprises generating the statements from the first and second macros stored in the memory area into the data stream after processing statements included in the first macro.
-
-
8. The method of claim 1, wherein the step of processing the statements comprises sequentially processing the statements and wherein the step of generating the statements stored in the memory comprises generating the statements stored in the memory on a first-in-first-out (FIFO) ordering.
-
9. The method of claim 1, wherein the buffering directive further includes an order operand, wherein the order operand affects the order of generating the statements stored in the memory area into the data stream.
-
10. The method of claim 9, wherein the order operand is one of a first string and a second string, further comprising the steps of:
-
processing the first string to indicate that the statement operand written in the memory area is to be generated into the data stream before statements that were in the memory area when the statement operand was written into the memory area; and
processing the second string to indicate that the statement operand written in the memory area is to be generated into the data stream after statements that were in the memory area when the statement operand was written into the memory area.
-
-
11. A computer programming apparatus, comprising:
-
(a) a computer having a memory;
(b) an assembler computer program loaded into the memory and executed by the computer;
(c) program logic executed by the assembler program, including;
(i) means for providing a plurality of statements;
(ii) mean for determining, for each statement, whether the processed statement is a buffering directive including a statement operand, wherein the buffering directive comprises an instruction to buffer the statement operand into a memory area to alter an order in which the statements are processed;
(iii) means for writing the statement operand of the buffering directive into a memory area after determining that the processed statement is a buffering directive;
(iv) means for generating the processed statement into a data stream after determining that the processed statement is not a buffering directive; and
(v) means for generating the statements stored in the memory area into the data stream after generating the plurality of statements that are not buffering directives into the data stream. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18)
means for processing a call to a second macro associated with a plurality of statements, wherein the means for processing the statements in the macro is capable of processing the statements in the second macro; and
means for resuming the processing of the statements in the first macro after processing all the statements in the second macro, wherein the means for generating the statements into the data stream comprises generating the statements from the first and second macro stored in the memory area into the data stream after processing all the statements included in the first macro.
-
-
17. The apparatus of claim 11, wherein the buffering directive further includes an order operand, wherein the order operand affects the order of generating the statements stored in the memory area into the data stream.
-
18. The apparatus of claim 17, wherein the order operand is one of a first string and a second string, wherein the program logic executed by the assembler program further comprises:
-
means for processing the first string to indicate that the statement operand written in the memory area is to be generated into the data stream before statements that were in the memory area when the statement operand was written into the memory area; and
means for processing the second string to indicate that the statement operand written in the memory area is to be generated into the data stream after statements that were in the memory area when the statement operand was written into the memory area.
-
-
19. An article of manufacture for use in programming a computer to process statements in an input file, the article of manufacture comprising a computer readable storage medium having at least one computer program embodied therein that causes the computer to perform:
-
(a) providing a plurality of statements;
(b) processing the statements in the macro by performing, for each statement, the steps of;
(i) determining whether the processed statement is a buffering directive including a statement operand, wherein the buffering directive comprises an instruction to buffer the statement operand into a memory area to alter an order in which the statements are processed;
(ii) writing the statement operand of the buffering directive into a memory arca after determining that the processed statement is a buffering directive; and
(iii) generating the processed statement into a data stream after determining that the processed statement is not a buffering directive; and
(c) generating the statements stored in the memory area into the data stream after generating the plurality of statements that are not buffering directives into the data stream. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26, 27, 28)
determining whether the operand statement is a variable expression;
substituting one of the parameters for the variable expression after determining that the operand statement is a variable expression, wherein the step of writing the statement operand into the memory area comprises writing the substituted parameter into the memory area; and
writing the statement operand of the buffering directive into a memory area after determining that the operand statement is not a variable expression.
-
-
24. The article of manufacture of claim 21, wherein the step of providing a plurality of statements associated with the macro comprises the steps of processing a call to the macro and providing a definition of the called macro including a plurality of statements.
-
25. The article of manufacture of claim 24, wherein the called macro is a first macro, wherein the step of processing each statement further comprises the steps of:
-
processing a call to a second macro;
suspending the processing of the statements in the first macro;
processing the statements in the second macro by performing, for each statement, the steps of;
(i) determining whether the processed statement is a buffering directive including a statement operand;
(ii) writing the statement operand of the buffering directive into a memory area after determining that the processed statement is a buffering directive; and
(iii) generating the processed statement into a data stream after determining that the processed statement is not a buffering directive; and
resuming the processing of the statements in the first macro after processing all the statements in the second macro, wherein the step of generating the statements into the data stream comprises generating the statements from the first and second macro stored in the memory area into the data stream after processing the statements included in the first macro.
-
-
26. The article of manufacture of claim 19, wherein the step of processing the statements comprises sequentially processing the statements and wherein the step of generating the statements stored in the memory comprises generating the statements stored in the memory on a first-in-first-out (FIFO) ordering.
-
27. The article of manufacture of claim 19, wherein the buffering directive further includes an order operand, wherein the order operand affects the order of generating the statements stored in the memory area into the data stream.
-
28. The article of manufacture of claim 27, wherein the order operand is one of a first string and a second string, further comprising the steps of:
-
processing the first string to indicate that the statement operand written in the memory area is to be generated into the data stream before statements that were in the memory area when the statement operand was written into the memory area; and
processing the second string to indicate that the statement operand written in the memory area is to be generated into the data stream after statements that were in the memory area when the statement operand was written into the memory area.
-
-
29. A memory device storing data accessible to a computer program executing on a computer, the data comprising:
-
an input file, wherein the computer program processes the contents of the input file;
a macro comprised of a plurality of statements, wherein the computer program processes the macro statements to determine whether the statement is a buffering directive including a statement operand, wherein the buffering directive comprises an instruction to buffer the statement operand into a memory area to alter an order in which the statements are processed, wherein the computer program writes the statement operand of the buffering directive into a memory area after determining that the processed statement is a buffering directive; and
a data stream, wherein the computer program generates the processed statement into the data stream after determining that the processed statement is not a buffering directive, and wherein the computer program generates the statements stored in the memory area into the data stream after generating the plurality of statements that are not buffering directives into the data stream. - View Dependent Claims (30, 31, 32)
-
Specification