JP2655608B2 - Program source copy processing method - Google Patents
Program source copy processing methodInfo
- Publication number
- JP2655608B2 JP2655608B2 JP21703588A JP21703588A JP2655608B2 JP 2655608 B2 JP2655608 B2 JP 2655608B2 JP 21703588 A JP21703588 A JP 21703588A JP 21703588 A JP21703588 A JP 21703588A JP 2655608 B2 JP2655608 B2 JP 2655608B2
- Authority
- JP
- Japan
- Prior art keywords
- copy
- program source
- token
- source
- 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 - Fee Related
Links
- 238000003672 processing method Methods 0.000 title claims description 5
- 238000000034 method Methods 0.000 description 9
Landscapes
- Devices For Executing Special Programs (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、原始プログラムの入力時に複写プログラム
ソースを複写するコンパイラの原始プログラム入力処理
におけるプログラムソース複写処理方式に関する。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program source copy processing method in a source program input process of a compiler which copies a copy program source when a source program is input.
従来のこの種のコンパイラの原始プログラム入力処理
におけるプログラムソース複写処理では、プログラムソ
ースの複写指示がある場合、指示がある都度、複写トー
クンを生成し、トークン出力ファイルに出力している。In a program source copy process in a source program input process of a conventional compiler of this type, when there is a program source copy instruction, a copy token is generated and output to a token output file every time there is an instruction.
上述した従来の処理においては、以前に処理した同一
名の複写ソース(プログラムソース)の複写指示がある
場合でも、毎回複写トークンを生成するから、複写に要
する時間が長くなり、コンパイラの原始プログラム入力
処理の時間が長くなってしまうという欠点がある。In the above-described conventional processing, even if there is a copy instruction of a copy source (program source) having the same name that was previously processed, a copy token is generated each time, so that the time required for the copy becomes longer, and the input of the source program of the compiler is performed. There is a disadvantage that the processing time becomes longer.
本発明のプログラムソース複写処理方式は、 原始プログラムの入力時に複写プログラムソースを複
写するコンパイラの原始プログラム入力装置において、 プログラムソース複写指示された複写プログラムソー
ス名を入力し、該複写プログラムソース名で複写情報フ
ァイルを検索し、該複写プログラムソース名が該複写情
報ファイルに登録されていなければ、該複写プログラム
ソース名を前記複写情報ファイルに登録する複写情報登
録処理手段と、 前記複写プログラムソース名が前記複写情報ファイル
に登録されていないとされた場合、該複写プログラムソ
ース名の複写プログラムソースを入力し、複写プログラ
ムソーストークンを生成する複写プログラムソーストー
クン生成処理手段と、 前記複写プログラムソーストークン生成処理手段によ
って生成された前記複写プログラムソーストークンを複
写プログラムソーストークン保存ファイルに保存する複
写プログラムソーストークン保存処理手段と、 前記複写プログラムソーストークンをトークン出力フ
ァイルに出力するトークン出力処理手段と、 前記複写処理プログラムソース名が前記複写情報ファ
イルに登録されているとされた場合、前記複写プログラ
ムソーストークン保存ファイル中の該複写プログラムソ
ース名の前記複写プログラムソーストークンを前記トー
クン出力ファイルに出力する既出力複写プログラムソー
ストークン出力手段とから構成されている。According to the program source copy processing method of the present invention, in a source program input device of a compiler for copying a copy program source when a source program is input, a copy program source name instructed to copy a program source is input, and a copy is performed using the copy program source name. An information file, and if the copy program source name is not registered in the copy information file, copy information registration processing means for registering the copy program source name in the copy information file; A copy program source token generating means for inputting a copy program source having the copy program source name and generating a copy program source token when the copy program file is not registered in the copy information file; To A copy program source token storage unit for storing the generated copy program source token in a copy program source token storage file; a token output processing unit for outputting the copy program source token to a token output file; An output copy program source that outputs the copy program source token of the copy program source name in the copy program source token storage file to the token output file when the source name is registered in the copy information file; And token output means.
次に、本発明について図面を参照して説明する。 Next, the present invention will be described with reference to the drawings.
第1図本発明の一実施例を示す流れ図である。 FIG. 1 is a flowchart showing one embodiment of the present invention.
この実施例は、原始プログラム8、複写情報登録処理
手段1とその出力となる複写情報ファイル9、既登録判
定処理2、複写プログラムソース7、複写プログラムソ
ーストークン生成処理手段3、複写プログラムソースト
ークン保存処理手段4とその出力となる複写プログラム
ソーストークン保存ファイル10、トークン出力処理手段
5と既出力複写プログラムソーストークン出力処理手段
6と生成トークンを出力するトークン出力ファイル11と
から構成されている。In this embodiment, a source program 8, a copy information registration processing means 1 and a copy information file 9 to be output therefrom, a registration judgment processing 2, a copy program source 7, a copy program source token generation processing means 3, a copy program source token storage The processing unit 4 includes a copy program source token storage file 10 to be output from the processing unit 4, a token output processing unit 5, an already output copied program source token output processing unit 6, and a token output file 11 to output a generated token.
次に第1図に従って処理の詳細を説明する。 Next, details of the processing will be described with reference to FIG.
コンパイラの原始プログラム入力処理において、原始
プログラム8を入力し、入力したソースにプログラムソ
ース複写指示があった場合、原始プログラム入力処理で
は、プログラムソース複写処理を呼ぶ。In the source program input process of the compiler, when the source program 8 is input and a program source copy instruction is given to the input source, the source program input process is called a program source copy process.
プログラムソース複写処理において、まず、複写情報
登録処理手段1は、プログラムソース複写指示された複
写プログラムソース7の名前を入力し、その複写プログ
ラムソース7の名前で複写情報ファイル9を検索し、複
写プログラムソース名が登録されていなければ複写プロ
グラムソース7の名前を複写情報ファイル9に登録す
る。次に、複写プログラムソース7の名前が複写情報フ
ァイル9に登録されていないとされた場合複写プログラ
ムソーストークン生成処理手段3を呼ぶ。複写プログラ
ムソーストークン生成処理手段3は複写プログラムソー
ス7を入力し、複写プログラムソーストークンを生成し
複写プログラムソーストークン保存処理手段4を呼ぶ。
複写プログラムソーストークン保存処理手段4は、複写
プログラムソーストークン生成処理手段3で生成された
複写プログラムソーストークンを複写プログラムソース
トークン保存ファイル10に保存する。さらに、その複写
プログラムソーストークンをトークン出力手段5によ
り、トークン出力領域11に出力する。また、複写プログ
ラムソース7の名前が複写情報ファイル9に登録されて
いるとされた場合、既出力複写プログラムトークン出力
処理手段6を呼ぶ。既出力複写プログラムトークン出力
処理手段6は、以前に複写プログラムソーストークン保
存処理手段4によって複写プログラムソーストークン保
存ファイル10内に保存されている複写プログラムソース
7の複写プログラムソーストークンを入力し、そのまま
トークン出力ファイル11の出力する。以上でプログラム
ソース複写処理が終了する。In the program source copy processing, first, the copy information registration processing means 1 inputs the name of the copy program source 7 instructed to copy the program source, searches the copy information file 9 with the name of the copy program source 7, and reads the copy program file. If the source name is not registered, the name of the copy program source 7 is registered in the copy information file 9. Next, when it is determined that the name of the copy program source 7 is not registered in the copy information file 9, the copy program source token generation processing means 3 is called. The copy program source token generation processing means 3 receives the copy program source 7, generates a copy program source token, and calls the copy program source token storage processing means 4.
The copy program source token storage processing unit 4 stores the copy program source token generated by the copy program source token generation processing unit 3 in the copy program source token storage file 10. Further, the copy program source token is output to the token output area 11 by the token output means 5. If the name of the copy program source 7 is registered in the copy information file 9, the output copy program token output processing means 6 is called. The already output copy program token output processing means 6 inputs the copy program source token of the copy program source 7 previously stored in the copy program source token storage file 10 by the copy program source token storage processing means 4, and Output the output file 11. Thus, the program source copying process ends.
以上に説明したように、本発明のプログラムソース複
写処理方式によれば、コンパイラの原始プログラム入力
処理時において、複写プログラムソースの複写指示があ
った場合、複写プログラムソーストークンの生成を1回
だけ行い、さらにその複写プログラムソーストークンを
保存しておくことにより2回目以降の複写指示又は、別
コンパイル処理における同一複写プログラムソースの複
写指示では、新たに複写プログラムソーストークンの生
成処理を行わず、以前に生成し保存した複写プログラム
ソーストークンをそのまま出力することにより、コンパ
イラの複写プログラムソースのソース複写にかかる時間
を減少させることができる。本発明はこのような効果が
ある。As described above, according to the program source copy processing method of the present invention, when a copy program source copy instruction is issued during the source program input processing of the compiler, the copy program source token is generated only once. Further, by storing the copy program source token, in the second or subsequent copy instruction or the copy instruction of the same copy program source in a separate compilation process, a new copy program source token generation process is not performed. By directly outputting the generated and stored copy program source token, the time required for the compiler to copy the copy program source can be reduced. The present invention has such an effect.
【図面の簡単な説明】 第1図は本発明の一実施例を示す流れ図である。 1……複写情報登録処理手段、2……既登録判定処理、
3……複写プログラムソーストークン生成処理手段、4
……複写プログラムソーストークン保存処理手段、5…
…トークン出力処理手段、6……既出力複写プログラム
ソーストークン出力処理手段、7……複写プログラムソ
ース、8……原始プログラム、9……複写情報ファイ
ル、10……複写プログラムソーストークン保存ファイ
ル、11……トークン出力ファイル。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flowchart showing one embodiment of the present invention. 1... Copy information registration processing means 2...
3. Copy source token generation processing means 4
... Copy source token storage processing means, 5 ...
... Token output processing means, 6... Already output copied program source token output processing means, 7... Copied program source, 8... Source program, 9... Copied information file, 10. ...... Token output file.
Claims (1)
ソースを複写するコンパイラの原始プログラム入力装置
において、 プログラムソース複写指示された複写プログラムソース
名を入力し、該複写プログラムソース名で複写情報ファ
イルを検索し、該複写プログラムソース名が該複写情報
ファイルに登録されていなければ、該複写プログラムソ
ース名を前記複写情報ファイルに登録する複写情報登録
処理手段と、 前記複写プログラムソース名が前記複写情報ファイルに
登録されていないとされた場合、該複写プログラムソー
ス名の複写プログラムソースを入力し、複写プログラム
ソーストークンを生成する複写プログラムソーストーク
ン生成処理手段と、 前記複写プログラムソーストークン生成処理手段によっ
て生成された前記複写プログラムソーストークンを複写
プログラムソーストークン保存ファイルに保存する複写
プログラムソーストークン保存処理手段と、 前記複写プログラムソーストークンをトークン出力ファ
イルに出力するトークン出力処理手段と、 前記複写処理プログラムソース名が前記複写情報ファイ
ルに登録されているとされた場合、前記複写プログラム
ソーストークン保存ファイル中の該複写プログラムソー
ス名の前記複写プログラムソーストークンを前記トーク
ン出力ファイルに出力する既出力複写プログラムソース
トークン出力手段とを備えたことを特徴とするプログラ
ムソース複写処理方式。In a source program input device of a compiler for copying a copy program source when a source program is input, a copy program source name instructed to copy a program source is input, and a copy information file is searched by the copy program source name. Copy information registration processing means for registering the copy program source name in the copy information file if the copy program source name is not registered in the copy information file; and registering the copy program source name in the copy information file. If not, the copy program source name of the copy program source name is input, and the copy program source token generation processing means for generating a copy program source token; and the copy program source token generation processing means Copy pro Copy program source token storage processing means for storing a ram source token in a copy program source token storage file; token output processing means for outputting the copy program source token to a token output file; and wherein the copy processing program source name is the copy information. Output copy program source token output means for outputting the copy program source token of the copy program source name in the copy program source token storage file to the token output file when the file is registered in the file. A program source copy processing method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP21703588A JP2655608B2 (en) | 1988-08-31 | 1988-08-31 | Program source copy processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP21703588A JP2655608B2 (en) | 1988-08-31 | 1988-08-31 | Program source copy processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0264821A JPH0264821A (en) | 1990-03-05 |
| JP2655608B2 true JP2655608B2 (en) | 1997-09-24 |
Family
ID=16697819
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP21703588A Expired - Fee Related JP2655608B2 (en) | 1988-08-31 | 1988-08-31 | Program source copy processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2655608B2 (en) |
-
1988
- 1988-08-31 JP JP21703588A patent/JP2655608B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0264821A (en) | 1990-03-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0264821A (en) | Program source copy processing system | |
| JPH01315844A (en) | File name dynamic adding system | |
| JP2990701B2 (en) | File editing method | |
| JPH0411888B2 (en) | ||
| JPH05113882A (en) | Out-fitted man-machine interface realizing system by intermediate file | |
| JPH04167129A (en) | Creation system for data area specifications | |
| JPH0216643A (en) | System for controlling output of debugging information | |
| JPH0561991A (en) | Program language translator | |
| JPH0350628A (en) | Make file generation method using source file | |
| JPH06301549A (en) | Program translation device | |
| JPH04373020A (en) | Function correspondence table preparing device | |
| JPH03119468A (en) | Slip processing system | |
| JPH0589103A (en) | Document editing processor | |
| JPS6446158A (en) | Fair copy system for sentence | |
| JPS63141133A (en) | Procedure call method by value delivery of parameter | |
| JPH0458334A (en) | Message output selection system | |
| JPH025132A (en) | Automatic document forming system | |
| JPH05233307A (en) | Multiple process generation method | |
| JPH04294427A (en) | Argument passing method | |
| JPH02151931A (en) | Intermediate language text reuse method | |
| JPH0895763A (en) | Method for fetching component program in original program | |
| JPH0512030A (en) | Execution-form program generating system | |
| JPH04153737A (en) | Output system for compile updating information | |
| JPH01231137A (en) | Trace information output system | |
| JPH04330521A (en) | Cross reference list forming system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |