Source converter processing method and machine-readable...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000

Reexamination Certificate

active

06360359

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
This invention relates to source converter processing methods that perform conversion of source programs containing language statements for accessing memories. In addition, this invention also relates to machine-readable media that store programs of the source converter processing methods.
This application is based on Patent Application No. Hei 10-19991 filed in Japan, the content of which is incorporated herein by reference.
2. Description of the Related Art
Conventionally, source converters are provided to convert source programs to other computer languages, so that source converter processing methods are provided for processing of the source converters.
For example, the paper of Japanese Patent Application, Publication No. Hei 3-252819 discloses an example of the device for converting the assembler source program to COBOL source program (where “COBOL” is an acronym for “Common Business Oriented Language”). Herein, the source program conversion is effected using operands between the assembler source program and COBOL source program, but it is not always applicable to the high level programming language such as the C language used for the Unix system, for example.
FIG.
7
and
FIG. 8
are flowcharts showing an example of the source converter processing method.
FIG. 9
shows an example of statements written in an assembly language for a 4-bit microcomputer, which is subjected to conversion using the source converter.
FIG. 10
shows an example of a symbol table that is created by the source converter when the assembly language is converted to C language.
FIG. 11
shows an example of statements written in the C language, which are obtained by converting statements of the assembly language of
FIG. 9
by the source converter. In the statements, “NIBBLE” represents a unit of information used in the 4-bit microcomputer. That is, it represents an amount of information having a half of byte. In addition, a symbol “H” following numeric symbols representing an address indicate that the numeric symbols are represented in hexadecimal notation.
In the flowchart of
FIG. 7
, a reference symbol “S
1
” designates a statement analysis step that performs analysis of statements, while “S
2
” designates a symbol definition decision step for making a decision as to whether an input statement corresponds to a statement of symbol definition or not. In addition, a reference symbol “S
3
” designates a symbol name registration step that detects a symbol name of a definition symbol from the statement of the symbol definition so as to register it with the symbol table, while “S
4
” designates a symbol size registration step that detects a size of the definition symbol from the statement of the symbol definition so as to register it with the symbol table. “S
6
” designates a symbol conversion step that performs conversion to statements of symbol definition of the C language in accordance with content of the symbol table and prescribed conversion method. “S
7
” designates an out-of-symbol-definition-statement processing step that deals with statements of out-of-symbol-definition that are out of the statements of the symbol definition determined by the symbol definition decision step S
2
. That is, the step S
7
performs analysis on statements of such out-of-symbol-definition so as to perform processing required for conversion on the basis of analysis result. “S
8
” designates an out-of-symbol-definition-statement conversion step that converts statements of the out-of-symbol-definition to statements of the C language. “S
9
” designates a statement end decision step that makes a decision as to whether the input statement ends or not. Moreover, a reference symbol “
50
” designates a symbol table that stores symbols and their sizes.
FIG. 8
shows details of the aforementioned out-of-symbol-definition-statement processing step S
7
shown in FIG.
7
. In
FIG. 8
, a reference symbol “S
11
” designates a memory access decision step for making a decision as to whether an input statement corresponds to a statement of memory access or not, while “S
12
” designates a symbol reference decision step for making a decision as to whether the input statement corresponds to a statement of symbol reference or not. “S
13
” designates a symbol name analysis step for performing analysis on the statement of the symbol reference to detect a name of a reference symbol, while “S
14
” designates a symbol search step that extracts the reference symbol from the symbol table
50
on the basis of the name of the reference symbol. “S
51
” designates a reference address statement creation step that creates statements of C language on the basis of definition size of the reference symbol, which is detected from a column of “definition size” of the symbol table
50
, as well as an address of a memory to be referred to. “S
21
” designates a constant reference address analysis step that performs analysis on the address of the memory referred in the statement of out-of-symbol-reference which is discriminated to be different from the statement of the symbol reference in step S
12
. “S
52
” designates a reference address communication step that communicates a reference address in the statement of the out-of-symbol-reference. “S
20
” designates an out-of-subject-statement processing step that performs processing required for conversion in response to analysis result with respect to statements of out-of-memory-access which are discriminated to be different from statements of memory access.
With reference to FIG.
7
and
FIG. 8
, operations of the steps will be described in detail. For example, the statement analysis step S
1
inputs a statement of the assembly language which describes “MEMORY NIBBLE 00H. 12H”. In order to confirm description of the input statement, a decision is made as to whether the input statement is registered as reserved words which are reserved in advance or not, or whether the input statement is registered with the symbol table
50
. If the input statement is registered, a type of the input statement is expressed using a type of the corresponding reserved word(s) or a type of the corresponding information stored in the symbol table
50
. If analysis result indicates that the input statement is not registered, it is detected that the input statement corresponds to error, which forms a statement description error.
Next, in step S
2
, a decision is made as to whether the input statement analyzed in step S
1
is a statement of symbol definition or not. In this case, the input statement includes “NIBBLE” defining a size of a symbol, which coincides with the reserved word. So, the step S
2
determines that the input statement corresponds to the statement of the symbol definition. Then, the symbol name registration step S
3
extracts a symbol name of “MEMORY” of the definition symbol from the input statement written in the assembly language, so that the step S
3
registers it in a column of “symbol name” of the symbol table
50
. In addition, the symbol size registration step S
4
registers “NIBBLE” representing the size of the definition symbol in a column of “definition size” of the symbol table
50
. As a result, the symbol table
50
stores “MEMORY” as the symbol name and “NIBBLE” as the definition size, which is shown in FIG.
10
.
Incidentally, a constant is set to an address designating a memory used for the input statement of the assembly language of “MEMORY NIBBLE 00H. 12H”. For this reason, it is impossible to convert the aforementioned input statement of the assembly language to the statement of the symbol definition written in the C language. Thus, error occurs in the symbol conversion step S
6
.
Next, the step S
1
analyzes a statement of the assembly language that describes “MOV MEMORY+1, #0FH”. This statement does not coincide with the reserved word(s) of the symbol definition which is registered in advance. Thus, the symbol definition decision step S
2
determines that this statement does not correspond to the statement of the symbol definition. So

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Source converter processing method and machine-readable... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Source converter processing method and machine-readable..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Source converter processing method and machine-readable... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2863103

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.