JPH023832A - Translation system for source program including input/ output sentence without format - Google Patents

Translation system for source program including input/ output sentence without format

Info

Publication number
JPH023832A
JPH023832A JP15123388A JP15123388A JPH023832A JP H023832 A JPH023832 A JP H023832A JP 15123388 A JP15123388 A JP 15123388A JP 15123388 A JP15123388 A JP 15123388A JP H023832 A JPH023832 A JP H023832A
Authority
JP
Japan
Prior art keywords
input
output
area
information table
source 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.)
Pending
Application number
JP15123388A
Other languages
Japanese (ja)
Inventor
Masanori Tamura
正典 田村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP15123388A priority Critical patent/JPH023832A/en
Publication of JPH023832A publication Critical patent/JPH023832A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To set the processing of data transfer only once and to attain a high speed input/output processing by permitting a user to designate a translation time instruction line immediately before an input/output sentence concerned and to process an input/output list as one variable area. CONSTITUTION:An area assignment means 21 inputs a source program 1, detects the translation time instruction line, and checks whether it is grammatically possible to assign the input/outputs, an appeared variable or the area of an array in an appeared order, or not. Next, an information table generation means 22 takes a series of assigned areas for one variable area, generates information on a position and a length with respect to the variable area concerned and stores them in an information table 24. An object program generation means 23 inputs the information table 24, and generates an object program 4 calling the input/output execution processing means of OS. Thus, it comes to be unnecessary to execute the processing of data transfer for plural times.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、高級プログラミング言語で記述された書式な
し入出力文を含む原始プログラムの翻訳方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for translating a source program containing unformatted input/output statements written in a high-level programming language.

〔従来の技術〕[Conventional technology]

一般に、原始プログラムの翻訳を行う場合、原始プログ
ラムの入出力文の入出力並びに現れた変数または配列の
それぞれの領域は、高級プログラミング言語の文法上の
規則によって割り当てられる領域および領域内での順番
が決定される場合を除き、任意の順番で任意の位置にと
られる。このため、入出力文の入出力並びに現れた変数
および配列の領域は、一般には連続にならない。
In general, when translating a source program, the input/output statements of the source program and the respective areas of variables or arrays that appear are allocated according to the grammatical rules of the high-level programming language, and the order within the area is determined. may be taken in any order and position, except as determined. Therefore, the input/output areas of input/output statements and the areas of variables and arrays that appear are generally not contiguous.

したがって、これ迄は、O8の入出力実行処理手段を呼
び出す目的プログラムを生成する場合。
Therefore, up to this point, the case of generating a target program that calls the input/output execution processing means of O8.

入出力文の入出力並びに現れた複数の変数および配列の
領域について、−括して情報テーブルを生成することは
できず、それぞれの領域に対して情報テーブルが生成さ
れ、これらを用いて目的プログラムを生成していた。
It is not possible to generate an information table all at once for the input/output of the input/output statement and the areas of multiple variables and arrays that appear. An information table is generated for each area, and these are used to program the target program. was being generated.

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

しかしながら、このような従来の方式では、O8の入出
力実行処理手段が入出力処理を行う場合。
However, in such a conventional method, when the input/output execution processing means of O8 performs input/output processing.

入出力並びに現れた複数の変数または配列に対して生成
された情報テーブルに従って処理される。
The inputs and outputs as well as the multiple variables or arrays that appear are processed according to an information table generated.

すなわち、情報テーブルを1つずつ参照し、前記の変数
または配列の位置および長さを評価しなければならない
ため、この評価のオーバへ、ドがかかる。
That is, since the information tables must be referred to one by one and the positions and lengths of the variables or arrays mentioned above must be evaluated, this evaluation is time consuming.

また、前記の変数または配列の領域が連続でないために
それぞれについてデータ転送しなければならない。一般
の計算機においては、−回で転送するよシも複数に分け
て転送する方が時間がかかるため、このような入出力文
は高速化の阻害要因となる。
Furthermore, since the variable or array areas are not continuous, data must be transferred for each area. In a general computer, it takes more time to transfer the data in multiple parts than to transfer it in multiple passes, so such input/output statements become an impediment to speeding up.

そこで2本発明の技術的課題は、上記欠点に鑑み、書式
なし入出力文の入出力並びに現われる変数および配列が
複数であっても変数および配列の評価及びそのデータ転
送の処理を複数回に分けて行う必要のない翻訳方式を提
供することである。
Therefore, in view of the above-mentioned drawbacks, the technical problem of the present invention is to divide the processing of input/output of unformatted input/output statements, evaluation of variables and arrays, and data transfer thereof into multiple times even if multiple variables and arrays appear. The objective is to provide a translation method that does not require manual translation.

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

本発明によれば、高級グログラミン言語で記述された原
始プログラムを入力し、目的プログラムを生成するフン
・ぐイラにおいて。
According to the present invention, in a computer that inputs a source program written in high-level glogramin language and generates a target program.

原始プログラムの翻訳時指示行によって指定された書式
なし入出力文について、当該入出力文の入出力並びに現
れた変数および配列のそれぞれの領域を、入出力並びに
現れた順番に連続した領域に割り当てることが可能であ
れば、これらの領域を連続に割り当てる領域割り当て手
段と。
For an unformatted input/output statement specified by the instruction line during translation of a source program, allocate areas for the input/output of the input/output statement and the variables and arrays that appear in consecutive areas in the order in which the input/output and the variables and arrays appear. area allocation means that allocates these areas contiguously if possible.

前記手段によって割り当てられた一連の領域を一個の変
数領域と見なし、当該変数領域に対する情報テーブルを
1つ生成する情報テーブル生成手段と。
Information table generation means that regards the series of areas allocated by the means as one variable area and generates one information table for the variable area.

前記手段で生成された情報テーブルを用いてO8の入出
力実行処理手段を呼び出す目的プログラムを生成する目
的プログラム生成手段とを有していることを特徴とする
書式なし入出力文を含む原始プログラム翻訳方式が得ら
れる。
A source program translation including an unformatted input/output statement, characterized in that it has an object program generating means for generating an object program that calls an input/output execution processing means of an O8 using the information table generated by the means. method is obtained.

〔実施例〕〔Example〕

次に1本発明の実施例について図面を参照しながら詳細
に説明する。
Next, an embodiment of the present invention will be described in detail with reference to the drawings.

第1図は本発明の一実施例のフン・ぐイラの機能ブロッ
ク図である。
FIG. 1 is a functional block diagram of a fungilla according to an embodiment of the present invention.

領域割り当て手段21は、原始プログラム1を入力して
翻訳時指示行を検出し、この指示行によって指定された
書式なし入出力文について、この入出力並びに現れた変
数または配列の領域を現れた順番に割り当てることが文
法上可能であるかどうかを調べ、可能であればデータ領
域3に前記変数または配列を入出力並びに現れた順番に
連続して割り当てる。
The area allocation means 21 inputs the source program 1, detects the instruction line at the time of translation, and, for the unformatted input/output statement specified by this instruction line, assigns the areas of the input/output and variables or arrays that appear in the order in which they appear. Check whether it is grammatically possible to allocate the variables or arrays to the data area 3, and if possible, allocate the variables or arrays to the data area 3 consecutively in the input/output order and the order in which they appear.

次に情報テーブル生成手段22は、前記手段によって割
り当てられた一連の領域を一個の変数領域として見なし
、当該変数領域に対する位置および長さを含む情報を生
成し情報テーブル24に格納する。
Next, the information table generating means 22 regards the series of areas allocated by the means as one variable area, generates information including the position and length of the variable area, and stores it in the information table 24.

そして、目的プログラム生成手段23は、情報テーブル
24を入力し、O8の入出力実行処理手段を呼び出す目
的プログラム4を生成する。
Then, the object program generating means 23 inputs the information table 24 and generates the object program 4 that calls the input/output execution processing means of O8.

第2図は1本発明を適用した場合に原始プログラム5か
ら088の入出力実行処理手段81を呼び出す目的プロ
グラム7が生成されるまでの流れを示す1つの例である
FIG. 2 is an example showing the flow from the source program 5 to the generation of the target program 7 that calls the input/output execution processing means 81 of 088 when the present invention is applied.

原始プログラム5の書式なし入出力文の直前に。Immediately before the unformatted input/output statement in source program 5.

/傘OPTIMIZE という翻訳時指示行が指定されている場合、コン/4イ
ラ6は、前記入出力文の入出力運びに現れたA、B、C の変数および配列について連続した領域に割り当て、当
該領域を1つの変数領域DATAと見なし、変数領域D
ATAに対する情報テーブルを生成する。
/umbrella OPTIMIZE is specified, the controller 6 allocates contiguous areas for the variables and arrays A, B, and C that appear in the input/output line of the input/output statement, and The area is regarded as one variable area DATA, and the variable area D
Generate an information table for the ATA.

さらにコン・母イラ6は、当該変数領域DATAの情報
テーブルを用いてO88の入出力実行処理手段81を呼
び出す目的プログラム7を生成する。
Further, the controller/mother 6 uses the information table of the variable area DATA to generate the object program 7 that calls the input/output execution processing means 81 of the O88.

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

以上の説明のとおり1本発明により、書式なし入出力文
の入出力並びに現れる変数および配列が複数であっても
、利用者が翻訳時指示行を当該入出力文の直前に指定す
ることによって、入出力並びは一つの変数領域として処
理されるため、O8の入出力実行処理手段が呼び出され
、前記変数および配列の評価およびデータ転送の処理を
行うのは一回だけですみ高速に入出力処理できる。
As explained above, according to the present invention, even if there are multiple inputs/outputs and variables and arrays that appear in an unformatted input/output statement, the user can specify a translation instruction line immediately before the input/output statement. Since the input/output array is processed as one variable area, the input/output execution processing means of O8 is called, and the evaluation of the variables and arrays and data transfer processing are performed only once, resulting in high-speed input/output processing. can.

領域割り当で手段、22・・・情報テーブル生成手段。Means for area allocation, 22... Information table generation means.

23・・・目的プログラム生成手段、24・・・情報テ
ーブル、3・・・データ領域、4・・・目的プログラム
、5・・・原始プログラム、6・・・コンパイラ、7・
・・目的プログラム、71・・・情報テーブル、8・・
・O8,81・・・入出力実行処理手段、9・・・デー
タ領域。
23... Objective program generation means, 24... Information table, 3... Data area, 4... Objective program, 5... Source program, 6... Compiler, 7.
...Objective program, 71...Information table, 8...
- O8, 81... Input/output execution processing means, 9... Data area.

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

第1図は2本発明の一実施例のコン/4’イラの機能ブ
ロック図である。 第2図は、原始プログラムから目的プログラムが生成さ
れるまでの流れを示す図である。
FIG. 1 is a functional block diagram of a controller/4' controller according to an embodiment of the present invention. FIG. 2 is a diagram showing the flow of generating a target program from a source program.

Claims (1)

【特許請求の範囲】[Claims] (1)高級プログラミング言語で記述された原始プログ
ラムを入力し目的プログラムを生成するコンパイラにお
いて、 原始プログラム中の入出力処理でデータ変換を行わない
書式なし入出力文の直前に、コンパイラがあらかじめ規
定した文字列を含む翻訳時指示行が挿入されている場合
、前記書式なし入出力文の入出力並びに現れた変数およ
び配列に対して入出力並びとして現れた順番に当該の変
数あるいは配列の領域を連続に割り当てることが可能な
らば、これらの領域を連続に割り当てる領域割り当て手
段と、 前記手段によって割り当てられた一連の領域を一個の変
数の領域と見なし、当該変数領域についての位置および
長さを含む情報テーブルを生成する情報テーブル生成手
段と、 前記手段によって生成された情報テーブルを用いてOS
の入出力実行処理手段を呼び出す目的プログラムを生成
する目的プログラム生成手段とを含むことを特徴とする
書式なし入出力文を含む原始プログラム翻訳方式。
(1) In a compiler that generates a target program by inputting a source program written in a high-level programming language, the compiler uses a predefined input/output statement immediately before an unformatted input/output statement that does not perform data conversion during input/output processing in the source program. If a translation instruction line containing a character string is inserted, the area of the variable or array is contiguous in the order in which it appears as an input/output list for the input/output and variables and arrays that appear in the unformatted input/output statement. an area allocation means for allocating these areas consecutively if it is possible to allocate these areas; and an area allocation means that regards the series of areas allocated by said means as the area of one variable, and information including the position and length of the variable area. an information table generation means for generating a table; and an OS using the information table generated by the means.
1. A source program translation method including an unformatted input/output statement, characterized by comprising: objective program generation means for generating an objective program that calls an input/output execution processing means.
JP15123388A 1988-06-21 1988-06-21 Translation system for source program including input/ output sentence without format Pending JPH023832A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15123388A JPH023832A (en) 1988-06-21 1988-06-21 Translation system for source program including input/ output sentence without format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15123388A JPH023832A (en) 1988-06-21 1988-06-21 Translation system for source program including input/ output sentence without format

Publications (1)

Publication Number Publication Date
JPH023832A true JPH023832A (en) 1990-01-09

Family

ID=15514159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15123388A Pending JPH023832A (en) 1988-06-21 1988-06-21 Translation system for source program including input/ output sentence without format

Country Status (1)

Country Link
JP (1) JPH023832A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59176347A (en) * 1983-03-25 1984-10-05 Toray Silicone Co Ltd Organopolysiloxane composition

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59176347A (en) * 1983-03-25 1984-10-05 Toray Silicone Co Ltd Organopolysiloxane composition

Similar Documents

Publication Publication Date Title
JPH023832A (en) Translation system for source program including input/ output sentence without format
JPH02163831A (en) Object program reduction system
JPS6234240A (en) Data allotting system
JPH11345127A (en) Compiler
JPS6365530A (en) Code optimizing system
JPS58149567A (en) Processing system of merging of vector length control range
JPS62219130A (en) Optimizing system for program
JPH03109642A (en) Compiling device
JPS63238628A (en) Register allocating system
JPS60200341A (en) Virtual head addressing system of character data
JPS593554A (en) Data base access controlling system
JPH02136929A (en) Reduction system for instruction sentence of object program
JP2809073B2 (en) Array memory allocation method
JPS58107951A (en) Image data output system
JPH02171831A (en) Data access system for compiler
JPH0290222A (en) Pointing device controller
JPH02249035A (en) Inter-module optimizing device
JPS6289141A (en) Data approaching system by indirect agrument list
JPH02105224A (en) Data allocation system in compiler
JPH05324346A (en) Vectorization system
JPH04250531A (en) Compilation device
JPS63189944A (en) Objective program formation processing system
JPH06324882A (en) Compiler device
JPH0224726A (en) Optimum data allocating system
JPH04256132A (en) Optimization system for substitute sentence of high level program language