JPH0281231A - Translation information managing system for source program file - Google Patents
Translation information managing system for source program fileInfo
- Publication number
- JPH0281231A JPH0281231A JP63234227A JP23422788A JPH0281231A JP H0281231 A JPH0281231 A JP H0281231A JP 63234227 A JP63234227 A JP 63234227A JP 23422788 A JP23422788 A JP 23422788A JP H0281231 A JPH0281231 A JP H0281231A
- Authority
- JP
- Japan
- Prior art keywords
- information
- translation
- error
- source program
- 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.)
- Pending
Links
- 238000013519 translation Methods 0.000 title claims abstract description 91
- 238000012545 processing Methods 0.000 claims abstract description 17
- 238000007726 management method Methods 0.000 claims description 8
- 238000012546 transfer Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000000034 method Methods 0.000 description 3
- 238000012937 correction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はソースプログラムを翻訳する際に出力される翻
訳情報を管理する方式に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for managing translation information output when a source program is translated.
コンパイラにおいては、−Sに、ソースプログラムを翻
訳した際にエラー情報等を含む翻訳情報が出力されるよ
うになっており、従来、その1訳情報は翻訳リストある
いはユーザ出力ファイル/エラー出力ファイル等に出力
されるようになっていた。In a compiler, translation information including error information is output to -S when a source program is translated. Conventionally, one translation information is a translation list or user output file/error output file, etc. It was supposed to be output to .
一方、翻訳に際して必要な情報はオプションとして入力
されるようになっており、翻訳の都度、利用者により入
力が行われていた。On the other hand, information necessary for translation is input as an option, and the information must be entered by the user each time translation is performed.
従来のコンパイラは上記のような方式を採用しており、
よって、以下のような欠点があった。Conventional compilers use the above method,
Therefore, there were the following drawbacks.
■翻訳情報が出力されるファイルとソースプログラムの
格納されるファイル(ソースプログラムファイル)とが
別々であるため、翻訳情報を得るには翻訳リストあるい
はユーザ出力ファイル/エラー出力ファイル等を常に確
保しておかなければならず、管理が複雑で面倒である。■Since the file where translation information is output and the file where the source program is stored (source program file) are separate, always ensure a translation list or user output file/error output file, etc. to obtain translation information. Management is complicated and troublesome.
■エラーを含むソースプログラムがあっても、翻訳時に
は何らその判断を行うことなく通常通り翻訳を実行する
ため、無駄なコンパイル処理を行うことがあり、コンパ
イル時間が増大する。■Even if there is a source program that contains an error, the translation is executed as usual without making any judgment during translation, which may result in unnecessary compilation processing, increasing compilation time.
■同じソースプログラムについて修正を加えつつ何度も
翻訳する場合は、翻訳に際して必要な情報を入力するた
めに翻訳用のJCLあるいはコマンドファイルを作成し
ておくか、または翻訳時にオプションを含めたコマンド
を直接キーインするしかなく、操作性が非常に悪い。■If you want to translate the same source program multiple times while making modifications, you should create a JCL or command file for translation in order to input the information necessary for translation, or use a command that includes options at the time of translation. The only option is to enter the key directly, and the operability is very poor.
本発明は上記の点に鑑み提案されたものであり、その目
的とするところは、翻訳情報をソースプログラムファイ
ル内で管理し有効に利用することができると共に、オプ
シッン情報の入力が容易なソースプログラムファイルの
翻訳情報管理方式を提供することにある。The present invention has been proposed in view of the above points, and its purpose is to provide a source program in which translation information can be managed and effectively used within a source program file, and in which it is easy to input optional information. The objective is to provide a file translation information management method.
本発明は上記の目的を達成するため、ソースプログラム
ファイル内に、オプション情報およびエラー数を含む翻
訳情報とエラー情報とを格納する領域を設け、ソースプ
ログラムの更新・修正時に前記翻訳情報のエラー数をゼ
ロクリアするものとし、
コンパイラ内に、起動時にソースプログラムの名前を指
定することにより翻訳時のオプションを前記翻訳情報の
オブシッン情報から入力するオプション情報人力手段と
、
翻訳実行前に前記翻訳情報のエラー数を参照してエラー
があるかどうかを判定するエラー判定手段と、
エラーがあると判定された場合に前記エラー情報をエラ
mmカフアイルに出力してコンパイラの処理を終了させ
るエラー情報出力手段と、エラーがないと判定された場
合に翻訳手段に制御を移し、翻訳終了後に前記ソースプ
ログラムファイル内の翻訳情報およびエラー情報を最新
の情報に更新する翻訳情報更新手段とを備えるようにし
ている。In order to achieve the above object, the present invention provides an area in a source program file to store translation information and error information including option information and the number of errors. shall be cleared to zero, and an option information manual means for inputting options at the time of translation from the obscene information of the translation information by specifying the name of the source program at startup in the compiler, and error detection of the translation information before execution of translation. error determining means for determining whether or not there is an error by referring to the number; and error information output means for outputting the error information to the error cuff file and terminating the processing of the compiler when it is determined that there is an error. Translation information updating means is provided, which transfers control to the translation means when it is determined that there is no error, and updates translation information and error information in the source program file to the latest information after the translation is completed.
本発明のソースプログラムファイルの翻訳情報管理方式
にあっては、コンパイラの起動時にソースプログラムの
名前を指定することによりオプション情報入力手段が翻
訳時のオプションをソースプログラムファイル内に格納
された翻訳情報のオプション情報から入力し、エラー判
定手段が翻訳実行前にソースプログラムファイル内に格
納された翻訳情報のエラー数を参照してエラーがあるか
どうかを判定し、エラーがあると判定された場合にエラ
ー情報出力手段がソースプログラムファイル内に格納さ
れたエラー情報をエラmmカフアイルに出力してコンパ
イラの処理を終了させ、エラーがないと判定された場合
にI11訳情軸情報手段が翻訳手段に制御を移し、!■
訳終了後にソースプログラムファイル内の翻訳情報およ
びエラー情報を最新の情報に更新する。In the source program file translation information management method of the present invention, by specifying the name of the source program when starting the compiler, the option information input means inputs options at the time of translation from the translation information stored in the source program file. The error determination means refers to the number of errors in the translation information stored in the source program file before translation execution, and determines whether there are any errors. If it is determined that there is an error, an error occurs. The information output means outputs the error information stored in the source program file to the error file to terminate the compiler processing, and when it is determined that there is no error, the I11 translation axis information means controls the translation means. Transfer! ■
After translation is complete, update the translation information and error information in the source program file to the latest information.
次に、本発明の実施例につき図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.
第1図は本発明のソースプログラムファイルの翻訳情報
管理方式の一実施例を示す構成図である。FIG. 1 is a block diagram showing an embodiment of a source program file translation information management method according to the present invention.
第1図において、lはソースプログラム12が格納され
るソースプログラムファイルであり、ソースプログラム
12の他に、オプション情報111およびエラー数11
2を含む翻訳情fallと、エラー情報13とが格納さ
れるようになっている。In FIG. 1, l is a source program file in which a source program 12 is stored, and in addition to the source program 12, option information 111 and error number 11 are stored.
Translation information fall including 2 and error information 13 are stored.
ここで、オプシッン情報111は翻訳に際して必要な情
報であり、エラー数112は前回の翻訳時に生じたエラ
ーの発生回数の情報である。なお、エラー数112はソ
ースプログラム12の更新・修正時にゼロクリア(エラ
ーが無い状態にセット)するものとする、また、エラー
情報13は前回の翻訳時に生じたエラーにかかる情報で
ある。Here, the option information 111 is information necessary for translation, and the number of errors 112 is information about the number of errors that occurred during the previous translation. It is assumed that the number of errors 112 is cleared to zero (set to a state where there are no errors) when the source program 12 is updated or corrected, and the error information 13 is information related to errors that occurred during the previous translation.
一方、2はソースプログラム12を翻訳するコンパイラ
であり、翻訳を実行する翻訳手段25の他に、起動時に
ソースプログラム12の名前を指定することにより翻訳
時のオプシヨンをソースプログラムファイルlの翻訳情
報11のオプション情$Ia111から入力するオプシ
ョン情報入力手段21と、翻訳実行前にソースプログラ
ムファイルlの翻訳情[11のエラー数112を参照し
てエラーがあるかどうかを判定するエラー判定手段22
と、エラーがあると判定された場合にソースプログラム
ファイル1のエラー情報13をエラー出力ファイル4に
出力してコンパイラ2の処理を終了させるエラー情報出
力手段23と、エラーがないと判定された場合に翻訳手
段25に制御を移し、翻訳終了後にソースプログラムフ
ァイルlの翻訳情報11およびエラー情報13を最新の
情報に更新する翻訳情報更新手段24とが設けられてい
る。On the other hand, 2 is a compiler that translates the source program 12, and in addition to the translation means 25 that executes the translation, by specifying the name of the source program 12 at the time of startup, the translation information 11 of the source program file l can be used to select translation options. Option information input means 21 that inputs the option information from the option information $Ia 111, and error determination means 22 that determines whether there is an error by referring to the number of errors 112 in the translation information [11] of the source program file l before translation execution.
and an error information output means 23 that outputs error information 13 of the source program file 1 to an error output file 4 to terminate the processing of the compiler 2 when it is determined that there is an error; and when it is determined that there is no error. Translation information updating means 24 is provided which transfers control to the translation means 25 and updates the translation information 11 and error information 13 of the source program file 1 to the latest information after the translation is completed.
また、3は翻訳結果であるオブジェクトプログラムを格
納するオブジェクトファイルである。Further, 3 is an object file that stores an object program that is a translation result.
第2図、第3図、第4図および第5図は、それぞれ第1
図におけるオプション情報入力手段21、エラー判定手
段22、エラー情報出力手段23および翻訳情報更新手
段24の処理を示すフローチャートであり、以下、第1
図ないし第5図に沿って実施例の動作を説明する。Figures 2, 3, 4 and 5 are respectively
This is a flowchart showing the processing of the option information input means 21, the error determination means 22, the error information output means 23, and the translation information update means 24 in the figure.
The operation of the embodiment will be explained with reference to FIGS.
先ず、利用者はソースプログラム12を更新あるいは修
正する時にソースプログラムファイル1の翻訳情報11
のエラー数112をゼロクリアしておき、翻訳する時に
ソースプログラム12の名前を指定してコンパイラ2を
起動する。コンパイラ2内では最初にオプション情報入
力手段21が起動される。First, when updating or modifying the source program 12, the user uses the translation information 11 of the source program file 1.
The number of errors 112 is cleared to zero, and when translating, specify the name of the source program 12 and start the compiler 2. In the compiler 2, the option information input means 21 is activated first.
起動されたオプション情報入力手段21は、ソースプロ
グラムファイルlの翻訳情報11のオプション情報11
1の読み込みを行い(第3図ステップS3)、翻訳時に
指定したオプシヨンであるとみなして処理を行い、その
後、エラー判定手段22を起動する(ステップS2)。The activated option information input means 21 inputs the option information 11 of the translation information 11 of the source program file l.
1 is read (step S3 in FIG. 3), processing is performed assuming that it is the option specified at the time of translation, and then the error determination means 22 is activated (step S2).
起動されたエラー判定手段22は、ソースプログラムフ
ァイル1の翻訳情報11のエラー数112の読み込みを
行い(第3図ステップS3)、エラーがないかどうかを
判定する(ステップS4)。The activated error determination means 22 reads the number of errors 112 in the translation information 11 of the source program file 1 (step S3 in FIG. 3), and determines whether there are any errors (step S4).
判定の結果、エラーがあると判定された場合は、エラー
情報出力手段23の起動を行って制御を移す(ステップ
S5)。As a result of the determination, if it is determined that there is an error, the error information output means 23 is activated and control is transferred (step S5).
起動されたエラー情幸団出力手段23は、ソースプログ
ラムファイルlのエラー情tl13を入力してエラー出
力ファイル4へ出力しく第4図ステップS7)、コンパ
イラ2の処理を終了させる(ステップS8)。The activated error information output means 23 inputs the error information tl13 of the source program file l and outputs it to the error output file 4 (step S7 in FIG. 4), and ends the processing of the compiler 2 (step S8).
一方、第3図のステップS4での判定の結果、エラーが
ない場合は、翻訳手段25の起動を行って制御を移す(
第3図ステップS6)。On the other hand, if there is no error as a result of the determination in step S4 in FIG. 3, the translation means 25 is activated and control is transferred (
FIG. 3 step S6).
起動された翻訳手段25は、ソースプログラムファイル
lのソースプログラム12を翻訳し、オブジェクトファ
イル3を生成し、その後、翻訳情報更新手段24を起動
して制御を移す。The activated translation means 25 translates the source program 12 of the source program file 1, generates the object file 3, and then activates the translation information updating means 24 to transfer control.
起動された翻訳情報更新手段24は、翻訳手段25の翻
訳結果に従い、ソースプログラムファイルlの翻訳情報
llの更新を行い(第5図ステップS9)、翻訳時にエ
ラーがあるかどうかを識別しくステップ5lo)、m別
の結果、エラーがある場合は、ソースプログラムファイ
ル1のエラー情It!13の更新を行い(ステップS
l l) 、エラーがない場合は、ソースプログラムフ
ァイル1のエラー情報13の削除を行う(ステップ51
2)。The activated translation information updating means 24 updates the translation information 11 of the source program file 1 according to the translation result of the translation means 25 (step S9 in FIG. 5), and identifies whether or not there is an error during translation. ), if there is an error as a result of m, the error information It! of source program file 1 is displayed. 13 updates (step S
l l) If there is no error, delete the error information 13 of the source program file 1 (step 51).
2).
そして、コンパイラ2の処理を終了させる。Then, the processing of the compiler 2 is terminated.
このように、翻訳した時の翻訳情報をソースプログラム
ファイルl内に登録しておくことにより、再度翻訳する
時にこの登録した情報をもとに無駄のない翻訳が容易に
行えるものである。In this way, by registering the translation information at the time of translation in the source program file l, it is possible to easily perform an efficient translation based on this registered information when translating again.
以上説明したように、本発明のソースプログラムファイ
ルの翻訳情報管理方式にあっては、ソースプログラムを
翻訳した時の翻訳情報およびオプジョン情報をソースプ
ログラムファイル内で管flするようにしたので、
■翻訳情報の管理がソースプログラムファイル−本で行
えるため、翻訳リスト、ユーザ出力ファイル/エラー出
力ファイル等を確保する必要がな(なり、管理が非常に
容易となる。As explained above, in the source program file translation information management method of the present invention, the translation information and option information when the source program is translated are managed within the source program file, so that: ■ Translation Since information can be managed in the source program file-book, there is no need to secure translation lists, user output files/error output files, etc. (this makes management very easy).
■ソースプログラムの修正漏れ等によりエラーが存在し
ても、翻訳時に以前のエラー情報をチエツクして翻訳処
理を中断させるため、無駄なコンパイル処理がなくなる
。■Even if there is an error due to omission of correction in the source program, the previous error information is checked during translation and the translation process is interrupted, eliminating unnecessary compile processing.
■翻訳時のオプションを毎回指定しなくて済むため操作
性が向上する。■Easy to use because you don't have to specify options every time you translate.
等の効果があるやThere are effects such as
第1図は本発明のソースプログラムファイルの翻訳情報
管理方式の一実施例を示す構成図、第2図は第1図にお
けるオプション情報入力手段の処理のフローチャート、
第3図は第1図におけるエラー判定手段の処理のフロー
チャート、
第4図は第1図におけるエラー情報出力手段の処理のフ
ローチャートおよび、
第5図は第1図における翻訳情報更新手段の処理のフロ
ーチャートである。
図において、
1・・・・・・・・・ソースプログラムファイル11・
・・・・・翻訳情報
111・・・オプシラン情報
112・・・エラー数
12・・・・・・ソースプログラム
13・・・・・・エラー情報
2・・・・・・・・・コンパイラ
21・・・・・・オプション情報入力手段22・・・・
・・エラー判定手段
23・・・・・・エラー情報出力手段
24・・・・・・翻訳情報更新手段
25・・・・・・翻訳手段
3・・・・・・・・・オブジェクトファイル4・・・・
・・・・・エラー出力ファイルオプション情報入力手段
の処理のフローチャート第2図
エラー判定手段の処理のフローチャート第3図
エラー情報出力手段の処理のフローチャート第4図FIG. 1 is a block diagram showing an embodiment of the source program file translation information management method of the present invention, FIG. 2 is a flowchart of the processing of the option information input means in FIG. 1, and FIG. 3 is an error diagram in FIG. 1. FIG. 4 is a flowchart of the processing of the error information outputting means in FIG. 1; FIG. 5 is a flowchart of the processing of the translation information updating means in FIG. 1. In the figure, 1... Source program file 11.
...Translation information 111 ... Opsilan information 112 ... Number of errors 12 ... Source program 13 ... Error information 2 ... Compiler 21 ...Optional information input means 22...
...Error determination means 23...Error information output means 24...Translation information update means 25...Translation means 3...Object file 4. ...
... Flowchart of the processing of the error output file option information input means Fig. 2 Flowchart of the processing of the error determination means Fig. 3 Flowchart of the processing of the error information output means Fig. 4
Claims (1)
エラー数を含む翻訳情報とエラー情報とを格納する領域
を設け、ソースプログラムの更新・修正時に前記翻訳情
報のエラー数をゼロクリアするものとし、 コンパイラ内に、起動時にソースプログラムの名前を指
定することにより翻訳時のオプションを前記翻訳情報の
オプション情報から入力するオプション情報入力手段と
、 翻訳実行前に前記翻訳情報のエラー数を参照してエラー
があるかどうかを判定するエラー判定手段と、 エラーがあると判定された場合に前記エラー情報をエラ
ー出力ファイルに出力してコンパイラの処理を終了させ
るエラー情報出力手段と、 エラーがないと判定された場合に翻訳手段に制御を移し
、翻訳終了後に前記ソースプログラムファイル内の翻訳
情報およびエラー情報を最新の情報に更新する翻訳情報
更新手段とを備えたことを特徴とするソースプログラム
ファイルの翻訳情報管理方式。[Claims] An area for storing translation information and error information including option information and the number of errors is provided in the source program file, and the number of errors in the translation information is cleared to zero when updating or modifying the source program. , an option information input means for inputting options at the time of translation from the option information of the translation information by specifying the name of the source program at startup in the compiler; an error determining means for determining whether there is an error; an error information output means for outputting the error information to an error output file and terminating compiler processing when it is determined that there is an error; and determining that there is no error. Translation of a source program file characterized by comprising: translation information updating means for transferring control to the translation means when the translation is completed, and updating translation information and error information in the source program file to the latest information after completion of translation. Information management method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63234227A JPH0281231A (en) | 1988-09-19 | 1988-09-19 | Translation information managing system for source program file |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63234227A JPH0281231A (en) | 1988-09-19 | 1988-09-19 | Translation information managing system for source program file |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0281231A true JPH0281231A (en) | 1990-03-22 |
Family
ID=16967688
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63234227A Pending JPH0281231A (en) | 1988-09-19 | 1988-09-19 | Translation information managing system for source program file |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0281231A (en) |
-
1988
- 1988-09-19 JP JP63234227A patent/JPH0281231A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0281231A (en) | Translation information managing system for source program file | |
| JPH05307478A (en) | Constituting method for data base management system | |
| JP2620545B2 (en) | Editing device driven by table | |
| JPH10254688A (en) | Program creation support device | |
| JP3503531B2 (en) | Online real-time processing system and sub load module replacement method in the system | |
| JPH10326192A (en) | CATV terminal software program download system | |
| JP3114907B2 (en) | How to change the sequence program of the programmable controller | |
| JP2643839B2 (en) | Completion method at the time of command input | |
| JPS61279932A (en) | Automatic batch translation system for source programs | |
| JPH0619512A (en) | Exclusive control method between PC programming devices | |
| JPH0816382A (en) | Erroneously corrected line retrieving device | |
| JPH04287134A (en) | Simplified trace information acquisition system | |
| JPH04335428A (en) | Version managing method for file | |
| JP2852402B2 (en) | Program development equipment | |
| JPH01296346A (en) | Partial compiling system by error information file | |
| JPH05216649A (en) | Dynamic changing system for system program | |
| JP2000357080A (en) | Device and method for managing version number, recording medium stored with program and information processor | |
| JPH04367029A (en) | Programming device for programmable controller | |
| JPH03214204A (en) | programmable controller | |
| JPH02112052A (en) | System for designating parameter of conversational command | |
| JPH07152541A (en) | System uninterrupted program switching method | |
| JPH0887403A (en) | Program development support device | |
| JPH03147129A (en) | Editing system for source program | |
| JPH01144127A (en) | Interpreter system | |
| JPH065506B2 (en) | Microcomputer branch processing method |