JPH06103079A - Compile system - Google Patents

Compile system

Info

Publication number
JPH06103079A
JPH06103079A JP27364892A JP27364892A JPH06103079A JP H06103079 A JPH06103079 A JP H06103079A JP 27364892 A JP27364892 A JP 27364892A JP 27364892 A JP27364892 A JP 27364892A JP H06103079 A JPH06103079 A JP H06103079A
Authority
JP
Japan
Prior art keywords
definition
data
information
unit
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.)
Granted
Application number
JP27364892A
Other languages
Japanese (ja)
Other versions
JP3018783B2 (en
Inventor
Hirohiko Ono
洋彦 小野
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

Abstract

PURPOSE:To enable processing without limiting the number of processing lines in the input source file of a compiler in a system provided with a little hardware resources such as memory capacity in the case of performing compile. CONSTITUTION:The compiler is provided with a division part 103 for the source file and a data decleration/definition information holding part 105 for the decleration part of data/compile information of the definition part, and at the time of compile, the input source file is divided into the decleration part/ definition part of data and function definition. In the case of the decleration part/definition part of data, the compile information is held and in the case of function definition, the input source file is compiled for each of function definition by referring to the compile information of the decleration part/ definition part of data.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

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

【0002】[0002]

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

【0003】高級言語で記述されたソースプログラム
は、コンパイラにより翻訳され、目的機械語列に変換さ
れる。
A source program written 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 compilation processing method will be described with reference to FIG. The developer inputs the source program 201 to the compiler 202, the syntax analysis unit 203 creates the intermediate code information 204 of the machine language instruction sequence, and the code generation unit 205.
In, the intermediate code information is converted into a machine language instruction sequence,
The output file 205 is created.

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

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

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

【0008】[0008]

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

【0009】また、コンパイルを行なっている途中で、
メモリが足りなくなった場合にコンパイルが中断し、そ
れまでにコンパイルしていたすべてのコンパイル情報は
無駄になるという問題点が存在した。
Also, during the compilation,
There was a problem that the compilation was interrupted when the memory became insufficient, and all the compilation information that had been compiled up to that point was wasted.

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

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

【0012】[0012]

【課題を解決するための手段】前記目的を達成するた
め、本発明に係るコンパイル方式は、分解部と、情報保
持部と、構文解析部とを有し、データ宣言部とデータ定
義と関数手続きの集まりから構成される入力ソースプロ
グラムを解析し、中間情報に変換し、その解析した中間
情報を機械語命令に変換するコンパイラの処理方式であ
って、分解部は、ソースプログラムの中のデータ宣言部
とデータ定義部と関数手続きの集まりからデータ宣言部
とデータ定義部と関数手続き単位にソースプログラムを
分割するものであり、情報保持部は、データ宣言部とデ
ータ定義部のコンパイル情報を保持するものであり、構
文解析部は、情報保持部からデータの宣言情報及び定義
情報を参照して構文解析を行なうものである。
In order to achieve the above object, a compiling method according to the present invention has a decomposing section, an information holding section, and a syntax analyzing section, and includes a data declaring section, a data definition and a function procedure. Is a processing method of a compiler that analyzes an input source program composed of a collection of data, converts it into intermediate information, and converts the analyzed intermediate information into machine language instructions. The decomposition unit is a data declaration in the source program. Part, data definition part, and function procedure, the source program is divided into data declaration part, data definition part, and function procedure unit. The information holding part holds compilation information of the data declaration part and data definition part. The syntax analysis unit refers to the declaration information and definition information of the data from the information storage unit and performs the syntax analysis.

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

【0014】[0014]

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

【0015】[0015]

【実施例】以下、本発明の実施例を図により説明する。Embodiments of the present invention will be described below with reference to the drawings.

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

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

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

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

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

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

【0022】図5に、C言語によるソースプログラム例
を示す。501がデータ宣言部、502がデータ定義
部、503及び504が関数定義部分である。
FIG. 5 shows an example of a source program in C language. Reference numeral 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 units divided as described above. In the data declaration / definition part determination means 303, the data declaration / definition part is judged, and if it is the data declaration / definition part, data declaration / definition processing is performed. Data declaration section 501 in the source file of FIG.
In the case of the data definition unit 502, this processing is performed.

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

【0025】データの宣言/定義部判定手段303によ
る判定において、分割したソースファイルが関数定義で
ある場合、関数定義処理の処理を行なう。図5のソース
ファイル中の関数定義部503及び504の場合この処
理を行なう。
In the judgment by the data declaration / definition part judging means 303, if the divided source file is the function definition, the function definition processing is performed. This processing is performed in the case of the function definition sections 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 process of the function definition portion is performed by the function definition analysis unit 3.
At 08, it is converted into intermediate code information.

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

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

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

【0030】次に終了判定手段301にもどり処理を続
ける。
Next, the processing is continued by returning to the end judging means 301.

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

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

【0033】実施例2では、図4のフローチャートに基
づき、本方式のコンパイル処理の説明を行なう。終了判
定手段401では、入力ソースファイルの終りを判定す
る。ソースファイルがまだある間はソースファイルの分
割の処理を行なう。
In the second embodiment, the compiling process of this method will be described with reference to the flowchart of FIG. The end determination unit 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 a data declaration / definition portion and a function definition portion at the source level.

【0035】図5に、C言語によるソースプログラム例
を示す。501がデータ宣言部、502がデータ定義
部、503及び504が関数定義部である。
FIG. 5 shows an example of a source program in C language. Reference numeral 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 the source information in memory or in an intermediate file for each data declaration / definition portion and function definition portion. In the example of FIG. 5, the data declaration unit 501 and the definition unit 502 are stored in one memory or are stored in an intermediate file as function definition units 503 and 504.
The source information is output for each function in memory or divided into intermediate files.

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

【0038】データ宣言/定義部判定手段405におい
て、データの宣言/定義部分の判定を行ない、データの
宣言/定義部分である場合、データの宣言/定義処理を
行なう。図5のソースファイル中のデータ宣言部501
及びデータ定義部502の中間ファイルの場合この処理
を行なう。
In the data declaration / definition part determination means 405, the data declaration / definition part is judged, and if it is the data declaration / definition part, data declaration / definition processing is performed. 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 data declaration / definition part is analyzed by the data declaration / definition part analysis means 406 to convert it 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 converted portion of the converted data is converted into machine language level data definition data by the definition data conversion means 408.

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

【0041】次に中間ファイル入力手段404にもどり
処理を続ける。データ宣言/定義部判定手段405によ
るデータの宣言/定義部分の判定において、分割したソ
ースファイルが関数定義である場合、関数定義処理の処
理を行なう。図5のソースファイル中の関数定義部50
3及び504の中間ファイルの場合この処理を行なう。
Next, the processing is returned to the intermediate file input means 404 to continue the processing. In the determination of the data declaration / definition portion by the data declaration / definition portion determination means 405, if the divided source files are function definitions, 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,
The syntax analysis processing of the function definition part is performed by the function definition part analysis means 41.
The value is set to 0 and converted into intermediate code information.

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

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

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

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

【0047】[0047]

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

【0048】さらに、中間コード情報をテンポラリファ
イルに作成するコンパイラシステムに比べて、ソースフ
ァイルを分割してメモリ中または小さいテンポラリファ
イルによるコンパイル処理を行なうので、コンパイル時
間が短縮できる。
Further, compared to 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 in a small temporary file, so the compilation time can be shortened.

【図面の簡単な説明】[Brief description of 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 showing processing of a compiler processing method according to the first embodiment of the present invention.

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

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

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

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 関数定義部 101 Input Source File 102 Compiler 103 File Dividing Unit 104 Syntactic 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 Part 206 Output file 301 End judgment means 302 File division means 303 Data declaration / definition part judgment means 304 Data declaration / definition part analysis means 305 Data declaration / definition part intermediate code information storage means 306 Definition data conversion means 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 output 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 Command sequence conversion means 412 File output means 501 Data declaration part 502 Data definition part 503 Function definition part 504 Function definition part

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 分解部と、情報保持部と、構文解析部と
を有し、データ宣言部とデータ定義と関数手続きの集ま
りから構成される入力ソースプログラムを解析し、中間
情報に変換し、その解析した中間情報を機械語命令に変
換するコンパイラの処理方式であって、 分解部は、ソースプログラムの中のデータ宣言部とデー
タ定義部と関数手続きの集まりからデータ宣言部とデー
タ定義部と関数手続き単位にソースプログラムを分割す
るものであり、 情報保持部は、データ宣言部とデータ定義部のコンパイ
ル情報を保持するものであり、 構文解析部は、情報保持部からデータの宣言情報及び定
義情報を参照して構文解析を行なうものであることを特
徴とするコンパイル方式。
1. An input source program having a decomposition unit, an information storage unit, and a syntax analysis unit, which is composed of a data declaration unit, a data definition, and a collection of function procedures, is analyzed, and converted into intermediate information. It is a processing method of a compiler that converts the analyzed intermediate information into machine language instructions, and the decomposition unit is a data declaration unit and a data definition unit from a collection of data declaration unit and data definition unit and function procedure in the source program. The source program is divided into function procedure units, the information holding unit holds the compilation information of the data declaration unit and the data definition unit, and the syntax analysis unit uses the data declaration information and definition from the information holding unit. A compilation method characterized by performing parsing with reference to information.
【請求項2】 請求項1に記載のコンパイル方式であっ
て、入力ソースファイルをデータ宣言/定義、関数定義
に分割して出力したソース情報をメモリ中または、中間
ファイルに分割してコンパイル処理を行うことを特徴と
するコンパイル方式。
2. The compiling method according to claim 1, wherein the input source file is divided into a data declaration / definition and a function definition, and the output source information is divided into memory or an intermediate file for compiling processing. Compile method characterized by performing.
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 true JPH06103079A (en) 1994-04-15
JP3018783B2 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)

Also Published As

Publication number Publication date
JP3018783B2 (en) 2000-03-13

Similar Documents

Publication Publication Date Title
US5586328A (en) Module dependency based incremental compiler and method
US5606697A (en) Compiler system for language processing program
US7823139B2 (en) Method and system for translating programming languages
US6934940B2 (en) Source code transformation-temporary object reduction
JP2008505423A (en) Generation of unwind information for optimized programs
JP3802058B2 (en) System, method and compiler preprocessor for conditionally compiling software compilation units
US7080370B1 (en) Method and apparatus for compiling source programs using one or more libraries
JP3018783B2 (en) Compilation method
JP3323147B2 (en) Compiling device, compiling method, and recording medium recording compiler program
JPH09179738A (en) Object-oriented language processing method and processor
JP3424596B2 (en) Method and apparatus for caching symbol reference information
JP2000242504A (en) Compiler device
JP2005301415A (en) Compile system, simulator, emulator, and program development supporting system
JP2001034482A (en) Compile device, program optimizing device, compile processing method and recording medium
Hari et al. CHILL toolset for C-DOT DSS
CN112579088A (en) Heterogeneous hybrid programming-oriented one-stop program compiling method
JP3226172B2 (en) Inline expansion system
JPH0561687A (en) Processing system for compiler
JPH1139155A (en) Static analysis method of execution performance via collection of information in compiling mode
JPH05313909A (en) Compiler system containing intermediate code line evolving function
JPS5924348A (en) Compilation processing system
JP2003330731A (en) Project management file generating device
JPH1021087A (en) Compiling method
JPH07239789A (en) Data code processing system
JPH06282443A (en) Method and device for editing program