JP3018783B2 - Compilation method - Google Patents

Compilation method

Info

Publication number
JP3018783B2
JP3018783B2 JP4273648A JP27364892A JP3018783B2 JP 3018783 B2 JP3018783 B2 JP 3018783B2 JP 4273648 A JP4273648 A JP 4273648A JP 27364892 A JP27364892 A JP 27364892A JP 3018783 B2 JP3018783 B2 JP 3018783B2
Authority
JP
Japan
Prior art keywords
data
definition
declaration
information
file
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
JP4273648A
Other languages
Japanese (ja)
Other versions
JPH06103079A (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.)
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 JP4273648A priority Critical patent/JP3018783B2/en
Publication of JPH06103079A publication Critical patent/JPH06103079A/en
Application granted granted Critical
Publication of JP3018783B2 publication Critical patent/JP3018783B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、言語処理プログラムの
処理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a language processing program processing system.

【0002】[0002]

【従来の技術】マイクロコンピュータ用のプログラムの
開発は、開発者がソースプログラムを作成し、言語処理
プログラム(コンパイラ等)にソースプログラムを入力
し、マイクロコンピュータ用の機械語命令列に翻訳し、
マイクロコンピュータ上のメモリに置き、実行させる。
2. Description of the Related Art To develop a program for a microcomputer, a developer creates a source program, inputs the source program to a language processing program (such as a compiler), translates the source program into a machine language instruction sequence for the microcomputer,
Put it in the memory on the microcomputer and execute it.

【0003】高級言語で記述されたソースプログラム
は、コンパイラにより翻訳され、目的機械語列に変換さ
れる。
A source program described in a high-level language is translated by a compiler and converted into a target machine language string.

【0004】図2を用いて、従来のコンパイル処理方式
を説明する。開発者はソースプログラム201をコンパ
イラ202に入力し、構文解析部203で機械語命令列
の中間コード情報204を作成し、コード生成部205
において、中間コード情報を機械語命令列に変換して、
出力ファイル205を作成する。
A conventional compile processing method will be described with reference to FIG. The developer inputs the source program 201 to the compiler 202, creates the intermediate code information 204 of the machine language instruction sequence in the syntax analysis unit 203, and generates the code generation unit 205
In, the intermediate code information is converted into a machine language instruction sequence,
An output file 205 is created.

【0005】一般にコンパイラが処理できるソースプロ
グラムの行数に制限が存在する。コンパイラが動作する
計算機のコンパイラが使用できるメモリの容量や作業領
域として使用するディスク装置の容量により、制限が存
在する。
Generally, there is a limit on the number of lines of a source program that can be processed by a compiler. There is a limit depending on the capacity of a memory that can be used by a compiler of a computer on which the compiler operates and the capacity of a disk device used as a work area.

【0006】たとえばMS−DOSシステム上で動作す
るコンパイラは、使用できるメモリ容量が少ない。コン
パイラがコンパイル時に作成するソースファイル全体の
シンボル情報、中間コード情報等のコンパイル用の管理
情報をメモリ上に作成するため、コンパイルするソース
プログラムの行数に制限がある。
For example, a compiler operating on an MS-DOS system has a small available memory capacity. Compiler management information such as symbol information and intermediate code information of the entire source file created by the compiler at the time of compilation is created in the memory, so that the number of lines of the source program to be compiled is limited.

【0007】また、あるコンパイラシステムでは、メモ
リが足りなくなると、中間コード情報をテンポラリファ
イルに作成して、コンパイルするものがあるが、ソース
ファイルの行数が大きくなると作成するテンポラリファ
イルが大きくなる。大きなテンポラリファイルへのアク
セスには処理時間がかかり、コンパイルの処理時間がソ
ース行数に比例して長くなる。
[0007] In some compiler systems, when memory is insufficient, intermediate code information is created in a temporary file and then compiled. However, as the number of lines in the source file increases, the temporary file created increases. Accessing a large temporary file takes processing time, and the processing time for compiling increases in proportion to the number of source lines.

【0008】[0008]

【発明が解決しようとする課題】使用可能なメモリが少
ない計算機システム上でのコンパイル時には制限行数を
超えるソースプログラムをコンパイルすることができな
いという問題点が存在した。
When compiling on a computer system with a small amount of available memory, there is a problem that a source program exceeding the limit number of lines cannot be compiled.

【0009】また、コンパイルを行なっている途中で、
メモリが足りなくなった場合にコンパイルが中断し、そ
れまでにコンパイルしていたすべてのコンパイル情報は
無駄になるという問題点が存在した。
Also, while compiling,
When there is not enough memory, compilation is interrupted, and all the compilation information compiled up to that point is wasted.

【0010】また、中間コード情報をテンポラリファイ
ルに作成するシステムでは、大きなソースファイルで
は、コンパイル時間が長くなるという欠点が存在した。
Further, in a system for creating intermediate code information in a temporary file, there is a disadvantage that a large source file requires a long compile time.

【0011】本発明の目的は、コンパイラの入力ソース
ファイルの処理行数を制限なく処理できるようにしたコ
ンパイル方式を提供することにある。
An object of the present invention is to provide a compiling method which can process the number of processing lines of an input source file of a compiler without limitation.

【0012】[0012]

【課題を解決するための手段】前記目的を達成するた
め、本発明に係るコンパイル方式は、分解部と、データ
宣言/データ定義情報保持部と、構文解析部とを有し、
データ宣言部とデータ定義と関数手続きの集まりから
構成される入力ソースプログラムを解析し、中間情報に
変換し、その解析した中間情報を機械語命令に変換する
コンパイラの処理方式であって、分解部は、ソースプロ
グラムの中のデータ宣言部とデータ定義部と関数手続き
の集まりからデータ宣言部とデータ定義部と関数手続き
単位にソースプログラムをソースレベルで分割するもの
であり、データ宣言/データ定義情報保持部は、ソース
ファイル内で宣言及び定義されているデータ宣言部とデ
ータ定義部のデータ情報を保持するものであり、構文解
析部は、前記データ宣言/データ定義情報保持部から
ータ宣言部及びデータ定義部のデータ情報を参照して、
関数単位で分割して構文解析を行なうものである。
In order to achieve the above object, a compiling method according to the present invention comprises a decomposing unit, a data
A declaration / data definition information holding unit and a syntax analysis unit,
A compiler processing method that analyzes an input source program consisting of a group of a data declaration section, a data definition section, and a function procedure, converts the input source program into intermediate information, and converts the analyzed intermediate information into machine language instructions. parts is to divide the data declaration part and a data definition section and a data declaration part of a collection of functions procedures and data definition, a source-level source program into the function procedure unit in the source program, data declarations / data definitions The information storage unit is the source
Data declaration section and data declared and defined in the file
Is intended to hold the data information over data definition section, the syntax analysis unit de from the data declarations / data definition information holding unit
Referring to the data information in the data declaration section and data definition section,
Parsing is performed for each function .

【0013】また入力ソースファイルをデータ宣言部,
データ定義部、関数定義に分割して出力したソース情報
をメモリ中または、中間ファイルに分割してコンパイル
処理を行うものである。
The input source file is defined as a data declaration section,
The source information divided and output into the data definition part and the function definition is divided into a memory or an intermediate file and compiled.

【0014】[0014]

【作用】コンパイラにソースファイルの分割部とデータ
宣言部/定義部のコンパイル情報の保持部を持ち、コン
パイル時に入力ソースファイルをデータ宣言部/定義部
と関数定義に分割して、データの宣言部/定義部の場
合、そのコンパイル情報を保持し、関数定義の場合、デ
ータの宣言部/定義部のコンパイル情報を参照して、関
数定義毎にコンパイルする。
[Function] The compiler has a source file division part and a data declaration part / definition part compilation information holding part in the compiler, and divides the input source file into a data declaration part / definition part and function definition at the time of compilation, and declares the data In the case of a / definition part, the compile information is held, and in the case of a function definition, compilation is performed for each function definition with reference to the compile information of the data declaration part / definition part.

【0015】[0015]

【実施例】以下、本発明の実施例を図により説明する。BRIEF DESCRIPTION OF THE DRAWINGS FIG.

【0016】(実施例1)図1は、本発明の実施例1を
示す構成図である。
(Embodiment 1) FIG. 1 is a configuration diagram showing Embodiment 1 of the present invention.

【0017】図1において、本発明に係るコンパイラ1
02は入力ソースファイル101を入力し、分割部10
3でデータ宣言部とデータ定義と関数手続きの集まりか
ら構成されるソースファイルを解析し、データ宣言部と
データ定義と関数手続きに分割する。
FIG. 1 shows a compiler 1 according to the present invention.
02 inputs the input source file 101, and
In step 3, a source file composed of a group of a data declaration section, a data definition, and a function procedure is analyzed, and the data file is divided into a data declaration section, a data definition, and a function procedure.

【0018】分割されたソースファイル情報を構文解析
部104で解析し中間コード情報106に変換しメモリ
中に保持する。
The divided source file information is analyzed by the syntax analyzer 104, converted into intermediate code information 106, and stored in a memory.

【0019】構文解析したデータ宣言、定義情報は、デ
ータ宣言、定義情報保持部105に保持し、関数部分の
構文解析時に参照して関数部分の中間コード情報への変
換時に使用する。
The parsed data declaration and definition information are stored in the data declaration and definition information holding unit 105, and are referred to at the time of syntax analysis of the function part and are used when the function part is converted into intermediate code information.

【0020】図3の処理フローチャートにより、本方式
のコンパイル処理の説明を行なう。終了判定手段301
では、入力ソースファイルの終りを判定する。入力ソー
スファイルからの読み込み情報がある間は以下の処理を
行なう。
The compile processing of this method will be described with reference to the processing flowchart of FIG. End determination means 301
Then, the end of the input source file is determined. The following processing is performed while there is read information from the input source file.

【0021】ソースファイル分割手段302は、入力し
たソースファイルをデータの宣言/定義部分、関数の定
義部分にソースレベルで分割する。
The source file dividing means 302 divides an input source file into data declaration / definition portions and function definition portions at a source level.

【0022】図5に、C言語によるソースプログラム例
を示す。501がデータ宣言部、502がデータ定義
部、503及び504が関数定義部分である。
FIG. 5 shows an example of a source program in C language. 501 is a data declaration part, 502 is a data definition part, and 503 and 504 are function definition parts.

【0023】上記のように分割した単位で、以下の処理
を行なう。データ宣言/定義部判定手段303におい
て、データの宣言/定義部分の判定を行ない、データの
宣言/定義部分である場合、データの宣言/定義処理を
行なう。図5のソースファイル中のデータ宣言部501
及びデータ定義部502の場合この処理を行なう。
The following processing is performed in the unit divided as described above. The data declaration / definition part determining means 303 determines the declaration / definition part of the data, and if it is the data declaration / definition part, performs data declaration / definition processing. Data declaration section 501 in the source file of FIG.
And the data definition unit 502 performs this processing.

【0024】データの宣言/定義部分の構文解析をデー
タ宣言/定義部解析手段304で行ない、中間コード情
報に変換する。変換した中間コード情報をデータ宣言/
定義部中間コード情報格納手段305で図1のデータ宣
言、定義情報保持部105へ格納する。さらに変換した
データの定義部分の中間コード情報を定義データ変換手
段306で機械語レベルのデータ定義データへ変換す
る。その変換した機械語レベルのデータ定義情報をファ
イル出力手段307で出力ファイル108へ出力する。
次に終了判定手段30にもどり処理を続ける。
The data declaration / definition part analyzing means 304 analyzes the syntax of the declaration / definition part of the data and converts it into intermediate code information. Data declaration of converted intermediate code information /
The definition part intermediate code information storage means 305 stores the data declaration in FIG. Further, the intermediate code information in the definition part of the converted data is converted by the definition data conversion means 306 into data definition data at the machine language level. The converted data definition information at the machine language level is output to the output file 108 by the file output means 307.
Next, the process returns to the end determination means 30 to continue the processing.

【0025】データの宣言/定義部判定手段303によ
る判定において、分割したソースファイルが関数定義で
ある場合、関数定義処理の処理を行なう。図5のソース
ファイル中の関数定義部503及び504の場合この処
理を行なう。
In the determination by the data declaration / definition unit determination means 303, if the divided source file is a function definition, a function definition process is performed. This processing is performed in the case of the function definition units 503 and 504 in the source file of FIG.

【0026】分割した関数定義部503,504の場
合、関数定義部分の構文解析処理を関数定義解析手段3
08で行ない、中間コード情報へ変換する。
In the case of the divided function definition units 503 and 504, the syntax analysis processing of the function definition part is performed by the function definition analysis unit 3.
08, and is converted into intermediate code information.

【0027】関数定義部分の構文解析を行なう場合、デ
ータ宣言、定義情報保持部105からデータの宣言情報
及び、定義情報を参照して、構文解析を行なう。
When the syntax analysis of the function definition portion is performed, the syntax analysis is performed with reference to the data declaration information and the definition information of the data from the definition information holding unit 105.

【0028】元来同一ソースファイル内で、宣言、定義
されているデータ情報をデータ宣言、定義情報保持部1
05から情報を参照することにより、関数単位で分割し
てコンパイルすることが可能となる。
Originally, data information declared and defined in the same source file is declared by the data declaration and definition information holding unit 1.
By referring to the information from 05, it becomes possible to divide and compile in function units.

【0029】変換した関数定義部分の中間コード情報を
機械語命令列変換手段309で機械語命令列データへ変
換する。変換した関数定義部分の機械語命令列情報をフ
ァイル出力手段310で出力ファイル108へ出力す
る。
The converted intermediate code information of the function definition part is converted into machine language instruction sequence data by the machine language instruction sequence conversion means 309. The converted machine language instruction sequence information of the function definition portion is output to the output file 108 by the file output unit 310.

【0030】次に終了判定手段301にもどり処理を続
ける。
Next, the process returns to the end determining means 301 and continues.

【0031】以上のように図3のフローチャートに従
い、上記の処理を入力ソースファイルが終了するまで、
コンパイル処理を行なう。
As described above, according to the flowchart of FIG. 3, the above processing is performed until the input source file is completed.
Perform compile processing.

【0032】(実施例2)実施例2のコンパイル処理方
式の構成は、実施例1と同じ図1に示すものである。図
1の分割部、構文解析部、コード生成部については、実
施例1と同様の処理を行なう。本実施例は、ソースファ
イルの分割方法が実施例1と異なる。
(Embodiment 2) The configuration of the compile processing system of Embodiment 2 is the same as that of Embodiment 1 shown in FIG. The division unit, the syntax analysis unit, and the code generation unit in FIG. 1 perform the same processing as in the first embodiment. This embodiment is different from the first embodiment in a method of dividing a source file.

【0033】実施例2では、図4のフローチャートに基
づき、本方式のコンパイル処理の説明を行なう。終了判
定手段401では、入力ソースファイルの終りを判定す
る。ソースファイルがまだある間はソースファイルの分
割の処理を行なう。
In the second embodiment, the compile processing of this system will be described with reference to the flowchart of FIG. The end determining means 401 determines the end of the input source file. While the source file still exists, the source file is divided.

【0034】ソースファイル分割手段402は、入力し
たソースファイルをデータの宣言/定義部分、関数の定
義部分にソースレベルで分割する。
The source file dividing means 402 divides the input source file into data declaration / definition portions and function definition portions at a source level.

【0035】図5に、C言語によるソースプログラム例
を示す。501がデータ宣言部、502がデータ定義
部、503及び504が関数定義部である。
FIG. 5 shows an example of a source program in C language. 501 is a data declaration part, 502 is a data definition part, and 503 and 504 are function definition parts.

【0036】上記のように分割した単位で、以下の処理
を行なう。中間ファイル出力手段403において、デー
タの宣言/定義部分、関数定義部分ごとにメモリ中また
は、中間ファイルにソース情報を出力する。図5の例で
は、データ宣言部501と定義部502が1つのメモリ
中または、中間ファイルへ各関数定義部503,504
の関数毎にそれぞれメモリ中または、中間ファイルへ分
割してソース情報を出力する。
The following processing is performed in units divided as described above. The intermediate file output means 403 outputs source information in a memory or an intermediate file for each data declaration / definition part and function definition part. In the example of FIG. 5, the data declaration unit 501 and the definition unit 502 store the function definition units 503 and 504 in one memory or in an intermediate file.
The source information is output in the memory or divided into intermediate files for each function of.

【0037】入力ソースファイルの分割が終了したら次
の処理を行なう。中間ファイル終了判定手段404にお
いて、入力ソースファイルをデータ宣言/定義、関数定
義に分割して出力したメモリ中または、中間ファイルの
ソース情報を入力して、ソース情報が存在するまで以下
の処理を行なう。
When the division of the input source file is completed, the following processing is performed. The intermediate file end determination means 404 inputs the source information of the intermediate file or the memory obtained by dividing the input source file into data declarations / definitions and function definitions, and performs the following processing until the source information exists. .

【0038】データ宣言/定義部判定手段405におい
て、データの宣言/定義部分の判定を行ない、データの
宣言/定義部分である場合、データの宣言/定義処理を
行なう。図5のソースファイル中のデータ宣言部501
及びデータ定義部502の中間ファイルの場合この処理
を行なう。
The data declaration / definition part determination means 405 determines the declaration / definition part of the data, and if it is the data declaration / definition part, performs data declaration / definition processing. Data declaration section 501 in the source file of FIG.
This process is performed for the intermediate file of the data definition unit 502.

【0039】データ宣言/定義部分の構文解析をデータ
宣言/定義部解析手段406で行ない、中間コード情報
に変換する。変換した中間コード情報をデータ宣言/定
義部中間コード情報格納手段407で図1のデータ宣
言、定義情報保持部105へ格納する。さらに変換した
データの定義部分の中間コード情報を定義データ変換手
段408で機械語レベルのデータ定義データへ変換す
る。
The syntax of the data declaration / definition part is analyzed by the data declaration / definition part analyzing means 406, and is converted into intermediate code information. The converted intermediate code information is stored in the data declaration / definition information holding unit 105 of FIG. 1 by the data declaration / definition unit intermediate code information storage unit 407. Further, the intermediate code information of the definition part of the converted data is converted by the definition data conversion means 408 into data definition data at the machine language level.

【0040】変換した機械語レベルのデータ定義情報を
ファイル出力手段409で出力ファイル108へ出力す
る。
The converted data definition information at the machine language level is output to the output file 108 by the file output means 409.

【0041】次に中間ファイル入力手段404にもどり
処理を続ける。データ宣言/定義部判定手段405によ
るデータの宣言/定義部分の判定において、分割したソ
ースファイルが関数定義である場合、関数定義処理の処
理を行なう。図5のソースファイル中の関数定義部50
3及び504の中間ファイルの場合この処理を行なう。
Next, the process returns to the intermediate file input means 404 to continue the processing. In the determination of the data declaration / definition part by the data declaration / definition part determination means 405, if the divided source file is a function definition, the function definition processing is performed. Function definition part 50 in the source file of FIG.
This process is performed for intermediate files 3 and 504.

【0042】分割した関数定義503,504の場合、
関数定義部分の構文解析処理を関数定義部解析手段41
0で行ない、中間コード情報へ変換する。
In the case of the divided function definitions 503 and 504,
Function definition part analysis means 41
This is performed with 0, and converted to intermediate code information.

【0043】関数定義部分の構文解析を行なう場合、デ
ータ宣言、定義情報保持部105からデータの宣言情報
及び、定義情報を参照して、構文解析を行なう。
When performing the syntax analysis of the function definition part, the syntax analysis is performed by referring to the data declaration information and definition information from the data declaration and definition information holding unit 105.

【0044】元来同一ソースファイル内で、宣言、定義
されているデータ情報をデータ宣言、定義情報保持部1
05から情報を参照することにより、関数単位で分割し
てコンパイルすることが可能となる。
The data information originally declared and defined in the same source file is referred to as a data declaration and definition information holding unit 1.
By referring to the information from 05, it becomes possible to divide and compile in function units.

【0045】変換した関数定義部分の中間コード情報を
機械語命令列変換手段411で機械語命令列データへ変
換する。変換した関数定義部分の機械語命令列情報をフ
ァイル出力手段412で出力ファイル108へ出力す
る。次に中間ファイル入力手段404にもどり処理を続
ける。
The converted intermediate code information of the function definition portion is converted into machine language instruction sequence data by the machine language instruction sequence conversion means 411. The machine language instruction sequence information of the converted function definition portion is output to the output file 108 by the file output unit 412. Next, the process returns to the intermediate file input means 404 and continues.

【0046】以上のように図4のフローチャートに従
い、上記の処理を入力ソースファイルをデータ宣言/定
義、関数定義に分割して出力したソース情報をメモリ中
または、中間ファイルに分割してコンパイル処理を行な
い、コンパイルする中間ファイルが存在するまでコンパ
イル処理を行なう。
As described above, according to the flowchart of FIG. 4, the above processing is performed by dividing the input source file into data declarations / definitions and function definitions, and dividing the output source information into a memory or an intermediate file to compile processing. And compile until there is an intermediate file to compile.

【0047】[0047]

【発明の効果】以上説明したように本発明は、使用可能
なメモリが少ない計算機システム上でのコンパイル時に
は制限行数を超えるソースプログラムをコンパイルする
ことが可能である。また、コンパイルを行なっている途
中で、メモリが足りなくなった場合にコンパイルが中断
することがなくなり、開発時間の短縮が図れる。
As described above, according to the present invention, it is possible to compile a source program exceeding the limit number of lines at the time of compiling on a computer system with a small available memory. Also, if the memory becomes insufficient during the compilation, the compilation is not interrupted, and the development time can be reduced.

【0048】さらに、中間コード情報をテンポラリファ
イルに作成するコンパイラシステムに比べて、ソースフ
ァイルを分割してメモリ中または小さいテンポラリファ
イルによるコンパイル処理を行なうので、コンパイル時
間が短縮できる。
Further, as compared with a compiler system that creates intermediate code information in a temporary file, the source file is divided and the compilation processing is performed in a memory or a small temporary file, so that the compilation time can be reduced.

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

【図1】本発明のコンパイラ処理方式を示すシステム構
成図である。
FIG. 1 is a system configuration diagram showing a compiler processing method of the present invention.

【図2】従来のコンパイラ処理方式を示すシステム構成
図である。
FIG. 2 is a system configuration diagram showing a conventional compiler processing method.

【図3】本発明の実施例1に係るコンパイラ処理方式の
処理を示すフローチャートである。
FIG. 3 is a flowchart illustrating processing of a compiler processing method according to the first embodiment of the present invention.

【図4】本発明の実施例2に係るコンパイラ処理方式の
処理を示すフローチャートである。
FIG. 4 is a flowchart illustrating a process of a compiler processing method according to a second embodiment of the present invention.

【図5】入力ソースファイルの例を示す図である。FIG. 5 is a diagram showing an example of an input source file.

【符号の説明】 101 入力ソースファイル 102 コンパイラ 103 ファイル分割部 104 構文解析部 105 データ宣言、定義情報保持部 106 中間コード 107 コード生成部 108 出力ファイル 201 入力ソースファイル 202 従来方式コンパイラ 203 構文解析部 204 中間コード 205 コード生成部 206 出力ファイル 301 終了判定手段 302 ファイル分割手段 303 データ宣言/定義部判定手段 304 データ宣言/定義部解析手段 305 データ宣言/定義部中間コード情報格納手段 306 定義データ変換手段 307 ファイル出力手段 308 関数定義部解析手段 309 機械語命令列変換手段 310 ファイル出力手段 401 ソースファイル終了判定手段 402 ファイル分割手段 403 中間ファイル出力手段 404 中間ファイル終了判定手段 405 データ宣言/定義部判定手段 406 データ宣言/定義部解析手段 407 データ宣言/定義部中間コード情報格納手段 408 定義データ変換手段 409 ファイル出力手段 410 関数定義部解析手段 411 機械語命令列変換手段 412 ファイル出力手段 501 データ宣言部 502 データ定義部 503 関数定義部 504 関数定義部[Description of Signs] 101 Input source file 102 Compiler 103 File division unit 104 Syntax analysis unit 105 Data declaration and definition information holding unit 106 Intermediate code 107 Code generation unit 108 Output file 201 Input source file 202 Conventional method compiler 203 Syntax analysis unit 204 Intermediate code 205 Code generation unit 206 Output file 301 End determination unit 302 File division unit 303 Data declaration / definition unit determination unit 304 Data declaration / definition unit analysis unit 305 Data declaration / definition unit intermediate code information storage unit 306 Definition data conversion unit 307 File output means 308 Function definition part analysis means 309 Machine language instruction sequence conversion means 310 File output means 401 Source file end determination means 402 File division means 403 Intermediate file Input means 404 Intermediate file end determination means 405 Data declaration / definition part determination means 406 Data declaration / definition part analysis means 407 Data declaration / definition part intermediate code information storage means 408 Definition data conversion means 409 File output means 410 Function definition part analysis means 411 Machine language instruction string conversion means 412 File output means 501 Data declaration section 502 Data definition section 503 Function definition section 504 Function definition section

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 分解部と、データ宣言/データ定義情報
保持部と、構文解析部とを有し、データ宣言部とデータ
定義と関数手続きの集まりから構成される入力ソース
プログラムを解析し、中間情報に変換し、その解析した
中間情報を機械語命令に変換するコンパイラの処理方式
であって、 分解部は、ソースプログラムの中のデータ宣言部とデー
タ定義部と関数手続きの集まりからデータ宣言部とデー
タ定義部と関数手続き単位にソースプログラムをソース
レベルで分割するものであり、データ宣言/データ定義 情報保持部は、ソースファイル
内で宣言及び定義されているデータ宣言部とデータ定義
部のデータ情報を保持するものであり、 構文解析部は、前記データ宣言/データ定義情報保持部
からデータ宣言部及びデータ定義部のデータ情報を参照
して、関数単位で分割して構文解析を行なうものである
ことを特徴とするコンパイル方式。
1. An input source program comprising a disassembly section, a data declaration / data definition information holding section, and a syntax analysis section, and analyzes an input source program composed of a collection of a data declaration section, a data definition section, and a function procedure. A compiler processing method that converts intermediate information into interpreted intermediate information and converts the analyzed intermediate information into machine language instructions. The decomposing unit performs a data declaration from a collection of a data declaration part, a data definition part, and a function procedure in a source program. the source of the source program into parts and data definition part and a function procedure unit
The data declaration / data definition information holding unit is divided into source files.
Data declaration section and data definition declared and defined in the
The syntax analysis unit refers to the data information of the data declaration unit and the data definition unit from the data declaration / data definition information holding unit .
A compile method characterized in that syntax analysis is performed in units of functions .
【請求項2】 請求項1に記載のコンパイル方式であっ
て、入力ソースファイルをデータ宣言部,データ定義
部、関数定義に分割して出力したソース情報をメモリ中
または、中間ファイルに分割してコンパイル処理を行う
ことを特徴とするコンパイル方式。
2. The compile method according to claim 1, wherein the input source file includes a data declaration section and a data definition.
Parts, in the memory source information output by dividing the function definition or compilation method and performing divided and compilation process into an intermediate file.
JP4273648A 1992-09-17 1992-09-17 Compilation method Expired - Lifetime JP3018783B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4273648A JP3018783B2 (en) 1992-09-17 1992-09-17 Compilation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4273648A JP3018783B2 (en) 1992-09-17 1992-09-17 Compilation method

Publications (2)

Publication Number Publication Date
JPH06103079A JPH06103079A (en) 1994-04-15
JP3018783B2 true JP3018783B2 (en) 2000-03-13

Family

ID=17530619

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4273648A Expired - Lifetime JP3018783B2 (en) 1992-09-17 1992-09-17 Compilation method

Country Status (1)

Country Link
JP (1) JP3018783B2 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
発明協会公開技報 公技91−10514号

Also Published As

Publication number Publication date
JPH06103079A (en) 1994-04-15

Similar Documents

Publication Publication Date Title
US5586328A (en) Module dependency based incremental compiler and method
US5606697A (en) Compiler system for language processing program
US6289505B1 (en) Method, apparatus and computer programmed product for binary re-optimization using a high level language compiler
US6078744A (en) Method and apparatus for improving compiler performance during subsequent compilations of a source program
EP0735468B1 (en) Method and apparatus for an optimizing compiler
US6412109B1 (en) Method for optimizing java bytecodes in the presence of try-catch blocks
US6233733B1 (en) Method for generating a Java bytecode data flow graph
US6311324B1 (en) Software profiler which has the ability to display performance data on a computer screen
JP4833206B2 (en) Generation of unwind information for optimized programs
JP3311462B2 (en) Compile processing unit
US6292939B1 (en) Method of reducing unnecessary barrier instructions
US5920723A (en) Compiler with inter-modular procedure optimization
US20030088860A1 (en) Compiler annotation for binary translation tools
US7823139B2 (en) Method and system for translating programming languages
JPH05257709A (en) Parallelism discriminating method and parallelism supporting method using the same
US6983458B1 (en) System for optimizing data type definition in program language processing, method and computer readable recording medium therefor
US5812854A (en) Mechanism for integrating user-defined instructions with compiler-generated instructions and for optimizing the integrated instruction stream
EP0790555B1 (en) Compile apparatus and method
JP3018783B2 (en) Compilation method
JP3266097B2 (en) Automatic reentrant method and system for non-reentrant program
US20040064301A1 (en) Software development system, simulator, and recording medium
JP3608993B2 (en) Compiler device and recording medium recording compiler program
JP3424596B2 (en) Method and apparatus for caching symbol reference information
JP3323147B2 (en) Compiling device, compiling method, and recording medium recording compiler program
JP2005301415A (en) Compile system, simulator, emulator, and program development supporting system