JPH04248624A - Program conversion processor - Google Patents

Program conversion processor

Info

Publication number
JPH04248624A
JPH04248624A JP1404291A JP1404291A JPH04248624A JP H04248624 A JPH04248624 A JP H04248624A JP 1404291 A JP1404291 A JP 1404291A JP 1404291 A JP1404291 A JP 1404291A JP H04248624 A JPH04248624 A JP H04248624A
Authority
JP
Japan
Prior art keywords
conversion
syntax
definition
converted
program
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.)
Withdrawn
Application number
JP1404291A
Other languages
Japanese (ja)
Inventor
Masako Yamaguchi
雅子 山口
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1404291A priority Critical patent/JPH04248624A/en
Publication of JPH04248624A publication Critical patent/JPH04248624A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To obtain a program conversion processor capable of executing the processing of a converter by automatically extracting required information from conversion specifications, with respect to source program conversion processing for switching or the like of a computer system. CONSTITUTION:The definition of a syntax to be converted in conversion specifications 2 is expressed by the character string of a fixed part constituting each required syntax and the data attribute of a variable part, and required data definition and conversion procedures are expressed by a prescribed expression and respective conversion procedures and respective conversion indicating codes are allowed to correspond to each other with respect to information, where conversion indicating codes are added to parts to be converted of the syntax, and the definition of conversion indication, and a conversion specification extracting part 5 generates syntax analysis data from the definition of the syntax to be converted of conversion specifications and generates a required conversion program, which has procedures corresponding to respective conversion indicating codes, from the conversion indicating definition. A conversion processing part 6 refers to syntax analysis data to detect the syntax to be converted from the source program and executes conversion determined by the conversion indicating code.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は計算機システムの移行等
において、ある計算機システムで実行するようにCOB
OLプログラミング言語等で記述された原始プログラム
を、他システムで実行するように変換するためのプログ
ラム変換処理装置に関する。
[Industrial Application Field] The present invention is useful for transferring COB data to be executed on a certain computer system during migration of computer systems.
The present invention relates to a program conversion processing device for converting a source program written in an OL programming language or the like so that it can be executed on another system.

【0002】0002

【従来の技術】計算機のシステム移行作業等において、
原始プログラムの変換が大きな作業量となる場合がある
[Background Art] In computer system migration work, etc.
Conversion of source programs may require a large amount of work.

【0003】このような原始プログラムの変換作業では
、変換仕様書に被変換対象の命令文等と、変換後の命令
文等との対応を定義し、次に変換仕様書に従う変換を行
なう処理手続きを定義するように、コンバータプログラ
ムの仕様書を作成する。
[0003] In such source program conversion work, the correspondence between the command statements to be converted and the command statements after conversion is defined in the conversion specification, and then a processing procedure is carried out to perform the conversion according to the conversion specification. Create a converter program specification that defines

【0004】このコンバータプログラムの仕様書に基づ
いて、コンバータプログラムのコーディングを行い、テ
ストしてコンバータプログラムが完成すると、必要な原
始プログラムを入力して、変換処理を実行し、変換した
原始プログラムが生成する作業が行なわれる。
[0004] Once the converter program is completed by coding and testing based on the converter program specifications, the necessary source program is input and the conversion process is executed to generate the converted source program. The work will be done.

【0005】変換仕様に変更、追加等の仕様修正が出た
場合には、それに応じてコンバータプログラムの仕様書
の変更、追加等を行い、コンバータプログラム上の要修
正部分を、プログラムロジックを追って探し、必要な修
正を実施する。
[0005] When a specification correction such as a change or addition is made to the conversion specification, the specification of the converter program is changed or added accordingly, and the part of the converter program that needs correction is searched for by following the program logic. , implement any necessary corrections.

【0006】[0006]

【発明が解決しようとする課題】変換仕様は、一般に移
行を行なう利用者システムごとの内容を有し、コンバー
タプログラムをそれに応じて作成しなければならないが
、前記従来の手順ではコンバータプログラムの作成に比
較的大きな工数を要し、更にこのために、変更、追加等
の修正が多くなると、修正仕様とコンバータプログラム
との同期を維持管理することが困難になる等の問題を生
じる。
[Problem to be Solved by the Invention] Conversion specifications generally have contents for each user system to be migrated, and a converter program must be created accordingly. However, in the conventional procedure described above, it is difficult to create a converter program. It requires a relatively large amount of man-hours, and as a result, if there are many modifications such as changes and additions, problems arise such as it becomes difficult to maintain and manage the synchronization between the modified specifications and the converter program.

【0007】本発明は、変換仕様書から自動的に必要な
情報を抽出して、コンバータの処理を実行することので
きるプログラム変換処理装置を目的とする。
The object of the present invention is to provide a program conversion processing device that can automatically extract necessary information from a conversion specification and execute converter processing.

【0008】[0008]

【課題を解決するための手段】図1は、本発明の構成を
示すブロック図である。図はプログラム変換処理装置の
構成であって、所与の変換仕様書2に従って、所与の原
始プログラム1を変換する処理において、変換仕様書2
は、被変換構文定義3と、変換指示定義4とを有する。
Means for Solving the Problems FIG. 1 is a block diagram showing the configuration of the present invention. The figure shows the configuration of a program conversion processing device, in which a given source program 1 is converted according to a given conversion specification 2.
has a converted syntax definition 3 and a conversion instruction definition 4.

【0009】被変換構文の定義3は、所要の各構文を構
成する固定部分の文字列と、可変部分のデータ属性で表
し、該構文中の被変換部分に変換指示記号を付した、所
定形式の情報を有し、変換指示の定義4は、所要のデー
タ定義と変換手順とを所定の表現によって表し、各該変
換手順を各該変換指示記号と対応付けた、所定形式の情
報を有する。
[0009] Definition 3 of the converted syntax is a predetermined format in which each required syntax is represented by a character string of a fixed part and a data attribute of a variable part, and a conversion instruction symbol is attached to the part to be converted in the syntax. The conversion instruction definition 4 has information in a predetermined format that expresses a required data definition and conversion procedure using a predetermined expression, and associates each conversion procedure with each conversion instruction symbol.

【0010】変換仕様抽出部5と、変換処理部6とを設
け、変換仕様抽出部5は、変換仕様書2を入力として、
被変換構文定義3から構文解析データ7を生成し、変換
指示定義4から各該変換指示記号に対応する手続きを有
する所要の変換プログラム8を生成する。
A conversion specification extraction section 5 and a conversion processing section 6 are provided, and the conversion specification extraction section 5 receives the conversion specification 2 as input.
Syntax analysis data 7 is generated from the converted syntax definition 3, and a required conversion program 8 having procedures corresponding to each conversion instruction symbol is generated from the conversion instruction definition 4.

【0011】変換処理部6は、原始プログラム1から、
構文解析データ7を参照して、被変換構文に該当する構
文を検出し、当該構文の該被変換部分について指定され
た該変換指示記号によって定まる変換プログラム8の手
続きを実行して、変換された原始プログラム9を生成す
る。
The conversion processing unit 6 converts the source program 1 into
The syntax analysis data 7 is referred to, a syntax that corresponds to the to-be-converted syntax is detected, and the conversion program 8 executes the procedure determined by the conversion instruction symbol specified for the to-be-converted part of the syntax to be converted. A source program 9 is generated.

【0012】0012

【作用】本発明のプログラム変換処理装置により、利用
者が変換仕様書に被変換構文を示し、その中の変換部分
を変換指示記号で指示し、又変換指示定義に変換指示記
号に対応して、変換の内容を示す手続きを定義すると、
プログラム変換処理装置に準備した構文解析機能、汎用
変換機能等、及び変換指示で定義された手続きに従って
、自動的に言語仕様にあった変換処理が実行される。
[Operation] With the program conversion processing device of the present invention, a user indicates a syntax to be converted in a conversion specification, specifies a conversion part therein with a conversion instruction symbol, and also specifies a conversion instruction symbol corresponding to the conversion instruction symbol in a conversion instruction definition. , if we define a procedure that describes the content of the conversion, we get
Conversion processing that matches the language specifications is automatically executed according to the syntax analysis function, general-purpose conversion function, etc. prepared in the program conversion processing device, and the procedures defined by the conversion instructions.

【0013】従って、変換作業は変換仕様書の作成の他
は自動化されて迅速に処理され、又変換仕様の修正があ
っても、変換仕様書の修正によって処理されるので、仕
様修正と変換処理との同期が容易且つ確実となり、変換
作業全般の管理を変換仕様書に一元化できる。
[0013] Therefore, the conversion work except for the creation of the conversion specification is automated and processed quickly, and even if there is a modification of the conversion specification, it is processed by modifying the conversion specification, so that the modification of the specification and the conversion process are It becomes easy and reliable to synchronize with the conversion specification, and the management of the entire conversion work can be unified using the conversion specification.

【0014】[0014]

【実施例】図2は変換仕様書2の内容の一例を説明する
図であり、このような仕様書を例えば適当なワードプロ
セッサの文書としてフロッピイディスク等に作成し、そ
れをプログラム変換処理装置に直接読み込ませるように
する。
[Example] Fig. 2 is a diagram for explaining an example of the contents of the conversion specification 2. Such a specification is created on a floppy disk or the like as a document for an appropriate word processor, and then transferred to a program conversion processing device. Make it read directly.

【0015】図2の被変換構文定義3には、「*」で始
まる説明文の下に、3行の構文が示されている。ここで
「〔」と「〕」で囲む部分は無い場合もある部分を示す
。構文中(図の例では各行の末尾)にある括弧付き数字
(図の例では(1) 〜(3))は変換指示記号であっ
て、次に述べる変換指示定義に書かれる番号に対応し、
その変換を適用すべき部分であることを示す。
In the converted syntax definition 3 in FIG. 2, three lines of syntax are shown below the explanatory text starting with "*". Here, the parts enclosed in "[" and "]" indicate parts that may or may not be present. The numbers in parentheses ((1) to (3) in the example shown) in the syntax (at the end of each line in the example shown) are conversion instruction symbols, and correspond to the numbers written in the conversion instruction definition described below. ,
Indicates the part to which the transformation should be applied.

【0016】図2の変換指示定義4には、初めの5行に
データ定義があり、その後の変換手続きで「コンピュー
タ名」で参照するデータが定義されている。この例は5
バイトの文字データ「FCOMP」を定義する例である
Conversion instruction definition 4 in FIG. 2 has data definitions in the first five lines, in which data to be referred to by "computer name" in the subsequent conversion procedure is defined. This example is 5
This is an example of defining byte character data "FCOMP".

【0017】(1)〜(3)の手続きは、「:**」の
後に通常の日本語文に近い表現のプログラミング言語を
使用して、図示のように定義し、(1)と(3)は構文
中で「(1)」等で指示されている該当する1語を「コ
ンピュータ名」のデータで置換すると共に、元の行をコ
メント化する変換の手続きであり、(2)は該当する行
をコメント化する変換の手続きを指示するものであり、
コメント化は例えばCOBOL言語の場合は、該当する
行に「*」を前置することによって変換される。
Procedures (1) to (3) are defined as shown in the diagram using a programming language with expressions similar to normal Japanese sentences after ":**", and the procedures (1) and (3) are is a conversion procedure that replaces the corresponding word indicated by "(1)" etc. in the syntax with "computer name" data, and also comments out the original line, and (2) corresponds to It instructs the conversion procedure to comment out lines,
For example, in the case of the COBOL language, commenting is performed by prefixing the corresponding line with "*".

【0018】変換仕様抽出部5は、前記のような被変換
構文定義3に指定された構文内容を、構文解析で参照し
易いテーブル形式に変換し、変換指示記号及びその他の
制御情報を付加して構文解析データ7を作成する。
The conversion specification extraction unit 5 converts the syntax content specified in the to-be-converted syntax definition 3 as described above into a table format that is easy to refer to in syntax analysis, and adds conversion instruction symbols and other control information. to create syntactic analysis data 7.

【0019】又、変換指示定義4から変換プログラム8
を生成し、構文解析データ7の各変換指示記号とその番
号で定まる手続きの入口番地とを対応付ける。変換処理
部6は、入力される原始プログラムの文字列を、構文解
析テーブル7を参照して解析し、該当しない文字列の行
はそのまゝ出力し、該当する構文を検出すると、変換す
る文字列を変換指示記号で定まる手続きに渡して処理を
要求し、処理結果により変換した文字列を生成して出力
する。
[0019] Also, from the conversion instruction definition 4 to the conversion program 8
is generated, and each conversion instruction symbol of the parsed data 7 is associated with the entrance address of the procedure determined by the number. The conversion processing unit 6 analyzes the input source program character string by referring to the syntax analysis table 7, outputs lines of character strings that do not apply as is, and when it detects the corresponding syntax, converts the characters to be converted. Passes the string to the procedure specified by the conversion instruction symbol, requests processing, and generates and outputs a converted string based on the processing result.

【0020】図3(a)は変換前の原始プログラム1の
例であり、これを図2の変換仕様に従って処理すること
により、(b)に示す原始プログラムが、変換された原
始プログラム9として出力される。
FIG. 3(a) is an example of the source program 1 before conversion, and by processing it according to the conversion specifications shown in FIG. 2, the source program shown in FIG. 3(b) is output as the converted source program 9. be done.

【0021】[0021]

【発明の効果】以上の説明から明らかなように本発明に
よれば、計算機システムの移行等のために原始プログラ
ムを変換する処理において、変換仕様書から自動的に必
要な情報を抽出して、コンバータの処理を実行すること
のできるので、プログラム変換作業の処理が迅速に進め
られ、又変換仕様の修正の実行及び管理が容易になって
、移行等の作業効率を改善するという著しい工業的効果
がある。
[Effects of the Invention] As is clear from the above description, according to the present invention, necessary information is automatically extracted from the conversion specification in the process of converting a source program for migration of a computer system, etc. Since the converter processing can be executed, program conversion work can be processed quickly, and modification of conversion specifications can be easily executed and managed, which has a significant industrial effect of improving work efficiency such as migration. There is.

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

【図1】  本発明の構成を示すブロック図[Figure 1] Block diagram showing the configuration of the present invention

【図2】 
 変換仕様書を説明する図
[Figure 2]
Diagram explaining conversion specifications

【図3】  原始プログラム例を示す図[Figure 3] Diagram showing an example of a source program

【符号の説明】[Explanation of symbols]

1  原始プログラム 2  変換仕様書 3  被変換構文定義 4  変換指示定義 5  変換仕様抽出部 6  変換処理部 7  構文解析データ 8  変換プログラム 9  変換された原始プログラム 1 Primitive program 2 Conversion specifications 3. Converted syntax definition 4 Conversion instruction definition 5 Conversion specification extraction part 6 Conversion processing unit 7 Syntactic analysis data 8 Conversion program 9 Converted source program

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  所与の変換仕様書(2)に従って、所
与の原始プログラム(1)を変換する処理において、該
変換仕様書(2)は、被変換構文定義(3)と、変換指
示定義(4)とを有し、該被変換構文定義(3)は、所
要の各構文を構成する固定部分の文字列と、可変部分の
データ属性で表し、該構文中の被変換部分に変換指示記
号を付した、所定形式の情報を有し、該変換指示定義(
4)は、所要のデータ定義と変換手順とを所定の表現に
よって表し、各該変換手続きを各該変換指示記号と対応
付けた、所定形式の情報を有し、変換仕様抽出部(5)
と、変換処理部(6)とを設け、該変換仕様抽出部(5
)は、該変換仕様書(2)を入力として、該被変換構文
定義から構文解析データ(7) を生成し、該変換指示
定義から各該変換指示記号に対応する手続きを有する所
要の変換プログラム(8)を生成し、該変換処理部(6
)は、該原始プログラム(1)から、該構文解析データ
(7)を参照して、被変換構文に該当する構文を検出し
、当該構文の該被変換部分について指定された該変換指
示記号によって定まる該変換プログラム(8)の該手続
きを実行するように構成されていることを特徴とするプ
ログラム変換処理装置。
Claim 1: In the process of converting a given source program (1) according to a given conversion specification (2), the conversion specification (2) includes a syntax definition to be converted (3) and a conversion instruction. Definition (4), and the converted syntax definition (3) is expressed by a character string of a fixed part constituting each required syntax and a data attribute of a variable part, and is converted into a converted part in the syntax. It has information in a predetermined format with instruction symbols attached, and the conversion instruction definition (
4) has information in a predetermined format in which the required data definition and conversion procedure are represented by a predetermined expression, each conversion procedure is associated with each conversion instruction symbol, and the conversion specification extraction unit (5)
and a conversion processing section (6), and the conversion specification extraction section (5).
) takes the conversion specification (2) as input, generates syntactic analysis data (7) from the converted syntax definition, and generates a required conversion program having procedures corresponding to each conversion instruction symbol from the conversion instruction definition. (8), and generates the conversion processing unit (6
) refers to the syntactic analysis data (7) from the source program (1), detects a syntax that corresponds to the to-be-converted syntax, and converts it by the conversion instruction symbol specified for the to-be-converted part of the syntax. A program conversion processing device characterized in that it is configured to execute the procedure of the conversion program (8) determined.
JP1404291A 1991-02-05 1991-02-05 Program conversion processor Withdrawn JPH04248624A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1404291A JPH04248624A (en) 1991-02-05 1991-02-05 Program conversion processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1404291A JPH04248624A (en) 1991-02-05 1991-02-05 Program conversion processor

Publications (1)

Publication Number Publication Date
JPH04248624A true JPH04248624A (en) 1992-09-04

Family

ID=11850059

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1404291A Withdrawn JPH04248624A (en) 1991-02-05 1991-02-05 Program conversion processor

Country Status (1)

Country Link
JP (1) JPH04248624A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010129040A (en) * 2008-12-01 2010-06-10 Systems:Kk Program conversion device, program analyzing device, program conversion method, program analyzing method, and program
JP2011086319A (en) * 2011-02-01 2011-04-28 Systems:Kk Production method and production system of program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010129040A (en) * 2008-12-01 2010-06-10 Systems:Kk Program conversion device, program analyzing device, program conversion method, program analyzing method, and program
JP2011086319A (en) * 2011-02-01 2011-04-28 Systems:Kk Production method and production system of program

Similar Documents

Publication Publication Date Title
US20040158820A1 (en) System for generating an application framework and components
JPH0630066B2 (en) Table type language translation method
US7237226B2 (en) Method and system for storing pending changes to data
JPS6375835A (en) Apparatus for generating intended code, program, list and design document
JP5147240B2 (en) Method and system for reversible design tree transformation
JP6176389B2 (en) Source code generation apparatus, source code generation method, and recording medium
JPH04248624A (en) Program conversion processor
CN111367937B (en) Data processing method and device
JPS5922140A (en) Interactive compiling system
US6948159B2 (en) Automatic compilation of electronic telecommunications system message generation code
JPH02205930A (en) Interface check processing method
JPH03121531A (en) Job control language processing system
JPH0236419A (en) Automatic translation execution system for source code
JPS60134335A (en) Printing method of source program
JPH0546373A (en) Flow chart generation processor
JPH036624A (en) Processing system for translation list output corresponding to plural code systems
JPH07141165A (en) Information processor
JPH032924A (en) Programming editing system
JPS629932B2 (en)
JPH05120226A (en) Command parameter substitution system
JPH05100829A (en) Compiling unit management system
JPS63140339A (en) Reserved word managing system for version identification
JPH04106626A (en) Program translation processor
JPH05204699A (en) Identifier searching system at debugging
JPH04209029A (en) Parallel process program translation processor

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980514