JPH06274371A - Source program correcting method - Google Patents

Source program correcting method

Info

Publication number
JPH06274371A
JPH06274371A JP5064061A JP6406193A JPH06274371A JP H06274371 A JPH06274371 A JP H06274371A JP 5064061 A JP5064061 A JP 5064061A JP 6406193 A JP6406193 A JP 6406193A JP H06274371 A JPH06274371 A JP H06274371A
Authority
JP
Japan
Prior art keywords
error
source program
message
error information
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5064061A
Other languages
Japanese (ja)
Inventor
Shiyuuichi Annou
修一 案納
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.)
Hitachi Software Engineering Co Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Software Engineering Co Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP5064061A priority Critical patent/JPH06274371A/en
Publication of JPH06274371A publication Critical patent/JPH06274371A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To easily proceed with source program correcting work by displaying information concerning an error from the position of a line next to the line with the error in the case of existing the sentence of a syntax error. CONSTITUTION:A message burying processing part 5 inputs error information in an error information file 9 and a source program corresponded by an input source file 8. The number of necessary lines is additionally ensured after the pertient line of the source program based on a line number in error information and the piece of error information is buried into the ensured line with respect to all the pieces of error information. Next, the source program into which error information is buried is registered to a message burying source file 10 to activate an editor part 6. The activated editor part 6 inputs the source program into which error information is buried from the message burying source file 10 so as to display it on a screen. Then error information is retrieved to correct the source program.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ソースプログラムの編
集及びエラーの修正等を行うに際し、診断用のプログラ
ムとテキストエディタとを連動させながらソースプログ
ラムを修正するソースプログラムの修正方法に関するも
のである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for modifying a source program, which is used to modify the source program while linking a diagnostic program and a text editor when editing the source program and correcting errors. .

【0002】[0002]

【従来の技術】従来において、この種の修正方法として
特開昭61−75435号公報、あるいは特開平03−
70033号公報に開示されたものがある。
2. Description of the Related Art Conventionally, as a correction method of this kind, JP-A-61-75435 or JP-A-03-
There is one disclosed in Japanese Patent No. 70033.

【0003】特開昭61−75435号公報(発明の名
称:構文チェッカとテキストエディタの連動方式)に開
示されたものは、図5の表示画面例に示すように、ソー
スプログラムの構文チェック結果をエディタに引き継ぎ
し、カーソルAでエラー位置を示し、エラーの種類(エ
ラーメッセージ)を下欄Bに表示するものである。
The one disclosed in Japanese Patent Application Laid-Open No. 61-75435 (Title of the Invention: Synchronous checker and text editor interlocking system) shows the syntax check result of the source program as shown in the display screen example of FIG. It is taken over by the editor, the error position is indicated by the cursor A, and the error type (error message) is displayed in the lower column B.

【0004】特開平03−70033号公報(発明の名
称:コンパイラエディタ連動方式)に開示されたもの
は、図6の表示画面例に示すように、エディタの画面分
割機能により、エラー箇所の種類を行番号別に表示する
エラー表示部分Cと、エディタが編集しているソースプ
ログラムの表示部分Dとに分割し、エラー箇所とその内
容およびソースプログラムを1画面に表示するものであ
る。
The one disclosed in Japanese Patent Laid-Open No. 03-70033 (title of the invention: compiler editor interlocking method) determines the type of error location by the screen division function of the editor, as shown in the display screen example of FIG. It is divided into an error display portion C displayed for each line number and a display portion D of the source program edited by the editor, and the error portion and its content and the source program are displayed on one screen.

【0005】[0005]

【発明が解決しようとする課題】しかし、上記従来技術
において、前者はソースプログラムを編集する時にソー
スプログラムの行番号順にエラー箇所を検索していくた
め、全てのエラー箇所を知るにはソースプログラムの最
後の行までスクロールするといった操作が必要になり、
操作が面倒であるといった問題があった。
However, in the above-mentioned conventional technique, the former searches for an error part in the order of the line number of the source program when the source program is edited. You need to scroll to the last line,
There was a problem that the operation was troublesome.

【0006】また、エラーメッセージの表示はカーソル
Aが示す行だけしか行われず、ループ文、サブルーチン
文等の他の文と関連がある命令文に対しては、1画面の
みで複数の文のエラーメッセージを見ることができず、
作業効率が悪いという問題があった。
Further, the error message is displayed only on the line indicated by the cursor A. For a command statement related to another statement such as a loop statement or a subroutine statement, an error of a plurality of statements is displayed on only one screen. I can't see the message,
There was a problem that work efficiency was poor.

【0007】後者は、エディタの画面分割機能により、
1画面で同時に複数行のエラーメッセージを見ることが
できるが、分割されたエラーメッセージ表示画面Cとソ
ースプログラムの表示部分Dとは同時にスクロールする
ことができず、エラーメッセージ表示画面Cとソースプ
ログラムの表示部分Dとを交互に操作しながらエラー内
容を確認しなければならないという問題があった。
In the latter case, the screen division function of the editor allows
Multiple lines of error messages can be viewed simultaneously on one screen, but the divided error message display screen C and the display portion D of the source program cannot be scrolled at the same time, and the error message display screen C and the source program are not displayed. There is a problem that the error content must be confirmed by alternately operating the display portion D.

【0008】エラーメッセージとエラー行とを同時に確
認することができないという問題があった。
There is a problem that the error message and the error line cannot be confirmed at the same time.

【0009】本発明の目的は、エラーメッセージとエラ
ー行とを同時に確認し、ソースプログラムの修正を容易
に行うことができるソースプログラムの修正方法を提供
することにある。
An object of the present invention is to provide a method of correcting a source program which can confirm an error message and an error line at the same time and easily correct the source program.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、本発明は修正すべきソースプログラムの表示におい
て、構文エラーに関する情報を該構文エラーのある次の
行位置から表示することを特徴とする。
To achieve the above object, the present invention is characterized in that, in displaying a source program to be corrected, information on a syntax error is displayed from the next line position where the syntax error occurs. To do.

【0011】[0011]

【作用】上記手段によれば、構文エラーの文があった場
合、そのエラーに関する情報がエラーのある行の次の行
位置から表示される。
According to the above means, when there is a syntax error sentence, information about the error is displayed from the line position next to the line having the error.

【0012】従って、エラー行とエラーに関する情報を
一挙に把握できる上、同一画面上での操作のみであるの
で簡単にソースプログラムの修正作業を進めることがで
きる。
Therefore, the error line and the information relating to the error can be grasped at once, and since only the operation is performed on the same screen, the correction work of the source program can be easily carried out.

【0013】[0013]

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

【0014】図1は、本発明の一実施例を示すシステム
構成図である。
FIG. 1 is a system configuration diagram showing an embodiment of the present invention.

【0015】本実施例のシステムは、大別して、中央処
理装置1、入出力装置2および記憶装置3から構成され
ている。
The system of this embodiment is roughly composed of a central processing unit 1, an input / output unit 2 and a storage unit 3.

【0016】このうち、中央処理装置1には、入出力装
置2を通して起動されてソースプログラムの構文チェッ
クを行って、構文エラーのある行については構文エラー
メッセージを生成して蓄積する診断プログラム部4と、
診断プログラム部4からの起動によって、蓄積された構
文エラーメッセージをソースプログラム中の該当する構
文エラー行に埋め込むメッセージ埋め込み処理部5と、
メッセージ埋め込み処理部5からの起動によって、構文
エラーメッセージが埋め込まれたソースプログラムを画
面に表示し、構文エラー行の修正を受け付けるエディタ
部6と、エディタ部6からの起動によって、構文エラー
メッセージが埋め込まれている修正されたソースプログ
ラムから構文エラーメッセージを削除して、構文エラー
のあるソースプログラムを修正されたソースプログラム
に更新する更新処理部7とが配置される。
Among them, the central processing unit 1 is activated through the input / output unit 2 to check the syntax of the source program, and generate a syntax error message for a line having a syntax error and store it in the diagnostic program unit 4. When,
A message embedding processing unit 5 for embedding the accumulated syntax error message in a corresponding syntax error line in the source program when activated from the diagnostic program unit 4;
The source program in which the syntax error message is embedded is displayed on the screen by the activation from the message embedding processing unit 5, and the syntax error message is embedded by the editor unit 6 that accepts the correction of the syntax error line and the activation from the editor unit 6. And an update processing unit 7 that deletes the syntax error message from the corrected source program and updates the source program having the syntax error to the corrected source program.

【0017】また、記憶装置3には、ソースプログラム
を格納する入力ソースファイル8と、診断プログラム部
4の結果を格納するエラー情報ファイル9と、メッセー
ジ埋め込み処理部5の結果を格納するメッセージ埋め込
みソースファイル10と、エディタ部6の結果を格納す
る修正後ソースファイル11が設けられている。
The storage device 3 has an input source file 8 for storing a source program, an error information file 9 for storing the result of the diagnostic program section 4, and a message embedding source for storing the result of the message embedding processing section 5. A file 10 and a modified source file 11 for storing the result of the editor unit 6 are provided.

【0018】図2は、前記エラー情報ファイル9のレコ
ード構成を示す図であり、行番号21、カラム位置2
2、メッセージ番号23、メッセージテキスト24で構
成されている。
FIG. 2 is a diagram showing the record structure of the error information file 9, where line number 21 and column position 2 are used.
2, message number 23, and message text 24.

【0019】図3は、本実施例の処理の流れを示すフロ
ーチャートである。以下、このフローチャートに従って
動作を説明する。
FIG. 3 is a flow chart showing the flow of processing of this embodiment. The operation will be described below according to this flowchart.

【0020】まず、入力装置2からの利用者の指示によ
り、診断プログラム部4が中央処理装置1にロードされ
る。
First, the diagnostic program section 4 is loaded into the central processing unit 1 according to a user's instruction from the input device 2.

【0021】この診断プログラム部4が起動されると、
診断プログラム部4は記憶装置3中の入力ソースファイ
ル8から利用者によって指定されたソースプログラムを
入力し、入力したソースプログラムのすべての命令文に
ついて構文に関するチェックを行う。
When the diagnostic program section 4 is activated,
The diagnostic program unit 4 inputs the source program specified by the user from the input source file 8 in the storage device 3, and checks the syntax of all the command statements of the input source program.

【0022】診断プログラム部4は、ソースプログラム
の命令文について構文エラーを検出すると、検出の都
度、図2の行番号21、カラム位置22、メッセージ番
号23、メッセージテキスト24から成る1レコードの
エラー情報を作成し、エラー情報ファイル9に登録し
て、メッセージ埋め込み処理部5を起動する(ステップ
31)。
When the diagnostic program unit 4 detects a syntax error in the command statement of the source program, each time it detects the error, one record of error information consisting of the line number 21, column position 22, message number 23, and message text 24 in FIG. Is created, registered in the error information file 9, and the message embedding processing unit 5 is activated (step 31).

【0023】メッセージ埋め込み処理部5は、エラー情
報ファイル9のエラー情報と入力ソースファイル8の対
応するソースプログラムとを入力し、エラー情報中の行
番号21をもとに必要行数をソースプログラムの該当行
の後に追加確保して、そのエラー情報を該確保した行へ
埋め込むことをすべてのエラー情報について行い、エラ
ー情報をすべて埋め込みし終わった時点で、エラー情報
が埋め込まれたソースプログラムをメッセージ埋め込み
ソースファイル10に登録して、エディタ部6を起動す
る(ステップ32)。
The message embedding processing unit 5 inputs the error information in the error information file 9 and the corresponding source program in the input source file 8, and determines the required number of lines of the source program based on the line number 21 in the error information. The error information is additionally secured after the relevant line, and the error information is embedded in the secured line for all the error information. When all the error information has been embedded, the source program with the embedded error information is embedded with a message. The source file 10 is registered and the editor unit 6 is activated (step 32).

【0024】起動されたエディタ部6はメッセージ埋め
込みソースファイル10からエラー情報が埋め込まれた
ソースプログラムを入力し、該入力したそれを画面に表
示する。利用者は表示されたエラー情報が埋め込まれた
ソースプログラムのエラー情報を検索しながらソースプ
ログラムの修正を行い、修正が終了したらエラー情報が
埋め込まれている修正済ソースプログラムを修正後ソー
スファイル11に登録して、更新処理部7を起動する
(ステップ33)。
The activated editor unit 6 inputs the source program in which the error information is embedded from the message embedded source file 10 and displays the input source program on the screen. The user corrects the source program while searching the error information of the source program in which the displayed error information is embedded, and when the correction is completed, the corrected source program in which the error information is embedded is corrected to the source file 11 after correction. Register and start the update processing unit 7 (step 33).

【0025】更新処理部7は修正後ソースファイル11
からエラー情報が埋め込まれている修正済ソースプログ
ラムを入力して、該入力した修正済ソースプログラムか
ら埋め込まれているエラー情報をすべて削除し、エラー
情報が削除された修正済ソースプログラムを入力ソース
ファイル8に登録する。この際、対応する旧いソースプ
ログラムは削除する(ステップ34)。
The update processing unit 7 uses the corrected source file 11
Input the modified source program in which the error information is embedded from, delete all the embedded error information from the input modified source program, and enter the modified source program in which the error information is deleted in the input source file Register at 8. At this time, the corresponding old source program is deleted (step 34).

【0026】図4は、ソースプログラムにエラーメッセ
ージを埋め込んだ処理済みプログラムの修正・編集を行
うときの画面表示例を示すものである。
FIG. 4 shows an example of a screen display when a processed program in which an error message is embedded in a source program is modified / edited.

【0027】図において、Eは処理済みソースプログラ
ム中のソースプログラム表示部分を示し、Fは処理済み
ソースプログラム中に埋め込まれたエラーメッセージ表
示部分を示し、Gは利用者に処理済みソースプログラム
中のエラーメッセージの埋め込み箇所を知らせるエラー
インディケータで、「$$$ cchk msg#:」
で表す。
In the figure, E indicates a source program display portion in the processed source program, F indicates an error message display portion embedded in the processed source program, and G indicates a user in the processed source program. In the error indicator that informs you of the embedding part of the error message, "$$$ cchk msg #:"
It is represented by.

【0028】Hはソースプログラム中のエラーがある行
番号を示し、Iはエラーメッセージを番号として利用者
に伝えるエラーメッセージ番号、Jはソースプログラム
中のエラーの個数、Kはメッセージレベル、Lはエラー
メッセージ内容を示すメッセージテキストを示す。
H represents a line number in the source program where an error occurs, I is an error message number for notifying the user of an error message as a number, J is the number of errors in the source program, K is a message level, and L is an error. The message text showing the message content is shown.

【0029】以上説明してきたように、ソースプログラ
ム中にエラー情報を埋め込むことにより、ソースプログ
ラムのエラー内容を同一画面で見ながら、修正・編集を
同時に処理できるので、効率良く、かつ容易に修正・編
集を行うことができる。
As described above, by embedding error information in a source program, correction / editing can be processed simultaneously while viewing the error content of the source program on the same screen, so that correction / editing can be performed efficiently and easily. You can edit.

【0030】特に、エディタ部に画面分割機能を持たな
いシステムでは極めて有効である。
Particularly, it is extremely effective in a system in which the editor section does not have a screen division function.

【0031】なお、本実施例では、エディタ部6での修
正(ステップ33)終了後に更新処理部7でのソースフ
ァイルの更新(ステップ34)で、対応する旧いソース
プログラムを削除して、エラー情報が削除された修正済
ソースプログラムを入力ソースファイル8に登録してい
るが、エディタ部6での修正(ステップ33)後で更新
処理部7でのソースファイルの更新(ステップ34)前
に、修正された文についてそれぞれの新旧文を対で画面
に表示して、修正が正しいか否かを最終確認する処理を
設けてもよい。
In the present embodiment, after the correction in the editor unit 6 (step 33) is completed, the update processing unit 7 updates the source file (step 34) to delete the corresponding old source program and to display the error information. Although the corrected source program deleted from is registered in the input source file 8, it is corrected after the correction in the editor unit 6 (step 33) and before the update of the source file in the update processing unit 7 (step 34). A process may be provided in which new and old sentences are displayed in pairs for each of the generated sentences and a final confirmation is made as to whether or not the correction is correct.

【0032】さらに本実施例では、更新処理部7でのソ
ースファイルの更新(ステップ34)で終了している
が、これを終了させずに、引き続き診断プログラムでの
ソースプログラム診断(ステップ31)に分岐させてソ
ースプログラムの診断を行わせてもよい。
Further, in the present embodiment, the update processing unit 7 completes the update of the source file (step 34). However, without ending this, the source program diagnosis (step 31) in the diagnostic program is continued. The source program may be diagnosed by branching.

【0033】[0033]

【発明の効果】以上説明したように本発明は、表示画面
に表示されたソースプログラムに対し、構文チェックを
行う診断手段が検出したエラー箇所に対応する行番号位
置に、行番号とエラーメッセージを組み込んで表示させ
るようにしたので、エラーメッセージとエラー行とを同
時に確認し、ソースプログラムの修正を容易に行うこと
ができるうえ、同一画面上での操作のみであるので簡単
に修正作業を進めることができる。
As described above, according to the present invention, the line number and the error message are displayed at the line number position corresponding to the error location detected by the diagnostic means for performing the syntax check for the source program displayed on the display screen. Since it is embedded and displayed, the error message and error line can be checked at the same time, and the source program can be easily modified.Because only the operation is on the same screen, you can easily proceed with the modification work. You can

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

【図1】本発明の一実施例を示すシステム構成図であ
る。
FIG. 1 is a system configuration diagram showing an embodiment of the present invention.

【図2】実施例におけるエラー情報ファイルのレコード
構成図である。
FIG. 2 is a record configuration diagram of an error information file in the embodiment.

【図3】実施例の処理の流れを示すフローチャートであ
る。
FIG. 3 is a flowchart showing a processing flow of the embodiment.

【図4】実施例のソースプログラム修正方法を説明する
ための表示例である。
FIG. 4 is a display example for explaining a source program correcting method of the embodiment.

【図5】従来のソースプログラム修正方法の一例を説明
するための表示例である。
FIG. 5 is a display example for explaining an example of a conventional source program correction method.

【図6】従来のソースプログラム修正方法の他の例を説
明するための表示例である。
FIG. 6 is a display example for explaining another example of the conventional source program correction method.

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

1…中央処理装置、2…入出力装置、3…記憶装置、4
…診断プログラム部、5…メッセージ埋め込み処理部、
6…エディタ部、7…更新処理部、8…入力ソースファ
イル、9…エラー情報ファイル、10…メッセージ埋め
込みソースファイル、11…修正後ソースファイル、2
1…行番号、22…カラム位置、23…メッセージ番
号、24…メッセージテキスト、E…ソースプログラム
表示部分、F…エラーメッセージ表示部分、G…エラー
インディケータ、H…行番号、I…エラーメッセージ番
号、J…エラー個数、K…メッセージレベル、L…メッ
セージテキスト。
1 ... Central processing unit, 2 ... Input / output unit, 3 ... Storage unit, 4
... diagnosis program section, 5 ... message embedding processing section,
6 ... Editor section, 7 ... Update processing section, 8 ... Input source file, 9 ... Error information file, 10 ... Message embedded source file, 11 ... Modified source file, 2
1 ... Line number, 22 ... Column position, 23 ... Message number, 24 ... Message text, E ... Source program display part, F ... Error message display part, G ... Error indicator, H ... Line number, I ... Error message number, J ... number of errors, K ... message level, L ... message text.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 ソースプログラムを構成する文の構文を
チェックし、構文エラーのある文についてはその文にエ
ラーのあることを表示し、表示した構文エラーのある文
を入力された訂正文に置き換えるソースプログラムの修
正方法において、 構文エラーに関する情報を該構文エラーのある行の次の
行位置から表示することを特徴とするソースプログラム
の修正方法。
1. The syntax of a statement that constitutes a source program is checked, a statement with a syntax error is displayed as having an error, and the displayed statement with a syntax error is replaced with the input correction statement. A method for correcting a source program, which is characterized in that information on a syntax error is displayed from a line position next to a line having the syntax error.
JP5064061A 1993-03-23 1993-03-23 Source program correcting method Pending JPH06274371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5064061A JPH06274371A (en) 1993-03-23 1993-03-23 Source program correcting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5064061A JPH06274371A (en) 1993-03-23 1993-03-23 Source program correcting method

Publications (1)

Publication Number Publication Date
JPH06274371A true JPH06274371A (en) 1994-09-30

Family

ID=13247205

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5064061A Pending JPH06274371A (en) 1993-03-23 1993-03-23 Source program correcting method

Country Status (1)

Country Link
JP (1) JPH06274371A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000065416A1 (en) * 1999-04-27 2000-11-02 Mitsubishi Denki Kabushiki Kaisha Control device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000065416A1 (en) * 1999-04-27 2000-11-02 Mitsubishi Denki Kabushiki Kaisha Control device
KR100441149B1 (en) * 1999-04-27 2004-07-21 미쓰비시덴키 가부시키가이샤 Control device
US6915461B1 (en) 1999-04-27 2005-07-05 Mitsubishi Denki Kabushiki Kaisha Control unit used in machine tools
CN1331057C (en) * 1999-04-27 2007-08-08 三菱电机株式会社 Control device

Similar Documents

Publication Publication Date Title
JP2993528B2 (en) Text management and restoration method
JPH06274371A (en) Source program correcting method
JP3964259B2 (en) PROGRAM GENERATION DEVICE, PROGRAM GENERATION METHOD, AND PROGRAM GENERATION PROGRAM
JPH07120285B2 (en) How to use the syntax checker and text editor
JP2000293519A (en) Document processor
JPS62214438A (en) Software specification reuse system
JPS62186339A (en) Compiling error display system in text editor
JPH04182841A (en) Compilation error correction system
JP3509182B2 (en) Information processing apparatus and method
JPH05216726A (en) Generation comparison screen display system for source program
JPH0589103A (en) Document editing processor
JPH1196040A (en) Process execution system and recording medium
JPH06332684A (en) Program correction supporting device
JPH08221265A (en) Supporting device for developing software
JPH0358225A (en) File editing system
JPH10148699A (en) Operation plan preparing device
JPH05204921A (en) Device for editing document and method therefor
JPH1153411A (en) Circuit diagram editor
JPH06350664A (en) State matrix table generation aid/verification device
JPH1049358A (en) Device and method for automatically generating altered program
JPH0594295A (en) Editing device for plural sub files
JPH03223927A (en) Support device for production of software
JPH06332756A (en) Information processing system
JPH04167053A (en) Text editor
JPH10143562A (en) Medical treatment action input device