[go: up one dir, main page]

JPH04317134A - Compiler grammar diagnosis message list output method - Google Patents

Compiler grammar diagnosis message list output method

Info

Publication number
JPH04317134A
JPH04317134A JP3084941A JP8494191A JPH04317134A JP H04317134 A JPH04317134 A JP H04317134A JP 3084941 A JP3084941 A JP 3084941A JP 8494191 A JP8494191 A JP 8494191A JP H04317134 A JPH04317134 A JP H04317134A
Authority
JP
Japan
Prior art keywords
error
message
grammar
compiler
output
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
JP3084941A
Other languages
Japanese (ja)
Inventor
Naritaka Kitou
整敬 木藤
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.)
NEC Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP3084941A priority Critical patent/JPH04317134A/en
Publication of JPH04317134A publication Critical patent/JPH04317134A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はコンパイラの文法診断メ
ッセージリスト出力方式に関し、特に、コンパイラの翻
訳リスト出力に対して、エラーメッセージ出力方式に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a compiler grammar diagnosis message list output method, and more particularly to an error message output method for compiler translation list output.

【0002】0002

【従来の技術】コンパイラの翻訳リストの出力方式は、
文法診断メッセージをソース上のエラー個所に挿入する
方式と、翻訳リストの最後にエラーのある行番号が出力
され、各々の行に対するエラー番号がその横に出力され
、次のページにエラーメッセージ本文がまとめて出力さ
れる方式が存在する。
[Background Art] The compiler's translation list output method is as follows:
A grammar diagnosis message is inserted at the error location on the source, the line number with the error is output at the end of the translation list, the error number for each line is output next to it, and the error message text is displayed on the next page. There is a method that outputs them all at once.

【0003】0003

【発明が解決しようとする課題】従来の文法診断メッセ
ージ出力方式では、文法診断メッセージをソース上のエ
ラー個所に挿入する方式では、同一のエラーが複数行に
あった場合、その数だけメッセージ本文が出力されるこ
とになり、経済的でない。
[Problem to be Solved by the Invention] In the conventional grammar diagnosis message output method, in which a grammar diagnosis message is inserted at an error location on the source, if the same error occurs in multiple lines, the message body is This is not economical as it will result in output.

【0004】また、エラー行番号とエラーメッセージ本
文を翻訳リストの最後にまとめて出力する方式では、エ
ラーを修正する場合、修正したいエラーメッセージの番
号から、そのエラーが検出されている行番号を目視で捜
しながら修正しなければならず、とくに、エラーが多く
あるとページをまたがってエラーの行番号を捜さなけれ
ばならず、効率が悪いという問題がある。
[0004] In addition, with the method of outputting the error line number and error message text together at the end of the translation list, when correcting an error, visually check the line number where the error is detected from the number of the error message you want to correct. In particular, if there are many errors, it is necessary to search across pages for the line number of the error, which is inefficient.

【0005】[0005]

【課題を解決するための手段】本発明のコンパイラの文
法診断メッセージリスト出力方式は、コンパイラの翻訳
リスト出力に対して、文法診断メッセージの出力におい
て、文法診断でエラーが検出されたとき、エラーメッセ
ージ番号とエラー行番号を保存するエラーメッセージ番
号/エラー行番号登録手段と、すべての診断終了後、文
法診断時に保存されたエラーメッセージ番号に対応した
エラーメッセージ本文をメッセージ格納ファイルから捜
し、エラーメッセージ本文とエラー行番号を、続けて出
力するように出力用バッファ上に格納してリスト上に出
力するリスト出力手段とを有することを特徴とする。
[Means for Solving the Problems] The grammar diagnosis message list output method of the compiler of the present invention provides an error message when an error is detected in the grammar diagnosis in the output of the grammar diagnosis message for the compiler's translation list output. An error message number/error line number registration means that saves the number and error line number, and after all diagnostics are completed, the error message body corresponding to the error message number saved during grammar diagnosis is searched from the message storage file, and the error message body is stored. and a list output means for storing the error line numbers on an output buffer and outputting them on a list so as to output them successively.

【0006】[0006]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be explained with reference to the drawings.

【0007】図1は本発明の一実施例の機能ブロック図
である。この実施例は、コンパイラに入力される原始プ
ログラム1と、制御部2と、エラーメッセージ格納ファ
イル3と、エラーメッセージ番号/エラー行番号格納領
域4と、コンパイラから出力される翻訳リスト5から構
成される。
FIG. 1 is a functional block diagram of an embodiment of the present invention. This embodiment consists of a source program 1 input to the compiler, a control section 2, an error message storage file 3, an error message number/error line number storage area 4, and a translation list 5 output from the compiler. Ru.

【0008】エラーメッセージ番号/エラー行番号登録
手段22は、入力された原始プログラム1に対して文法
診断21を行ない、エラーが検出されるとエラーメッセ
ージ番号をエラーメッセージ番号/エラー行番号格納領
域4に格納し、その後に続けてエラー行番号を格納する
The error message number/error line number registration means 22 performs a grammar diagnosis 21 on the input source program 1, and when an error is detected, the error message number is stored in the error message number/error line number storage area 4. , followed by the error line number.

【0009】リスト出力手段23は、すべての診断終了
後エラーメッセージ番号/エラー行番号格納領域4に格
納されているエラーメッセージ番号に対して検索を行な
い、同一エラー番号があれば、それに添付されているエ
ラー行番号を1つにまとめるように編集する。そして、
エラー番号に対応したエラーメッセージ本文を、エラー
メッセージ格納ファイル3から捜して、エラーメッセー
ジ番号、エラー行番号とともに出力用バッファにセット
する。
The list output means 23 searches the error message numbers stored in the error message number/error line number storage area 4 after all the diagnoses are completed, and if there is the same error number, the list output means 23 searches for the error message numbers stored in the error message number/error line number storage area 4, and if there is an identical error number, the list output means 23 searches for the error message numbers stored in the error message number/error line number storage area 4. Edit the error line numbers so that they are all in one line. and,
The error message body corresponding to the error number is searched from the error message storage file 3 and set in the output buffer together with the error message number and error line number.

【0010】図2は、コンパイラ翻訳リストのエラーメ
ッセージ出力の例を示す。
FIG. 2 shows an example of an error message output from a compiler translation list.

【0011】[0011]

【発明の効果】以上説明したように、本発明は、コンパ
イラ翻訳リストのエラーメッセージ出力に対して、エラ
ーメッセージ本文と、エラー行番号を並べて出力するこ
とにより、エラーの修正効率の向上と、出力リスト量が
削減される効果を奏する。
[Effects of the Invention] As explained above, the present invention improves error correction efficiency and outputs the error message text and error line numbers side by side in response to the error message output of the compiler translation list. This has the effect of reducing the list size.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の一実施例の機能ブロック図である。FIG. 1 is a functional block diagram of an embodiment of the present invention.

【図2】図1の実施例におけるコンパイラ翻訳リストを
例示する図である。
FIG. 2 is a diagram illustrating a compiler translation list in the embodiment of FIG. 1;

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

1    原始プログラム 2    制御部 3    エラーメッセージ格納ファイル4    エ
ラーメッセージ番号/エラー行番号格納領域5    
翻訳リスト 21    文法診断 22    エラーメッセージ番号/エラー行番号登録
手段23    リスト出力手段
1 Source program 2 Control unit 3 Error message storage file 4 Error message number/error line number storage area 5
Translation list 21 Grammar diagnosis 22 Error message number/error line number registration means 23 List output means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  コンパイラの翻訳リスト出力に対して
、文法診断メッセージの出力において、文法診断でエラ
ーが検出されたとき、エラーメッセージ番号とエラー行
番号を保存するエラーメッセージ番号/エラー行番号登
録手段と、すべての診断終了後、文法診断時に保存され
たエラーメッセージ番号に対応したエラーメッセージ本
文をメッセージ格納ファイルから捜し、エラーメッセー
ジ本文とエラー行番号を、続けて出力するように出力用
バッファ上に格納してリスト上に出力するリスト出力手
段とを有することを特徴とするコンパイラの文法診断メ
ッセージリスト出力方式。
Claim 1: Error message number/error line number registration means for storing an error message number and error line number when an error is detected in grammar diagnosis in the output of a grammar diagnosis message with respect to the translation list output of a compiler. After all the diagnostics are completed, search the message storage file for the error message text corresponding to the error message number saved during grammar diagnosis, and write the error message text and error line number onto the output buffer so that they are output successively. 1. A grammar diagnostic message list output method for a compiler, comprising a list output means for storing and outputting the message on a list.
JP3084941A 1991-04-17 1991-04-17 Compiler grammar diagnosis message list output method Pending JPH04317134A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3084941A JPH04317134A (en) 1991-04-17 1991-04-17 Compiler grammar diagnosis message list output method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3084941A JPH04317134A (en) 1991-04-17 1991-04-17 Compiler grammar diagnosis message list output method

Publications (1)

Publication Number Publication Date
JPH04317134A true JPH04317134A (en) 1992-11-09

Family

ID=13844682

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3084941A Pending JPH04317134A (en) 1991-04-17 1991-04-17 Compiler grammar diagnosis message list output method

Country Status (1)

Country Link
JP (1) JPH04317134A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7810081B2 (en) 2006-08-22 2010-10-05 International Business Machines Corporation Compilation error isolation, optimization and resolution

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7810081B2 (en) 2006-08-22 2010-10-05 International Business Machines Corporation Compilation error isolation, optimization and resolution

Similar Documents

Publication Publication Date Title
CN112346918B (en) Method for assisting waveform debug in chip verification and application
JPH04317134A (en) Compiler grammar diagnosis message list output method
JPH01307832A (en) Compiler source program syntax error automatic correction method
JPH05297911A (en) Sequence control circuit for sequence controller
JPS585846A (en) Instruction processing system
JPS58143500A (en) Storage device available for interleaving
JPS63273132A (en) Program development support system
JP2758768B2 (en) Redundant storage device
JPS6168631A (en) Document printing processing method
JPS63261422A (en) string matching device
JPH058646U (en) Memory device
JPH0567035A (en) Data alignment method in DMA transfer
JPS6378265A (en) Process controlling system
JPH0423134A (en) Program loading system
JPH0498322A (en) Generation method for compiler
JPS58175054A (en) Data search method
JPH01234931A (en) Relational database projection processing method
JPH02232731A (en) Data evaluating system
JPS62206632A (en) Main storage control method
JPS6134588A (en) Image memory control circuit
JPS6385940A (en) Testing system for information processor
JPS63136133A (en) Information processing circuit
JPH01303549A (en) Memory
JPH02150906A (en) numerical control device
JPS6227834A (en) Compiling list output system