JPS6182242A - Fortran translating system - Google Patents

Fortran translating system

Info

Publication number
JPS6182242A
JPS6182242A JP17978084A JP17978084A JPS6182242A JP S6182242 A JPS6182242 A JP S6182242A JP 17978084 A JP17978084 A JP 17978084A JP 17978084 A JP17978084 A JP 17978084A JP S6182242 A JPS6182242 A JP S6182242A
Authority
JP
Japan
Prior art keywords
sentence
processing
statement
input
output
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
JP17978084A
Other languages
Japanese (ja)
Inventor
Susumu Nishida
進 西田
Hiroyuki Akamatsu
弘之 赤松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP17978084A priority Critical patent/JPS6182242A/en
Publication of JPS6182242A publication Critical patent/JPS6182242A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To execute easily an input/output instruction of structure body data by using a pre-compiler for correcting source in which a structure body data defining sentence and an open sentence which has designated a presentation to an access designator, to a standard language. CONSTITUTION:One sentence is inputted from an input source file 6, a sort of the sentence is executed by a sorting part 4, and it is delivered to a 'control part of processing' 4 by adding the sort. When the sentence is a PARTITION sentence, the 'control pat of processing' 4 delivers it to a 'processing part of PARTITION sentence' 7. In this part, the overall length of a data designated by the PARTITION sentence is derived, and also it is converted to a NAMELIST sentence and returned to the 'control part of processing' 4. When the sentence is the first execution sentence, it is delivered to a 'processing part of the first execution sentence' 8, and in this part, a CALL JZLPSX sen tence is inserted immediately before the execution sentence, and the length of said whole data is appropriated as its argument. As for an input/output sentence READ, a CALL JZLPSX is inserted immediately before said sentence in a processing part, and an identification number of a data set is appropriated as its argument.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、フォートランの拡張言語仕様として構造体を
定義するPARTITTON文を追加し、PARTIT
1ON文が記入されたフォートラン・ソースをコンパイ
ルとして標準言語仕様のフォートラン・ソースに変換し
、標準言語仕様のフォートラン・ソースをコンパイルし
て実行形式のプログラムに変換するフォートラン翻訳方
式に関するものである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention adds a PARTITTON statement that defines a structure as an extended language specification of Fortran, and
The present invention relates to a Fortran translation method in which a Fortran source in which a 1ON statement is written is compiled and converted into a Fortran source with standard language specifications, and the Fortran source with standard language specifications is compiled and converted into an executable program.

〔従来技術と問題点〕[Prior art and problems]

構造体データは、異種のデータ項目を成る順序に従って
集めたものであるが、従来のフォートランでは構造体デ
ータ単位で人出力を行うことが出来ず、構造体データの
入出力を行いたい場合、構造体データを要素に分解し、
要素毎にフォーマ。
Structure data is a collection of different data items in the order in which they are formed, but in conventional Fortran, it is not possible to perform human output in units of structure data. Break down the body data into elements,
Forma for each element.

ト文を書き入出力を指示する必要があった。It was necessary to write command statements to specify input and output.

〔発明の目的〕[Purpose of the invention]

本発明は、上記の考察に基づくものであって、フォート
ランで構造体データを扱い得るようにすることを目的と
している。
The present invention is based on the above considerations, and aims to enable Fortran to handle structure data.

〔目的を達成するための手段〕[Means to achieve the purpose]

そしてそのため、本発明のフォー1ヘラン翻訳方式は、
構造体データを定義したPARTITIfIN文とアク
セス指示子にPI?R5ENTATION指定があるO
PI’:N文が記入されたフォートラン・ソースをプリ
コンパイルして標準言語仕様のフォートラン・ソースに
変換し、該標準言語仕様のフォートラン・ソースをコン
パイルして実行形式のプログラムに変換することを特徴
とするものである。
Therefore, the four-one hellan translation method of the present invention is
Is there a PI in the PARTITIfIN statement that defines the structure data and the access indicator? O with R5ENTATION specification
The feature is that the Fortran source in which the PI':N statement is entered is precompiled and converted into the Fortran source of the standard language specification, and the Fortran source of the standard language specification is compiled and converted into an executable program. That is.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明を図面を参照しつつ説明する。 Hereinafter, the present invention will be explained with reference to the drawings.

第1図は本発明の詳細な説明するための図である。第1
図(イ)は構造体データの1例を示す図である。第1図
(イ)において、Aは整数型の4ハイド領域、Bは実数
型の4ハイドの領域、Cは文字型の16バイトの領域を
示す。第1E(ロ)はPARTITTON文及びアクセ
ス指示子にPRESENTAT ION指定がある0P
EN文を持つフォートラン・ソースと、これをプリコン
パイルして得られる標準言語仕様のフォートラン・ソー
スとを示す図である。本発明においては、構造体データ
を扱うために、下記の仕様を追加する。
FIG. 1 is a diagram for explaining the present invention in detail. 1st
Figure (A) is a diagram showing an example of structure data. In FIG. 1(a), A indicates an integer type 4-hide area, B a real number type 4-hide area, and C a character type 16-byte area. The 1st E (b) is 0P with PRESENTATION specified in the PARTITTON statement and access indicator.
FIG. 2 is a diagram showing a Fortran source having an EN statement and a Fortran source with standard language specifications obtained by precompiling the Fortran source. In the present invention, the following specifications are added in order to handle structure data.

■PARTTTION文 ■ 0PEN文のアクセス指示子に PRESENTA
TrONPARTITION文で構造体データを定義し
、0PEN文のアクセス指示子に PRESENTAT
TON  を指定することにより、構造体を扱うデータ
セノ[識別番号を決める。第1図(ロ)の左側のフ」−
1〜ラン・ソースにおいて、PARTITION文は構
造体の名AiiがDであること並びに構造体の要素がA
、B及びCであることを示している。また、l? HA
 11文は、入力装置番号が6であり、構造体りを読め
込むべきことを指示している。
■PARTTTION statement■ PRESENTA in the access indicator of the 0PEN statement
Define the structure data in the TrONPARTITION statement and use PRESENTAT as the access indicator in the 0PEN statement.
By specifying TON, the data sensor [identification number that handles the structure] is determined. The left side of Figure 1 (b)
1~ In the run source, the PARTITION statement specifies that the structure name Aii is D and that the structure element is A.
, B and C. Also, l? H.A.
Sentence 11 indicates that the input device number is 6 and indicates that a structure should be read.

第1図(ロ)の左側のフォートラン・ソース6才、プリ
コンパイルされて標準言語仕様のフォートラン・ソース
(右側)に変換され、標イIL言語仕様のフォートラン
・ソースかコンパイルされ°ζ実行形式のプログラムに
変換される。
The Fortran source on the left side of Figure 1 (b) is precompiled and converted to the standard language specification Fortran source (on the right side), and the Fortran source of the standard IL language specification is compiled or compiled into °ζ executable format. converted into a program.

第2図はプリコンパイル時の処理を示す図である。第2
図において、1は制御部、2は1文の入力部、3は1文
の分類部、4は1文の処理の制御部、5ば1文の出力部
、6は入力ソース用ファイル、7はPARTITION
文の処理部、8は最初の実行文の処理部、9はネームリ
ストの入出力文の処理部、10は出力ソース用ファイル
をそれぞれ示している。制御部1はプリコンパイラ全体
の制御を行うものである。1文の入力部2は、入力ソー
ス用ファイルから1文を入力し、これを1文の分類部3
に渡す。1文の分類部3は、文の分類を行い、分類が付
加された文を1文の処理の制御部4に渡す。1文の処理
の制御部4は、文がPARTITTON文であればこれ
をPARTTTION文の処理部7に渡し、文が最初の
実行文であればこれを最初の実行文の処理部8に渡し、
文がネームリストの入出力文であればこれをネームリス
トの入出力文の処理部9に渡し、そして処理結果が返っ
てくると、これを1文の出力部5に渡す。1文の出力部
5は、受は取った文を出力ソース用ファイル10に出力
する。
FIG. 2 is a diagram showing processing at the time of precompilation. Second
In the figure, 1 is a control section, 2 is an input section for one sentence, 3 is a classification section for one sentence, 4 is a control section for processing one sentence, 5 is an output section for one sentence, 6 is an input source file, and 7 is a one-sentence processing control section. is PARTITION
The statement processing section 8 is a first executable statement processing section, 9 is a name list input/output statement processing section, and 10 is an output source file. The control unit 1 controls the entire precompiler. The one-sentence input section 2 inputs one sentence from the input source file and inputs it into the one-sentence classification section 3.
give it to The one-sentence classification unit 3 classifies sentences and passes the sentences to which the classification has been added to the one-sentence processing control unit 4. If the statement is a PARTITTON statement, the control unit 4 for processing one sentence passes it to the PARTITTON statement processing unit 7, and if the statement is the first executable statement, passes it to the first executable statement processing unit 8,
If the statement is a name list input/output statement, it is passed to the name list input/output statement processing section 9, and when the processing result is returned, it is passed to the one sentence output section 5. The one-sentence output unit 5 outputs the received sentence to the output source file 10.

PARTITION文の処理部7は、PARTITIO
N文で指定されているデータの全体の長さを求め、そし
て、PARTTTION文をNAMEl、IST文りこ
変換する。最初の実行文の処理部8は、PARTITI
ON文で求めたデータの長さを最初の実行文の直前にC
ALL JZI、PSXの引数として出力する。但し、
FAI?TITI(IN文が複数あるときは、その中の
最大のものを採用する。ネームリスト入出力文の処理部
9はPART、lTloN文で指定されている名前と同
し不−1、リスト名を持つネームリスト入出力に対して
、ネームリスト入出力文のデータセット識別番号をネー
1、リストの直前にCALIl、IZl、FSXの引数
として出力する。
The processing unit 7 of the PARTITION statement is the PARTITIO
The entire length of the data specified by the N statement is found, and the PARTTTION statement is converted into NAME1 and IST statements. The processing unit 8 of the first executable statement is PARTITI
Add the length of the data determined by the ON statement to C just before the first executable statement.
Output as an argument for ALL JZI and PSX. however,
FAI? TITI (If there are multiple IN statements, the largest one among them is adopted. The name list input/output statement processing unit 9 uses the same name as the name specified in the PART, lTloN statement, and the list name. For the name list input/output that has, the data set identification number of the name list input/output statement is output as an argument of Ne1, CALI1, IZ1, and FSX immediately before the list.

第1図(ロ)は左側のフォートラン・ソースは拡張言語
仕様の文を用いるものであるが、これを第2図のように
プリコンパイルすると、第1図(ロ)の右側に示された
ような標準言語仕様のフォー l−ラン・ソースが得ら
れる。なお、ネームリストの入出力文とは、第1図(ロ
)の例ではIIEArl (6、FMT−D )を指す
In Figure 1 (b), the Fortran source on the left uses statements from the extended language specification, but if this is precompiled as shown in Figure 2, it will look like the one shown on the right side of Figure 1 (b). You can obtain a formal language source with a standard language specification. Note that the input/output statement of the name list refers to IIEArl (6, FMT-D) in the example of FIG. 1(b).

プリコンパイルの結果得られる標準言語仕様のフォート
ラン・ソースはコンパイルされて実行形式のプログラム
に変換される。第3図は実行形式のプロゲラl、による
実行時の処理を示す図である。
The standard language specification Fortran source obtained as a result of precompilation is compiled and converted into an executable program. FIG. 3 is a diagram showing processing at the time of execution by the executable version of ProGuerra.

第3図において、11ば制御部、12は構造体データの
入出力文の判定部、I3はバッファの確保部、14は構
造体データに対するデータセット識別番号の登録部、1
5は構造体データの入出力部、16は構造体データの出
力部、17は構造体データ用ファイルをそれぞれ示して
いる。バッファの確保部13は、CALL JZLPS
X(1,X)を実行する部分であり、制御部11の指示
により動作を開始し、Xの大きさのバッファを確保する
。構造体データに対するデータセット識別番号の登録部
14は、アクセス指示子でPRESIENTATION
  が指定されている0PEN文を実行する部分であり
、制御部11の指示により処理を開始し、上記OPEN
文のデータセット識別番号を構造体データの入出力対象
のデータセントの番号として登録する。構造体データの
入出力部の判定部12ば、CAI、L JZLPSX(
2,X)を実行する部分であり、制御部11の指示によ
り処理を開始し、上記CALL文のXの示すデータセッ
ト識別番号と登録されているデータセント識別番号とが
同じ場合には、構造体データの人出力の準備を行う。構
造体データの入力部15は、構造体データの入力を指示
するREAD文を実行する部分であり、判定部12を介
する制御部11からの指示により処理を開始し、構造体
データ用ファイル17から構造体データのルコードを上
記バッファに入力し、ネームリスト名を基にしてバッフ
ァの内容をPARTITION文で指定している並びの
変数に出力する。構造体データの出力部16は、構造体
データの出力を指示するWIIITE文を実行する部分
であり、判定部12を介する制御部11からの指示によ
り処理を開始し、ネームリスト名を基にして−1−記ハ
ソファにPARTITION文で指定された変数の並び
を出力し、そしてへソファの内容を構造体I/ココ−の
1 レコー1ことして構造体データ用ファイル17に格
納する。
In FIG. 3, 11 is a control unit, 12 is a structure data input/output statement determination unit, I3 is a buffer securing unit, 14 is a data set identification number registration unit for structure data, and 1
Reference numeral 5 indicates a structure data input/output section, 16 a structure data output section, and 17 a structure data file. The buffer securing unit 13 performs CALL JZLPS
This is the part that executes X(1, The data set identification number registration unit 14 for the structure data registers PRESIENTATION with an access indicator.
This is the part that executes the 0PEN statement specified by
Register the data set identification number of the statement as the data center number for input/output of structure data. The determination unit 12 of the structure data input/output unit, CAI, L JZLPSX (
2, Prepare human output of physical data. The structure data input unit 15 is a unit that executes a READ statement that instructs input of structure data, and starts processing in response to an instruction from the control unit 11 via the determination unit 12, and inputs data from the structure data file 17. The structure data code is input to the buffer, and the contents of the buffer are output to the variables in the sequence specified by the PARTITION statement based on the name list name. The structure data output unit 16 is a part that executes a WIIITE statement that instructs the output of structure data, and starts processing in response to an instruction from the control unit 11 via the determination unit 12, and performs processing based on the name list name. -1- The sequence of variables specified in the PARTITION statement is output to the HA sofa, and the contents of the HA sofa are stored in the structure data file 17 as one record of the structure I/here.

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

以ヒの説明から明らかなように、本発明によれば、フォ
ートラン・ソース上における構造体データの入出力指示
を簡mに行うことが出来る。
As is clear from the following explanation, according to the present invention, input/output instructions for structure data on a Fortran source can be easily performed.

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

第1図は本発明の概要を示す図、第2図はプリコンパイ
ル時の処理を示す図、第3図は実行時の処理を示す図で
ある。 1・・・制御部、2・・・1文の入力部、3・・・1文
の分類部、4・・・1文の処理の制御部、5・・何文の
出力部、6・・・入力ソース用ファイル、7・・・PA
RTITION文の処理部、8・・・最初の実行文の処
理部、9・・・ネームリストの入出力文の処理部、10
・・・出力ソース用ファイル、11・・・制御部、12
・・・構造体データの入出力文の判定部、13・・・バ
ッファの確保部、14・・・構造体データに対するデー
タセット識別番号の登録部、15・・・構造体データの
入力部、16・・・構造体データの出力部、17・・・
構造体データ用ファイル。
FIG. 1 is a diagram showing an overview of the present invention, FIG. 2 is a diagram showing processing during precompilation, and FIG. 3 is a diagram showing processing during execution. 1... Control section, 2... 1 sentence input section, 3... 1 sentence classification section, 4... 1 sentence processing control section, 5. How many sentences output section, 6. ...Input source file, 7...PA
RTITION statement processing unit, 8... First executable statement processing unit, 9... Name list input/output statement processing unit, 10
...Output source file, 11...Control unit, 12
... Structure data input/output statement determination section, 13... Buffer reservation section, 14... Data set identification number registration section for structure data, 15... Structure data input section, 16...Structure data output part, 17...
File for structure data.

Claims (1)

【特許請求の範囲】[Claims] 構造体データを定義したPARTITION文とアクセ
ス指示子にPRESENTATION指定があるOPE
N文が記入されたフォートラン・ソースをプリコンパイ
ルして標準言語仕様のフォートラン・ソースに変換し、
該標準言語仕様のフォートラン・ソースをコンパイルし
て実行形式のプログラムに変換することを特徴とするフ
ォートラン翻訳方式。
PARTITION statement that defines structure data and an OPE with PRESENTATION specified in the access specifier
Precompile the Fortran source with N statements and convert it into a Fortran source with standard language specifications.
A Fortran translation method characterized by compiling Fortran source of the standard language specifications and converting it into an executable program.
JP17978084A 1984-08-29 1984-08-29 Fortran translating system Pending JPS6182242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17978084A JPS6182242A (en) 1984-08-29 1984-08-29 Fortran translating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17978084A JPS6182242A (en) 1984-08-29 1984-08-29 Fortran translating system

Publications (1)

Publication Number Publication Date
JPS6182242A true JPS6182242A (en) 1986-04-25

Family

ID=16071758

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17978084A Pending JPS6182242A (en) 1984-08-29 1984-08-29 Fortran translating system

Country Status (1)

Country Link
JP (1) JPS6182242A (en)

Similar Documents

Publication Publication Date Title
KR960042340A (en) Program conversion device and processor
JPS58203554A (en) Operation processor
JPS6182242A (en) Fortran translating system
JPS61245239A (en) Logical circuit system
JPH0317136B2 (en)
JPS59183441A (en) Debug processing system of extended language
JPH02165339A (en) Compile device
JPH04153878A (en) Pre-editing assisting processor of machine translation device
JPS62206668A (en) Parallel formation processing system for object program
JPH1021087A (en) Compiling method
Rutter Using a high level language as a cross assembler
JPS60157639A (en) Program editing method
JPH02105224A (en) Data allocation system in compiler
JPH05233314A (en) System for compilation processing and vocabulary dictionary processing in program execution
JPS6074039A (en) Recognition processing system of compiler language
JPS6266371A (en) Text separation type learning system
JPH02214974A (en) Vectorization processing system
JPS62182843A (en) Fast compiling/linking system
JPH0468664B2 (en)
JPS62182931A (en) Data separating system
JPH02171928A (en) Device for optimizing compiler
JPS6162141A (en) Logic-type information processing device
JPH06282442A (en) Compiler device
JPS63214838A (en) Data flow graph preparing system
JPH03186933A (en) Symbol processing system for language processing system