JPH0561665A - Source program correcting system - Google Patents
Source program correcting systemInfo
- Publication number
- JPH0561665A JPH0561665A JP3225493A JP22549391A JPH0561665A JP H0561665 A JPH0561665 A JP H0561665A JP 3225493 A JP3225493 A JP 3225493A JP 22549391 A JP22549391 A JP 22549391A JP H0561665 A JPH0561665 A JP H0561665A
- Authority
- JP
- Japan
- Prior art keywords
- source
- line number
- image
- source program
- program
- 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
- 238000012937 correction Methods 0.000 claims abstract description 19
- 238000012986 modification Methods 0.000 claims description 18
- 230000004048 modification Effects 0.000 claims description 18
- 238000000034 method Methods 0.000 claims description 10
- 238000012545 processing Methods 0.000 description 18
- 238000010586 diagram Methods 0.000 description 8
- 238000003780 insertion Methods 0.000 description 4
- 230000037431 insertion Effects 0.000 description 4
- 230000003213 activating effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明はソースプログラム修正方
式、特に計算機のプログラミング言語で記述されたソー
スプログラムのイメージを端末の画面上にアニメートし
ながら行うソースプログラム修正方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a source program modification method, and more particularly to a source program modification method for animating an image of a source program written in a computer programming language on a screen of a terminal.
【0002】[0002]
【従来の技術】従来、計算機のプログラム言語で記述さ
れたソースプログラムを修正するには、デバッガでソー
スプログラムのデバッグを行った後、エディタを起動し
て、行っていた。2. Description of the Related Art Conventionally, a source program written in a computer programming language has been modified by debugging the source program with a debugger and then activating an editor.
【0003】[0003]
【発明が解決しようとする課題】上述した従来のソース
プログラム修正方式では、デバッガを起動して修正ソー
スイメージをキーボードから入力してデバッグを行って
も、ソースプログラム上には何の修正も行われないた
め、デバッグ時にキーボードより入力した修正ソースイ
メージを紙に記述する等の手段によって記録しておき、
エディタを起動した際に、記録しておいた修正ソースイ
メージを、再びキーボードから入力しなければならない
という問題があった。In the above-mentioned conventional source program modification method, even if the debugger is started and the modified source image is input from the keyboard for debugging, no modification is made on the source program. Since it does not exist, record the modified source image input from the keyboard during debugging by a method such as writing on paper,
There was a problem that when the editor was started up, the recorded modified source image had to be input again from the keyboard.
【0004】[0004]
【課題を解決するための手段】本発明の方式は計算機の
プログラミング言語で記述されたソースプログラムのイ
メージを端末の画面上にアニメートしながら行うソース
プログラム修正方式において、キーボードから修正を指
示した際に修正されるソースプログラム上の対応する行
番号と、修正の指示による修正後のソースイメージとを
保存するソース情報登録手段と、デバッガ終了時に、ソ
ース修正するか否かを指定させ、ソース修正を指定され
た場合に、前記ソース情報登録手段により保存された行
番号に対応するソースプログラム上の行番号を検索し、
ソースプログラム上のその行のソースイメージを保存さ
れたソースイメージに書き換え、ソースプログラムに対
して修正を行うソース修正手段とを有する。The method of the present invention is a source program modification method in which an image of a source program described in a computer programming language is animated on the screen of a terminal when a modification is instructed from a keyboard. Source information registration means to save the corresponding line number on the source program to be modified and the source image after modification by the modification instruction, and to specify whether or not to modify the source when the debugger ends, and specify the source modification In case of, the line number on the source program corresponding to the line number saved by the source information registration means is searched,
It has a source correction means for rewriting the source image of the line on the source program to the stored source image and correcting the source program.
【0005】[0005]
【実施例】次に、本発明について、図面を用いて説明す
る。Next, the present invention will be described with reference to the drawings.
【0006】図1は、本発明の一実施例の動作の流れを
示す構造図であり、ソースプログラム1と、コンパイラ
2と、デバッガ用中間テキスト3と、デバッガ10と、
ソース修正コマンド11と、修正イメージ12と、行番
号/ソースイメージ格納領域13と、修正後ソースプロ
グラム14とからなる。FIG. 1 is a structural diagram showing the flow of operation of an embodiment of the present invention. A source program 1, a compiler 2, an intermediate text 3 for a debugger, a debugger 10,
It is composed of a source modification command 11, a modified image 12, a line number / source image storage area 13, and a modified source program 14.
【0007】さらに、デバッガ10は、初期処理部4
と、修正ソースイメージ入力手段5およびソース情報登
録手段6を含むユーザプログラム実行処理部7と、ソー
ス修正手段8を含む終了処理部9とからなる。Further, the debugger 10 includes an initial processing section 4
And a user program execution processing unit 7 including the corrected source image input unit 5 and the source information registration unit 6, and an end processing unit 9 including the source correction unit 8.
【0008】コンパイラ2は、ソースプログラム1を入
力してデバッガ用中間テキスト3を出力する。デバッガ
10では、デバッガ用中間テキスト3及びソースプログ
ラム1を入力して初期処理部4を起動する。The compiler 2 inputs the source program 1 and outputs a debugger intermediate text 3. The debugger 10 inputs the debugger intermediate text 3 and the source program 1 and activates the initial processing unit 4.
【0009】初期処理部4でデバッガ起動のための初期
処理終了後、ユーザプログラム実行処理部7が起動さ
れ、端末の画面上にソースプログラムのイメージがアニ
メートされ動作確認を行う。After the initial processing for starting the debugger is completed in the initial processing section 4, the user program execution processing section 7 is started and the image of the source program is animated on the screen of the terminal to confirm the operation.
【0010】動作確認中にソースイメージの修正が必要
となり、ソース修正コマンド11がキーボードより入力
されると、修正イメージ入力手段5は、画面上に修正イ
メージ入力要求を出力し、キーボードから修正イメージ
12が入力されると、ソース情報登録手段6で、修正イ
メージ12を加工して行番号とソースイメージを行番号
/ソースイメージ格納領域13に保存する。When the source image needs to be corrected during operation confirmation and the source correction command 11 is input from the keyboard, the corrected image input means 5 outputs a corrected image input request on the screen and the corrected image 12 is input from the keyboard. Is input, the source information registration means 6 processes the modified image 12 and stores the line number and the source image in the line number / source image storage area 13.
【0011】デバッガによるデバッグが終了して終了処
理部9が起動されると、ソース修正手段8は、デバッガ
利用者にソース修正するか否かを指定させ、ソース修正
要求ありの場合に行番号/ソースイメージ格納領域13
を入力し、行番号/ソースイメージ格納領域13に格納
されている行番号に対応するソースプログラム上の行番
号を捜しだし、その行番号のソースイメージを行番号/
ソースイメージ格納領域13のソースイメージに書き換
えて修正後ソースプログラム14を生成して、終了処理
部9を終了する。When the termination processing section 9 is started after the debugging by the debugger is completed, the source modification means 8 causes the debugger user to specify whether or not to modify the source, and if there is a source modification request, the line number / Source image storage area 13
To search for the line number in the source program corresponding to the line number stored in the line number / source image storage area 13 and to find the source image of that line number in line number /
The modified source program 14 is generated by rewriting the source image in the source image storage area 13, and the termination processing unit 9 is terminated.
【0012】図2は、本発明によるソースプログラムの
修正の例を具体的に示した図であり、ソースプログラム
201をデバッグしている際、データに初期値を設定す
る必要があると判明した場合に、ソース修正コマンドの
初期値設定コマンド202を入力することにより、修正
ソースイメージ入力手段5は、コマンド種別203を持
つコマンド情報204を出力し、画面上に修正イメージ
入力要求を出力する。FIG. 2 is a diagram specifically showing an example of modification of the source program according to the present invention. When it is found that an initial value needs to be set in the data while debugging the source program 201. By inputting the initial value setting command 202 of the source correction command, the correction source image input means 5 outputs the command information 204 having the command type 203, and outputs the correction image input request on the screen.
【0013】画面上に出力された修正イメージ入力要求
に対して、キーボードより修正イメージ205を入力す
ると、ソース情報登録手段6は、修正イメージ205及
びコマンド情報204を取得し、修正イメージ205を
加工して修正ソースイメージ206を生成して、行番号
/ソースイメージ格納領域13に出力する。When the modified image 205 is input from the keyboard in response to the modified image input request output on the screen, the source information registration means 6 acquires the modified image 205 and the command information 204 and processes the modified image 205. Then, the modified source image 206 is generated and output to the line number / source image storage area 13.
【0014】ソース修正手段8は、ソース情報登録手段
6により行番号/ソースイメージ格納領域13に出力さ
れた修正ソースイメージ206をもとに、ソースプログ
ラムに対して修正を行い、修正後ソースプログラム20
7を生成する。The source modification means 8 modifies the source program based on the modified source image 206 output to the line number / source image storage area 13 by the source information registration means 6, and the modified source program 20.
7 is generated.
【0015】図3は、ソース情報登録手段6の処理の流
れを詳細に示した図であり、ソース情報登録手段6は、
修正イメージの取得301をした後、コマンド情報の取
得302をし、コマンドの種別が挿入かどうかの判断3
03をした結果、挿入である場合、修正ソースイメージ
を生成して、行番号/ソースイメージ格納領域13にP
UT308して処理を終了する。FIG. 3 is a diagram showing in detail the processing flow of the source information registration means 6, and the source information registration means 6 is
After acquiring 301 of the corrected image, 302 of command information is acquired, and it is determined whether the command type is insertion 3
As a result of 03, if it is an insertion, a modified source image is generated and P is stored in the line number / source image storage area 13.
UT 308 is performed and the process ends.
【0016】コマンドの種別が挿入かどうかの判断30
3をした結果、挿入ではない場合、入力ソースプログラ
ムから1レコードGET304を行い、入力ソースの終
わりに達したかの判断305をし、入力ソースの終わり
である場合、処理を終了する。Judgment whether command type is insertion 30
As a result of step 3, if it is not the insertion, one record GET 304 is performed from the input source program, it is judged 305 whether the end of the input source has been reached, and if it is the end of the input source, the processing is ended.
【0017】入力ソースの終わりに達したかの判断30
5の結果、入力ソースの終わりに達していない場合は、
PUTしたレコードが修正対象のソースかどうかの判断
306をし、修正対象のソースである場合は、修正ソー
スイメージ12を生成して、行番号/ソースイメージ格
納領域13にPUT307して、再び入力ソースプログ
ラム1からレコードGETし、入力ソースの終わりに達
するまで処理を行う。Determining if the end of the input source has been reached 30
As a result of 5, if the end of the input source is not reached,
A judgment 306 is made as to whether the PUT record is the correction target source. If the PUT record is the correction target source, the correction source image 12 is generated, PUT 307 to the line number / source image storage area 13, and input source again. Record GET from program 1 and process until the end of the input source is reached.
【0018】図4は、ソース修正手段8の処理の流れを
詳細に示した図である。ソース修正手段8は、オプショ
ン指定によるソース修正要求ありかの判断301をし、
ソース修正要求ありの場合、行番号/ソースイメージ格
納領域13中に保存された修正ソースイメージを、同一
行番号が存在する場合には後から入力した修正ソースイ
メージを有効としながら行番号順にソート302し、初
期化処理として入力ソースプログラムGET不要フラグ
のOFF303を行い、行番号/ソースイメージ格納領
域13からの1レコード取得304をして、格納領域の
終わりに達したかの判断305をする。FIG. 4 is a diagram showing in detail the processing flow of the source correction means 8. The source correction means 8 determines 301 whether there is a source correction request by specifying an option,
If there is a source correction request, the correction source images stored in the line number / source image storage area 13 are sorted in the order of line numbers while the correction source image input later is valid if the same line number exists. 302 Then, as an initialization process, the input source program GET unnecessary flag is turned OFF 303, one record is acquired 304 from the line number / source image storage area 13, and it is determined 305 whether the end of the storage area is reached.
【0019】格納領域の終わりに達した場合は、入力ソ
ースプログラムの終わりまで順次テンポラリファイルに
PUT315して、テンポラリファイルの内容での入力
ソースプログラムファイルの置き換え317を行い、処
理を終了する。When the end of the storage area is reached, the PUT 315 is sequentially performed on the temporary file until the end of the input source program, the input source program file is replaced 317 with the contents of the temporary file, and the process is ended.
【0020】格納領域の終わりに達したかの判断305
をした結果、終わりに達していない場合は、入力ソース
プログラムGET不要フラグがONがどうかの判断30
6をして、GET不要フラグがONならば、入力ソース
プログラムからのレコードGETを行わずに入力ソース
プログラムの行番号と行番号/ソースイメージ格納領域
13から取得した行番号との大きさの判断309をす
る。Determining whether the end of the storage area has been reached 305
As a result, if the end is not reached, it is judged whether the input source program GET unnecessary flag is ON 30
6 and if the GET unnecessary flag is ON, the size of the line number of the input source program and the line number acquired from the line number / source image storage area 13 is determined without performing the record GET from the input source program. Take 309.
【0021】入力ソースプログラムGET不要フラグが
OFFの場合には、入力ソースプログラムからの1レコ
ードGET307をし、入力ソースの終わりに達したか
の判断308をする。入力ソースの終わりに達した場合
には、行番号/ソースイメージ格納領域13の終わりま
で順次テンポラリファイルにPUT316し、テンポラ
リファイルの内容での入力ソースプログラムファイルの
置き換え317を行い、処理を終了する。When the input source program GET unnecessary flag is OFF, 1 record GET 307 from the input source program is made and it is judged 308 whether the end of the input source is reached. When the end of the input source is reached, the PUT 316 is sequentially performed to the temporary file until the end of the line number / source image storage area 13, the input source program file is replaced 317 with the contents of the temporary file, and the process is ended.
【0022】入力ソースの終わりに達したかの判断30
8により、入力ソースの終わりではない場合、入力ソー
スプログラムの行番号と行番号/ソースイメージ格納領
域13から取得した行番号との大きさの判断309をす
る。Determining if the end of the input source has been reached 30
If it is not the end of the input source according to 8, the size 309 of the line number of the input source program and the line number acquired from the line number / source image storage area 13 is determined.
【0023】入力ソースプログラムの行番号と行番号/
ソースイメージ格納領域13から取得した行番号との大
きさの判断309により入力ソースプログラムの行番号
の方が小さい場合は、テンポラリファイルへの入力ソー
スプログラムの1レコード分PUT310を行い、行番
号/ソースイメージ格納領域13から取得した行番号の
方が大きいかもしくは入力ソースプログラムの行番号と
行番号/ソースイメージ格納領域13から取得した行番
号とが一致する場合は、テンポラリファイルへの格納領
域の1レコード分PUT311をし、再び入力ソースプ
ログラムの行番号と行番号/ソースイメージ格納領域1
3から取得した行番号との大きさの判断312をする。Line number of input source program and line number /
If the line number of the input source program is smaller than the line number acquired from the source image storage area 13 according to the determination 309, the PUT 310 for one record of the input source program to the temporary file is performed, and the line number / source If the line number acquired from the image storage area 13 is larger or the line number of the input source program and the line number / line number acquired from the source image storage area 13 match, one of the storage areas in the temporary file is set. Perform PUT 311 for the record and again enter the line number of the input source program and the line number / source image storage area 1
The size of the line number acquired from 3 is judged 312.
【0024】入力ソースプログラムの行番号が行番号/
ソースイメージ格納領域13から取得した行番号より大
きい場合には、入力ソースプログラムGET不要フラグ
のON313をし、入力ソースプログラムの行番号と行
番号/ソースイメージ格納領域13から取得した行番号
とが一致する場合には、入力ソースプログラムGET不
要フラグのOFF314をして、入力ソースの終わりに
達するか、格納領域の終わりに達するまで処理を行う。The line number of the input source program is line number /
If it is larger than the line number acquired from the source image storage area 13, the input source program GET unnecessary flag is turned on 313, and the line number of the input source program matches the line number / line number acquired from the source image storage area 13. In this case, the input source program GET unnecessary flag is turned off 314, and the processing is performed until the end of the input source or the end of the storage area is reached.
【0025】[0025]
【発明の効果】以上説明したように、本発明は、デバッ
ガによるデハッグ時にキーボードより入力される修正ソ
ースイメージを保存し、デバッガ終了時に保存した終了
ソースイメージによりソースプログラムを修正すること
により、デバッグ中に入力した修正ソースイメージをエ
ディタを起動して再び入力する必要がなくなるという効
果がある。As described above, the present invention saves the modified source image input from the keyboard when the debugger dehags and modifies the source program by the ending source image saved when the debugger ends to debug. This has the effect of eliminating the need to start the editor and input the modified source image input to the editor again.
【図1】本発明の一実施例の動作の流れを示す構造図で
ある。FIG. 1 is a structural diagram showing a flow of operations of an embodiment of the present invention.
【図2】本発明によるソースプログラムの修正の例を具
体的に示した図である。FIG. 2 is a diagram specifically showing an example of modification of a source program according to the present invention.
【図3】本発明の構成要素であるソース情報登録手段の
処理の流れを示す図である。FIG. 3 is a diagram showing a processing flow of a source information registration unit that is a component of the present invention.
【図4】本発明の構成要素であるソース修正手段の処理
の流れを示す図である。FIG. 4 is a diagram showing a processing flow of a source correction means which is a constituent element of the present invention.
1 ソースプログラム 2 コンパイラ 3 デバッガ用中間テキスト 4 初期処理部 5 修正ソースイメージ入力手段 6 ソース情報登録手段 7 ユーザプログラム実行処理部 8 ソース修正手段 9 終了処理部 10 デバッガ 11 ソース修正コマンド 12 修正イメージ 13 行番号/ソースイメージ格納領域 14 修正後ソースプログラム DESCRIPTION OF SYMBOLS 1 source program 2 compiler 3 intermediate text for debugger 4 initial processing section 5 modified source image input means 6 source information registration means 7 user program execution processing section 8 source modification means 9 termination processing section 10 debugger 11 source modification command 12 modified image 13 lines Number / Source image storage area 14 Source program after modification
Claims (1)
たソースプログラムのイメージを端末の画面上にアニメ
ートしながら行うソースプログラム修正方式において、 キーボードから修正を指示した際に修正されるソースプ
ログラム上の対応する行番号と、修正の指示による修正
後のソースイメージとを保存するソース情報登録手段
と、 デバッガ終了時に、ソース修正するか否かを指定させ、
ソース修正を指定された場合に、前記ソース情報登録手
段により保存された行番号に対応するソースプログラム
上の行番号を検索し、ソースプログラム上のその行のソ
ースイメージを保存されたソースイメージに書き換え、
ソースプログラムに対して修正を行うソース修正手段と
を有することを特徴とするソースプログラム修正方式。1. A source program modification method for animating an image of a source program described in a computer programming language on a screen of a terminal, which corresponds to the modification of the source program when a modification is instructed from a keyboard. Source information registration means to save the line number and the source image after modification by the modification instruction, and let the user specify whether to modify the source when the debugger ends,
When the source correction is designated, the line number on the source program corresponding to the line number saved by the source information registration means is searched, and the source image of the line on the source program is rewritten to the saved source image. ,
A source program modifying method, comprising: a source modifying means for modifying a source program.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3225493A JPH0561665A (en) | 1991-09-05 | 1991-09-05 | Source program correcting system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3225493A JPH0561665A (en) | 1991-09-05 | 1991-09-05 | Source program correcting system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0561665A true JPH0561665A (en) | 1993-03-12 |
Family
ID=16830184
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3225493A Pending JPH0561665A (en) | 1991-09-05 | 1991-09-05 | Source program correcting system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0561665A (en) |
-
1991
- 1991-09-05 JP JP3225493A patent/JPH0561665A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0561665A (en) | Source program correcting system | |
| JPH05297911A (en) | Sequence control circuit for sequence controller | |
| JP2639349B2 (en) | Error correction line search device | |
| JPS61147336A (en) | Generation management system of load module | |
| JPH09160611A (en) | Programmable controller | |
| JPS58139254A (en) | Programmable controller | |
| JPH0667864A (en) | Method for automatically preparing/updating manual or the like | |
| JPS6210831Y2 (en) | ||
| JPH0581005A (en) | Program converter | |
| JP2860054B2 (en) | Program debugging device | |
| JP3307358B2 (en) | Partial correction command method and information processing apparatus | |
| JP2000353359A (en) | Storage device initializing method | |
| JPH0581017A (en) | Program processor | |
| JPH04162152A (en) | Double write checking device for program instruction | |
| JPH04149747A (en) | System for updating trace information | |
| JPH01307844A (en) | editing device | |
| JPH0473177B2 (en) | ||
| JPH05241814A (en) | Patch management device | |
| JPH02155026A (en) | Character output device | |
| JPH03147130A (en) | Operating system correcting system | |
| JPH05181706A (en) | Device for forming execution time information output debugger control sentence | |
| JPH0773170A (en) | New file creation method and device | |
| JPH05189227A (en) | Microcomputer with built-in one-time programmable ROM | |
| JPH04267439A (en) | Program evaluation system | |
| JPS62251938A (en) | List file updating system |