JPH02197925A - Expansion system for memory area deletion type basic instruction of evaluate instruction - Google Patents

Expansion system for memory area deletion type basic instruction of evaluate instruction

Info

Publication number
JPH02197925A
JPH02197925A JP1804189A JP1804189A JPH02197925A JP H02197925 A JPH02197925 A JP H02197925A JP 1804189 A JP1804189 A JP 1804189A JP 1804189 A JP1804189 A JP 1804189A JP H02197925 A JPH02197925 A JP H02197925A
Authority
JP
Japan
Prior art keywords
selection
subject
selection subject
instruction
text
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
JP1804189A
Other languages
Japanese (ja)
Inventor
Yoichi Suzuki
陽一 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP1804189A priority Critical patent/JPH02197925A/en
Publication of JPH02197925A publication Critical patent/JPH02197925A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To reduce the memory area of a work subject store table by producing no selection subject information table and storing each selection subject in the work subject store table when an EVALUATE instruction is expanded into a basic instruction. CONSTITUTION:A selection subject information setting means 7 supplies a selection subject out of an EVALUATE instruction text and registers the text forming the selection subject in a work subject store table 12. Then the means 7 sets an entry number, the number of texts, and the type of the selection subject at a selection subject information table 11 from the table 12 for each selection subject. When no contradiction is recognized in the combination of attributes, a basic instruction production means 9 produces a basic instruction expansion text 13 via a selection subject information relating means 8 in accordance with the attribute of the selection subject and the combination of attributes of the selection subject and based on the type of the selection subject and that of the corresponding entry of the table 11. As a result, the memory area required for expansion of the EVALUATE instruction into a basic instruction can be reduced.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はCOBOLコンパイラによるCOBOL原始プ
ログラム上の手続き部の翻訳処理におけるEVALUA
TE命令の基本命令への展開方式に関し、特にE V 
A L U A ′r E命令の記憶領域削減型基本命
令展開方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to EVALUA in the translation process of the procedure division of a COBOL source program by a COBOL compiler.
Regarding the expansion method of TE instructions to basic instructions, especially EV
This invention relates to a storage area reduction type basic instruction expansion method for the ALU A'rE instruction.

〔従来の技術〕[Conventional technology]

従来、COBOLコンパイラのEVALUATE命令テ
キストを扱う意味解析処理部では、例えば第6図に示す
ように、選択主体を構成するテキストを作用対象格納テ
ーブル630のエントリ631に格納した後に、その選
択主体種別611゜テキスト数612およびエントリ番
号613からなる格納情報を選択主体情報テーブル61
0に設定する。上記の処理は、選択主体の組のうちのす
べての選択主体に対して行われる(エントリ632、選
択主体種別614.テキスト数615およびエントリ番
号616参照)。
Conventionally, in a semantic analysis processing unit that handles the EVALUATE command text of a COBOL compiler, for example, as shown in FIG.゜ Selected storage information consisting of text number 612 and entry number 613 in subject information table 61
Set to 0. The above process is performed for all selected subjects in the set of selected subjects (see entry 632, selected subject type 614, number of texts 615, and entry number 616).

一方、選択対象に対しても、選択主体の処理と同様に、
選択対象の組ごとに選択対象を構成するテキストを作用
対象格納テーブル630のエントリ633ないし634
に格納し、その選択対象種別621および624.テキ
スト数622および625ならびにエントリ番号623
および626からなる格納情報を選択対象情報テーブル
620に設定する。
On the other hand, for the selection target, in the same way as the selection subject,
For each set of selection targets, the texts that constitute the selection targets are stored in entries 633 and 634 of the operation target storage table 630.
, and the selection target types 621 and 624 . Text numbers 622 and 625 and entry number 623
and 626 is set in the selection target information table 620.

作用対象格納テーブル630に対する格納処理ならびに
選択主体情報テーブル610および選択対象情報テーブ
ル620に対する設定処理が終了した後に、選択主体情
報テーブル610と選択対象情報テーブル620との同
一エントリ同士を比較し、選択主体の属性と選択対象の
属性との組合せに矛盾が有るか否かを判定する。正しい
属性の組合せの場合には、作用対象格納テーブル630
に対するエントリ番号(613,616)および(62
3,626)ならびにテキスト数(612゜615)お
よび(622,625)を参照し、選択主体の属性と選
択対象の属性との組合せに応じた基本命令展開テキスト
を生成する。
After the storage process for the action target storage table 630 and the setting process for the selection subject information table 610 and the selection subject information table 620 are completed, the same entries in the selection subject information table 610 and the selection subject information table 620 are compared, and the selection subject information table 610 and the selection subject information table 620 are compared. It is determined whether there is a contradiction in the combination of the attribute of and the attribute of the selection target. If the combination of attributes is correct, the operand storage table 630
Entry numbers (613, 616) and (62
3,626) and the text numbers (612°615) and (622,625), a basic command expansion text is generated according to the combination of the selection subject attribute and the selection target attribute.

基本命令展開テキストの生成が完了した後に、作用対象
格納テーブル630内のエントリ633ないし634の
選択対象を構成するテキストを削除し、次の選択対象に
ついても選択対象を構成するテキストを作用対象格納テ
ーブル630のエントリ633ないし634に格納し、
その格納情報を選択対象情報テーブル620に設定する
After the generation of the basic instruction expanded text is completed, the text that constitutes the selection target of entries 633 to 634 in the operand storage table 630 is deleted, and the text that constitutes the selection target for the next selection target is also added to the operation target storage table. 630 entries 633 to 634,
The stored information is set in the selection target information table 620.

この後、前述したのと同様にして、選択主体情報テーブ
ル610と選択対象情報テーブル620との同一エント
リ同士を比較し、選択主体の属性と選択対象の属性との
組合せに矛盾が有るか否かを判定し、正しい属性の組合
せの場合には、基本命令展開テキストを生成する処理を
繰り返す。
After that, in the same way as described above, the same entries in the selection subject information table 610 and the selection target information table 620 are compared, and it is determined whether there is a contradiction in the combination of the selection subject's attribute and the selection target's attribute. If the combination of attributes is correct, the process of generating basic instruction expansion text is repeated.

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

上述した従来のEVALUATE命令の基本命令展開方
式では、選択主体情報テーブル61Gと選択対象情報テ
ーブル620とを作成した後に選択主体の属性と選択対
象の属性との組合せのチエツクと基本命令展開テキスト
の生成処理とを行っていたので、多くの情報を記憶領域
に確保する必要があり、記憶領域の少ない計算機では選
択主体と選択対象との数に制限を受けやすいという欠点
がある。
In the conventional basic command expansion method of the EVALUATE command described above, after creating the selection subject information table 61G and the selection target information table 620, the combination of the selection subject attribute and the selection target attribute is checked and the basic command expansion text is generated. Since this method requires a large amount of information to be stored in a storage area, computers with a small storage area have the disadvantage that the number of selection subjects and selection targets is likely to be limited.

本発明の目的は、上述の点に鑑み、EVALUATE命
令を基本命令に展開する際に必要となる記憶領域を削減
し、記憶領域の少ない計算機でも選択主体と選択対象と
の数についての制限を緩和することができるEVALU
ATE命令の記憶領域削減型基本命令展開方式を提供す
ることにある。
In view of the above-mentioned points, it is an object of the present invention to reduce the storage area required when expanding the EVALUATE instruction into basic instructions, and to ease restrictions on the number of selection subjects and selection targets even on computers with small storage areas. EVALU can
The object of the present invention is to provide a storage area-reduced basic instruction expansion method for ATE instructions.

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

本発明のEVALUATE命令の基本命令展開方式は、
COBOL原始プログラム上の手続き部に指定されたE
VALUATE命令を基本命令に展開する意味解析処理
において、EVALUATE命令テキスト中の選択主体
を入力し選択主体を構成するテキストを作用対象格納テ
ーブルに登録し選択主体ごとに作用対象格納テーブル上
のエントリ番号、テキスト数および選択主体種別を選択
主体情報テーブルに設定する選択主体情報設定手段と、
EVALUATE命令テキスト中の選択対象を入力し選
択対象を構成するテキストを前記作用対象格納テーブル
に登録した後に選択対象種別と前記選択主体情報テーブ
ルの対応するエントリの選択主体種別とに基づいて選択
主体の属性と選択対象の属性との組合せに矛盾があるか
否かを判定する選択対象情報関係材は手段と、この選択
対象情報関係材は手段により属性の組合せに矛盾がない
ことが判定された場合に選択対象種別と前記選択主体情
報テーブルの対応するエントリの選択主体種別とに基づ
いて選択主体の属性と選択対象の属性との組合せに応じ
た基本命令展開テキストを生成する基本命令生成手段と
を有する。
The basic instruction expansion method of the EVALUATE instruction of the present invention is as follows:
E specified in the procedure division on a COBOL source program
In the semantic analysis process that expands the VALUATE command into a basic command, the selection subject in the EVALUATE command text is input, the text that constitutes the selection subject is registered in the operation object storage table, and for each selection object, the entry number on the operation object storage table, selection subject information setting means for setting the number of texts and selection subject type in a selection subject information table;
After inputting a selection target in the EVALUATE command text and registering the text constituting the selection target in the operation target storage table, the selection target is determined based on the selection target type and the selection target type of the corresponding entry in the selection target information table. The selection target information related material that determines whether there is a contradiction in the combination of the attribute and the attribute of the selection target is a means, and the selection target information related material is determined by the means that there is no contradiction in the combination of attributes. basic command generation means for generating a basic command expansion text according to the combination of the selection subject attribute and the selection target attribute based on the selection subject type and the selection subject type of the corresponding entry of the selection subject information table; have

〔作用〕[Effect]

本発明のEVALtJATE命令の記’Lt aM域削
減型基本命令展開方式では、選択主体情報設定手段がE
VALUATE命令テキスト中の選択主体を入力し選択
主体を構成するテキストを作用対象格納テーブルに登録
し選択主体ごとに作用対象格納テーブル上のエントリ番
号、テキスト数および選択主体種別を選択主体情報テー
ブルに設定し、選択対象情報関係骨は手段がEVALt
JATE命令テキスト中の選択対象を入力し選択対象を
構成するテキストを作用対象格納テーブルに登録した後
に選択対象種別と選択主体情報テーブルの対応するエン
トリの選択主体種別とに基づいて選択主体の属性と選択
対象の属性との組合せに矛盾があるか否かを判定し、基
本命令生成手段が選択対象情報関係骨は手段により属性
の組合せに矛盾がないことが判定された場合に選択対象
種別と選択主体↑NN子テーブル対応するエントリの選
択主体種別とに基づいて選択主体の属性と選択対象の属
性との組合せに応じた八本命令展開テキストを生成する
In the Lt aM area reduction type basic instruction expansion method of the EVALtJATE command of the present invention, the selection subject information setting means is
Enter the selection subject in the VALUATE command text, register the text that constitutes the selection subject in the action object storage table, and set the entry number, number of texts, and selection object type on the action object storage table for each selection object in the selection object information table. However, the selection target information relation bone is EVALt.
After inputting the selection target in the JATE command text and registering the text that constitutes the selection target in the operation target storage table, the attribute of the selection subject is determined based on the selection target type and the selection subject type of the corresponding entry in the selection subject information table. The basic command generating means determines whether there is a contradiction in the combination of the attributes of the selection object, and the selection object information relationship bone is selected as the selection object type when the means determines that there is no contradiction in the combination of attributes. Subject ↑ Based on the selection subject type of the corresponding entry in the NN child table, an eight-command expansion text is generated according to the combination of the selection subject attribute and the selection target attribute.

〔実施例〕〔Example〕

次に、本発明について図面を参照して詳細に説明する。 Next, the present invention will be explained in detail with reference to the drawings.

第1図は、本発明の一実施例に係るEVALUATE命
令の記憶領域削減型基本命令展開方式の構成を示すブロ
ック図である。本実施例のEVALUATE命令の記憶
領域削減型基本命令展開方式は、COBOL原始プログ
ラム(以下、単に原始プログラムという) 1と、CO
BOLコンパイラ(以下、単にコンパイラという)2と
、EVALUATE命令テキストl命令テキストl部報
テーブル11と、作用対象格納テーブル12と、基本命
令展開テキスト13と、目的プログラム15とから、そ
の主要部が構成されている。
FIG. 1 is a block diagram showing the configuration of a storage area reduction type basic instruction expansion method for an EVALUATE instruction according to an embodiment of the present invention. The storage area-reduced basic instruction expansion method of the EVALUATE instruction in this embodiment uses a COBOL source program (hereinafter simply referred to as a source program) 1 and a COBOL source program (hereinafter simply referred to as a source program).
Its main parts consist of a BOL compiler (hereinafter simply referred to as a compiler) 2, an EVALUATE instruction text, an instruction text, a report table 11, an operation object storage table 12, a basic instruction expansion text 13, and an object program 15. has been done.

コンパイラ2は、誘雷解析処理部3と、構文解析処理部
4と、選択主体情報設定手段79選択対象情報関係付は
手段8および基本命令生成手段9を有するEVALUA
TE命令処理部6を含む意味解析処理部5と、コード生
成処理部i4とから構成されている。
The compiler 2 includes a lightning analysis processing section 3, a syntax analysis processing section 4, a selection subject information setting means 79, a selection object information relation means 8, and a basic instruction generation means 9.
It is composed of a semantic analysis processing section 5 including a TE instruction processing section 6, and a code generation processing section i4.

EVALUATE命令テキストl命令テキストl部理部
4が生成して、意味解析処理部5が入力する。
EVALUATE command text 1 command text 1 is generated by the logic section 4 and inputted to the semantic analysis processing section 5 .

選択主体種別テーブル11は、選択主体情報設定手段7
が設定して、選択対象情報関係骨は手段8および基本命
令生成手段9が入力する。
The selection entity type table 11 includes the selection entity information setting means 7
The selection target information relation bone is inputted by the means 8 and the basic command generation means 9.

作用対象格納テーブルI2は、選択主体情報設定手段7
および選択対象情報関係骨は手段8が設定して、選択対
象情報関係骨は手段8および基本命令生成手段9が入力
する。
The action object storage table I2 is the selection subject information setting means 7
The selection target information relationship bone is set by the means 8, and the selection target information relationship bone is input by the means 8 and the basic command generation means 9.

基本命令展開テキス)13は、基本命令生成手段9が展
開して、コード生成処理部14が入力する。
The basic instruction expansion text) 13 is expanded by the basic instruction generation means 9 and inputted to the code generation processing section 14.

第2図を参照すると、選択主体情報テーブル11は、E
VALUATE命令テキスト10の選択主体ごとに、選
択主体種別(111,114)テキスト数(112,1
15)およびエントリ番号(113,116)を格納す
る複数のエントリからなる。
Referring to FIG. 2, the selection entity information table 11 is
For each selection subject of VALUATE command text 10, selection subject type (111, 114) text number (112, 1
15) and entry numbers (113, 116).

同じく、第2図を参照すると、作用対象格納テーブル1
2は、EVALUATF、命令テキスト10の作用対象
を構成するテキストを格納する複数のエントリ121〜
124からなる。
Similarly, referring to FIG. 2, the operand storage table 1
2 is EVALUATF, a plurality of entries 121 to 121 that store texts forming the operands of the command text 10;
Consists of 124.

次に、このように構成された本実施例のEVALtJA
TE命令の記憶領域削減型基本命令展開方式の動作の概
要について説明する。
Next, EVALtJA of this embodiment configured in this way
An overview of the operation of the storage area reduction type basic instruction expansion method for TE instructions will be explained.

コンパイラ2は、原始プログラムlを入力し、誘電解析
処理部3と構文解析処理部4とにより文法的に正しいこ
とを検査し、手続き命令がEVALUATE命令ノトキ
ニはEVAL[JATE命令テキス)10を出力した後
に、意味解析処理部5を起動する。
The compiler 2 inputs the source program l, checks that it is grammatically correct by the dielectric analysis processing unit 3 and the syntactic analysis processing unit 4, and outputs the procedure instruction as EVALUATE instruction and EVAL [JATE instruction text) 10. Afterwards, the semantic analysis processing unit 5 is activated.

意味解析処理部5は、手続き命令がEVALUATE命
令のときにEVALUATE命令処理部6を起動する。
The semantic analysis processing unit 5 activates the EVALUATE command processing unit 6 when the procedure command is an EVALUATE command.

EVALLIATE命令処理部6は、選択主体情報設定
手段7によりEVALUATE命令テキストlO中の選
択主体を構成するテキストを作用対象格納テーブル12
のエントリに格納し、その選択主体種別、テキスト数お
よびエントリ番号からなる格納情報を選択主体情報テー
ブル11に設定した後に、同様の処理をすべての選択主
体に対して順次行う。
The EVALLIATE command processing unit 6 uses the selection subject information setting means 7 to set the text constituting the selection subject in the EVALUATE command text IO to the operation target storage table 12.
After setting the stored information consisting of the selection subject type, number of texts, and entry number in the selection subject information table 11, the same process is sequentially performed for all selection subjects.

次に、EVALUATE命令処理部6は、選択対象情報
関係材は手段8によりEVALUATE命令IO中の選
択対象を構成するテキストを作用対象格納テーブル12
のエントリに格納した後に、その選択対象種別と選択主
体情報設定手段7により設定された選択主体情報テーブ
ル11の対応するエントリ内の選択主体種別とを比較し
、i!沢主体の属性と選択対象の属性との組合せに矛盾
があるか否かを判定する。
Next, the EVALUATE command processing unit 6 uses the means 8 to transfer text forming the selection target in the EVALUATE command IO to the operation target storage table 12.
After storing the selected object type in the entry of i! It is determined whether there is a contradiction in the combination of the stream-based attribute and the selection target attribute.

選択主体の属性と選択対象の属性とが正しい組合せの場
合には、EVALUATE命令処理部6は、基本命令生
成手段9により作用対象格納テーブル12に対するエン
トリ番号およびテキスト数を参照し、選択主体の属性と
選択対象の属性との組合せに応じた基本命令展開テキス
ト13を生成する。
If the attributes of the selection subject and the attributes of the selection object are a correct combination, the EVALUATE instruction processing unit 6 uses the basic instruction generation means 9 to refer to the entry number and text number for the operation object storage table 12, and determines the attributes of the selection subject. A basic command expansion text 13 is generated according to the combination of the attribute of the selected object and the attribute of the selection target.

意味解析処理部5の処理が終了すると、コンパイラ2は
、コード生成処理部14を起動し、基本命令展開テキス
ト13から目的プログラム15を生成することにより、
原始プログラムlの目的プログラム15への翻訳処理を
終了する。
When the processing of the semantic analysis processing unit 5 is completed, the compiler 2 starts the code generation processing unit 14 and generates the target program 15 from the basic instruction expansion text 13.
The translation process of the source program 1 into the target program 15 is completed.

第3図を参照すると、EVALUATE命令処理部6に
おける詳細な処理は、選択主体情報設定処理ステップ3
10と、選択対象入力ステップ320と、選択対象有無
判定ステップ321と、選択対象数カウントアツプステ
ップ322と、選択対象構成テキスト有無判定ステップ
323と、作用対象格納テーブルエントリ数カウントア
ツプおよび選択対象構成テキスト格納ステップ324と
、選択主体情報テーブル検索ステップ325と、属性組
合せチエツクステップ326と、組合せOK判定ステッ
プ327と、エラーステップ328と、基本命令展開テ
キスト生成ステップ329と、作用対象格納テーブルエ
ントリ数復元ステップ330とからなる。
Referring to FIG. 3, the detailed processing in the EVALUATE command processing unit 6 is as follows:
10, selection target input step 320, selection target presence/absence determination step 321, selection target number count up step 322, selection target constituent text presence/absence determination step 323, operation target storage table entry count up and selection target constituent text storage step 324, selection entity information table search step 325, attribute combination check step 326, combination OK determination step 327, error step 328, basic command expansion text generation step 329, and operation object storage table entry number restoration step It consists of 330.

第4図は、原始プログラムl内の手続き部にEVALU
ATE命令を記述した場合の一例を示す図である。’A
’410およびB”411は、それぞれ選択主体を示す
* ” (C+2)*3”420、”D’″421.”
E″430および“F1431はそれぞれ選択対象を示
す、なお、符号41は選択主体の組を示し、42および
43は選択対象の組をそれぞれ示す。
Figure 4 shows EVALU in the procedure division within the source program l.
FIG. 3 is a diagram illustrating an example of a case where an ATE instruction is written. 'A
'410 and B"411 indicate the selection entity *"(C+2)*3"420,"D'"421."
E'' 430 and "F 1431 each indicate a selection target. Note that numeral 41 indicates a set of selection subjects, and 42 and 43 indicate a set of selection targets, respectively.

次に、本実施例のEVALLJATE命令の記憶領域削
減型基本命令展開方式により第4図に示したEVALU
ATE命令を基本命令展開テキスト13に展開する過程
について、第3図を参照しながら具体的に説明する。
Next, by using the storage area reduction type basic instruction expansion method of the EVALLJATE instruction of this embodiment, the EVALU
The process of expanding an ATE instruction into basic instruction expansion text 13 will be specifically explained with reference to FIG.

選択主体情報設定手段7は、EVALUATE命令テキ
スト10中の選択主体の&f141のうちの選択主体“
A”410を入力し、作用対象格納テーブル12のエン
トリ数(なお、この値はEVALUATE命令処理部6
の最初でゼロにされている)をカウントアツプした後に
、エントリ121に選択主体“A”410を構成するテ
キスト”Aoを格納する。そして、選択主体情報設定手
段7は、選択主体”A”410がTRLIE/FALS
E/条件式/その他のいずれ条件式外を示す選択主体種
別1.11.選択主体“A”410のEVALOATH
命令テキスト10上の構成要素数を示すテキスト数11
2および作用対象格納テーブル12のエントリ数を示す
エントリ番号113からなる格納情報を、選択主体情報
テーブル11のエントリ数(なお、この値はEVALU
ATE命令処理部6の最初でゼロにされている)をカウ
ントアンプした後に、選択主体情報テーブル11に設定
する(ステップ310) 。
The selection subject information setting means 7 selects the selection subject " of the selection subjects &f141 in the EVALUATE command text 10.
A"410 is input, and the number of entries in the operation target storage table 12 (this value is the EVALUATE instruction processing unit 6
(which is set to zero at the beginning of ), stores the text "Ao" constituting the selection subject "A" 410 in the entry 121. Then, the selection subject information setting means 7 is TRLIE/FALS
E/conditional expression/other selection subject type indicating outside of conditional expression 1.11. EVALOATH of selection subject “A” 410
Text number 11 indicating the number of components on instruction text 10
2 and the entry number 113 indicating the number of entries in the action target storage table 12.
(which is set to zero at the beginning of the ATE command processing unit 6) is counted and amplified, and then set in the selection subject information table 11 (step 310).

次に、選択主体情報設定手段7は、選択主体の組41の
うちの次の選択主体“B”411を入力し、上記処理と
同様に、作用対象格納テーブル12のエントリ数をカウ
ントアツプした後に、エントリ122に選択主体“B”
411を構成するテキスト“B”を格納し、選択主体“
B”411の選択主体積別114.テキスト数115お
よび作用対象格納テーブル12のエントリ数を示すエン
トリ番号116からなる格納情報を、選択主体情報テー
ブル11のエントリ数をカウントアツプした後に、選択
主体情報テーブル11に設定する(ステップ310)。
Next, the selection subject information setting means 7 inputs the next selection subject "B" 411 from the set of selection subjects 41, and after counting up the number of entries in the action object storage table 12 in the same way as the above process. , entry 122 shows selection subject “B”
411 is stored, and the selection subject “B” is stored.
After counting up the number of entries in the selection subject information table 11, the storage information consisting of the number of texts 115 and the entry number 116 indicating the number of entries in the operation object storage table 12 is stored by selection subject volume 114 of B" 411. The information is set in table 11 (step 310).

選択主体情報設定手段7による作用対象格納テーブル1
2への格納処理および選択主体種別テーブル11への設
定処理が終了すると、選択対象情報関係材は手段8は、
まず選択対象のMi42のうちの最初の選択対象“ (
C+2)*3”420を入力しくステップ320)、選
択対象があるので(ステップ321)、選択対象数(な
お、この値はEVALUATE命令処理部6の最初でゼ
ロにされている)をカウントアツプする(ステップ32
2)。次に、選択対象情報関係材は手段8は、選択対象
“ (C+21413”420を構成するテキスト(“
 (”、“C″、“+”、“) ”、′*”および“3
″)があるので(ステップ323)、作用対象格納テー
ブル12のエントリ数をカウントアツプして、エントリ
123に選択対象を構成するテキストを格納しくステッ
プ324)、ステップ323に制御を戻す。
Action object storage table 1 by selection entity information setting means 7
When the storage process in 2 and the setting process in the selection subject type table 11 are completed, the selection target information related material is stored in the means 8 as follows.
First, the first selection target among the Mi42 selection targets " (
C+2)*3" 420 is input (step 320), and since there is a selection target (step 321), the number of selection targets (this value is set to zero at the beginning of the EVALUATE instruction processing unit 6) is counted up. (Step 32
2). Next, the selection target information related material is the text ("
(”, “C”, “+”, “)”, ′*” and “3
'') (step 323), the number of entries in the action object storage table 12 is counted up and the text constituting the selection object is stored in the entry 123 (step 324), and control is returned to step 323.

ステップ323および324の処理を繰り返し、ステッ
プ323で選択対象“ (C+2)$3”420を構成
するテキストがなくなれば、選択対象情報関係材は手段
8は、選択主体情報設定手段7により設定された選択主
体情報テーブル11を選択対象数を添字として検索しく
ステップ325)、選択主体情報テーブル11の一致し
たエントリ内の選択主体種別111と選択対象“ (C
+2)*3”420の選択対象種別とを比較して属性の
組合せをチエツクしくステップ326)、選択主体の属
性と選択対象の属性との組合せに矛盾が有るか否かを判
定する(ステップ327)、選択主体の属性と選択対象
の属性との組合せが不正なときには、選択対象情報関係
材は手段8は、エラーとして扱う(ステップ328)、
選択主体の属性と選択対象の属性との組合せが正しいと
きには、選択対象情報関係材は手段8は、基本命令生成
手段9に制御を渡す。
The processes of steps 323 and 324 are repeated, and when there is no text constituting the selection object "(C+2)$3" 420 in step 323, the selection object information related material means 8 is set by the selection subject information setting means 7. The selection entity information table 11 is searched using the number of selection objects as a subscript (Step 325), and the selection object type 111 and selection object in the matching entry of the selection entity information table 11 are searched (step 325).
+2)*3" 420 to check the combination of attributes by comparing the selection target type (step 326), and determine whether there is a contradiction in the combination of the selection subject's attribute and the selection target's attribute (step 327) ), when the combination of the selection subject's attribute and the selection target's attribute is invalid, the selection target information related material is treated as an error by means 8 (step 328);
When the combination of the selection subject's attribute and the selection object's attribute is correct, the selection object information related material means 8 passes control to the basic command generation means 9.

基本命令生成手段9は、選択主体情報設定手段7により
設定された選択主体情報テーブル1】を選択対象数を添
字として検索し、選択主体種別テーブル11の一致した
エントリ内のテキスト数112およびエントリ番号11
3の情報から、作用対象格納テーブル12内の選択主体
を構成するテキストA′を参照し、選択対象情輻関係付
は手段8により格納された作用対象格納テーブル12内
の選択対象“ (C+2)13”420を構成するテキ
ストとを組み合わせ、基本命令展開テキスト13 (第
5図中の符号51参照)を生成する(ステップ329)
。この後、基本命令生成手段9は、作用対象格納テーブ
ル12のエントリ数を選択対象“ (C+2)*3”4
20を入力する前の状態の値としくステップ330)、
ステップ320に戻って選択対象情報関係材は手段8に
制御を渡す。
The basic command generation means 9 searches the selection subject information table 1 set by the selection subject information setting means 7 using the number of selection objects as a subscript, and searches the text number 112 in the matching entry of the selection subject type table 11 and the entry number. 11
From the information in 3, refer to the text A' that constitutes the selection subject in the action object storage table 12, and the selection object information relation is the selection object "(C+2) in the action object storage table 12 stored by means 8. 13" 420 to generate the basic instruction expansion text 13 (see reference numeral 51 in FIG. 5) (step 329).
. After this, the basic instruction generation means 9 changes the number of entries in the operation target storage table 12 to the selection target "(C+2)*3"4
20 as the value of the state before inputting step 330),
Returning to step 320, the selection target information related material passes control to the means 8.

次に、選択対象情報関係材は手段8は、選択対象の組4
2のうらの次の選択対象“D”421を入力しくステッ
プ620)、以下、選択対象情報関係材は手段8と基本
命令生成手段9とにより選択対象“ (C+2)*3”
420の場合と同様の処理が行われ、選択対象“D”4
21に対応する基本命令展開テキスト13 (第5図中
の符号52参照)が生成される。
Next, the selection target information related material means 8 selects the selection target set 4.
Input the next selection target "D" 421 (step 620), hereafter, the selection target information related material is the selection target "(C+2)*3" by the means 8 and the basic command generation means 9.
The same process as in the case of 420 is performed, and the selection target "D" 4
A basic command expanded text 13 (see reference numeral 52 in FIG. 5) corresponding to 21 is generated.

このようにして、選択対象の組42の選択対象″ (C
+2>$3″420および選択対象“D”421をすヘ
テ処理した後は、EVALUATE命令処理部6は、選
択対象数をゼロにし、選択対象の組43の選択対象“E
”430および“F“431に対しても、上記と同様の
処理を行う(第5図中の符号54および55参照)。
In this way, the selection object of the selection object set 42'' (C
+2>$3'' 420 and the selection target "D" 421, the EVALUATE instruction processing unit 6 sets the number of selection targets to zero and selects the selection target "E" of the selection target group 43.
The same processing as above is performed for "430" and "F" 431 (see numerals 54 and 55 in FIG. 5).

第5図は、第4図に示した原始プログラムl内のEVA
LtJATE命令を基本命令51〜57からなる基本命
令展開テキスト13に展開した後の命令形式を示した図
である。
Figure 5 shows the EVA in the source program l shown in Figure 4.
5 is a diagram showing an instruction format after expanding the LtJATE instruction into basic instruction expanded text 13 consisting of basic instructions 51 to 57. FIG.

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

以上に説明したように本発明は、原始プログラムの翻訳
時にEVALUATE命令を基本命令に展開する際に選
択対象情報テーブルを生成しないことおよび選択対象を
選択対象の組ごとではなしに選択対象ごとに作用対象格
納テーブルに格納して作用対象格納テーブルの記憶領域
を削減することにより、記憶領域の少ない計算機でも選
択主体と選択対象との数についての制限を大幅に緩和す
ることが可能になるという効果がある。
As explained above, the present invention does not generate a selection target information table when expanding an EVALUATE instruction into a basic instruction during translation of a source program, and operates on each selection target instead of each set of selection targets. By storing in the target storage table and reducing the storage area of the operation target storage table, it is possible to significantly relax the restrictions on the number of selection subjects and selection targets even on computers with small storage space. be.

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

第1図は本発明の一実施例に係るEVALUATE命令
の記憶領域削減型基本命令展開方式の構成を示すブロッ
ク図、 第2図は第1図中の選択主体情報テーブルおよび作用対
象格納テーブルの構成を示す図、第3図は第1図中のE
VALLIATE命令処理部における処理を示す流れ図
、 第4図はCOBOL原始プログラムにおける手続き部の
EVALUATE命令の一例を示す図、第5図は第4図
に例示したCOBOL原始プログラムのEVALUAT
E命令の一例を基本命令展開テキストに展開した後の命
令形式を示す図、第6図は従来のEVALUATE命令
の基本命令展開方式で使用される選択主体情報テーブル
。 選択対象情報テーブルおよび作用対象格納テーブルの構
成を示す図である。 図において、 l・・・原始プログラム、 2・・・コンパイラ、 3・・・語霊解析処理部、 4・・・構文解析処理部、 5・・・意味解析処理部、 6一−−EVALUATE命令処理部、7・・・選択主
体情報設定手段、 8・・・選択対象情報関係付は手段、 9・・・基本命令生成手段、 10 ・−EVALLIATE命令テキスト、11・・
選択主体情報テーブル、 12・・作用対象格納テーブル、 13・・基本命令展開テキスト、 14・・コード生成処理部、 15・・目的プログラム、 41・・選択主体の組、 42.43・選択対象の組、 51〜57・基本命令、 111.114・選択主体種別、 112.115・テキスト数、 113.116・エントリ数、 121〜124・エントリ、 410.411・選択主体、 420.421,430.431・選択対象である。 第2図
FIG. 1 is a block diagram showing the configuration of a storage area-reduced basic instruction expansion method for the EVALUATE instruction according to an embodiment of the present invention, and FIG. 2 is a configuration of the selection subject information table and the operand storage table in FIG. 1. Figure 3 shows E in Figure 1.
A flowchart showing the processing in the VALLIATE instruction processing section, FIG. 4 is a diagram showing an example of the EVALUATE instruction of the procedure section in a COBOL source program, and FIG. 5 is a flowchart showing the EVALUATE instruction of the COBOL source program illustrated in FIG.
FIG. 6 is a diagram showing the command format after expanding an example of the E command into a basic command expansion text. FIG. 6 is a selection subject information table used in the conventional basic command expansion method of the EVALUATE command. FIG. 3 is a diagram showing the configuration of a selection target information table and an action target storage table. In the figure, l...Original program, 2...Compiler, 3...Speech analysis processing section, 4...Syntax analysis processing section, 5...Semantic analysis processing section, 61--EVALUATE command Processing unit, 7... Selection subject information setting means, 8... Selection object information relation means, 9... Basic command generation means, 10 -EVALLIATE command text, 11...
Selection subject information table, 12. Operator storage table, 13. Basic command expansion text, 14. Code generation processing unit, 15. Target program, 41. Set of selection subjects, 42. 43. Selection subject. Group, 51-57・Basic command, 111.114・Selection subject type, 112.115・Number of texts, 113.116・Number of entries, 121–124・Entry, 410.411・Selection subject, 420.421,430. 431・Selection target. Figure 2

Claims (1)

【特許請求の範囲】 COBOL原始プログラム上の手続き部に指定されたE
VALUATE命令を基本命令に展開する意味解析処理
において、 EVALUATE命令テキスト中の選択主体を入力し選
択主体を構成するテキストを作用対象格納テーブルに登
録し選択主体ごとに作用対象格納テーブル上のエントリ
番号、テキスト数および選択主体種別を選択主体情報テ
ーブルに設定する選択主体情報設定手段と、 EVALUATE命令テキスト中の選択対象を入力し選
択対象を構成するテキストを前記作用対象格納テーブル
に登録した後に選択対象種別と前記選択主体情報テーブ
ルの対応するエントリの選択主体種別とに基づいて選択
主体の属性と選択対象の属性との組合せに矛盾があるか
否かを判定する選択対象情報関係付け手段と、 この選択対象情報関係付け手段により属性の組合せに矛
盾がないことが判定された場合に選択対象種別と前記選
択主体情報テーブルの対応するエントリの選択主体種別
とに基づいて選択主体の属性と選択対象の属性との組合
せに応じた基本命令展開テキストを生成する基本命令生
成手段とを有することを特徴とするEVALUATE命
令の記憶領域削減型基本命令展開方式。
[Claims] E specified in the procedure division on a COBOL source program
In the semantic analysis process that expands the VALUATE command into basic commands, input the selection subject in the EVALUATE command text, register the text that constitutes the selection subject in the operation object storage table, and enter the entry number on the operation object storage table for each selection object, selection subject information setting means for setting the number of texts and selection subject type in the selection subject information table; and inputting the selection subject in the EVALUATE command text and registering the text constituting the selection subject in the operation subject storage table, and then setting the selection subject type. and a selection object information relationship means for determining whether or not there is a contradiction in the combination of the selection object attribute and the selection object attribute based on the selection object type of the corresponding entry of the selection object information table; When the target information association means determines that there is no contradiction in the combination of attributes, the attributes of the selection subject and the attributes of the selection subject are determined based on the selection subject type and the selection subject type of the corresponding entry in the selection subject information table. 1. A storage area reduction type basic instruction expansion method for an EVALUATE instruction, comprising a basic instruction generation means for generating a basic instruction expansion text according to a combination of the EVALUATE instruction.
JP1804189A 1989-01-27 1989-01-27 Expansion system for memory area deletion type basic instruction of evaluate instruction Pending JPH02197925A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1804189A JPH02197925A (en) 1989-01-27 1989-01-27 Expansion system for memory area deletion type basic instruction of evaluate instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1804189A JPH02197925A (en) 1989-01-27 1989-01-27 Expansion system for memory area deletion type basic instruction of evaluate instruction

Publications (1)

Publication Number Publication Date
JPH02197925A true JPH02197925A (en) 1990-08-06

Family

ID=11960598

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1804189A Pending JPH02197925A (en) 1989-01-27 1989-01-27 Expansion system for memory area deletion type basic instruction of evaluate instruction

Country Status (1)

Country Link
JP (1) JPH02197925A (en)

Similar Documents

Publication Publication Date Title
JP2644728B2 (en) Data dictionary directory system
US5132901A (en) System and method for input of target language equivalents and determination of attribute data associated therewith
JPH11265395A (en) Data base access system
JPH02197925A (en) Expansion system for memory area deletion type basic instruction of evaluate instruction
Campbell A compiler definition facility based on the syntactic macro
JPH1153391A (en) Database access method
JPH0371342A (en) Reserved word deciding system
JPH02222032A (en) Optimization system for addition/subtraction instruction
JPS63136265A (en) Mechanical translating device
JPH07244601A (en) Method and device for accessing relational data base
JP3034527B2 (en) Editor device
JP2922207B2 (en) Program conversion system
JPH06162097A (en) System for setting retrieval condition of database
JPH05120226A (en) Command parameter substitution system
JPH08161155A (en) Method and device for preparing macro data
JPH0433058A (en) Machine translation device
JPH04205422A (en) Automatic program translation connecting and selecting method
JPS60138668A (en) Information terminal process controller
JPH04107738A (en) Optimum allocation system for literal
JPH01211121A (en) Translation system for source program including plural data base descriptions
JPH0261715A (en) Command interpreter with memory function
JPH0511989A (en) Parameter analyzing device
JPH06215025A (en) Device and method for processing natural language
JPH03180942A (en) Master file forming device for document data base
JPH02163823A (en) Set value check system at decision of system constitution