JPS62157950A - Translating method for data base operating source program - Google Patents

Translating method for data base operating source program

Info

Publication number
JPS62157950A
JPS62157950A JP29842385A JP29842385A JPS62157950A JP S62157950 A JPS62157950 A JP S62157950A JP 29842385 A JP29842385 A JP 29842385A JP 29842385 A JP29842385 A JP 29842385A JP S62157950 A JPS62157950 A JP S62157950A
Authority
JP
Japan
Prior art keywords
database operation
program
source program
database
data base
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP29842385A
Other languages
Japanese (ja)
Inventor
Yoshio Hosoya
細矢 義夫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP29842385A priority Critical patent/JPS62157950A/en
Publication of JPS62157950A publication Critical patent/JPS62157950A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To analyze the justification of a data base operating instruction by accumulating the information concerning the work area included in the source program into a data base before the data base operating instruction is translated. CONSTITUTION:A data base operating source program 6 is a source program which is translated from now on, and in the program, the contents described by a host language and the data base operating instruction described by the language except the host language are included. Before the translation 14 of the data base operating instruction is executed, the information concerning the work area used by a data base operating instruction 3 included in the data base operating source program 6 is accumulated in the data base. Thus, even when another data base operating source program has the work area at the earlier translated data base operating source program, the justification of the data base operating instruction can be analyzed only based upon the information in the data base and the analyzing logic is simplified.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、ホスト言語で記述されたプログラム部分に加
えホスト言語と異なる言語で記述されたデータベース操
作命令を含むデータベース操作ソ−ス・プロゲラJ、を
実行可能な命令に641訳するデータベース操作ソース
・プロゲラJ、 ff1ll訳方法に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention provides a database operation source Progera J that includes a program part written in a host language and database operation instructions written in a language different from the host language. This paper relates to a database operation source progera J, ff1ll translation method for translating 641 into executable instructions.

〔従来の技術〕[Conventional technology]

従来、この種の方法は、データベース操作命令の翻訳を
ブリプロセッサとしてコンパイラの1?■フエーズで実
行するか、又は、コンパイラを拡張してデータベース操
作命令も解析できるようにするかの何れかの方法か採用
されていた。
Conventionally, this type of method uses a compiler as a preprocessor to translate database operation instructions. ■Either one of two methods was adopted: executing it in phase mode, or extending the compiler so that it could also analyze database manipulation instructions.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかし、」二連したブリプロセッサをコンパイラの前フ
ェーズで実9−jする方法ば、その前フェーズにおいて
、データー、−ス操作命令かデータベース内のデータの
授受に用い2)作業域の解析を行なう必要があり、ホス
ト8語の種類によってはコンパイル単位が別なソース・
プログラムに作業域を持っている場合があり、データベ
ース操作命令と作業域との整合11の解析に多大な解t
J7t+シックを必要とする問題点があった。
However, if you use a method in which two consecutive pre-processors are implemented in the phase before the compiler, in the phase before that, they are used for data manipulation instructions or data in the database. 2) Analyze the work area. Depending on the type of host word, the compilation unit may be a different source file.
The program may have a work area, and it takes a lot of effort to analyze the consistency between the database operation command and the work area.
There was a problem that required J7t + chic.

また、″:1ンバイラを改造してデータベース操作命令
をも扱えるようにする方法は、コンパイラの処理ロジッ
クを複雑にする上、データベース操作命令の拡張の度に
コンパイラを改造しなりればならない等の問題点がある
In addition, the method of modifying the ``:1 compiler so that it can also handle database manipulation instructions complicates the processing logic of the compiler, and requires modification of the compiler every time the database manipulation commands are expanded. There is a problem.

本発明はこのような従来の問題点を解決したもので、そ
の目的は、コンパイル単位が別なソース・プログラムに
作業域を持っているような場合においても、従来のコン
パイラの前フェーズで動作するプリプロセッサ相当部分
の負荷の軽減が可能であり、珪つデータベース操作命令
の拡張に伴うコンパイラへの影Cをも軽減することがで
きる翻訳方法を提供することにある。
The present invention solves these conventional problems, and its purpose is to operate in the previous phase of the conventional compiler even when the compilation unit has a work area in a separate source program. It is an object of the present invention to provide a translation method that can reduce the load on a portion corresponding to a preprocessor, and can also reduce the impact on a compiler caused by the expansion of database operation instructions.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は上記目的を達成するために、ホスト言語で記述
されたプログラム部分に加えポスl−言語以外の言語で
記述されたデータベース操作命令を含み、該データベー
ス操作命令をホスト言語の命令群に変換し、更にホスI
・言語を翻訳することによってオブジェクト・プログラ
ムを生成するデータベース操作ソース・プロゲラJ、 
El翻訳式において、 前記データベース操作ソース・プログラムに含まれるデ
ータベース操作命令のi!iJ+訳を行なう前に、前記
データベース操作ソース・プログラドからデータベース
操作命令がデータベース内のデータの授受に用いる作業
域の宣言に関する命令群のみをプログラム生成手段によ
り抽出し、該抽出された命令群をホスト言語翻訳手段に
より中間L′語に翻訳してデータベース操作命令がデー
タベース内のデータの授受に用いる作業域に関ずろ情報
をプログラム・データベースに蓄積するようにし、前記
データベース操作ソース・プログラムに含まれるデータ
ベース操作命令の翻訳を行なうに際し7ては、データベ
ース操作命令翻訳手段が前記プログラム・データベース
に蓄積された作業域に関する情報から前記プログラム・
データベース操作命令の正当性を解析して正当性が認め
られたときに前記データベース操作命令をホス+−2語
に翻訳し、該ホスト言語に翻訳されたデータベース操作
命令と前記データベース操作ソース・プログラブ、の他
のホスト言語で記述された内容とを前記ホスト言語翻訳
1段により翻訳して目的のオブジェクト・プlコグラム
を生成するよ・うに構成されろ。
In order to achieve the above object, the present invention includes a program part written in a host language as well as a database operation instruction written in a language other than the POST language, and converts the database operation instruction into a group of instructions in the host language. and further phos I
・Progera J, a database operation source that generates object programs by translating languages;
In the El translation formula, i! of the database operation instruction included in the database operation source program. Before performing the iJ+ translation, the program generation means extracts from the database operation source program only the instruction group related to the declaration of the work area used by database operation instructions to exchange data in the database, and the extracted instruction group is used as a host. A database included in the database operation source program is translated into an intermediate L' language by a language translation means so that information related to a work area used for exchanging data in the database is stored in a program database. When translating the operation command, in step 7, the database operation command translation means calculates the program from the information regarding the work area stored in the program database.
analyzing the validity of the database operation command and translating the database operation command into a host language when the validity is recognized, and the database operation command translated into the host language and the database operation source program; The content written in another host language is translated by the first stage of host language translation to generate a target object program.

〔作用〕[Effect]

データベース操作ソース・プログラムに含まれるデータ
ベース操作命令の翻訳を行なう前に、そのデータベース
操作ソース・プログラムに含まれるデータベース操作命
令で用いる作業域に関する情報をデータベース内に蓄積
しておくようにしたので、そのデータベース操作ソース
・プログラムに含まれるデータベース操作命令が自ソー
ス・プログラムに持っている作業域を使用するときのみ
ならず、先に翻訳された別のデータベース操作ソース・
プログラムに作業域を持っている場合でも、データベー
ス内の情報に基づいて白痢のデータベース操作命令の正
当性を解析することができる。
Before translating the database operation instructions included in the database operation source program, information about the work area used by the database operation instructions included in the database operation source program is stored in the database. Not only when a database operation instruction included in a database operation source program uses the work area that the own source program has, but also when a database operation instruction included in a database operation source program that has been translated previously is used.
Even if the program has a work area, it is possible to analyze the validity of the database operation command for dysentery based on the information in the database.

〔実施例〕〔Example〕

次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の詳細な説明図であり、1は制御手段、
2はプログラム生成手段、3はう一−クヘース操作命令
抽出手段、4はデータベース操作命令翻訳手段、5はホ
ストL゛語翻訳手段、(3はデータベース操作ソース・
プロクラjい7は部分的なソース・プIXIグラム、8
はプログう1、・データヘース、9はオフジェクI・・
プログラムである。
FIG. 1 is a detailed explanatory diagram of the present invention, in which 1 is a control means;
2 is a program generation means, 3 is a keyword operation instruction extraction means, 4 is a database operation instruction translation means, 5 is a host L language translation means, (3 is a database operation source
Program code 7 is a partial source program, 8
is Prog U1, Data Hose, 9 is Offjec I...
It is a program.

上記データベース操作ソース・プし1クラム6がこれか
らIJI Ii尺し7.!:、うとするソース・ブ11
グラ1、てあり、この中にはホスト言語で記述された内
容とホスト言8E以外の一諷′語で記述されたデータベ
ース操作命令とが含まれている。
The above database operation source program 1 crumb 6 is now IJI Ii length 7. ! :、Drowsing Sauce Bu 11
This includes contents written in the host language and database operation commands written in a pronunciation other than the host language 8E.

第2図は制御手段]の処理例を示す流れ図であり、制御
手段】G14起動されイ、と、フ’ T:lグラノー、
生成手段2の起動処理21.データベース操作命令抽出
手段3の起動処理22.同しくデータベース操作命令抽
出手段3の起動処理23をその111へ番に行なう如く
制御の移行処理を行なう。
FIG. 2 is a flowchart showing an example of the processing of the control means.
Starting process 21 of generation means 2. Start-up process of database operation command extraction means 3 22. Similarly, the control transfer process is performed such that the startup process 23 of the database operation command extraction means 3 is performed in its turn 111.

第3図はブI」クラJ、生成手段2の処理例を示す流れ
図であり、ブし1クシJ、生成手段2は起動されると、
チーター・−入操作ソース・プロクラム〔jの読込処理
31、読込んだ内容が、データベース操作命令がデータ
ベース内のデータの授受に用いる作業域の宣言に関する
命令であるが否かを解析する命令の解析処理32、作業
域の宣言に関する命令群のみを部分的なソース・プログ
ラム7に出力する命令の出力処理33とを行なう。
FIG. 3 is a flowchart showing an example of the processing of the generating means 2. When the generating means 2 is activated,
Cheetah - Input operation source program [j's reading process 31, analysis of instructions to determine whether the read content is an instruction related to the declaration of a work area used for sending and receiving data in the database as a database operation instruction A process 32 and an instruction output process 33 for outputting only a group of instructions related to the declaration of the work area to the partial source program 7 are performed.

第4図はデータベース操作命令抽出手段3の処理例を示
す流れ図であり、データベース操作命令抽出手段3は起
動されると、ソース・プログラムの読込処理41(制御
1段1の起動処理22で起動されたときは部分的なソー
ス・プログラム7からのソース・プログラムの読み込ゐ
を行ない、起動処理23で起動されたときはデータベー
ス操作ソース・プログラム6からのソース・プログラム
の読込を行なう)、読込んだ内容がデータベース操作命
令か否かの解析を行なう解析処理42.データベース操
作命令翻訳手段4の起動処理43.ボス1−言語翻訳手
段5の起動処理44を行な・)6第5図はデータベース
操作命令翻訳手段4の処理例を示す流れ図であり、デー
タベース操作命令翻訳手段4はデータベース操作命令抽
出手段3から起動されると、データへ・−入操作命令抽
出手段3からデータベース操作命令を受取る処理51、
プログラム・データヘース8へのアクセス処理52゜デ
ータベース操作命令の解析処理53.データー・−入操
作命令のホスト言語への変換処理54.変換結果のデー
タベース操作命令抽出手段3への通知処理55を行なう
FIG. 4 is a flowchart showing a processing example of the database operation instruction extraction means 3. When the database operation instruction extraction means 3 is activated, it executes a source program reading process 41 (starting process 22 of the control stage 1). When the database operation source program 6 is started, the source program is partially read from the source program 7, and when started in the startup process 23, the source program is read from the database operation source program 6). Analysis processing 42 to analyze whether the content is a database operation command or not. Start-up processing of database operation command translation means 4 43. Boss 1 - Start-up processing 44 of language translation means 5 is performed.)6 FIG. When activated, a process 51 for receiving a database operation command from the data input operation command extraction means 3;
Access processing to program/data database 8 52. Database operation command analysis processing 53. Conversion processing of data-input operation commands into host language 54. A notification process 55 of the conversion result to the database operation command extraction means 3 is performed.

第6図はボスl” ’=−語翻訳手段5の処理例を示す
流れ図であり、ボスト1語翻訳手段5はデータ・\−ス
操作命令抽出f段3から起動されろと、データベース操
作命令抽出手段3からのホスト3語のコンパイル処理6
1.コンパイル結果のうらの中間言語のプロゲラJ・・
データヘース8への出力処理62、コンパイル結果のう
ちのオブジェクト・プログラムをオブジェクト・プログ
ラム9として作成する処理63を行な・う。
FIG. 6 is a flowchart showing an example of the processing of the boss l'''=-word translation means 5, in which the boss one-word translation means 5 receives a database operation command to be activated from the data/base operation command extraction f stage 3. Compilation process 6 of 3 host words from extraction means 3
1. Progera J, the intermediate language behind the compilation results...
Output processing 62 to the data database 8 and processing 63 for creating an object program as an object program 9 from among the compilation results are performed.

次に本実施例の動作を図面を参照して説明する。Next, the operation of this embodiment will be explained with reference to the drawings.

第1図において、最初に制御手段1が起動さ4すると、
制御手段Iは第2図に示したようにプIコグラム生成手
段2.データベース操作命令抽出十段3、同じくデータ
ベース操作命令抽出手段3の順に3回の制御の移行を実
施する(処理21〜処理23)。
In FIG. 1, when the control means 1 is first activated 4,
As shown in FIG. 2, the control means I includes a pcogram generating means 2. The control is transferred three times in the order of database operation command extraction stage 10 3 and database operation command extraction means 3 (processes 21 to 23).

始めに起動されるプログラム生成手段2は、第3図に示
したように、先ずデータベース操作ソース・プログラム
6からソース・プログラムを読込み(処理31)、この
読込んだ内容が、データベース操作命令がデータベース
内のデータの授受に用いる作業域の宣言に関する命令で
あるが否かを解析する(処理32)。解析した結果、そ
の命令が、データベース操作命令が作業域として用いる
宣言の命令であれば、プログラム生成手段2はそれを部
分的なソース・プログラム7に出力する(処理33)。
As shown in FIG. 3, the program generating means 2 that is started first reads a source program from the database operation source program 6 (process 31), and the read content is used to create a database operation command. It is analyzed whether the command is related to the declaration of a work area used for exchanging data within (processing 32). As a result of the analysis, if the command is a declaration command to be used as a work area by the database operation command, the program generating means 2 outputs it to the partial source program 7 (processing 33).

この結果、部分的なソース・プログラム7は、ホスト言
語の命令群のうちデータベース操作命令がデータベース
内のデータの授受に用いる作業域の宣言を行なう命令群
のみから構成される。
As a result, the partial source program 7 is composed of only a group of commands in the host language in which the database operation command declares a work area used for exchanging data in the database.

次に起動されるデータベース操作命令抽出手段3は、第
4図に示したように、先ず部分的なソース・プログラム
7を読込み(処理41)、その内容がデータベース操作
命令であるか否かを解析する(処理42)。前述したよ
うに部分的なソース・プログラム7にはデータベース操
作命令を含まないため、この場合処理42の次に処理4
4が実行さ相2、データベース操作命令翻訳手段4の起
動処理43は行なわれないで、ホスト言語翻訳手段5の
起動処理44によってホスト言語翻訳手段5が起動され
る。
As shown in FIG. 4, the database operation instruction extracting means 3 to be started next first reads the partial source program 7 (processing 41) and analyzes whether the content is a database operation instruction or not. (processing 42). As mentioned above, since the partial source program 7 does not include any database operation instructions, in this case, the process 42 is followed by the process 4.
4 is executed, the host language translation means 5 is started by the start-up process 44 of the host language translation means 5 without performing the start-up process 43 of the database operation command translation means 4.

ホスト言語翻訳手段5は起動されると、第6図に示した
ようにコンパイル処理61を行ない、そのコンパイル結
果で得られた中間言語をプログラム・データベース8へ
出力することによって(処理62)、プログラム・デー
タベース8内に、データベース操作ソース・プログラム
6に含まれろデータベース操作命令かデータベース内の
データの授受に用いる作業域に関する情報が蓄積されろ
。なお、第6図の処理ではオブジェク1−・ブじτグラ
1、作成処理63によってオブジェクト・プログラム9
も作成されるが、本発明では部分的なソース・プログラ
ムの翻訳段Il!、yにおいては無意味であり、プログ
ラム・データベース8に蓄積さ41だ情報の・7ノ意味
がある。
When the host language translation means 5 is activated, it performs a compile process 61 as shown in FIG. 6, and outputs the intermediate language obtained as a result of the compilation to the program database 8 (process 62). - In the database 8, information regarding the database operation commands included in the database operation source program 6 or the work area used for exchanging data in the database is stored. In addition, in the process shown in FIG.
However, in the present invention, a partial source program translation stage Il! is also created. , y is meaningless, and 7 of the information stored in the program database 8 has meaning.

次に、データベース操作命令抽出手段3が再び起動され
ると、データベース操作命令抽出り段3は第4図のソー
ス・プログラム読込処理41によってデータベース操作
ソース・プし1グラム6を読込み、次に読込んだ命令の
うちからデータベース操作命令を抽出する(処理42)
。前述したようにデータベース操作ソース・プログラム
6にはデータベース操作命令が含まれているので、デー
タベース操作命令抽出手段3は処理42によってデータ
ベース操作命令を認識すると、データベース操作命令翻
訳手段4を起動ずろ(処理43)。このとき、認識した
データベース操作命令が同時にデータベース操作命令翻
訳手段4に通知される。
Next, when the database operation instruction extraction means 3 is started again, the database operation instruction extraction stage 3 reads the database operation source program 1gram 6 by the source program reading process 41 shown in FIG. Extract database operation instructions from the received instructions (process 42)
. As mentioned above, the database operation source program 6 includes database operation instructions, so when the database operation instruction extracting means 3 recognizes the database operation instruction in the process 42, it starts the database operation instruction translation means 4 (processing 43). At this time, the recognized database operation command is simultaneously notified to the database operation command translation means 4.

データベース操作命令翻訳手段4は起動されると、第5
図に示したように、先ず通知されたデータベース操作命
令を受は取り(処理51)、プログラム・データベース
8へのアクセス処理52に、1−ってプログラム・デー
タベース8ヘアクセスしてデータベース操作命令で用い
る作業域の情報を得る。
When the database operation command translation means 4 is activated, the fifth
As shown in the figure, first, the notified database operation command is received (process 51), and in the program database 8 access process 52, 1- accesses the program database 8 and executes the database operation command. Obtain information about the work area to be used.

冊 そして、得られた作業域の情報とデータベ−ス操作命令
との整合性の解析をデータベース操作命令の解析処理5
3によって行ない、結果が正しければ、データベース操
作命令の変換処理54によってデータベース操作命令を
ホスi・言語の命令のみからなる命令群に変換し、デー
タベース操作命令抽出手段3へ変換結果を通知する(処
理55)。
Then, the database operation command analysis process 5 analyzes the consistency between the obtained work area information and the database operation command.
3, and if the result is correct, the database operation command is converted into a group of commands consisting only of the host i/language commands through the database operation command conversion process 54, and the conversion result is notified to the database operation command extraction means 3 (processing 55).

データベース操作命令抽出手段3は、このホスト言語の
命令群に変換された結果を受取ると、データベース操作
ソース・プログラム6におけるデータベース操作命令部
分をその変換結果で置換えた内容を、第4図のホスト言
語翻訳手段起動処理44によってホスト言R1j fi
ll訳手段5に通知すると共にこれを起動する。
When the database operation instruction extracting means 3 receives the result converted into the command group of the host language, the database operation instruction extracting means 3 replaces the database operation instruction part in the database operation source program 6 with the conversion result and converts it into the host language as shown in FIG. By the translation means activation process 44, the host word R1j fi
It notifies the translation means 5 and activates it.

これに応答してホスト言語翻訳手段5ば、第6図に示し
たように動作し、通知されたホスト言語の内容をコンパ
イルしく処理61)、そのコンパイル結果の中間言語情
報をブし1グラム・データベース8へ出力しく処理62
)、またコンパイル結果のオブジェクト・プロゲラJ・
をオブジlり1〜・プログラム9として作成しく処理6
3)、データベース操作ソース・プログラム6の翻訳処
理を完Yする。
In response, the host language translation means 5 operates as shown in FIG. 6, compiles the contents of the notified host language (61), and reads the intermediate language information of the compilation result. Process 62 to output to database 8
), and the compilation result object Progera J.
Process 6 to create objects as objects 1 to 9 and programs 9.
3) Complete the translation process of the database operation source program 6.

このように本実施例によれば、データベース操作ソース
・プログラム6に含まれるデータベース操作命令がデー
タベース内のデータの授受に用いる作業域に関する情報
は、プログラム・データベース8内に蓄積されていくの
で、データベース操作ソース・プログラム6の翻訳処理
を柊了し、別のデータベース操作ソース・プログラムの
翻訳を行なう際、その別のデータベース操作ソース・プ
1ゴグラムがデータベース操作ソース・プログラム6に
作業域を持っているソース・プログラムであっても、デ
ータベース操作命令翻訳手段4はプロクラム・データベ
ース8に格納された情報に基づきその別のデータベース
操作ソース・プログラムに含まれるデータベース操作命
令の正当性の解析を行なうことが可能となる。
As described above, according to this embodiment, information regarding the work area used by database operation instructions included in the database operation source program 6 to exchange data in the database is accumulated in the program database 8, When the translation process of the operation source program 6 is completed and another database operation source program is translated, the other database operation source program has a work area in the database operation source program 6. Even if it is a source program, the database operation instruction translation means 4 can analyze the validity of the database operation instruction included in another database operation source program based on the information stored in the program database 8. becomes.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば、あるデータベー
ス操作ソース・プログラムに含まれるデ−タヘース操作
命令の翻訳を行なう前に、そのデータベース操作ソース
・プログラノ、に含まれるデータヘース操作命令がデー
タヘース内のデータの授受に用いる作業域の宣5ヤに関
する命令群のみか抽出されると共に翻訳されてデータヘ
ース内に、そのデー々ヘース操作命令が用いろ作業域に
関する情報が蓄積されるので、別のデータベース操作ソ
ース・ブ11グラl、か前に翻訳されたデータベース操
作ソース・プロゲラJ・に作業域を持っている場合でも
、その別のう′−タヘース操作ソース・プロゲラl、に
含まれイ)データー・−ス操作命令の正当性をデータヘ
ース内の情報にのみWついて解析することができ、解析
ロジックが簡略化される。また、データヘース操作命令
で扱う作業域に関する命令群の解析の負イ11を従来の
コンパイラに相当するホスト言語翻訳手段に負わせてい
るので、従来のコンパイラの前フL−スとして動作する
プリプロセッサに相当するデータベース操作命令翻訳手
段の負荷の軽減が可能であり、且つ、データー・−ス操
作命令が拡張された場合、データベース操作命令翻訳手
段を拡張すれば良くホスト言語翻訳子 一段への影響を
軽減することもできる。即ち、本発明によれば、従来の
2方法のデメリットの双方を解決することができる効果
がある。
As explained above, according to the present invention, before translating the data operations commands included in a certain database operation source program, the data operations instructions included in the database operations source program are Only the commands related to the declaration of the work area used for data exchange are extracted and translated, and the information regarding the work area used by the data storage operation commands is stored in the data directory. Even if you have a work area in a previously translated database operation source program, the data contained in another database operation source program. - The validity of the space operation command can be analyzed with respect to only the information in the data space, and the analysis logic is simplified. In addition, since the burden of analyzing the instruction group related to the work area handled by the data domain manipulation command is placed on the host language translation means equivalent to a conventional compiler, the preprocessor, which operates as a preprocessor for the conventional compiler, is It is possible to reduce the load on the corresponding database operation command translation means, and if the database operation commands are expanded, the database operation command translation means can be expanded to reduce the impact on the host language translator. You can also. That is, according to the present invention, it is possible to solve both of the disadvantages of the two conventional methods.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の詳細な説明図、 第2図は制御手段1の処理例を示す流れ図、第3図はプ
ログラム生成手段2の処理例を示す流れ図、 第4図はデータベース操作命令抽出手段3の処理例を示
す流れ図、 第5図はデータベース操作命令翻訳手段4の処理例を示
す流れ図および、 第6図はホスト言語翻訳手段5の処理例を示す流れ図で
ある。 図において、1は制御手段、2はプログラム生成手段、
3はデータベース操作命令抽出手段、4はデータベース
操作命令翻訳手段、5はホスト言語翻訳手段、6はデー
タベース操作ソース・プログラム、7は部分的なソース
・プログラム、8ばプログラム・データヘース、9はオ
ブジェクト・プログラムである。
FIG. 1 is a detailed explanatory diagram of the present invention, FIG. 2 is a flowchart showing an example of processing by the control means 1, FIG. 3 is a flowchart showing an example of processing by the program generation means 2, and FIG. 4 is a database operation command extraction means. FIG. 5 is a flowchart showing an example of processing by the database operation command translation means 4, and FIG. 6 is a flowchart showing an example of processing by the host language translation means 5. In the figure, 1 is a control means, 2 is a program generation means,
3 is a database operation instruction extraction means, 4 is a database operation instruction translation means, 5 is a host language translation means, 6 is a database operation source program, 7 is a partial source program, 8 is a program data base, 9 is an object. It is a program.

Claims (1)

【特許請求の範囲】 ホスト言語で記述されたプログラム部分に加えホスト言
語以外の言語で記述されたデータベース操作命令を含み
、該データベース操作命令をホスト言語の命令群に変換
し、更にホスト言語を翻訳することによってオブジェク
ト・プログラムを生成するデータベース操作ソース・プ
ログラム翻訳方法において、 前記データベース操作ソース・プログラムに含まれるデ
ータベース操作命令の翻訳を行なう前に、前記データベ
ース操作ソース・プログラムからデータベース操作命令
がデータベース内のデータの授受に用いる作業域の宣言
に関する命令群のみをプログラム生成手段により抽出し
、該抽出された命令群をホスト言語翻訳手段により中間
言語に翻訳してデータベース操作命令がデータベース内
のデータの授受に用いる作業域に関する情報をプログラ
ム・データベースに蓄積するようにし、前記データベー
ス操作ソース・プログラムに含まれるデータベース操作
命令の翻訳を行なうに際しては、データベース操作命令
翻訳手段が前記プログラム・データベースに蓄積された
作業域に関する情報から前記データベース操作命令の正
当性を解析して正当性が認められたときに前記データベ
ース操作命令をホスト言語に翻訳し、該ホスト言語に翻
訳されたデータベース操作命令と前記データベース操作
ソース・プログラムの他のホスト言語で記述された内容
とを前記ホスト言語翻訳手段により翻訳して目的のオブ
ジェクト・プログラムを生成するようにしたことを特徴
とするデータベース操作ソース・プログラム翻訳方法。
[Claims] In addition to a program portion written in a host language, the program includes database operation instructions written in a language other than the host language, converts the database operation instructions into a group of instructions in the host language, and further translates the host language. In a database operation source program translation method that generates an object program by The program generation means extracts only the instruction group related to the declaration of the work area used for exchanging data, and the extracted instruction group is translated into an intermediate language by the host language translation means, and the database operation command is used to exchange data in the database. When translating database operation instructions included in the database operation source program, the database operation instruction translation means stores information about the work area used for The validity of the database operation command is analyzed from the information regarding the domain, and when the validity is recognized, the database operation command is translated into a host language, and the database operation command translated into the host language and the database operation source file are A method for translating a database operation source program, characterized in that a target object program is generated by translating the content of the program written in another host language by the host language translation means.
JP29842385A 1985-12-31 1985-12-31 Translating method for data base operating source program Pending JPS62157950A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29842385A JPS62157950A (en) 1985-12-31 1985-12-31 Translating method for data base operating source program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29842385A JPS62157950A (en) 1985-12-31 1985-12-31 Translating method for data base operating source program

Publications (1)

Publication Number Publication Date
JPS62157950A true JPS62157950A (en) 1987-07-13

Family

ID=17859513

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29842385A Pending JPS62157950A (en) 1985-12-31 1985-12-31 Translating method for data base operating source program

Country Status (1)

Country Link
JP (1) JPS62157950A (en)

Similar Documents

Publication Publication Date Title
JPH05197685A (en) System and method for supporting translation of windowed user interface with plurality of languages
JPS6375835A (en) Apparatus for generating intended code, program, list and design document
JPS62157950A (en) Translating method for data base operating source program
JPH11154093A (en) Program compiler and storage medium recording compiler program
JPH0695890A (en) Name replacement system in compiler
JP2000305790A (en) Label address converting device and its method and computer readable medium
JPH07105014A (en) Symbol processing system for language processing system
JP2539070B2 (en) Compiler processor
JPH06119203A (en) Debugging line deleting device
JPS63138426A (en) Program production system
Crocker et al. 4. FORMAL SEMANTICS
JPH10207738A (en) Language processing system
Taylor et al. The Westinghouse signal processor (WSP) microcompiler
JPS61235949A (en) Translating system
JPH04364537A (en) Method, device, and compiler for optimizing program for parallel process
JPH04248624A (en) Program conversion processor
JPH08161179A (en) Method for executing one sentence
JPH0683630A (en) Automatic program converting device
JPS62182843A (en) Fast compiling/linking system
JPH03111943A (en) Variable output range specification system
JPH0561687A (en) Processing system for compiler
JPH03113538A (en) Compiling device
Lane Porting Pan I to Allegro COMMON Lisp
JPH06231003A (en) Debugger for feasible file
JPH0690669B2 (en) Character string manipulation instruction compilation processing method