JPH07120285B2 - How to use the syntax checker and text editor - Google Patents

How to use the syntax checker and text editor

Info

Publication number
JPH07120285B2
JPH07120285B2 JP59197356A JP19735684A JPH07120285B2 JP H07120285 B2 JPH07120285 B2 JP H07120285B2 JP 59197356 A JP59197356 A JP 59197356A JP 19735684 A JP19735684 A JP 19735684A JP H07120285 B2 JPH07120285 B2 JP H07120285B2
Authority
JP
Japan
Prior art keywords
syntax
text editor
error
checker
check result
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 - Lifetime
Application number
JP59197356A
Other languages
Japanese (ja)
Other versions
JPS6175435A (en
Inventor
安洋 杉山
Original Assignee
日立ソフトウェアエンジニアリング株式会社
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 日立ソフトウェアエンジニアリング株式会社 filed Critical 日立ソフトウェアエンジニアリング株式会社
Priority to JP59197356A priority Critical patent/JPH07120285B2/en
Publication of JPS6175435A publication Critical patent/JPS6175435A/en
Publication of JPH07120285B2 publication Critical patent/JPH07120285B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は構文チェッカーとテキストエディタの連動方法
に係り、特に構文チェッカーの構文チェック結果をテキ
ストエディタに引きつぐ方法に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of linking a syntax checker and a text editor, and more particularly to a method of pulling a syntax check result of the syntax checker into a text editor.

〔発明の背景〕[Background of the Invention]

従来、構文チェッカーとテキストエディタを使用してソ
ースプログラムのデバッグを行う場合、構文チェッカー
はソースプログラムを入力し、それを構文チェックした
結果を人間が読める形で構文チェック結果リストなどの
形式で出力し、オペレータが該構文チェック結果リスト
を見ながらテキストエディタを操作し、テキストエディ
タでは、すべての編集処理をオペレータの投入するコマ
ンドに従って処理することで、デバッグを行っていた。
そのため、オペレータは構文チェック結果リストを見る
という作業とテキストエディタを構文チェック結果リス
トに合せて操作するという二つの作業を同時に行わなけ
ればならず、オペレータに大きな負担となっていた。
Conventionally, when debugging a source program using a syntax checker and a text editor, the syntax checker inputs the source program and outputs the result of the syntax check in a human-readable form such as a syntax check result list. The operator operates the text editor while looking at the syntax check result list, and the text editor performs all the editing processing in accordance with the command input by the operator for debugging.
Therefore, the operator has to simultaneously perform the work of viewing the syntax check result list and the work of operating the text editor in accordance with the syntax check result list, which imposes a heavy burden on the operator.

〔発明の目的〕[Object of the Invention]

本発明の目的は、ソースプログラムを構文チェック後、
オペレータが構文チェック結果リストを見る事なく、テ
キストエディタが自動的にエラーの場所と種類を表示
し、オペレータが簡単にそのエラーを修正できるように
構文チェッカーとテキストエディタを連動させることに
ある。
The purpose of the present invention is to check the syntax of the source program,
The text editor automatically displays the location and type of the error without the operator having to look at the syntax check result list, and the syntax checker and the text editor work together so that the operator can easily correct the error.

〔発明の概要〕[Outline of Invention]

本発明の要点は、構文チェッカーが構文チェック結果を
人間が読める形式だけでなくテキストエディタが入力可
能な中間コードの形式で出力できるようにし、テキスト
エディタがこの中間コードを入力してエラー箇所にカー
ソルを位置付け、エラー場所の周辺とエラーメッセージ
を画面表示し、すぐにエラーの修正が可能となるように
したことである。
The gist of the present invention is that the syntax checker can output the syntax check result not only in a human-readable form but also in the form of intermediate code that can be input by a text editor, and the text editor can input this intermediate code and move the cursor to the error location. Is positioned so that the area around the error location and the error message are displayed on the screen so that the error can be corrected immediately.

〔発明の実施例〕Example of Invention

第2図は本発明を実施したマイクロコンピュータシステ
ムのシステム構成を表わしている。中央処理装置1は構
文チェッカーやテキストエディタなどのプログラムをロ
ーディングして実行する。キーボード2はオペレータが
中央処理装置1に対してコマンドやデータを入力する時
に使用する。ディスプレイ装置3及びプリンタ4は中央
処理装置1の処理結果を出力したり、オペレータとの問
い合わせに使用する。フロッピーディスク5はプログラ
ムやデータなどを格納・保管するために使用する。本シ
ステムにおいては、プログラムは通常フロッピーディス
ク5上に格納されており、必要に応じて中央処理装置1
上にローディングされ実行される。
FIG. 2 shows a system configuration of a microcomputer system embodying the present invention. The central processing unit 1 loads and executes a program such as a syntax checker or a text editor. The keyboard 2 is used when the operator inputs commands and data to the central processing unit 1. The display device 3 and the printer 4 output the processing result of the central processing unit 1 and use it for inquiries with the operator. The floppy disk 5 is used for storing and storing programs and data. In this system, the program is usually stored on the floppy disk 5, and if necessary, the central processing unit 1
Loaded on top and executed.

第1図は本発明を実現するためのデータフローを表わし
ている。以下、第1図と第2図を使用して本発明につい
て詳細に説明する。
FIG. 1 shows a data flow for realizing the present invention. Hereinafter, the present invention will be described in detail with reference to FIGS. 1 and 2.

オペレータがキーボード2から構文チェッカーを起動す
るコマンドを投入すると、フロッピーディスク5から構
文チェッカーのプログラムが中央処理装置1へローディ
ングされ実行される。構文チェッカー7はフロッピーデ
ィスク5から構文チェックを行うべきソースプログラム
6を入力し、構文チェック結果を人間の読める形で構文
チェック結果リスト8としてプリンタ4へ出力する。さ
らにテキストエディタにも入力できる形式で、構文チェ
ック結果中間コードファイル9をフロッピーディスク5
へも出力する。
When the operator inputs a command to start the syntax checker from the keyboard 2, the syntax checker program is loaded from the floppy disk 5 into the central processing unit 1 and executed. The syntax checker 7 inputs the source program 6 to be syntax checked from the floppy disk 5 and outputs the syntax check result to the printer 4 as a syntax check result list 8 in a human-readable form. You can also input the syntax check result intermediate code file 9 to a floppy disk 5 in a format that can also be input to a text editor.
Also output to.

構文チェッカーの実行終了後、オペレータがキーボード
2からテキストエディタを起動するコマンドを投入する
と、中央処理装置1からは構文チェッカーのプログラム
は抹消され、代ってテキストエディタのプログラムがフ
ロッピーディスク5から中央処理装置1へローディング
され実行される。
After the execution of the syntax checker, when the operator inputs a command for starting the text editor from the keyboard 2, the syntax checker program is deleted from the central processing unit 1, and instead the text editor program is centrally processed from the floppy disk 5. The device 1 is loaded and executed.

テキストエディタ10はフロッピディスク5から構文チェ
ックを終了したソースプログラム6を入力し、入力した
ソースプログラムの変更がキーボード2からの入力で自
由に行える状態となる。ここで、キーボード2から連動
処理コマンド11を投入すると、テキストエディタ10はフ
ロッピーディスク5から構文チェック結果中間コードフ
ァイル9を入力し、エラーメッセージ12をディスプレイ
装置3に表示し、ソースプログラムの構文エラー箇所の
周辺を画面表示すると共にエラー箇所にカーソルを位置
付ける。これにより、オペレータは構文エラーの場所と
種類を知る事ができ、さらにエラーの修正もその場で行
えることになる。表示されている構文エラーの修正が完
了した時点で再びキーボード2から連動処理コマンド11
を投入すると、次の構文エラーのエラーメッセージ12が
ディスプレイ装置3上に表示され、ソースプログラムの
新しい構文エラー箇所の周辺がディスプレイ装置3に表
示され、エラー箇所にカーソルが位置付けられ、エラー
の修正が可能となる。最終の構文エラーまでこの作業を
繰り返す事により、すべての構文エラーが修正できる。
最後に、修正の終了したソースファイル13は再びフロッ
ピーディスク5に格納される。
The text editor 10 inputs the source program 6 whose syntax check has been completed from the floppy disk 5, and the input source program can be freely changed by inputting from the keyboard 2. When the interlocking process command 11 is input from the keyboard 2, the text editor 10 inputs the syntax check result intermediate code file 9 from the floppy disk 5, displays the error message 12 on the display device 3, and displays the syntax error location of the source program. The area around is displayed on the screen and the cursor is positioned at the error location. This allows the operator to know the location and type of syntax error and also to correct the error on the spot. When correction of the displayed syntax error is completed, the linked processing command 11 is again sent from the keyboard 2.
Then, the error message 12 of the next syntax error is displayed on the display device 3, the area around the new syntax error position of the source program is displayed on the display device 3, the cursor is positioned at the error position, and the error is corrected. It will be possible. By repeating this process until the final syntax error, all syntax errors can be corrected.
Finally, the modified source file 13 is stored again in the floppy disk 5.

第3図は本発明を実現するための構文チェッカーの構造
図である。構文チェッカーは、構文チェックするソース
ファイルを入力する入力装置14と構文チェックを行う構
文解析装置15と構文チェックした結果を出力する出力装
置16から構成される。出力装置16は、構文チェック結果
リスト出力装置17だけではなく、本発明を実現するため
に、構文チェック結果中間コードファイル出力装置18も
含んでいる。なお、これらは実際には、第2図のシステ
ムを用いて構築される。
FIG. 3 is a structural diagram of a syntax checker for implementing the present invention. The syntax checker is composed of an input device 14 for inputting a source file for syntax check, a parser 15 for syntax check, and an output device 16 for outputting the result of syntax check. The output device 16 includes not only the syntax check result list output device 17 but also a syntax check result intermediate code file output device 18 for implementing the present invention. Note that these are actually constructed using the system of FIG.

第4図は本発明で採用した構文チェック結果中間コード
ファイル9のファイル形式の一例である。これは1レコ
ード4バイトの固定長形式で、19は構文エラーの発生し
たソースプログラムの行番号(2バイト)、20は構文エ
ラーの発生箇所のカラム位置(1バイト)、21は構文エ
ラーのメッセージ番号(1バイト)である。
FIG. 4 is an example of a file format of the syntax check result intermediate code file 9 adopted in the present invention. This is a fixed length format of 4 bytes per record, 19 is the line number (2 bytes) of the source program where the syntax error occurred, 20 is the column position (1 byte) where the syntax error occurred, and 21 is the message of the syntax error. It is a number (1 byte).

第5図は本発明を実現するためのテキストエディタの構
造図で、これも実際には第2図のシステムを用いて構築
される。コマンドはコマンド入力装置22により入力さ
れ、コマンド解析装置23により解析され、コマンド実行
装置24により実行される。連動処理コマンドはコマンド
処理装置24に含まれる連動処理コマンド実行装置25によ
り実行される。連動処理コマンド実行装置25は、構文チ
ェック結果中間コードファイル入力装置26と、構文エラ
ーメッセージを表示するエラーメッセージ表示装置27
と、構文エラー箇所の周辺のソースプログラムを表示す
る画面表示位置決定装置28、カーソルをエラー箇所にセ
ットするカーソル位置設定装置29から構成されている。
FIG. 5 is a structural diagram of a text editor for implementing the present invention, which is actually constructed using the system of FIG. The command is input by the command input device 22, analyzed by the command analysis device 23, and executed by the command execution device 24. The interlocked process command is executed by the interlocked process command execution device 25 included in the command processing device 24. The linked processing command execution device 25 includes a syntax check result intermediate code file input device 26 and an error message display device 27 that displays a syntax error message.
And a screen display position determining device 28 for displaying the source program around the syntax error location and a cursor position setting device 29 for setting the cursor at the error location.

第6図は第5図における連動処理コマンド実行装置25の
処理のアルゴリズムを表わしている。即ち、コマンド入
力装置22からコマンドが入力され、コマンド解析装置23
によって解析され、それが連動処理コマンドの場合は連
動処理コマンド実行装置25が起動される。するとまず、
第5図の構文チェック結果中間コードファイル入力装置
26に制御が渡され、中間コードファイルの状態によっ
て、ファイルのオープン、レコードの読み込みなどが行
われる。続いて、第5図のエラーメッセージ表示装置2
7、画面表示位置決定装置28、カーソル位置設定装置29
に逐次制御が渡され、エラーメッセージの表示、エラー
箇所の周辺のソースプログラムの表示、カーソルのエラ
ー発生箇所への位置付けが行われる。
FIG. 6 shows an algorithm of the process of the linked process command execution device 25 in FIG. That is, a command is input from the command input device 22 and the command analysis device 23
Is analyzed, and if it is a linked processing command, the linked processing command execution device 25 is activated. Then first,
Syntax check result intermediate code file input device of FIG.
The control is passed to 26, and the file is opened, the record is read, etc. depending on the state of the intermediate code file. Then, the error message display device 2 of FIG.
7, screen display position determination device 28, cursor position setting device 29
Sequential control is passed to, the error message is displayed, the source program around the error location is displayed, and the cursor is positioned at the error location.

〔発明の効果〕〔The invention's effect〕

本発明によれば、ソースプログラムを構文チェック後、
該構文チェック結果を人間が読める形式だけでなくテキ
ストエディタが入力・処理可能な中間コードの形式でフ
ァイルに出力し、テキストエディタに引きつぐことによ
り、オペレータが構文チェック結果リストを見る事な
く、テキストエディタが自動的にエラー箇所へのカーソ
ルの位置付けやエラーメッセージ等の表示を行う結果、
その場でエラーの修正を行うことができるので、構文チ
ェック結果リストの不要、構文エラーの修正時のオペレ
ータの負担の大幅軽減という効果がある。
According to the present invention, after syntax checking the source program,
The syntax check result is output to a file not only in a human-readable format but also in the form of an intermediate code that can be input / processed by a text editor, and is sent to a text editor so that the operator can view the text without checking the syntax check result list. As a result of the editor automatically positioning the cursor to the error location and displaying error messages,
Since the error can be corrected on the spot, there is an effect that the syntax check result list is unnecessary and the burden on the operator at the time of correcting the syntax error is significantly reduced.

また、ソースプログラムの構文チェック結果を中間コー
ド形式でファイルに出力することにより、ユーザが何時
でも該中間コード形式の構文チェックファイルを使用し
て修正でき、さらには任意の箇所まで修正し、残りは後
日修正するという融通性のある利用も可能になる。
Further, by outputting the syntax check result of the source program to the file in the intermediate code format, the user can use the syntax check file in the intermediate code format to make corrections at any time. It also allows for flexible use that can be modified at a later date.

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

第1図は本発明によるデータフローを示す図、第2図は
本発明を実施するマイクロコンピュータシステムの構成
図、第3図は第1図の構文チェッカーの構造図、第4図
は構文チェック結果中間コードファイルの内部形式を示
す図、第5図は第1図のテキストエディタの構造図、第
6図は第5図の連動処理コマンド実行装置の処理のアル
ゴリズムを表わした図である。 6……ソースプログラム、7……構文チェッカー、8…
…構文チェック結果リスト、9……構文チェック結果中
間ファイル、10……テキストエディタ、12……エラーメ
ッセージ表示。
1 is a diagram showing a data flow according to the present invention, FIG. 2 is a configuration diagram of a microcomputer system for implementing the present invention, FIG. 3 is a structural diagram of the syntax checker of FIG. 1, and FIG. 4 is a syntax check result. FIG. 5 is a diagram showing the internal format of the intermediate code file, FIG. 5 is a structural diagram of the text editor of FIG. 1, and FIG. 6 is a diagram showing an algorithm of the process of the interlocked process command execution device of FIG. 6 ... Source program, 7 ... Syntax checker, 8 ...
… Syntax check result list, 9 …… Syntax check result intermediate file, 10 …… Text editor, 12 …… Error message display.

フロントページの続き (56)参考文献 特開 昭56−110144(JP,A) 特開 昭59−11448(JP,A) 特開 昭59−22140(JP,A) 特開 昭57−100544(JP,A) 特開 昭59−83248(JP,A)Continuation of the front page (56) Reference JP-A-56-110144 (JP, A) JP-A-59-11448 (JP, A) JP-A-59-22140 (JP, A) JP-A-57-100544 (JP , A) JP 59-83248 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】ソースプログラムを入力して構文チェック
を行い、その結果を出力する構文チェッカーと、ソース
プログラムの修正処理を行うテキストエディタとの連動
方法であって、 前記構文チェッカーは構文チェック結果を前記テキスト
エディタが入力・処理可能な中間コード形式でファイル
に出力し、 前記テキストエディタは前記ファイルから前記中間コー
ド形式の構文チェック結果を入力して、エラー箇所への
カーソルの位置付けやエラーメッセージの表示を行う、 ことを特徴とする構文チェッカーとテキストエディタの
連動方法。
1. A method of interlocking a syntax checker for inputting a source program, performing a syntax check, and outputting the result, and a text editor for correcting a source program, wherein the syntax checker displays the result of the syntax check. The text editor outputs to a file in an intermediate code format that can be input / processed, and the text editor inputs the syntax check result of the intermediate code format from the file to position the cursor at an error location and display an error message. The method of interlocking a syntax checker and a text editor characterized by that.
JP59197356A 1984-09-20 1984-09-20 How to use the syntax checker and text editor Expired - Lifetime JPH07120285B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59197356A JPH07120285B2 (en) 1984-09-20 1984-09-20 How to use the syntax checker and text editor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59197356A JPH07120285B2 (en) 1984-09-20 1984-09-20 How to use the syntax checker and text editor

Publications (2)

Publication Number Publication Date
JPS6175435A JPS6175435A (en) 1986-04-17
JPH07120285B2 true JPH07120285B2 (en) 1995-12-20

Family

ID=16373122

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59197356A Expired - Lifetime JPH07120285B2 (en) 1984-09-20 1984-09-20 How to use the syntax checker and text editor

Country Status (1)

Country Link
JP (1) JPH07120285B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62272357A (en) * 1986-05-20 1987-11-26 Sharp Corp System for displaying error of input sentence in mechanical translating system
JPS63142439A (en) * 1986-12-04 1988-06-14 Pfu Ltd Processing system for displaying error state
JPS6467640A (en) * 1987-09-09 1989-03-14 Hitachi Electr Eng Program debugging system
JPH01106235A (en) * 1987-10-20 1989-04-24 Nec Corp Display system for error position in source program
JPH01161542A (en) * 1987-12-18 1989-06-26 Fujitsu Ltd Parenthesis retrieving system for full-screen editor
JP2601533B2 (en) * 1988-12-20 1997-04-16 株式会社ピーエフユー Data processing device
JP6019843B2 (en) * 2012-07-11 2016-11-02 富士通株式会社 Extended language specification information providing method, extended language specification information providing program, and compiling device
CN110413575A (en) * 2018-04-28 2019-11-05 广东亿迅科技有限公司 Document management householder method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56110144A (en) * 1980-02-06 1981-09-01 Hitachi Ltd Graphic indicator having error display function
JPS57100544A (en) * 1980-12-15 1982-06-22 Mitsubishi Electric Corp Debug device
JPS5911448A (en) * 1982-07-13 1984-01-21 Fujitsu Ltd Syntax check system of high-class language
JPS5922140A (en) * 1982-07-28 1984-02-04 Hitachi Ltd Interactive compiling system
US4617643A (en) * 1982-10-29 1986-10-14 Mattel, Inc. Syntax error correction method and apparatus

Also Published As

Publication number Publication date
JPS6175435A (en) 1986-04-17

Similar Documents

Publication Publication Date Title
JPH07120285B2 (en) How to use the syntax checker and text editor
JP3016217B2 (en) Image processing system that can play back operation history
JP2706558B2 (en) Ladder program editing method
JP2591938B2 (en) Method of modifying part program of numerical controller
JPH042961B2 (en)
JPH04155540A (en) Program correcting system by interactive debugger
JPS62235651A (en) Test data origination device
JPH0628170A (en) Program generating device
JP2972570B2 (en) Document creation device
JPH04155538A (en) Conversational debugger
JP2585513B2 (en) Management Modeling System Simulation System
JPH0264746A (en) Input/output control system in debugging system
JPS61285525A (en) Command input method
JPH0512953U (en) Small electronic calculator
JPH06250876A (en) Interactive debugging supporting system
JPH0317740A (en) Program editing support system
JPH03294927A (en) Screen editor for electronic computer
JPH04314135A (en) Error message displaying system
JPH0581005A (en) Program converter
JPH0683602A (en) Program development screen editor
JPH03245206A (en) Method and device for programming of industrial robot
JPS63278151A (en) Debugging device
JPH01270165A (en) Initial line setting processing system for picture type editor
JPH03144760A (en) Method for displaying error state in formation of screen definition body
JPS63640A (en) Execution control system for partial unit of data flow

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term