JP2807854B2 - Data structure expansion method for COBOL programs - Google Patents

Data structure expansion method for COBOL programs

Info

Publication number
JP2807854B2
JP2807854B2 JP5044578A JP4457893A JP2807854B2 JP 2807854 B2 JP2807854 B2 JP 2807854B2 JP 5044578 A JP5044578 A JP 5044578A JP 4457893 A JP4457893 A JP 4457893A JP 2807854 B2 JP2807854 B2 JP 2807854B2
Authority
JP
Japan
Prior art keywords
data item
statement
source image
definition
command
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.)
Expired - Lifetime
Application number
JP5044578A
Other languages
Japanese (ja)
Other versions
JPH06236262A (en
Inventor
國寶 費
忠夫 森
真二 西谷
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.)
ADOBANSUDO SHISUTEMU KENKYUSHO KK
Original Assignee
ADOBANSUDO SHISUTEMU KENKYUSHO KK
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 ADOBANSUDO SHISUTEMU KENKYUSHO KK filed Critical ADOBANSUDO SHISUTEMU KENKYUSHO KK
Priority to JP5044578A priority Critical patent/JP2807854B2/en
Publication of JPH06236262A publication Critical patent/JPH06236262A/en
Application granted granted Critical
Publication of JP2807854B2 publication Critical patent/JP2807854B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、COBOL言語で記述
された既存アプリケーション・プログラムの再構築、再
設計、部品化再利用、メンテナンスなどを行なうための
アプリケーション・プログラムに対する各種解析処理の
前処理としてアプリケーション・プログラムをデータ構
造に基づいて展開するデータ構造展開方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to preprocessing of various analysis processes for an application program for reconstructing, redesigning, reusing parts, and maintaining an existing application program described in the COBOL language. The present invention relates to a data structure expansion method for expanding an application program based on a data structure.

【0002】[0002]

【従来の技術及び発明が解決しようとする課題】アプリ
ケーション・プログラムの再構築、再設計、部品化再利
用、メンテナンスなどを行なう場合、それぞれの処理に
対応する各種解析ツールを用いて必要な解析処理を行な
う。
2. Description of the Related Art In the case of restructuring, redesigning, reusing parts, and maintaining an application program, necessary analysis processing is performed using various analysis tools corresponding to each processing. Perform

【0003】従来、この種の解析ツールは、各ツ−ル間
に共通して利用可能なデータ構造が確立されておらず、
プログラム構造の記述をそれぞれ独自の形式で行なって
いた。そのため、アプリケーション・プログラムの解析
処理を行なう場合において、解析処理、及び展開処理、
展開形式などを最初から開発することが必要になり、時
間的にも労力的にも多大な負荷がかかるという欠点があ
った。
Conventionally, in this type of analysis tool, a data structure that can be used in common between tools has not been established.
Each program structure was described in its own format. Therefore, when performing the analysis process of the application program, the analysis process, the expansion process,
It is necessary to develop a development format from the beginning, and there is a disadvantage that a great load is imposed on both time and labor.

【0004】また、既に同様の解析処理が行なわれたこ
とのあるアプリケーション・プログラムについて、かか
る既存の解析結果を流用する場合であっても、プログラ
ム構造の記述が流用した解析ツ−ルの記述形式に依存す
ることになり、汎用性がなくなるという欠点があった。
[0004] In addition, even when an existing analysis result is diverted for an application program that has already been subjected to the same analysis processing, the description of the program structure is diverted to the description format of the analysis tool. , And there is a disadvantage that versatility is lost.

【0005】本発明は、COBOL言語で記述されたア
プリケーション・プログラムを対象に、上記従来の課題
を解決し、種々の解析処理において共通して利用可能な
汎用性のあるプログラム構造の記述形式を提供し、様々
な解析ツールの開発負荷を軽減することを課題としてい
る。
SUMMARY OF THE INVENTION The present invention solves the above-mentioned conventional problems for an application program described in the COBOL language and provides a description format of a versatile program structure that can be commonly used in various analysis processes. And to reduce the development load of various analysis tools.

【0006】[0006]

【課題を解決するための手段】上記の目的を達成するた
め、本発明は、COBOL言語で記述されたアプリケー
ション・プログラムのソースプログラムをデータ構造に
基づいて展開するCOBOLプログラムのデータ構造展
開方式において、上記COBOL言語で記述されたアプ
リケーション・プログラムのソースプログラムを字句に
分解する字句解析部と、上記字句解析部の字句解析処理
で得られた字句の並びに対して構文解析をする構文解析
部と、上記構文解析部の構文解析処理の結果から上記ア
プリケーション・プログラムの命令文本体、各種定義、
命令の種類、命令文の制御構造、参照及び更新データ項
目名からなる情報をデータ構造に基づいて展開したソー
ス・イメージ・テーブルを作成するソース・イメージテ
ーブル作成部と、上記ソース・イメージテーブル作成部
で作成したソース・イメージテーブルを参照しながら、
上記アプリケーション・プログラムのデータ項目定義部
分を対象とし、該データ項目定義を木構造で構成される
データ構造に基づいて展開したデータ項目定義テーブル
を作成するデータ項目定義テーブル作成部と、上記ソー
ス・イメージテーブル作成部で作成したソース・イメー
ジテーブルを参照しながら、上記アプリケーション・プ
ログラムの命令定義部分を対象とし、該命令定義を木構
造で構成されるデータ構造に基づいて展開した制御構造
テーブルを作成する制御構造テーブル作成部とからな
り、上記ソース・イメージテーブルは、ソースプログラ
ムの字句の並びに対応する命令文ごとにソース・イメー
ジの1行文字列、命令の種類、命令文の制御構造に関す
る情報、参照データ項目名や更新データ項目名からなる
情報と共に対応する命令文を格納した領域のアドレスを
登録してなるコマンドテーブルと、該対応する命令文の
種類に応じて命令文を構成する要素を示す情報を登録し
た命令文テーブルとからなり、上記コマンドテーブルが
必要に応じて上記命令文テーブルをポインタ参照するこ
とを特徴とする。
SUMMARY OF THE INVENTION In order to achieve the above object, the present invention relates to a COBOL program data structure expansion method for expanding a source program of an application program described in the COBOL language based on a data structure. A lexical analysis unit for decomposing a source program of an application program described in the COBOL language into lexical expressions, a lexical analysis unit for analyzing a lexical sequence obtained by the lexical analysis processing of the lexical analysis units, From the result of the syntax analysis processing of the syntax analysis unit, the statement body of the application program, various definitions,
A source image table creating section for creating a source image table in which information including an instruction type, an instruction statement control structure, a reference and an update data item name is developed based on the data structure; and the source image table creating section While referring to the source image table created in
A data item definition table creating unit for creating a data item definition table which is developed based on a data structure composed of a tree structure, for a data item definition portion of the application program; While referring to the source image table created by the table creating unit, a control structure table is created by expanding the instruction definition based on a data structure composed of a tree structure for the instruction definition portion of the application program. The source image table includes information on one line character string of the source image, type of instruction, control structure of the instruction, reference for each of the corresponding lexicals of the source program, and the corresponding instruction. Corresponds with information consisting of data item names and update data item names A command table in which the address of the area storing the statement is registered; and a command table in which information indicating elements constituting the statement according to the type of the corresponding statement is registered. It is characterized in that the instruction statement table is referenced by a pointer as needed.

【0007】また上記請求項2に記載の本発明は、上記
請求項1に記載の本発明において、データ項目定義テー
ブルが、ソース・イメージテーブルのコマンドテーブル
において命令を定義している命令文の、次のデータ項
目、サブデータ項目、親データ項目というアプリケーシ
ョン・プログラム中のデータ項目定義文やサブデータ定
義文どうしの関係を示す定義テーブルからなり、該定義
テーブルが必要に応じてコマントテーブルをポインタ参
照することを特徴とする。
The present invention described in claim 2 is a data item definition table according to claim 1 of the present invention.
Is the next data item, sub data item, and parent data item of the statement defining the command in the command table of the source image table. It is characterized by a definition table indicating a relationship, wherein the definition table refers to a command table as needed by a pointer.

【0008】さらに、上記請求項3に記載の本発明は、
上記請求項1に記載の本発明において、制御構造テーブ
ルが、ソース・イメージテーブルのコマンドテーブルに
おいて命令を定義している命令文の、次のテーブル、サ
ブテーブル、親テーブルというアプリケーション・プロ
グラム中の命令文の制御構造を示す構造テーブルからな
り、該構造テーブルが必要に応じてコマンドテーブルを
ポインタ参照することを特徴とする。
[0008] Further, the present invention according to claim 3 provides:
In the present invention according to claim 1, the control structure table has an instruction in an application program, which is a next table, a sub-table, and a parent table of an instruction defining an instruction in a command table of a source image table. The structure table includes a structure table indicating a control structure of the statement, and the structure table refers to a command table by pointer as needed.

【0009】[0009]

【実施例】以下、本発明の実施例について図面を参照し
て詳細に説明する。図1は、本発明の一実施例にかかる
COBOLプログラムのデータ構造展開方式の構成を示
すブロック図である。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a data structure expansion method of a COBOL program according to an embodiment of the present invention.

【0010】本実施例のCOBOLプログラムのデータ
構造展開方式は、COBOL言語で記述されたアプリケ
ーション・プログラムのソースプログラムを入力し、デ
ータ構造展開処理を行なって、ソース・イメージテーブ
ル10、データ項目定義テーブル11、制御構造テーブ
ル12の各展開形式に分けてそれぞれ展開する。作成し
た各テーブルは、図示しない所定の記憶装置に記憶す
る。
In the data structure development method of the COBOL program of the present embodiment, a source program of an application program described in the COBOL language is input, data structure development processing is performed, and a source image table 10, a data item definition table 11, the control structure table 12 is separately developed in each development format. Each created table is stored in a predetermined storage device (not shown).

【0011】ここで、ソース・イメージテーブル10
は、アプリケーション・プログラム中の命令文どうしの
関係を示すと共に対応する命令文を格納した領域のアド
レスを登録してなるコマンドテーブル10aと、対応す
る命令文の種類に応じて命令文を構成する要素を示す情
報を登録した命令文テーブル10bとからなる。そし
て、コマンドテーブル10aは、必要に応じて命令文テ
ーブル10bをポインタ参照することができる。図9
に、ソース・イメージテーブル10の例を示す。
Here, the source image table 10
Is a command table 10a showing the relationship between the command statements in the application program and registering the address of the area where the corresponding command statement is stored, and the elements constituting the command statement according to the type of the corresponding command statement. And a command statement table 10b in which information indicating the above is registered. The command table 10a can refer to the instruction statement table 10b with a pointer as needed. FIG.
FIG. 1 shows an example of the source image table 10.

【0012】また、データ項目定義テーブル11は、ア
プリケーション・プログラム中のデータ項目定義文やサ
ブデータ定義文どうしの関係を示す定義テーブル11a
からなり、定義テーブル11aが必要に応じてコマンド
テーブル10aをポインタ参照することができる。図1
0に、データ項目定義テーブル11の例を示す。図示の
ように、データ項目定義テーブル11は、構造化された
定義テーブル11aの組み合わせによって構成されてい
る。本実施例では、定義テーブル11aは木構造をな
し、アプリケーション・プログラムの命令文の階層構造
を示している。なお、各定義テーブル11aはポインタ
によってコマンド・テーブル10aにアクセスすること
ができるため、データ項目定義テーブル11はソース・
イメージテーブル10との関係を有して存在することと
なる。
The data item definition table 11 is a definition table 11a indicating the relationship between data item definition statements and sub data definition statements in an application program.
The definition table 11a can refer to the command table 10a by pointer as needed. FIG.
0 shows an example of the data item definition table 11. As illustrated, the data item definition table 11 is configured by a combination of structured definition tables 11a. In the present embodiment, the definition table 11a has a tree structure, and shows the hierarchical structure of the statement of the application program. Since each definition table 11a can access the command table 10a by a pointer, the data item definition table 11
It exists in a relationship with the image table 10.

【0013】また、制御構造テーブル12は、アプリケ
ーション・プログラム中の命令文の制御構造を示す構造
テーブル12aからなり、構造テーブル12aが必要に
応じてコマンドテーブル11aをポインタ参照すること
ができる。図11に、制御構造テーブル12の例を示
す。図示のように、制御構造テーブル12は、構造化さ
れた構造テーブル12aの組み合わせによって構成され
ている。本実施例では、構造テーブル12aは木構造を
なし、アプリケーション・プログラムの命令文の階層構
造を示している。なお、各構造テーブル12aはポイン
タによってコマンドテーブル10aにアクセスすること
ができるため、制御構造テーブル12はソース・イメー
ジテーブル10との関係を有して存在することとなる。
The control structure table 12 comprises a structure table 12a indicating a control structure of a command sentence in an application program. The structure table 12a can refer to the command table 11a by a pointer as needed. FIG. 11 shows an example of the control structure table 12. As illustrated, the control structure table 12 is configured by a combination of structured structure tables 12a. In the present embodiment, the structure table 12a has a tree structure, and shows a hierarchical structure of a command sentence of an application program. Since each structure table 12a can access the command table 10a by a pointer, the control structure table 12 has a relationship with the source image table 10.

【0014】上記図9、図10、図11において、ソー
ス・イメージテーブル10、データ項目定義テーブル1
1、制御構造テーブル12のそれぞれに展開したアプリ
ケーション・プログラムのCOBOL言語で記述された
ソースプログラムを図12に示す。以上の三種類のテー
ブルによる展開形式でソースプログラムを展開すること
により、COBOL言語で記述されたアプリケーション
・プログラムの構造を汎用的に記述するための最低限必
要な形式を確保することができ、かつ、展開以前のソー
スプログラムの記述状態とプログラム構造との関係を示
すことができる。
In FIGS. 9, 10 and 11, the source image table 10, the data item definition table 1
1. A source program described in the COBOL language of an application program developed in each of the control structure tables 12 is shown in FIG. By expanding the source program in the expansion format using the above three types of tables, it is possible to secure the minimum necessary format for universally describing the structure of the application program described in the COBOL language, and And the relationship between the description state of the source program before expansion and the program structure.

【0015】図1に示すように、上記データ構造展開処
理は、入力したソースプログラムを構文上の基本要素で
ある字句に分解する字句解析部1と、字句解析部1の解
析によって得られた字句列に対して構文解析をする構文
解析部2と、構文解析部2の解析結果に基づいてソース
・イメージテーブル10を作成するソース・イメージテ
ーブル作成部3と、ソース・イメージテーブル作成部3
で作成したソース・イメージテーブル10を参照してデ
ータ項目定義テーブル11を作成するデータ項目定義テ
ーブル作成部4と、ソース・イメージテーブル作成部3
で作成したソース・イメージテーブル10を参照して制
御構造テーブル12を作成する制御構造テーブル作成部
5とからなる。
As shown in FIG. 1, the data structure expansion processing includes a lexical analysis unit 1 for decomposing an input source program into lexical characters, which are basic structural elements, and a lexical analysis unit 1 obtained by the analysis of the lexical analysis unit 1. A parsing unit 2 that parses a column, a source image table creating unit 3 that creates a source image table 10 based on the analysis result of the syntax analyzing unit 2, and a source image table creating unit 3
A data item definition table creating unit 4 for creating a data item definition table 11 with reference to the source image table 10 created in step 2; and a source image table creating unit 3
And a control structure table creation unit 5 for creating the control structure table 12 with reference to the source image table 10 created in step (1).

【0016】図2に上記データ構造展開処理の流れを示
す。まず、字句解析部1がアプリケーション・プログラ
ムのソースプログラムのファイルを入力すると、入力し
たソースプログラムを字句に分解する(ステップS
1)。そして、構文解析部2が、字句列に対して構文解
析をい、構文エラーの処理、命令文の種類及び構造の識
別をする(ステップS2)。
FIG. 2 shows the flow of the data structure expansion processing. First, when the lexical analyzer 1 inputs a file of a source program of an application program, the input source program is decomposed into lexical characters (step S).
1). Then, the syntax analysis unit 2 performs syntax analysis on the lexical string, processes the syntax error, and identifies the type and structure of the command sentence (step S2).

【0017】次に、ソース・イメージテーブル作成部3
が、構文解析部2によって構文解析処理を施された字句
列から命令文を順次検査して、その種類や構造に応じて
ソース・イメージテーブル10に記録する(ステップS
3)。以上の各処理は、入力したプログラムファイルの
全てのソースプログラムについて処理を終るまで繰り返
し行なう(ステップS4)。
Next, the source image table creating section 3
Sequentially examines the command sentence from the lexical string subjected to the syntax analysis processing by the syntax analysis unit 2 and records it in the source image table 10 according to its type and structure (step S
3). The above processes are repeated until all the source programs of the input program file have been processed (step S4).

【0018】ソース・イメージテーブル10が作成され
ると、データ項目定義テーブル作成部4が、ソース・イ
メージテーブル10に記録されている命令文のうちデー
タ項目定義に関するものを参照し、データ項目定義の階
層的な構造を表わす木構造で構成されたデータ項目定義
テーブル11に記録する(ステップS5)。
When the source image table 10 is created, the data item definition table creating unit 4 refers to the command statement recorded in the source image table 10 relating to the data item definition, and It is recorded in the data item definition table 11 composed of a tree structure representing a hierarchical structure (step S5).

【0019】また、制御構造テーブル作成部5が、ソー
ス・イメージテーブル10に記録されている命令文のう
ちアプリケーション・プログラムの命令文定義に関する
ものを参照し、命令文の階層的な制御構造を表わす木構
造で構成された制御構造テーブル12に記録する(ステ
ップS6)。
The control structure table creator 5 refers to the command statement recorded in the source image table 10 relating to the command statement definition of the application program, and represents the hierarchical control structure of the command statement. It is recorded in the control structure table 12 having a tree structure (step S6).

【0020】上記ソース・イメージテーブル作成部3
は、図3に示すように、記憶装置の記憶領域にテーブル
を格納する領域を確保するコマンドテーブル領域確保手
段31及び命令テーブル領域確保手段32と、確保され
た領域に命令文に関する所定の情報を登録する基本情報
登録手段33及び構成情報登録手段34とからなる。
The source image table creating section 3
As shown in FIG. 3, a command table area securing means 31 and an instruction table area securing means 32 for securing an area for storing a table in a storage area of a storage device, and predetermined information relating to a statement in the secured area. It comprises a basic information registration unit 33 and a configuration information registration unit 34 for registration.

【0021】図4に、ソース・イメージテーブル作成部
3の処理の流れを示す。ソース・イメージテーブル作成
部3が構文解析の施されたソースプログラムの字句列を
入力すると、まずコマンドテーブル領域確保手段31に
よって、記憶装置の記憶領域中にコマンドテーブル10
aの領域を確保する(ステップS1)。そして、基本情
報登録手段33によって、ソースプログラムの命令文ご
とに、ソース・イメージの1行文字列、定義命令や実行
命令などの命令種別、命令文の制御構造に関する情報、
参照データ項目名や更新データ項目名などからなる基本
情報をコマンドテーブル10aに登録する(ステップS
2)。
FIG. 4 shows the flow of processing of the source image table creating section 3. When the source image table creating unit 3 inputs the lexical string of the source program subjected to the syntax analysis, the command table area securing unit 31 first stores the command table 10 in the storage area of the storage device.
An area a is secured (step S1). Then, the basic information registration unit 33 provides, for each command sentence of the source program, a one-line character string of the source image, an instruction type such as a definition command or an execution command, information on a control structure of the command sentence,
Basic information including a reference data item name and an update data item name is registered in the command table 10a (step S
2).

【0022】次に、命令テーブル領域確保手段32によ
って、記憶装置の記憶領域中に、コマンドテーブル10
aに登録された命令文の種別に応じた命令テーブル10
bの領域を確保する(ステップS3)。そして、構成情
報登録手段34によって、命令文を構成する要素を示す
情報を命令テーブル10bに登録する(ステップS
4)。以上の各処理は、ソースプログラムの全ての命令
文についてコマンドテーブル10aと命令テーブル10
bの登録が終了するまで、命令文ごとに順次繰り返して
行なう。
Next, the command table 10 is stored in the storage area of the storage device by the instruction table area securing means 32.
instruction table 10 corresponding to the type of the instruction sentence registered in a
An area b is secured (step S3). Then, the configuration information registration unit 34 registers information indicating the elements constituting the statement in the command table 10b (step S10).
4). The above-described processing is performed by using the command table 10a and the instruction table 10
Until the registration of b is completed, the processing is sequentially repeated for each command statement.

【0023】上記データ項目定義テーブル作成部4は、
図5に示すように、記憶装置の記憶領域にテーブルを格
納する領域を確保する定義テーブル領域確保手段41
と、ソース・イメージテーブル10にアクセスして所定
の情報を読み込む読み込み手段42と、ソース・イメー
ジテーブル10から読み取った情報を検査する検査手段
43と、定義テーブル領域確保手段41によって確保さ
れた領域に読み込み手段42で読み取った所定の情報を
登録する登録手段44とからなる。
The data item definition table creation unit 4
As shown in FIG. 5, a definition table area securing unit 41 for securing an area for storing a table in a storage area of a storage device.
Reading means 42 for accessing the source image table 10 and reading predetermined information; checking means 43 for checking the information read from the source image table 10; and reading the area secured by the definition table area securing means 41. A registration unit 44 for registering predetermined information read by the reading unit 42;

【0024】図6に、データ項目定義テーブル作成部4
の処理の流れを示す。ソース・イメージテーブル作成部
3がソース・イメージテーブル10を作成すると、デー
タ項目定義テーブル作成部4は、定義テーブル領域確保
手段41によって記憶装置の記憶領域に定義テーブル1
1aの領域を確保する(ステップS1)。そして、読み
込み手段42によって、ソース・イメージテーブル10
のコマンドテーブル10aを読み込んでデータ項目を定
義している命令文を識別し、登録手段44によって、そ
の命令文の次データ項目、サブデータ項目、親データ項
目などのデータ項目定義情報と、コマンドテーブル10
aへアクセスするためのポインタとを定義テーブル11
aに登録する(ステップS2)。
FIG. 6 shows a data item definition table creating section 4.
2 shows the flow of processing. When the source image table creating unit 3 creates the source image table 10, the data item definition table creating unit 4 causes the definition table area securing unit 41 to store the definition table 1 in the storage area of the storage device.
An area 1a is secured (step S1). Then, the source image table 10 is read by the reading unit 42.
The command table 10a is read to identify the command statement defining the data item, and the registration means 44 registers data item definition information such as the next data item, sub data item, and parent data item of the command statement, and the command table. 10
a and a pointer for accessing the
a (step S2).

【0025】次に、検査手段43によって、読み込み手
段42で読み取ったソース・イメージテーブル10のコ
マンドテーブル10aにデータ項目定義情報が残ってい
るかどうか検査し、残っている場合は、次に処理するデ
ータ項目がサブデータ項目であるかどうか検査する(ス
テップS3、S4)。
Next, the checking means 43 checks whether or not the data item definition information remains in the command table 10a of the source image table 10 read by the reading means 42. It is checked whether the item is a sub data item (steps S3, S4).

【0026】処理するデータ項目定義情報が残ってお
り、かつ次に処理するデータ項目がサブデータ項目であ
るときは、登録手段44によって、それまで処理してい
たデータ項目の定義テーブル11aの下階層であるサブ
クラスの定義テーブル11aを用意して、データ項目定
義情報とコマンドテーブル10aへのポインタとを登録
する(ステップS5)。
If the data item definition information to be processed remains and the next data item to be processed is a sub-data item, the registration means 44 uses the lower layer of the data item definition table 11a to process the data item. Is prepared, and data item definition information and a pointer to the command table 10a are registered (step S5).

【0027】一方、処理するデータ項目定義情報が残っ
ており、次に処理するデータ項目がサブデータ項目でな
いときは、さらに、検査手段43によって、それまで処
理していたデータ項目定義がサブクラスの定義テーブル
11aに登録されているかどうか検査する(ステップS
6)。そして、サブクラスの定義テーブル11aに登録
されている場合は、最上位の階層の定義テーブル11a
と同階層の定義テーブル11aを用意して、データ項目
定義情報とコマンドテーブル10aへのポインタとを登
録する(ステップS7)。また、サブクラスでない定義
テーブル11aに登録されている場合は、それまで処理
していた定義テーブル11aの下階層の定義テーブル1
1aを用意して、データ項目定義情報とコマンドテーブ
ル10aへのポインタとを登録する(ステップS8)。
On the other hand, when the data item definition information to be processed remains and the data item to be processed next is not a sub data item, the data item definition which has been processed up to that time is further checked by the checking means 43. It is checked whether it is registered in the table 11a (step S
6). When registered in the definition table 11a of the subclass, the definition table 11a of the highest hierarchy
And a definition table 11a at the same level as the above is prepared, and data item definition information and a pointer to the command table 10a are registered (step S7). If it is registered in the definition table 11a which is not a subclass, the definition table 1a in the lower hierarchy of the definition table 11a which has been processed up to that time is used.
1a is prepared, and data item definition information and a pointer to the command table 10a are registered (step S8).

【0028】以上の各処理を、読み込み手段42で読み
取ったソース・イメージテーブル10のコマンドテーブ
ル10aにデータ項目定義情報がなくなるまで繰り返し
て行なう。そして、コマンドテーブル10aにデータ項
目定義情報がなくなった場合は、データ項目定義テーブ
ル作成処理を終了する(ステップS3)。
The above processing is repeated until the command table 10a of the source image table 10 read by the reading means 42 has no data item definition information. When the data item definition information is no longer present in the command table 10a, the data item definition table creation processing ends (step S3).

【0029】上記制御構造テーブル作成部5は、図7に
示すように、記憶装置の記憶領域にテーブルを格納する
領域を確保する構造テーブル領域確保手段51と、ソー
ス・イメージテーブル10にアクセスして所定の情報を
読み込む読み込み手段52と、ソース・イメージテーブ
ル10から読み取った情報を検査する検査手段53と、
構造テーブル領域確保手段51によって確保された領域
に読み込み手段52で読み取った所定の情報を登録する
登録手段54とからなる。
As shown in FIG. 7, the control structure table creator 5 accesses the source image table 10 by accessing the structure table area securing means 51 for securing an area for storing the table in the storage area of the storage device. Reading means 52 for reading predetermined information; checking means 53 for checking information read from the source image table 10;
A registration unit 54 for registering predetermined information read by the reading unit 52 in the area secured by the structure table area securing unit 51;

【0030】図8に、制御構造テーブル作成部5の処理
の流れを示す。ソース・イメージテーブル作成部3がソ
ース・イメージテーブル10を作成すると、制御構造テ
ーブル作成部5は、構造テーブル領域確保手段51によ
って記憶装置の記憶領域に構造テーブル12aの領域を
確保する(ステップS1)。そして、読み込み手段52
によって、ソース・イメージテーブル10のコマンドテ
ーブル10aを読み込んで命令を定義している命令文を
識別し、登録手段54によって、その命令文の次テーブ
ル、サブテーブル、親テーブルなどの制御構造情報と、
コマンドテーブル10aへアクセスするためのポインタ
とを構造テーブル12aに登録する(ステップS2)。
FIG. 8 shows the flow of the process of the control structure table creation unit 5. When the source image table creating unit 3 creates the source image table 10, the control structure table creating unit 5 secures the area of the structure table 12a in the storage area of the storage device by the structure table area securing means 51 (step S1). . And reading means 52
The command table 10a of the source image table 10 is read to identify the command statement defining the command, and the registration unit 54 controls the control structure information such as the next table, subtable, parent table, and the like of the command statement,
A pointer for accessing the command table 10a is registered in the structure table 12a (step S2).

【0031】次に、検査手段53によって、読み込み手
段52で読み取ったソース・イメージテーブル10のコ
マンドテーブル10aに制御構造情報が残っているかど
うか検査し、残っている場合は、当該命令文が制御構造
を有しているかどうか検査する(ステップS3、S
4)。
Next, the checking means 53 checks whether or not control structure information remains in the command table 10a of the source image table 10 read by the reading means 52. (Steps S3 and S3)
4).

【0032】処理する制御構造情報が残っており、かつ
当該命令文が制御構造を有しているときは、登録手段5
4によって、それまで処理していた構造テーブル12a
の下階層であるサブクラスの構造テーブル12aを用意
して、制御構造情報とコマンドテーブル10aへのポイ
ンタとを登録する(ステップS5)。
If the control structure information to be processed remains and the statement has a control structure, the registration means 5
4, the structure table 12a that has been processed until then
A structure table 12a of a subclass which is a lower hierarchy is prepared, and control structure information and a pointer to the command table 10a are registered (step S5).

【0033】一方、処理する制御構造情報が残ってお
り、当該命令文が制御構造を有していないときは、さら
に、検査手段53によって、当該命令文が制御構造中の
命令文であるかどうか検査する(ステップS6)。そし
て、当該命令文が制御構造中の命令文である場合は、最
上位の階層の構造テーブル12aと同階層の構造テーブ
ル12aを用意して、制御構造情報とコマンドテーブル
10aへのポインタとを登録する(ステップS7)。ま
た、当該命令文が制御構造中の命令文でない場合は、そ
れまで処理していた構造テーブル12aの下階層の構造
テーブル12aを用意して、制御構造情報とコマンドテ
ーブル10aへのポインタとを登録する(ステップS
8)。
On the other hand, when the control structure information to be processed remains and the statement does not have a control structure, the checking means 53 further checks whether the statement is a statement in the control structure. An inspection is performed (step S6). If the statement is a statement in the control structure, a top-level structure table 12a and a same-level structure table 12a are prepared, and control structure information and a pointer to the command table 10a are registered. (Step S7). If the statement is not a statement in the control structure, a structure table 12a in the lower hierarchy of the structure table 12a that has been processed is prepared, and the control structure information and a pointer to the command table 10a are registered. (Step S
8).

【0034】以上の各処理を、読み込み手段52で読み
取ったソース・イメージテーブル10のコマンドテーブ
ル10aに制御構造情報がなくなるまで繰り返して行な
う。そして、コマンドテーブル10aに制御構造情報が
なくなった場合は、制御構造テーブル作成処理を終了す
る(ステップS3)。
The above processes are repeated until the command structure 10a of the source image table 10 read by the reading means 52 has no control structure information. Then, when the control structure information has disappeared from the command table 10a, the control structure table creation processing ends (step S3).

【0035】[0035]

【発明の効果】以上説明したように本発明は、COBO
L言語で記述されたアプリケーション・プログラムのソ
ースプログラムをソース・イメージテーブル、データ項
目定義テーブル、制御構造テーブルの三種類のテーブル
による展開形式で展開することとしたため、かかるアプ
リケーション・プログラムの構造を汎用的に記述するた
めの最低限必要な形式を確保することができ、かつ、展
開以前のソースプログラムの記述状態とプログラム構造
との関係を示すことができることにより、各種解析ツー
ル間のデータ交換や新たな解析ツールの開発が容易にな
り、時間的及び労力的な負荷を軽減することができると
いう効果がある。
As described above, the present invention provides a COBO
Since the source program of the application program described in the L language is expanded in an expansion format using three types of tables, a source image table, a data item definition table, and a control structure table, the structure of the application program is generally used. Since the minimum required format for the description can be secured and the relationship between the description state of the source program before development and the program structure can be shown, data exchange between various analysis tools and new This has the effect of facilitating the development of an analysis tool and reducing the time and labor load.

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

【図1】本発明の一実施例に係るCOBOLプログラム
のデータ構造展開方式の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a data structure expansion method of a COBOL program according to an embodiment of the present invention.

【図2】図1のデータ構造展開方式の処理の流れを示す
フローチャートである。
FIG. 2 is a flowchart showing the flow of processing of the data structure expansion method of FIG.

【図3】図1のソース・イメージテーブル作成部の機能
を示す機能ブロック図である。
FIG. 3 is a functional block diagram showing functions of a source image table creating unit in FIG. 1;

【図4】図3のソース・イメージテーブル作成部の処理
の流れを示すフローチャートである。
FIG. 4 is a flowchart showing a flow of processing of a source image table creating unit of FIG. 3;

【図5】図1のデータ項目定義テーブル作成部の機能を
示す機能ブロック図である。
FIG. 5 is a functional block diagram illustrating functions of a data item definition table creation unit of FIG. 1;

【図6】図5のデータ項目定義テーブル作成部の処理の
流れを示すフローチャートである。
FIG. 6 is a flowchart showing a flow of processing of a data item definition table creation unit of FIG. 5;

【図7】図1の制御構造テーブル作成部の機能を示す機
能ブロック図である。
FIG. 7 is a functional block diagram illustrating functions of a control structure table creation unit in FIG. 1;

【図8】図7の制御構造テーブル作成部の処理の流れを
示すフローチャートである。
FIG. 8 is a flowchart showing a flow of processing of a control structure table creation unit of FIG. 7;

【図9】ソース・イメージテーブルの例を示す図であ
る。
FIG. 9 is a diagram illustrating an example of a source image table.

【図10】データ項目定義テーブルの例を示す図であ
る。
FIG. 10 is a diagram illustrating an example of a data item definition table.

【図11】制御構造テーブルの例を示す図である。FIG. 11 is a diagram illustrating an example of a control structure table.

【図12】COBOL言語で記述されたアプリケーショ
ン・プログラムのソースプログラムの例を示す図であ
る。
FIG. 12 is a diagram illustrating an example of a source program of an application program described in the COBOL language.

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

1 字句解析部 2 構文解析部 3 ソース・イメージテーブル作成部 4 データ項目定義テーブル作成部 5 制御構造テーブル作成部 10 ソース・イメージテーブル 10a コマンドテーブル 10b 命令テーブル 11 データ項目定義テーブル 11a 定義テーブル 12 制御構造テーブル 12a 構造テーブル DESCRIPTION OF SYMBOLS 1 Lexical analysis part 2 Syntax analysis part 3 Source image table preparation part 4 Data item definition table preparation part 5 Control structure table preparation part 10 Source image table 10a Command table 10b Instruction table 11 Data item definition table 11a Definition table 12 Control structure Table 12a Structure table

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 「情報処理学会研究報告」VOL. 92,NO.79(1992−9)(92−SE− 87−1) 「情報処理学会研究報告」VOL. 93,NO.4(1993−1−19)(93−I S−42−11) (58)調査した分野(Int.Cl.6,DB名) G06F 9/06 G06F 9/45──────────────────────────────────────────────────続 き Continued on the front page (56) References “IPSJ Research Report” Vol. 92, NO. 79 (1992-9) (92-SE-87-1) "Information Processing Society of Japan Research Report" VOL. 93, NO. 4 (1993-1-19) (93-IS-42-11) (58) Fields investigated (Int. Cl. 6 , DB name) G06F 9/06 G06F 9/45

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 COBOL言語で記述されたアプリケー
ション・プログラムのソースプログラムをデータ構造に
基づいて展開するCOBOLプログラムのデータ構造展
開方式において、 上記COBOL言語で記述されたアプリケーション・プ
ログラムのソースプログラムを字句に分解する字句解析
部と、 上記字句解析部の字句解析処理で得られた字句の並びに
対して構文解析をする構文解析部と、 上記構文解析部の構文解析処理の結果から上記アプリケ
ーション・プログラムの命令文本体、各種定義、命令の
種類、命令文の制御構造、参照及び更新データ項目名か
らなる情報をデータ構造に基づいて展開したソース・イ
メージ・テーブルを作成するソース・イメージテーブル
作成部と、 上記ソース・イメージテーブル作成部で作成したソース
・イメージテーブルを参照しながら、上記アプリケーシ
ョン・プログラムのデータ項目定義部分を対象とし、該
データ項目定義を木構造で構成されるデータ構造に基づ
いて展開したデータ項目定義テーブルを作成するデータ
項目定義テーブル作成部と、 上記ソース・イメージテーブル作成部で作成したソース
・イメージテーブルを参照しながら、上記アプリケーシ
ョン・プログラムの命令定義部分を対象とし、該命令定
義を木構造で構成されるデータ構造に基づいて展開した
制御構造テーブルを作成する制御構造テーブル作成部と
からなり、 上記ソース・イメージテーブルは、ソースプログラムの
字句の並びに対応する命令文ごとにソース・イメージの
1行文字列、命令の種類、命令文の制御構造に関する情
報、参照データ項目名や更新データ項目名からなる情報
と共に対応する命令文を格納した領域のアドレスを登録
してなるコマンドテーブルと、該対応する命令文の種類
に応じて命令文を構成する要素を示す情報を登録した命
令文テーブルとからなり、上記コマンドテーブルが必要
に応じて上記命令文テーブルをポインタ参照することを
特徴とするCOBOLプログラムのデータ構造展開方
式。
1. A data structure development method for a COBOL program which expands a source program of an application program described in a COBOL language based on a data structure, wherein a source program of the application program described in the COBOL language is lexically expressed. A lexical analyzer to be decomposed; a parser to parse a sequence of lexical characters obtained by the lexical analyzer of the lexical analyzer; and an instruction of the application program based on the result of the parser of the parser. A source image table creating unit for creating a source image table in which information including a statement body, various definitions, types of instructions, control structures of instruction statements, references and updated data item names is expanded based on the data structure; The source created by the source image table creation unit A data item definition table for creating a data item definition table in which the data item definition is expanded based on a data structure composed of a tree structure with respect to the data item definition portion of the application program while referring to the image table Creating unit, referring to the source image table created by the source image table creating unit, targeting the instruction definition portion of the application program, and defining the instruction definition based on a data structure composed of a tree structure. And a control structure table creating unit for creating an expanded control structure table. The source image table has a one-line character string of a source image, an instruction type, an instruction Information on statement control structures, reference data item names and update data Command table in which an address of an area in which a corresponding statement is stored together with information consisting of data item names, and a statement in which information indicating elements constituting the statement according to the type of the corresponding statement is registered. A COBOL program data structure development method comprising a table, wherein the command table refers to the instruction statement table by a pointer as needed.
【請求項2】 データ項目定義テーブルが、ソース・イ
メージテーブルのコマンドテーブルにおいて命令を定義
している命令文の、次のデータ項目、サブデータ項目、
親データ項目というアプリケーション・プログラム中の
データ項目定義文やサブデータ定義文どうしの関係を示
す定義テーブルからなり、該定義テーブルが必要に応じ
てコマンドテーブルをポインタ参照することを特徴とす
る請求項1に記載のCOBOLプログラムのデータ構造
展開方式。
2. A data item definition table comprising : a next data item, a sub data item, and a next item of a statement defining an instruction in a command table of a source image table.
2. A parent data item comprising a definition table indicating a relationship between data item definition statements and sub-data definition statements in an application program, wherein the definition table refers to a command table by pointer as needed. 2. The data structure expansion method of the COBOL program described in 1. above.
【請求項3】 制御構造テーブルが、ソース・イメージ
テーブルのコマンドテーブルにおいて命令を定義してい
る命令文の、次のテーブル、サブテーブル、親テーブル
というアプリケーション・プログラム中の命令文の制御
構造を示す構造テーブルからなり、該構造テーブルが必
要に応じてコマンドテーブルをポインタ参照することを
特徴とする請求項1に記載のCOBOLプログラムのデ
ータ構造展開方式。
3. The control structure table indicates a control structure of a statement in an application program, which is a next table, a sub-table, and a parent table of a statement defining an instruction in a command table of a source image table. 2. The data structure development method for a COBOL program according to claim 1, comprising a structure table, wherein the structure table references a command table as needed by a pointer.
JP5044578A 1993-02-09 1993-02-09 Data structure expansion method for COBOL programs Expired - Lifetime JP2807854B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5044578A JP2807854B2 (en) 1993-02-09 1993-02-09 Data structure expansion method for COBOL programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5044578A JP2807854B2 (en) 1993-02-09 1993-02-09 Data structure expansion method for COBOL programs

Publications (2)

Publication Number Publication Date
JPH06236262A JPH06236262A (en) 1994-08-23
JP2807854B2 true JP2807854B2 (en) 1998-10-08

Family

ID=12695389

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5044578A Expired - Lifetime JP2807854B2 (en) 1993-02-09 1993-02-09 Data structure expansion method for COBOL programs

Country Status (1)

Country Link
JP (1) JP2807854B2 (en)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
「情報処理学会研究報告」VOL.92,NO.79(1992−9)(92−SE−87−1)
「情報処理学会研究報告」VOL.93,NO.4(1993−1−19)(93−IS−42−11)

Also Published As

Publication number Publication date
JPH06236262A (en) 1994-08-23

Similar Documents

Publication Publication Date Title
US20040158820A1 (en) System for generating an application framework and components
US7240340B2 (en) System and method for browse information parsing without compilation
JPH02109127A (en) Specification processing method
US20040158824A1 (en) Method and system for generating executable code for formatting and printing complex data structures
JPH0540616A (en) Method for generating program specifications
JP2807854B2 (en) Data structure expansion method for COBOL programs
US20060053159A1 (en) Exploiting metadata for performing structure-oriented operations on content-specific data representations
JP2764782B2 (en) Data structure expansion method for COBOL programs
US20090144322A1 (en) Exploiting Metadata for Performing Structure-Oriented Operations on Content-Specific Data Representations
JP2942414B2 (en) Virtual database method
JP3419483B2 (en) Natural language processing apparatus and method
JPH11154093A (en) Program compiler and storage medium recording compiler program
Stephens et al. Visual Basic. NET and XML: harness the power of XML in VB. NET applications
JP2000181691A (en) Program structure analysis system
JPH07168711A (en) Program managing method
JP2797749B2 (en) File destruction pre-check mechanism
JP3034527B2 (en) Editor device
Gardner RayTracer: traceability for software engineering
JPH04148336A (en) Fortran program grammar analyzing system
JP2590083B2 (en) Source program translation processing method
KR960018924A (en) Data Manipulation Processing Method for Real-time Support of DBMS
JPH0279127A (en) Fortran compile processing system
JPH05108372A (en) System for outputting compiler optimization processing content
JPH10161914A (en) Automatic generating method for embedded sql
JPH04270422A (en) Precompile processing system