JPH03164834A - System for mutual conversion between programming languages - Google Patents

System for mutual conversion between programming languages

Info

Publication number
JPH03164834A
JPH03164834A JP30525589A JP30525589A JPH03164834A JP H03164834 A JPH03164834 A JP H03164834A JP 30525589 A JP30525589 A JP 30525589A JP 30525589 A JP30525589 A JP 30525589A JP H03164834 A JPH03164834 A JP H03164834A
Authority
JP
Japan
Prior art keywords
program
japanese
language
programming language
conversion
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
JP30525589A
Other languages
Japanese (ja)
Inventor
Hideo Nakamura
英生 中村
Takeshi Sasao
佐々布 武司
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP30525589A priority Critical patent/JPH03164834A/en
Publication of JPH03164834A publication Critical patent/JPH03164834A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain interchangeability between programming languages in the level of a common Japanese-language document by performing mutual conversion between an arbitrary programming language and the Japanese-language document. CONSTITUTION:A program/Japanese language converting means 2 converts a program source described in an arbitrary programming language to a program of a Japanese-language document, and a Japanese language/program converting means 3 converts the program of the Japanese-language document to a program source described in a designated programming language. These program/ Japanese language converting means 2 and Japanese language/program converting means 3 are used, and the program described in an arbitrary programming language is temporarily converted to the mode of the Japanese-language document, and thereafter, a desired programming language is designated to convert it to a program in this programming language. Thus, mutual conversion between different programming languages is possible.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、プログラミング言語間相互変換方式に関し、
特に、任意のプログラミング言語と日本語ドキュメント
との間の相互変換を実現し、−旦。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a mutual conversion method between programming languages.
In particular, it realizes mutual conversion between arbitrary programming languages and Japanese documents.

日本語ドキュメントにプログラムを変換して、プログラ
ミング言語の間の相互の互換性を持たせる技術に関する
ものである。
It relates to technology for converting programs into Japanese documents to provide mutual compatibility between programming languages.

〔従来の技術〕[Conventional technology]

従来、C0BOL言語、PL/1言語などのプログラミ
ング言語で記述されているプログラムを別のプログラミ
ング言語で記述されたプログラムに変換する場合には、
プログラムのドキュメントよりプログラム内容を読み取
り、再度、目的とするプログラミング言語を用いて、変
換するプログラムを最初からコーディングすることによ
り行なわれている。
Conventionally, when converting a program written in a programming language such as C0BOL language or PL/1 language to a program written in another programming language,
This is done by reading the program contents from the program document and coding the program to be converted from the beginning again using the target programming language.

このようなプログラムにおけるプログラミング言語の変
換作業は、手間のかかる作業であり、プログラム内容を
読み取る場合に、誤りが生じやすい、このため、プログ
ラム内容の一部ではあるがプログラム文を日本語文に翻
訳する技術も開発されている0例えば、特開昭61−1
12241号公報には、プログラム中の定数代入文を日
本語の処理文に表現する翻訳を行うrプログラム翻訳方
法」が記載されている。
Converting programming languages for such programs is a time-consuming task, and errors are likely to occur when reading the program contents.For this reason, it is necessary to translate the program sentences into Japanese, even though they are part of the program contents. Technologies have also been developed. For example, JP-A-61-1
Publication No. 12241 describes a program translation method for translating constant assignment statements in a program into Japanese processing statements.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

ところで、従来の技術において、あるプログラミング言
語で記述されているプログラムを別のプログラミング言
語で記述されたプログラムに変換する場合、プログラム
内容のロジックが同じであっても、異なる2つのプログ
ラミング言語を用いて当該ロジックの記述の表示を行う
と、その間には、相関性、互換性がまったくなくなって
しまう。
By the way, in conventional technology, when converting a program written in one programming language to a program written in another programming language, even if the logic of the program content is the same, it is converted using two different programming languages. If the description of the logic is displayed, there will be no correlation or compatibility between them.

このため、異なるプログラミング言語に変換されたプロ
グラムの間において、不注意によりその変換の内容に誤
りがあっても、その確認ができないという問題があった
For this reason, there is a problem in that even if there is an error in the contents of the conversion due to inadvertence between programs converted into different programming languages, it cannot be confirmed.

また、一般に、プログラムを開発する環境、使用する計
算機の環境などの要因により、プログラミング言語を自
由に選択することができないため、一方の環境で開発さ
れたプログラムが他の環境では利用できないことが多い
、このため、ソフトウェア開発環境は、個々のプログラ
ミング言語内で閉じられることが多く、ソフトウェアの
流用が円滑に行えないどう問題があった。
In addition, in general, it is not possible to freely select a programming language depending on factors such as the environment in which the program is developed and the environment of the computer used, so programs developed in one environment often cannot be used in another environment. For this reason, software development environments are often closed within individual programming languages, which poses a problem in that software cannot be reused smoothly.

本発明は、上記問題点を解決するためになされたもので
ある。
The present invention has been made to solve the above problems.

本発明の目的は、任意のプログラミング言語と日本語ド
キュメントとの間の相互変換を実現し、日本語ドキュメ
ントレベルで、プログラミング言語間の互換性を持たせ
るプログラミング言語間相互変換方式を提供することに
ある。
An object of the present invention is to provide a mutual conversion method between programming languages that realizes mutual conversion between any programming language and a Japanese document, and provides compatibility between programming languages at the Japanese document level. be.

本発明の前記ならびにその他の目的と新規な特徴は、本
明細書の記述及び添付図面によって明らかになるであろ
う。
The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的を達成するため1本発明のプログラミング言語
間相互変換方式は、任意のプログラミング言語で記述さ
れたプログラムを日本語ドキュメントのプログラムに変
換するプログラム日本語変換手段と、日本語ドキュメン
トのプログラムを指定のプログラミング言語で記述され
たプログラムに変換する日本語プログラム変換手段とを
備え、プログラム日本語変換手段により第1のプログラ
ミング言語で記述されたプログラムを日本語ドキュメン
トのプログラムに変換し、更に、日本語プログラム変換
手段により当該日本語ドキュメントのプログラムを第2
のプログラミング言語で記述されたプログラムソースに
変換することを特徴とする。
In order to achieve the above object, 1 the mutual conversion method between programming languages of the present invention includes a program Japanese conversion means for converting a program written in an arbitrary programming language into a program with a Japanese document, and a program with a Japanese document specified. a Japanese program conversion means for converting the program written in the first programming language into a program written in the first programming language; The program conversion means converts the program of the Japanese document into a second one.
It is characterized by converting program sources written in programming languages.

〔作用〕[Effect]

前記手段によれば、プログラム日本語変換手段と1日本
語プログラム変換手段とが備えられる。
According to the means, a program Japanese language conversion means and a Japanese language program conversion means are provided.

プログラム日本語変換手段は、任意のプログラミング言
語で記述されたプログラムソースを日本語ドキュメント
のプログラムに変換し、また、日本語プログラム変換手
段は、日本語ドキュメントのプログラムを指定したプロ
グラミング言語で記述されたプログラムソースに変換す
る。このプログラム日本語変換手段と1日本語プログラ
ム変換手段とを用いて、任意のプログラミング言語で記
述されたプログラムを、−旦1日本語ドキュメントの形
態に変換し、その後、所望するプログラミング言語を指
定して、該当するプログラミング言語のプログラムに変
換する。これにより、異なるプログラミング言語の間で
相互変換が可能となる。
The program Japanese conversion means converts a program source written in an arbitrary programming language into a program with a Japanese document, and the Japanese program conversion means converts a program source written in an arbitrary programming language into a program with a Japanese document written in a specified programming language. Convert to program source. Using this program Japanese conversion means and the 1-Japanese program conversion means, a program written in an arbitrary programming language is first converted into a 1-Japanese document format, and then the desired programming language is specified. and convert it into a program in the appropriate programming language. This allows mutual conversion between different programming languages.

その際、−旦、プログラムは日本語ドキュメントのプロ
グラムに変換されるので、あるプログラミング言語が理
解できない者であっても、日本語ドキュメントのプログ
ラムにより、プログラム内容の確認ができる。すなわち
、プログラム内容のロジックを特定のプログラミング言
語ではなく、日本語ドキュメントレベルで明確に表示し
、互換性を日本語ドキュメントレベルで持たせているた
め、プログラム内容が1日本語ドキュメントレベルで容
易に確認ができる。さらに、他のプログラミング言語環
境の機械に利用できるプログラムとするため、プログラ
ミング言語を指定して、日本語ドキュメントのプログラ
ムから該当するプログラミング言語のプログラムへ自動
変換を行う。
At this time, since the program is first converted into a program with Japanese documentation, even a person who cannot understand a certain programming language can confirm the contents of the program using the program with Japanese documentation. In other words, the logic of the program content is clearly displayed at the Japanese document level rather than in a specific programming language, and compatibility is maintained at the Japanese document level, so the program content can be easily confirmed at the Japanese document level. Can be done. Furthermore, in order to make the program usable on machines using other programming language environments, the programming language is specified and the program in the Japanese document is automatically converted to the program in the corresponding programming language.

〔実施例〕〔Example〕

以下1本発明の一実施例を図面を用いて具体的に説明す
る。
An embodiment of the present invention will be specifically described below with reference to the drawings.

第1図は、本発明の一実施例にかかるプログラミング言
語間相互変換方式の処理プロセスを示すブロック図であ
る。第1図において、1は処理装置、2はプログラム日
本語変換機構、3は日本語プログラム変換機構、4は日
本語変換テーブル、5は翻訳辞書、6はプログラム変換
テーブルである。また、7は変換元のプログラミング言
語のソースプログラムを格納するソースプログラムファ
イル、8は日本語ドキュメントを格納する日本語ドキュ
メントファイル、9は変換先のプログラミング言語のソ
ースプログラムを格納するソースプログラムファイルで
ある。プログラム日本語変換機構2は、ソースプログラ
ムファイル7から被変換プログラミング言語のソースプ
ログラムを取り出し、該当するプログラミング言語に対
応した日本語変換テーブル4および翻訳辞書5を利用し
て。
FIG. 1 is a block diagram showing a processing process of a mutual conversion method between programming languages according to an embodiment of the present invention. In FIG. 1, 1 is a processing device, 2 is a program Japanese language conversion mechanism, 3 is a Japanese language program conversion mechanism, 4 is a Japanese language conversion table, 5 is a translation dictionary, and 6 is a program conversion table. Further, 7 is a source program file that stores the source program of the programming language of the conversion source, 8 is the Japanese document file that stores the Japanese document, and 9 is the source program file that stores the source program of the programming language of the conversion destination. . The program Japanese translation mechanism 2 extracts the source program of the programming language to be converted from the source program file 7, and uses the Japanese translation table 4 and translation dictionary 5 corresponding to the applicable programming language.

日本語ドキュメントのプログラムに変換して1日本語ド
キュメントファイル8に出力する。このとき1日本語ド
キュメントに変換されたプログラムは、必要に応じてプ
ログラム内容を確認するため。
It is converted into a Japanese document program and output to a Japanese document file 8. At this time, the program converted to 1 Japanese document is used to check the program contents as necessary.

印刷出力される。また、日本語プログラム変換機構3は
1日本語ドキュメントファイル8に格納された日本語ド
キュメントのプログラムを取り出し。
Printed out. Furthermore, the Japanese program conversion mechanism 3 retrieves the Japanese document program stored in the 1 Japanese document file 8.

指定されたプログラミング言語に対応するプログラム変
換テーブル6および翻訳辞書5を利用して、目的とする
プログラミング言語のソースプログラムに変換し、ソー
スプログラムファイル9に出力する。
Using the program conversion table 6 and translation dictionary 5 corresponding to the designated programming language, the program is converted into a source program of the target programming language and output to the source program file 9.

第2図は1日本語変換テーブルの構成例を示す図であり
、第3図は、プログラム変換テーブルの構成例を示す図
である。
FIG. 2 is a diagram showing an example of the structure of a 1-Japanese conversion table, and FIG. 3 is a diagram showing an example of the structure of a program conversion table.

日本語変換テーブル4は、第2図に示すように。The Japanese conversion table 4 is as shown in FIG.

例えば、C0BOLのプログラミング言語の各々のプロ
グラム文4aに対して、プログラム文からタグ名称(変
数部分)を除いた文をASCIIコード順にソートし、
ソートした文コードを索引データ4bとして、それに対
応する日本語文を日本語名称文4cに格納したテーブル
である。
For example, for each program statement 4a of the C0BOL programming language, the statements obtained by removing the tag name (variable part) from the program statement are sorted in ASCII code order,
This table stores the sorted sentence codes as index data 4b and the corresponding Japanese sentences as Japanese name sentences 4c.

また、プログラム変換テーブル6は、第3図に示すよう
に、予かじめ登録しである日本語名称文6aに対して、
タグ名称を除いた文をASCIIコード順にソートし、
ソートした文コードを索引データ6bとして、対応する
プログラム文をプログラム変換データ6cに格納しであ
るテーブルである。プログラム変換データ6cとしては
、変換するプログラミング言語に対応して、それぞれの
プログラミング言語の固有のプログラム文が格納される
In addition, as shown in FIG. 3, the program conversion table 6 is configured to convert
Sort the sentences excluding tag names in ASCII code order,
This is a table in which sorted statement codes are used as index data 6b and corresponding program statements are stored in program conversion data 6c. As the program conversion data 6c, program statements unique to each programming language are stored in correspondence with the programming language to be converted.

第4図は、プログラム日本語変換機構の処理フローを示
すフローチャートである。第4図を参照して、あるプロ
グラミング言語のソースプログラムから日本語ドキュメ
ントのプログラムに変換する処理゛を説明する。
FIG. 4 is a flowchart showing the processing flow of the program Japanese language conversion mechanism. The process of converting a source program in a certain programming language into a program in a Japanese document will be explained with reference to FIG.

先ず、ステップ21においてソースプログラムファイル
7からプログラムの一文を取出し、ステップ22におい
て、翻訳辞書5を用いて、タグ名称(変数部分)のみを
予め登録されている日本語に変換する0次に、ステップ
23において、タグ名称を除いた一文をASCIIコー
ド順にソートし、ステップ24において、ソートした文
データを検索キーデータとして、日本語変換テーブル4
の索引データの検索を行い(変換テーブルに該当する索
引データがあるか否かの判定を順次に繰り返し行い)、
該当する索引データ4bの日本語名称文4cを抽出する
1次に、ステップ25において、抽出した該当プログラ
ム文の日本語名称文とタグ名称のみを日本語に変換した
文とをマージして、タグ名称部分を日本語に置き換え1
日本語ドキュメントのプログラム文を作成する。そして
、次のステップ26において、未処理のプログラムの文
があるか否かを判定し、プログラム文がなければ処理を
終了とし、プログラム文があれば、ステップ21に戻り
、ステップ21からの処理を繰り返す6日本語ドキュメ
ントに変換されたプログラム文は1日本語ドキュメント
ファイル8に格納される。
First, in step 21, a sentence of the program is extracted from the source program file 7, and in step 22, using the translation dictionary 5, only the tag name (variable part) is converted into pre-registered Japanese. In step 23, the sentence excluding the tag name is sorted in the order of ASCII code, and in step 24, the sorted sentence data is used as search key data and the Japanese conversion table 4 is used.
Search for index data (sequentially repeatedly determine whether or not there is corresponding index data in the conversion table),
First, the Japanese name sentence 4c of the corresponding index data 4b is extracted. Next, in step 25, the extracted Japanese name sentence of the corresponding program sentence and the sentence in which only the tag name is converted into Japanese are merged, and the tag name is Replace the name part with Japanese 1
Create program statements for Japanese documents. Then, in the next step 26, it is determined whether or not there is an unprocessed program statement. If there is no program statement, the process is terminated. If there is a program statement, the process returns to step 21 and the processing from step 21 is continued. The program sentences converted into six repeated Japanese documents are stored in one Japanese document file 8.

第5図は、日本語プログラム変換機構の処理フローを示
すフローチャートである。第5図を参照して1日本語ド
キュメントのプログラムから指定のプログラミング言語
のソースプログラムに変換する処理を説明する。
FIG. 5 is a flowchart showing the processing flow of the Japanese program conversion mechanism. The process of converting a Japanese document program into a source program in a designated programming language will be described with reference to FIG.

先ず、ステップ31において日本語ドキュメントファイ
ル8から日本語ドキュメントの1文を取出し1次のステ
ップ32において項番と文章部分とを分離する。ステッ
プ33において、文章部分のみをASCIIコード順に
ソートし、ソートした文コードを検索キーデータとして
1次のステップ34においてプログラム変換テーブル6
の索引データの検索を行い、変換テーブルに該当する索
引データがあるか否かを判定する。このステップ34の
処理により、該当する索引データから対応する日本語名
称文と指定のプログラミング言語のプログラム変換デー
タとを抽出すると1次に、ステップ35に進み、抽出し
た日本語名称文と変換される日本語ドキュメントの文と
を比較して1日本語の変数部分(タグ名称)を抽出する
0次に。
First, in step 31, one sentence of the Japanese document is extracted from the Japanese document file 8, and in the next step 32, the item number and sentence part are separated. In step 33, only the sentence parts are sorted in the order of ASCII codes, and the sorted sentence codes are used as search key data in the program conversion table 6 in the first step 34.
The index data is searched and it is determined whether or not the corresponding index data exists in the conversion table. Through the process of step 34, when the corresponding Japanese name sentence and the program conversion data of the designated programming language are extracted from the corresponding index data, the process proceeds to step 35, where the extracted Japanese name sentence and the conversion are performed. A zero-order method that extracts a Japanese variable part (tag name) by comparing it with a sentence in a Japanese document.

ステップ36において、抽出した日本語の変数部分を、
指定のプログラミング言語のプログラム変換データの変
数部分(タグ名称)に代入して、変数部分の置き換えを
行う。次のステップ37では、更に変数部分が置き換え
られたプログラム変換データから日本語のタグ名称の部
分を取出し、ステップ38で日本語に変換されているタ
グ名称の部分を翻訳辞書5から対応するプログラミング
言語のタグ名称に変換する。そして、ステップ39で変
換対象の日本語ドキュメントの他の日本語文があるか否
かを判定し1日本語文がなれけば、処理を終了とし、ま
だ未処理の日本語文が存在すれば。
In step 36, the extracted Japanese variable part is
Substitute the variable part (tag name) of the program conversion data of the specified programming language to replace the variable part. In the next step 37, the Japanese tag name part is further extracted from the program conversion data in which the variable part has been replaced, and in step 38, the tag name part that has been converted into Japanese is translated into the corresponding programming language from the translation dictionary 5. Convert to tag name. Then, in step 39, it is determined whether there are any other Japanese sentences in the Japanese document to be converted, and if one Japanese sentence is left, the process is terminated, and if there are still unprocessed Japanese sentences.

ステップ31に戻り、ステップ31からの処理を繰り返
す6日本語ドキュメントから指定のプログラミング言語
に変換された各々のプログラム文は、変換後のソースプ
ログラムを格納するソースプログラムファイル9に格納
される。
Returning to step 31, each program statement converted from the six Japanese documents into the designated programming language by repeating the process from step 31 is stored in the source program file 9 that stores the converted source program.

このようにして、プログラム日本語変換処理により、あ
るプログラミング言語で記述されたソースプログラムを
日本語ドキュメントのプログラムに変換し、更に1日本
語ドキュメントのプログラムを指定のプログラミング言
語で記述されたソースプログラムに変換する。
In this way, the program Japanese conversion process converts a source program written in a certain programming language into a program with a Japanese document, and then converts a program with one Japanese document into a source program written in a specified programming language. Convert.

次に、C0BOLのプログラミング言語で記述されたソ
ースプログラムを1日本語ドキュメントのプログラム文
に変換し、更に例えばFORTRANプログラミング言
語で記述されたソースプログラムに変換する場合を例と
して、具体的に、その変換プロセスを説明する。
Next, we will explain the conversion in detail, taking as an example a case where a source program written in the C0BOL programming language is converted into a program statement in a Japanese document, and then further converted into a source program written in the FORTRAN programming language. Explain the process.

第6図は、異なるプログラミング言語の間でソースプロ
グラムの変換を行う変換プロセスの全体の流れを示すブ
ロック図である。変換プロセスの全体の流れとしては、
第6図に示すように、変換元のソースプログラム40か
ら一つのプログラミング言語の例えばC0BOLで記述
されたC0BOLソースプログラム40−aが指定され
て、プログラム日本語変換部41に入力される。このと
き、プログラム日本語変換部41には、変換するプログ
ラミング言語がC0BOLであることが指示される。
FIG. 6 is a block diagram showing the overall flow of the conversion process for converting source programs between different programming languages. The overall flow of the conversion process is as follows:
As shown in FIG. 6, a C0BOL source program 40-a written in one programming language, for example C0BOL, is specified from the source program 40 to be converted, and is input to the program Japanese language converter 41. At this time, the program Japanese conversion unit 41 is instructed that the programming language to be converted is C0BOL.

これにより、プログラム日本語変換部41は、C0BO
Lに対応するプログラム変換テーブルを用いて変換の処
理を行う、この結果、日本語ドキュメントのソースプロ
グラム42が生成される6日本語ドキュメントのソース
プログラム42は、更に、日本語プログラム変換部43
に入力さ九、#s定のプログラミング言語のFORTR
ANで記述されたFORTRANソースプログラム44
aに変換され、変換先のソースプログラム44が得られ
る。
As a result, the program Japanese conversion unit 41 converts C0BO
The conversion process is performed using the program conversion table corresponding to L. As a result, a Japanese document source program 42 is generated.6 The Japanese document source program 42 is further processed by a Japanese program converter 43.
Entered into the #s constant programming language FORTR
FORTRAN source program written in AN 44
a, and a source program 44 to be converted is obtained.

第7図は1日本語ドキュメントに変換された日本語文プ
ログラムの一例を示す図ある。例えば、C0BOLソー
スプログラムがら、第7図に示すような日本語文プログ
ラムの文に変換され、この日本語文プログラムから更に
目的とするプログラミング言語のFORTRANソース
プログラムに変換される。
FIG. 7 is a diagram showing an example of a Japanese sentence program converted into one Japanese document. For example, a COBOL source program is converted into the sentences of a Japanese language program as shown in FIG. 7, and this Japanese language program is further converted into a FORTRAN source program of the target programming language.

第8図は、C0BOLソースプログラムのプログラム文
を日本語ドキュメントのプログラム文に変換する処理プ
ロセスを説明するブロック図である。第8図のブロック
図において、各ブロック中の記述内容は各々の処理段階
の変換データ内容を示している。
FIG. 8 is a block diagram illustrating a processing process for converting program sentences of a COBOL source program into program sentences of a Japanese document. In the block diagram of FIG. 8, the written content in each block indicates the converted data content at each processing stage.

まず、ブロック51において、C0BOLソースプログ
ラムのファイルからソースプログラムの1文rMOVE
  ?I  To  ?2J &取出し。
First, in block 51, one sentence of the source program is rMOVE from the C0BOL source program file.
? I To? 2J & take out.

ブロック52において、このプログラム文のタグ名称「
?1」と「?2」のみを翻訳辞書により日本語に変換し
くこの例では“?1″を゛′今日日日付″′に変換し 
u q 2 IIを“″明日の日付″′に変換して)、
rMOVE“今日の日付”To“明日の日付”」とする
1次に、ブロック53において。
In block 52, the tag name of this program statement "
? Only ``1'' and ``?2'' are converted into Japanese using a translation dictionary. In this example, ``?1'' is converted to ``Today's date''.
Convert u q 2 II to "tomorrow's date"),
rMOVE "Today's Date" To "Tomorrow's Date" First, in block 53.

タグ名称を除いたプログラム文rMOVE  TOJを
ASCIIコード順にソートしてrEMOOTV」とす
る、このrEMOOTVJを検索キーノデータとして1
日本語変換用テーブル54の索引データを検索し、ブロ
ック55において、対応する日本語名称文「?1に?2
をセットする」を得る0次にブロック58において、こ
のようにして得られた日本語名称文[?1に?2をセッ
トする」と先に得られたタグ名称のみを日本語に変換し
たプログラム文rMOVE“今日の日付″TO“″明日
の日付”)とをマージする。この結果1日本語名称文の
タグ名称部分が1日本語のタグ名称に変換されて、ブロ
ック58において、日本語ドキュメントのプログラム文
[今日の日付に明日の日付をセットする」が得られる。
Sort the program statement rMOVE TOJ excluding the tag name in the order of ASCII code and make it ``rEMOOTV''.This rEMOOTVJ is search key data1.
The index data of the Japanese conversion table 54 is searched, and in block 55, the corresponding Japanese name sentence "?1 to?2" is searched.
In block 58, the Japanese name sentence [? To 1? 2" and the program statement rMOVE "today's date" TO "tomorrow's date") which converted only the previously obtained tag name into Japanese. As a result, the tag with the Japanese name sentence 1 is merged. The name part is converted into a Japanese tag name, and in block 58, the program statement "Set tomorrow's date to today's date" of the Japanese document is obtained.

このような変換プロセスが繰り返し行なわれて。This conversion process is repeated repeatedly.

第7図に示すような、一連の日本語ドキュメントのプロ
グラム文が得られる。
A series of program sentences of Japanese documents as shown in FIG. 7 is obtained.

第9図は1日本語ドキュメントプログラム文を指定のプ
ログラミング言語のプログラム文に変換する処理プロセ
スを説明するブロック図である。
FIG. 9 is a block diagram illustrating a processing process for converting a Japanese document program sentence into a program sentence of a designated programming language.

第9図のブロック図において、各ブロック中の記述内容
は各々の処理段階の変換データ内容を示している。
In the block diagram of FIG. 9, the written content in each block indicates the converted data content at each processing stage.

ブロック61において日本語ドキュメントのファイルか
ら日本語プログラムの1文r8.今日の日付に明日の日
付をセットする」を取出し、ブロック62において、項
番「8.」と文章部分[今日の日付に明日の日付をセッ
トする」とを分離する0次に、ブロック63において、
日本語の文章部分[今日の日付に明日の日付をセットす
る」をASCIIコード順にソートし、「すにののるを
セット今日日日日付付明」とする6次にソートした文章
部分「すにののるをセット今日日日日付付明」を検索キ
ーのデータとして、プログラム変換用テーブル64の索
引データを検索し、1部分のデータで一致する索引デー
タ[すにるをセット」を得て、日本語名称文「?1に?
2をセットする」とプログラム変換データj’i)l 
=’72Jを抽出する0次にブロック65およびブロッ
ク66において、抽出した日本語名称文「?1に?2を
セットする」と変換する日本語ドキュメントの文章部分
「今日の日付に明日の日付をセットする」とを比較して
、日本語の変数部分(タグ名称)を抽出する。抽出した
日本語の変数部分を、指定のプログラミング言語のプロ
グラム変換データの変数部分(タグ名称)に代入して、
変数部分の置き換えを行い、ブロック67の「今日の日
付=明日の日付」を得る。更に変数部分が置き換えられ
たプログラム変換データから日本語のタグ名称の部分を
取出し1日本語のタグ名称の部分を翻訳辞書5から対応
するプログラミング言語のタグ名称に変換し、ブロック
68において、指定するプログラミング言語のプログラ
ム文rA=BJ を得る。この例では、″“今日の日付
″=“A 11 11明日の日付”=11B”としてい
る。
In block 61, one sentence r8 of the Japanese program is extracted from the Japanese document file. "Set tomorrow's date to today's date" is taken out, and in block 62, the item number "8." is separated from the text part "Set tomorrow's date to today's date". Next, in block 63, ,
Sort the Japanese sentence part [Set tomorrow's date to today's date] in the order of ASCII code, and change it to 'Set today's date, date, and date'.6. Search the index data of the program conversion table 64 using ``Set today's date, date, and date'' as the search key data, and obtain the matching index data ``Set Sunuru'' with one part of the data. So, the Japanese name sentence “?1?
"Set 2" and program conversion data j'i)l
= '72J is extracted 0 Next, in blocks 65 and 66, the extracted Japanese name sentence "Set ?1 to ?2" and the sentence part of the Japanese document to be converted "Set tomorrow's date to today's date""Set" and extract the Japanese variable part (tag name). Assign the extracted Japanese variable part to the variable part (tag name) of the program conversion data of the specified programming language,
The variable part is replaced to obtain "today's date=tomorrow's date" in block 67. Furthermore, the Japanese tag name part is extracted from the program conversion data in which the variable part has been replaced.1 The Japanese tag name part is converted from the translation dictionary 5 into the tag name of the corresponding programming language, and specified in block 68. Obtain the program statement rA=BJ of the programming language. In this example, "today's date" = "A 11 11 tomorrow's date" = 11B.

このように、あるプログラミング言語(PL/1、C言
語、C0BOL、FORTRAN等)のソースプログラ
ムから他の異なるプログラミング言語のソースプログラ
ムへの変換が1日本語ドキュメントのプログラムを介し
て行うことが可能となる。
In this way, it is possible to convert a source program of a certain programming language (PL/1, C language, COBOL, FORTRAN, etc.) to a source program of another different programming language through a program with a Japanese document. Become.

以上1本発明を実施例にもとづき具体的に説明したが1
本発明は、前記実施例に限定されるものではなく、その
要旨を逸脱しない範囲において種々変更可能であること
は言うまでもない。
The present invention has been specifically described above based on examples.
It goes without saying that the present invention is not limited to the embodiments described above, and can be modified in various ways without departing from the spirit thereof.

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

以上、!I2明したように、本発明によれば、任意のプ
ログラミング言語と日本語ドキュメントとの間の相互変
換を行うことにより、共通の日本語ドキュメントのレベ
ルで、プログラミング言語間の互換性を持たせることが
できろ、また1日本語ドキュメントのプログラムにおい
て、変換したいプログラムソースの内容の確認を行うこ
とができ。
that's all,! As explained in I2, according to the present invention, compatibility between programming languages can be achieved at the level of a common Japanese document by performing mutual conversion between arbitrary programming languages and Japanese documents. You can also check the contents of the program source you want to convert in a Japanese document program.

更にプログラング言語にとられれないで、プログラムロ
ジックの流用が可能となる。
Furthermore, program logic can be used without being restricted to programming languages.

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

第1図は1本発明の一実施例にかかるプログラミング言
語間相互変換方式の処理プロセスを示すブロック図。 第2図は、日本語変換テーブルの構成例を示す図。 第3図は、プログラム変換テーブルの構成例を示す図。 第4図は、プログラム日本語変換機構の処理フローを示
すフローチャート。 第5図は1日本語プログラム変換機構の処理フローを示
すフローチャート、 第6図は、異なるプログラミング言語の間でソースプロ
グラムの変換を行う変換プロセスの全体の流れを示すブ
ロック図。 第7図は1日本語ドキュメントに変換された日本語文プ
ログラムの一例を示す図。 第8図は、C0BOLソースプログラムのプログラム文
を日本語ドキュメントのプログラム文に変換する処理プ
ロセスを説明するブロック図。 第9図は1日本語ドキュメントプログラム文を指定のプ
ログラミング言語のプログラム文に変換する処理プロセ
スを説明するブロック図である。 図中、1・・・処理装置、2・・・プログラム日本語変
換機構、3・・・日本語プログラム変換機構、4・・・
日本語変換テーブル、5・・・翻訳辞書、6・・・プロ
グラム変換テーブル、7・・・ソースプログラムファイ
ル、8・・・日本語ドキュメントファイル、9・・・ソ
ースプログラムファイル。
FIG. 1 is a block diagram showing a processing process of a mutual conversion method between programming languages according to an embodiment of the present invention. FIG. 2 is a diagram showing an example of the structure of a Japanese translation table. FIG. 3 is a diagram showing an example of the configuration of a program conversion table. FIG. 4 is a flowchart showing the processing flow of the program Japanese language conversion mechanism. FIG. 5 is a flowchart showing the processing flow of the Japanese program conversion mechanism. FIG. 6 is a block diagram showing the overall flow of the conversion process for converting source programs between different programming languages. FIG. 7 is a diagram showing an example of a Japanese sentence program converted into one Japanese document. FIG. 8 is a block diagram illustrating a processing process for converting program sentences of a COBOL source program into program sentences of a Japanese document. FIG. 9 is a block diagram illustrating a processing process for converting a Japanese document program sentence into a program sentence of a designated programming language. In the figure, 1...processing device, 2...program Japanese language conversion mechanism, 3...Japanese program conversion mechanism, 4...
Japanese translation table, 5... Translation dictionary, 6... Program conversion table, 7... Source program file, 8... Japanese document file, 9... Source program file.

Claims (1)

【特許請求の範囲】[Claims] 1、任意のプログラミング言語で記述されたプログラム
を日本語ドキュメントのプログラムに変換するプログラ
ム日本語変換手段と、日本語ドキュメントのプログラム
を指定のプログラミング言語で記述されたプログラムに
変換する日本語プログラム変換手段とを備え、プログラ
ム日本語変換手段により第1のプログラミング言語で記
述されたプログラムを日本語ドキュメントのプログラム
に変換し、更に、日本語プログラム変換手段により当該
日本語ドキュメントのプログラムを第2のプログラミン
グ言語で記述されたプログラムに変換することを特徴と
するプログラミング言語間相互変換方式。
1. A program Japanese conversion means that converts a program written in an arbitrary programming language into a program written in a Japanese document, and a Japanese program conversion means that converts a program written in a Japanese document into a program written in a specified programming language. A program written in a first programming language is converted into a program written in a Japanese document by a program Japanese language conversion means, and the program written in the Japanese document is converted into a program written in a Japanese document in a second programming language by the Japanese program conversion means. A mutual conversion method between programming languages that is characterized by converting programs written in .
JP30525589A 1989-11-22 1989-11-22 System for mutual conversion between programming languages Pending JPH03164834A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30525589A JPH03164834A (en) 1989-11-22 1989-11-22 System for mutual conversion between programming languages

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30525589A JPH03164834A (en) 1989-11-22 1989-11-22 System for mutual conversion between programming languages

Publications (1)

Publication Number Publication Date
JPH03164834A true JPH03164834A (en) 1991-07-16

Family

ID=17942900

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30525589A Pending JPH03164834A (en) 1989-11-22 1989-11-22 System for mutual conversion between programming languages

Country Status (1)

Country Link
JP (1) JPH03164834A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06110674A (en) * 1992-09-28 1994-04-22 Sony Corp Program preparing device and interactive program preparing device
JP2005228075A (en) * 2004-02-13 2005-08-25 Institute Of Physical & Chemical Research Daily language program processing system, its method and rhetorical structure analyzing method
JP2012053676A (en) * 2010-09-01 2012-03-15 Tokyo Denki Gijutsu Kogyo Kk Program conversion processing apparatus, method and program, and recording medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06110674A (en) * 1992-09-28 1994-04-22 Sony Corp Program preparing device and interactive program preparing device
JP2005228075A (en) * 2004-02-13 2005-08-25 Institute Of Physical & Chemical Research Daily language program processing system, its method and rhetorical structure analyzing method
JP2012053676A (en) * 2010-09-01 2012-03-15 Tokyo Denki Gijutsu Kogyo Kk Program conversion processing apparatus, method and program, and recording medium

Similar Documents

Publication Publication Date Title
US8515733B2 (en) Method, device, computer program and computer program product for processing linguistic data in accordance with a formalized natural language
US5983171A (en) Auto-index method for electronic document files and recording medium utilizing a word/phrase analytical program
US6219831B1 (en) Device and method for converting computer programming languages
US7124073B2 (en) Computer-assisted memory translation scheme based on template automaton and latent semantic index principle
US5956510A (en) Apparatus and method for revising computer program code
JPH0630066B2 (en) Table type language translation method
CA2413455C (en) Systems and methods for translating languages
Wax Automated grammar engineering for verbal morphology
CN113297251A (en) Multi-source data retrieval method, device, equipment and storage medium
JPH03164834A (en) System for mutual conversion between programming languages
Bowers et al. TEI and Bavarian dialect resources in Austria: updates from the DBÖ and WBÖ
Bachut et al. Software tools for the environment of a computer aided translation system
JP2004178490A (en) Numerical value information search device
Rowe et al. An introduction to the ACTR coding system
Segert et al. A Computer Program for Analysis of Words According to Their Meaning (Conceptual analysis of Latin equivalents for the comparative dictionary of Semitic languages)
JPH02116972A (en) Retrieval system for program data base
JPH04211868A (en) Method for creating keyword for retrieval of cd-rom data
JPH05324343A (en) Program conversion system
JPH08314958A (en) Data registering method in parliamentary papers retrieving system
Wolberg et al. Using convert to transform source code
JPH077421B2 (en) Multilingual document creation method
Carpenter The design for a computerized information cataloging system for regional water resources application
JPH03116273A (en) Mechanical translation system using bilingual sentence template pair
JP2002157246A (en) Dictionary preparing method for knowledge acquisition support system and knowledge acquisition support system
JPH0290364A (en) Method and system for mechanical translation