JPH0922346A - Compiler system - Google Patents

Compiler system

Info

Publication number
JPH0922346A
JPH0922346A JP7169819A JP16981995A JPH0922346A JP H0922346 A JPH0922346 A JP H0922346A JP 7169819 A JP7169819 A JP 7169819A JP 16981995 A JP16981995 A JP 16981995A JP H0922346 A JPH0922346 A JP H0922346A
Authority
JP
Japan
Prior art keywords
original source
source
error
precompilation
information
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.)
Withdrawn
Application number
JP7169819A
Other languages
Japanese (ja)
Inventor
Toshitaka Nagai
敏隆 永井
Yuichiro Tako
勇一郎 田幸
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP7169819A priority Critical patent/JPH0922346A/en
Publication of JPH0922346A publication Critical patent/JPH0922346A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To make the correction or the like easy by displaying original sources before and after precompiling when a translation error or a debugging error is generated by adding the position information of the original source to the precompiled original source as the line of notes and displaying positions corresponding to the original sources before and after precompiling according to the position information based on translation error information or debugging error information. SOLUTION: The compiler system is provided with a precompiler 2 for precompiling the original source and adding the position information of the original source, a compiler 4 for compiling the original source, to which the position information is added, and outputting the translation error information and an editor 7 for performing the display or the like of information at the relevant position of the original source before precompiling while referring to the original source, to which the position information is added, based on this outputted translation error information.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、原ソースのプレコンパ
イル時に位置情報を付加して翻訳エラー時あるいはデバ
ッグエラー時にこの位置情報を参照して原ソースの該当
エラー箇所を表示などするコンパイラシステムに関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a compiler system which adds position information at the time of pre-compilation of an original source and refers to this position information at the time of a translation error or a debug error to display the corresponding error portion of the original source. It is a thing.

【0002】[0002]

【従来の技術】従来、原ソースをプレコンパイラによっ
て例えば言語変換した後、コンパイラによってコンパイ
ルして実行形式プログラムを作成している。
2. Description of the Related Art Conventionally, an original source is converted into a language by, for example, a precompiler and then compiled by the compiler to create an executable program.

【0003】この一連の作業を行う場合、コンパイル時
に生じた翻訳エラー情報はコンパイラから出力される。
しかし、このコンパイラから出力された翻訳エラー情報
と、元の原ソース、特にプレコンパイラが言語変換して
いた場合には言語変換後の原ソースの翻訳エラー情報が
判明するのみで、言語変換前の原ソースのエラー箇所は
不明であり、利用者が対応付けを行うようにしていた。
When performing this series of operations, the translation error information generated during compilation is output from the compiler.
However, only the translation error information output from this compiler and the translation error information of the original source, especially if the precompiler has translated the language, will be known. The error location of the original source is unknown, and the user had to do the matching.

【0004】[0004]

【発明が解決しようとする課題】上述したように、原ソ
ースをプレコンパイラによって言語変換などを行った
後、コンパイラによってコンパイルするシステムの場
合、翻訳エラーが発生したときに言語変換後の原ソース
の箇所は容易に判るが、プレコンパイラによって言語変
換などする前の原ソースへの対応づけは利用者が行うし
かなく大変であるという問題があった。
As described above, in the case of a system in which the source is subjected to language conversion by the precompiler and then compiled by the compiler, when the translation error occurs, the source of the source after the language conversion is converted. Although the location can be easily known, there was a problem that the user had no choice but to associate with the original source before converting the language by the precompiler.

【0005】また、プレコンパイラによって言語変換し
た後の原ソースと、言語変換前の原ソースとの対応関係
を抽出してコンパイラに渡し、コンパイラが翻訳エラー
発生時に言語翻訳前の原ソースの対応箇所(対応する行
数や図形IDの位置、座標など)を見つけて表示などす
ることも考えられるが、このようにするには、既存のコ
ンパイラが使えなく、プレコンパイル前の原ソースの箇
所と、プレコンパイル後の原ソースの箇所との対応関係
情報を受け取る手段と、翻訳エラー時にプレコンパイル
前の原ソースの箇所を見つけるという手段などの複雑な
処理を付加しないと実現できないという問題があった。
このため、既存のコンパイラを変えることなく、プレコ
ンパイル後の原ソースをコンパイラがコンパイルしたと
きの翻訳エラー情報をもとにプレコンパイル前の原ソー
スの箇所を指摘することが望まれている。
Further, the correspondence between the original source after the language conversion by the precompiler and the original source before the language conversion is extracted and passed to the compiler, and when the translation error occurs, the compiler corresponds to the original source before the language translation. It is possible to find and display (corresponding number of lines, position of figure ID, coordinates, etc.), but in order to do so, the existing compiler cannot be used and the source source before precompilation and There was a problem that it could not be realized without adding complicated processing such as a means for receiving the correspondence information with the location of the source after precompilation and a means for finding the location of the source before precompilation when a translation error occurred.
Therefore, it is desired to point out the location of the source before precompilation based on the translation error information when the compiler compiles the source after precompilation without changing the existing compiler.

【0006】本発明は、これらの問題を解決するため、
プレコンパイル前の原ソースの位置情報をプレコンパイ
ル後の原ソースに注釈行などとして付加しておき、既存
のコンパイラによってコンパイルしたときの翻訳エラー
情報やデバッグしたときのエラー情報をもとに位置情報
に従いプレコンパイル後およびプレコンパイル前の原ソ
ースの対応する箇所を表示などし、翻訳エラーやデバッ
グエラー発生時にプレコンパイル後およびプレコンパイ
ル前の原ソースを表示して修正などを容易に可能にする
ことを目的としている。
[0006] The present invention solves these problems,
The position information of the original source before precompilation is added to the original source after precompilation as comment lines, and the position information is based on the translation error information when compiled by the existing compiler and the error information when debugged. According to the above, the corresponding parts of the original source before and after precompilation are displayed, and when a translation error or a debug error occurs, the original source after precompilation and before precompilation are displayed to enable easy correction. It is an object.

【0007】[0007]

【課題を解決するための手段】図1を参照して課題を解
決するための手段を説明する。図1において、原ソース
1は、プレコンパイルする対象の原ソースである。
Means for solving the problem will be described with reference to FIG. In FIG. 1, an original source 1 is an original source to be precompiled.

【0008】プレコンパイラ2は、原ソース1を言語変
換などのプレコンパイルするものである。原ソース3
は、プレコンパイルした後の原ソースである。
The precompiler 2 precompiles the original source 1 such as language conversion. Original source 3
Is the original source after precompiling.

【0009】コンパイラ4は、原ソース3をコンパイル
し、実行形式プログラム5を生成するものである。デバ
ッガ6は、実行形式プログラム5をデバッグするもので
ある。
The compiler 4 compiles the original source 3 to generate an executable program 5. The debugger 6 is for debugging the executable program 5.

【0010】エディタ7は、コンパイラ4からの翻訳時
のエラー一覧21やデバッガ6からのデバッグ時のエラ
ーをもとに、原ソース(プレコンパイル後)表示71や
原ソース(プレコンパイル前)表示72などしたりする
ものである。
The editor 7 displays an original source (after pre-compilation) display 71 and an original source (before pre-compilation) display 72 based on the error list 21 at the time of translation from the compiler 4 and the error at the time of debugging from the debugger 6. And so on.

【0011】[0011]

【作用】本発明は、図1に示すように、プレコンパイラ
2が原ソース(プレコンパイル前)1のプレコンパイル
を行うと共に原ソース(プレコンパイル前)1の位置情
報を付加して原ソース(プレコンパイル後)3を生成
し、コンパイラ4がコンパイルして実行形式プログラム
5を生成する。この際、翻訳エラーが発生した場合に
は、この翻訳エラー情報をもとにエラー一覧21を表示
すると共に、エディタ7がこのエラー一覧21から選択
されたエラー箇所について、原ソース(プレコンパイル
後)3に付加されている位置情報を参照して原ソース
(プレコンパイル前)1の該当位置の情報を表示するよ
うにしている。
According to the present invention, as shown in FIG. 1, the precompiler 2 precompiles the original source (before precompilation) 1 and adds the position information of the original source (before precompilation) 1 to the original source ( (After pre-compilation) 3 is generated, and the compiler 4 compiles to generate an executable program 5. At this time, when a translation error occurs, the error list 21 is displayed based on this translation error information, and the editor 7 selects the original source (after precompilation) for the error location selected from the error list 21. By referring to the position information added to 3, the information on the corresponding position of the original source (before precompilation) 1 is displayed.

【0012】また、コンパイラ4が生成した実行形式プ
ログラム5をデバッガ6がデバッグしてエラーが発生し
たときに、そのエラー情報をもとにエディタ7が原ソー
ス(プレコンパイル後)3のエラー箇所を表示すると共
に、当該原ソース(プレコンパイル後)3に付加されて
いる位置情報をもとに原ソース(プレコンパイル前)1
の該当箇所の情報を表示するようにしている。
When the debugger 6 debugs the executable program 5 generated by the compiler 4 and an error occurs, the editor 7 determines the error location of the original source (after precompilation) 3 based on the error information. The original source (before precompilation) 1 is displayed based on the position information added to the original source (after precompilation) 3
The information of the relevant part of is displayed.

【0013】これらの際に、原ソース(プレコンパイル
前)1の位置情報を、プレコンパイル後の原ソース(プ
レコンパイル後)3の注釈行として付加するようにして
いる。
In these cases, the position information of the original source (before precompilation) 1 is added as a comment line of the original source (after precompilation) 3 after precompilation.

【0014】また、エディタが翻訳エラー情報あるいは
デバッグエラー情報の一覧表示し、選択された箇所に対
応する上記プレコンパイル後の原ソース3の該当箇所を
強調表示した状態で、プレコンパイル後の原ソース3の
位置情報をもとにプレコンパイル前の原ソース1の該当
位置の情報を併せて表示するようにしている。
Further, the editor displays a list of translation error information or debug error information, and the relevant part of the pre-compiled original source 3 corresponding to the selected part is highlighted, and the pre-compiled original source is displayed. Based on the position information of 3, the information of the corresponding position of the original source 1 before precompilation is also displayed.

【0015】従って、プレコンパイル前の原ソース1の
位置情報をプレコンパイル後の原ソース3に注釈行など
として付加しておき、既存のコンパイラ4によってコン
パイルしたときの翻訳エラー情報あるいはデバッグした
ときのエラー情報をもとに位置情報に従いプレコンパイ
ル後およびプレコンパイル前の原ソース3、1の対応す
る箇所を表示などすることにより、翻訳エラーやデバッ
グエラー発生時にプレコンパイル後およびプレコンパイ
ル前の原ソース3、1を表示などして修正を簡易に行う
ことが可能となる。
Therefore, the position information of the original source 1 before precompilation is added to the original source 3 after precompilation as a comment line or the like, and translation error information when compiled by the existing compiler 4 or when debugged Based on the error information, the corresponding locations of the pre-compiled and pre-compiled original sources 3 and 1 are displayed according to the position information, so that when a translation error or debug error occurs, the pre-compiled and pre-compiled original sources It is possible to easily make corrections by displaying items 3 and 1.

【0016】[0016]

【実施例】次に、図1から図9を用いて本発明の実施例
の構成および動作を順次詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the construction and operation of an embodiment of the present invention will be described in detail with reference to FIGS.

【0017】図1は、本発明の1実施例構成図を示す。
図1において、原ソース1は、プレコンパイルする対象
の原ソースであって、例えば後述する図4の原ソース1
に示すようなものである。
FIG. 1 shows a block diagram of an embodiment of the present invention.
In FIG. 1, an original source 1 is an original source to be precompiled, and for example, the original source 1 of FIG. 4 described later.
As shown in.

【0018】プレコンパイラ2は、原ソース1を言語変
換や正当性のチェックなどを行い、原ソース(プレコン
パイル後)3である後述する図4の生成済テキスト22
を生成するものである。
The precompiler 2 performs language conversion and correctness check of the original source 1, and the original source (after precompilation) 3 is the generated text 22 in FIG. 4 to be described later.
Is generated.

【0019】原ソース3は、プレコンパイルした後の原
ソースであって、例えば後述する図4の生成済テキスト
22である。この原ソース3の注釈行には、原ソース1
の対応する位置情報が記述されている。この位置情報を
もとに原ソース(プレコンパイル後)3と原ソース(プ
レコンパイル前)1との対応付けを行うことが可能とな
る。
The original source 3 is the original source after pre-compilation, and is, for example, the generated text 22 in FIG. 4 described later. In the comment line of this original source 3, original source 1
The corresponding position information of is described. Based on this position information, the original source (after precompilation) 3 and the original source (before precompilation) 1 can be associated with each other.

【0020】コンパイラ4は、原ソース3をコンパイル
し、実行形式プログラム5を生成するものであって、翻
訳エラーが発生したときには翻訳エラー情報を出力する
ものである。
The compiler 4 compiles the original source 3 to generate the executable program 5, and outputs translation error information when a translation error occurs.

【0021】デバッガ6は、コンパイラ4によって生成
された実行形式プログラム5をデバッグするものであっ
て、デバッグエラーが発生したときにデバッグエラー情
報を出力するものである。
The debugger 6 debugs the executable program 5 generated by the compiler 4 and outputs debug error information when a debug error occurs.

【0022】エディタ7は、コンパイラ4からの翻訳時
のエラー一覧21やデバッガ6からのデバッグ時のエラ
ー情報をもとに、原ソース(プレコンパイル後)表示7
1や原ソース(プレコンパイル前)表示72などしたり
するものである。
The editor 7 displays the original source (after precompilation) 7 based on the error list 21 at the time of translation from the compiler 4 and the error information at the time of debugging from the debugger 6.
1 and original source (pre-compile) display 72, etc.

【0023】次に、図2のフローチャートに示す順序に
従い、図1の構成の動作を詳細に説明する。図2におい
て、S1は、利用者がコンパイルを指定する。
Next, the operation of the configuration of FIG. 1 will be described in detail according to the order shown in the flowchart of FIG. In FIG. 2, in step S1, the user specifies compilation.

【0024】S2は、プレコンパイル処理を行う。これ
は、コンパイル指定された原ソースについて ・複数の原ソースを1つにまとめる ・言語変換 ・正当性のチェック などのコンパイルに先立って必要な処理(プレコンパイ
ル処理)を行う。
In step S2, pre-compilation processing is performed. This is to perform the necessary processing (pre-compilation processing) for compilation of the original source for which compilation is specified-combining multiple original sources into one-language conversion-validity check.

【0025】S3は、コンパイラを起動する。S4は、
S3で起動されたコンパイラが翻訳を行い、エラーが発
生したか判別する。YESの場合には、S5以降の処理
を行う。NOの場合には、コンパイラが翻訳して実行形
式プログラム5の生成を完了したので、S11でテスト
実行(デバッグ)を行い、S12でエラー発生か判別
し、YESのときにS13でエラーメッセージを表示し
た後にS7に進み、一方、S12のNOのときに終了す
る。
In step S3, the compiler is activated. S4 is
The compiler started in S3 translates and determines whether an error has occurred. In the case of YES, the processing from S5 is performed. In the case of NO, since the compiler has translated and completed the generation of the executable program 5, test execution (debugging) is performed in S11, it is determined whether an error occurs in S12, and if YES, an error message is displayed in S13. After that, the process proceeds to S7, and when NO in S12, the process ends.

【0026】S5は、S4のYESで翻訳時にエラー発
生と判明したので、発生したエラーリスト(図1のエラ
ー一覧21)を表示する。例えば後述する図6の(a)
に示すようにエラー一覧を表示する。
In S5, since it has been determined that an error has occurred during translation in YES in S4, the error list that has occurred (error list 21 in FIG. 1) is displayed. For example, FIG. 6A described later.
Display the error list as shown in.

【0027】S6は、利用者がS5で表示されたエラー
一覧からエラー行をクリックして選択する。S7は、エ
ディタ7が生成後ソース(原ソース3)の該当行を表示
する。これは、利用者がエラー一覧から選択したエラー
行に該当する原ソース(プレコンパイル後)3の行を強
調表示する。
In step S6, the user selects an error line by clicking on the error line from the error list displayed in step S5. In S7, the editor 7 displays the relevant line of the source (original source 3) after being generated. This highlights the line of the original source (after precompilation) 3 corresponding to the error line selected by the user from the error list.

【0028】S8は、利用者が原ソース表示コマンドを
指示する。これは、S7で原ソース(プレコンパイル
後)3のエラーの発生した行について、原ソース(プレ
コンパイル前)1の該当するエラー発生した行を表示す
るように指示する。
In S8, the user gives an instruction for the original source display command. This instructs to display the line in which the error occurred in the original source (before precompilation) 1 for the line in which the error occurred in the original source (after precompilation) 3 in S7.

【0029】S9は、エディタ7が原ソース(プレコン
パイル前)1のエラー発生した行の情報を表示する(例
えば該当箇所の図形またはテキストを表示する)。S1
0は、利用者が原ソース(プレコンパイル前)1のエラ
ー箇所を修正する。そして、S1に戻り、繰り返す。
In step S9, the editor 7 displays the information of the line in which the error occurred in the original source (before pre-compilation) 1 (for example, the graphic or the text of the corresponding portion is displayed). S1
In 0, the user corrects the error part of the original source (before precompilation) 1. Then, the process returns to S1 and is repeated.

【0030】以上によって、利用者がコンパイル対象の
原ソース1を指定すると、プレコンパイラ2が複数の原
ソース(プレコンパイル前)1を1つにまとめたり、言
語変換したり、正当性チェックしたりして原ソース(プ
レコンパイル後)3を生成すると共に原ソース(プレコ
ンパイル前)1の位置情報を実行に影響を与えない注釈
行に付加する。この位置情報の付加された原ソース(プ
レコンパイル後)3についてコンパイラ4がコンパイル
し、翻訳エラーが発生したときにエラー一覧を表示して
利用者から選択されたエラー情報について、原ソース
(プレコンパイル後)3の該当する情報を表示する共
に、位置情報をもとに原ソース(プレコンパイル前)1
の該当する情報を併せて表示し、この情報を修正するよ
うにしている。また、コンパイラ4によって生成された
実行形式プログラム5をデバッガ6が実行し、エラー発
生したときにエラー発生した原ソース(プレコンパイル
後)3の該当する情報を表示すると共に、位置情報をも
とに原ソース(プレコンパイル前)1の該当する情報を
併せて表示し、この情報を修正するようにしている。こ
れらにより、コンパイル時の翻訳エラーやコンパイル後
のデバッグ時のエラーが発生したときに、原ソース(プ
レコンパイル前)1の該当する情報を簡易に表示し修正
することが可能となる。以下順次詳細に説明する。
As described above, when the user specifies the original source 1 to be compiled, the precompiler 2 collects a plurality of original sources (before precompilation) 1 into one, performs language conversion, and checks validity. Then, the original source (after pre-compilation) 3 is generated and the position information of the original source (before pre-compilation) 1 is added to the comment line that does not affect the execution. The compiler 4 compiles the original source 3 (after pre-compilation) to which this position information is added. When a translation error occurs, the error list is displayed and the error information selected by the user is the original source (pre-compiled). After) Display the corresponding information in 3 and also source source (before pre-compilation) 1 based on the position information.
Applicable information is also displayed together, and this information is corrected. Also, when the debugger 6 executes the executable program 5 generated by the compiler 4, and when the error occurs, the corresponding information of the original source (after pre-compilation) 3 in which the error occurs is displayed, and based on the position information. The relevant information of the original source (before pre-compilation) 1 is also displayed, and this information is modified. As a result, when a translation error at the time of compilation or an error at the time of debugging after compilation occurs, it is possible to easily display and correct the relevant information of the original source (before precompilation) 1. The details will be sequentially described below.

【0031】図3は、本発明のプレコンパイルのフロー
チャートを示す。図3において、S21は、原ソース
(プレコンパイル前)1のファイル名を出力する。これ
は、図2のS1で指定された、まとめようとする複数の
原ソース(プレコンパイル前)1のファイル名を出力、
例えば後述する図4の右側のの部分に示すように、フ
ァイル名を出力する。
FIG. 3 shows a flow chart of the precompilation of the present invention. In FIG. 3, S21 outputs the file name of the original source (before precompilation) 1. This outputs the file names of a plurality of original sources (before precompilation) 1 to be put together, designated in S1 of FIG.
For example, the file name is output as shown in the right part of FIG. 4 described later.

【0032】S22は、原ソース(プレコンパイル前)
1の位置情報を出力する。これは、後述する図4の右側
の★の注釈行に示すように、それぞれ原ソース(プレコ
ンパイル前)1の行番号や図IDを出力する(追加す
る)。これにより、原ソース(プレコンパイル後)3
(図4の生成済テキスト22)の行情報と、原ソース
(プレコンパイル前)1の行情報や図IDとの対応づけ
が完了したこととなる。
S22 is the original source (before precompilation)
The position information of 1 is output. This outputs (adds) the line number and the figure ID of the original source (before precompilation) 1, respectively, as indicated by the comment line marked * on the right side of FIG. 4 described later. As a result, the original source (after precompilation) 3
Correspondence between the line information of (generated text 22 in FIG. 4) and the line information of the original source (before precompilation) 1 and the figure ID is completed.

【0033】S23は、処理中の原ソースが、制御テキ
スト、項目仕様、あるいは部品テキストのいずれか判別
する。これは、図4の左側に示すように、原ソース(プ
レコンパイル前)1が制御テキスト、項目仕様、あるい
は部品テキストのいずれであるかを判別する。
In S23, it is determined whether the original source being processed is a control text, an item specification, or a parts text. This determines whether the original source (before precompilation) 1 is a control text, an item specification, or a component text, as shown on the left side of FIG.

【0034】S24は、S23で原ソース(プレコンパ
イル前)1が制御テキスト(原ソース(プレコンパイル
前)1のトップレベルのもの)と判明したので、プレコ
ンパイル処理1を行う(図4のに示すように、制御テ
キストを生成済テキスト22に入れる。
In S24, since the original source (before precompilation) 1 is found to be the control text (top level of the original source (before precompilation) 1) in S23, the precompilation processing 1 is performed (see FIG. 4). Put the control text into the generated text 22, as shown.

【0035】S25は、S23で原ソース(プレコンパ
イル前)1が項目仕様(組込で指定されたもの)と判明
したので、プレコンパイル処理2を行う(図4のに示
すように、項目仕様を生成済テキスト22に組み込む。
In S25, since the original source (before precompilation) 1 is found to be the item specification (specified by the incorporation) in S23, the precompile process 2 is performed (as shown in FIG. 4, item specification). Is incorporated into the generated text 22.

【0036】S26は、S23で原ソース(プレコンパ
イル前)1が部品テキスト(原ソース(プレコンパイル
前)1中に暗示的に引用されるもの)と判明したので、
プレコンパイル処理3を行う(図4のに示すように、
部品テキストを生成済テキスト22に入れる。
In S26, since the original source (before precompilation) 1 was found to be the part text (that is implicitly cited in the original source (before precompile) 1) in S23,
Perform the pre-compilation processing 3 (as shown by in FIG.
Put the part text in the generated text 22.

【0037】S27は、原ソース(プレコンパイル前)
1の切り替え処理を行う。これは、原ソース(プレコン
パイル前)1の切り替えとして、組み込みあるいは部品
の参照の処理に設定する。
S27 is the original source (before precompilation)
The switching process of 1 is performed. This is set as a process of embedding or referring to a component as switching of the original source (before precompilation) 1.

【0038】S28は、終了か判別する。YESの場合
には、全ての制御テキスト、項目仕様、および部品テキ
ストの処理および位置情報の付加が終了し、図4の生成
済テキスト(原ソース(プレコンパイル後)3)の作成
が完了したこととなる。一方、NOの場合には、S22
に戻り繰り返す。
In step S28, it is determined whether or not the process is completed. In the case of YES, processing of all control texts, item specifications, and part texts and addition of position information have been completed, and creation of the generated text (original source (after precompilation) 3) in FIG. 4 has been completed. Becomes On the other hand, if NO, S22
Return to and repeat.

【0039】以上によって、例えば図4の左側の制御テ
キスト、項目仕様、部品テキストなどをプレコンパイル
すると、右側の位置情報を付加した生成済テキスト(原
ソース(プレコンパイル後)3)が生成できたこととな
る。
As described above, for example, by precompiling the control text, item specifications, parts text, etc. on the left side of FIG. 4, the generated text (original source (after precompilation) 3) with position information on the right side generated. It will be.

【0040】図4は、本発明のプレコンパイルの概要を
説明する図を示す。図4において、左側は原ソース(プ
レコンパイル前)1を示し、右側は生成済テキスト(原
ソース(プレコンパイル後)3)を示す。生成済テキス
ト中の★は注釈行であって、原ソース(プレコンパイル
前)1の位置情報を付加したものである。両者の対応関
係を点線の矢印で示す。また、右側の、、、
は、図3の、、、の処理に対応する。
FIG. 4 is a diagram for explaining the outline of the precompilation of the present invention. In FIG. 4, the left side shows the original source (before precompilation) 1, and the right side shows the generated text (original source (after precompilation) 3). The star in the generated text is a comment line to which the position information of the original source (before precompilation) 1 is added. The correspondence between the two is shown by a dotted arrow. Also, on the right side ...
Corresponds to the processing of ,,, and in FIG.

【0041】図5は、本発明のエディタが原ソースを表
示する場合の処理フローチャートを示す。図5におい
て、S31は、カーソルを展開部分に移動する。これ
は、原ソース(プレコンパイル後)3をコンパイラ4が
コンパイルして翻訳エラーが発生し、その翻訳エラーの
一覧中から1つを選択して原ソース(プレコンパイル
後)3中の該当する展開部分(エラー箇所)に文字カー
ソルを移動する。例えば図6の(a)の翻訳エラー発生
時のエラーメッセージのうち、上段の “30 代入式の両辺の型が合っていません” を選択した場合、図6の(b)に示すように、原ソース
(プレコンパイル後)3の該当する箇所の“行番号3
0”のエントリにカーソルを移動する。
FIG. 5 shows a processing flowchart when the editor of the present invention displays the original source. In FIG. 5, S31 moves the cursor to the expanded portion. This is because the compiler 4 compiles the original source (after pre-compilation) 3 and a translation error occurs. Select one from the list of translation errors and select the corresponding expansion in the original source (after pre-compilation) 3. Move the character cursor to the part (error part). For example, in the error message when a translation error occurs in Fig. 6 (a), if you select "The types of both sides of the 30 assignment expression do not match" in the upper line, as shown in Fig. 6 (b), "Line number 3" at the corresponding part of the original source (after precompilation) 3
Move the cursor to the "0" entry.

【0042】S32は、「生成元の編集」処理を起動す
る。これは、S31で図6の(b)の“行番号30”の
エントリにカーソルを位置づけた状態で、「生成元の編
集」(図1のエディタ7)を起動し、S33以降の処理
を行う。
In step S32, the "edit source" process is activated. This is because in S31, the cursor is positioned at the entry of "line number 30" in FIG. 6B, the "edit source" (editor 7 in FIG. 1) is activated, and the processes from S33 are performed. .

【0043】S33は、現在のカーソルの位置から上へ
ソース情報を検索する。S34は、生成元のファイル名
を決定する。ソース情報"F2;項目仕様記述部:0001"と、
原ソース(プレコンパイル後)の先頭にあるファイル名
を比較し、ファイル名"F2;H:\ABC\SAMP2.CUD"を得る
(2行目)。
In step S33, the source information is searched upward from the current cursor position. In S34, the file name of the generation source is determined. Source information "F2; Item specification description part: 0001",
Compare the file names at the beginning of the original source (after precompilation) and get the file name "F2; H: \ ABC \ SAMP2.CUD" (2nd line).

【0044】S35は、生成元が存在したか判別する。
YESの場合には、S36に進む。図6の(b)の例で
はファイル名“F2;H:\ABC\SAMP2.CUD"が生成元として存
在するので、YESとなり、S36に進む。一方、NO
の場合には、生成元がないと判明したので、終了する。
In step S35, it is determined whether or not the origin is present.
In the case of YES, the process proceeds to S36. In the example of FIG. 6B, since the file name “F2; H: \ ABC \ SAMP2.CUD” exists as the generation source, YES is determined and the process proceeds to S36. On the other hand, NO
In the case of, it is determined that there is no generation source, and the process ends.

【0045】S36は、S35のYESで生成元が存在
すると判明したので、項目仕様からの展開か判別する。
YESの場合には、S37で項目仕様エディタを起動
し、S38で項目仕様を表示する。例えば図6の(b)
の場合には、ソース情報“F2;項目仕様記述部;0001"で
項目仕様と判明しYESとなるので、S37で項目仕様
エディタを起動し、図6の(c)に示すように、項目仕
様編集画面を表示し、その中に図6の(b)のエラー箇
所の対応するエントリを強調表示(ここでは、行番号0
001のエントリを強調表示)し、コンパイル時の翻訳
エラーの発生した原ソース(プレコンパイル前)1のエ
ラー箇所を表示する。これを見た利用者は翻訳エラー内
容をもとに修正、ここでは、代入式の両辺の型が合って
いないので、両辺の型を一致させるように修正する。一
方、S36のNOの場合には、S39に進む。
In S36, since it is determined that the generation source is present in YES in S35, it is determined whether the development is based on the item specification.
If YES, the item specification editor is activated in S37 and the item specifications are displayed in S38. For example, FIG. 6B
In the case of, the source information “F2; item specification description part; 0001” reveals that the item specification is YES, so that the item specification editor is started in S37, and as shown in (c) of FIG. The edit screen is displayed, and the entry corresponding to the error location in FIG. 6B is highlighted in the edit screen (here, line number 0
The entry of 001 is highlighted), and the error part of the original source (before precompilation) 1 in which a translation error at the time of compilation occurs is displayed. The user who sees this corrects based on the translation error content. Here, since the types of both sides of the assignment expression do not match, the types of both sides are corrected so that they match. On the other hand, if NO in S36, the process proceeds to S39.

【0046】S39は、部品テキストからの展開か判別
する。YESの場合には、S40で部品テキストエディ
タを起動し、S41で部品テキストを表示する(例えば
後述する図8に示すように、部品編集画面上に翻訳エラ
ーの発生した原ソース(プレコンパイル前)1)のエラ
ー箇所を表示する。これを見た利用者は翻訳エラー内容
をもとに修正する。一方、S39のNOの場合には、S
42に進む。
In step S39, it is determined whether the expansion is based on the part text. If YES, the component text editor is activated in S40, and the component text is displayed in S41 (for example, as shown in FIG. 8 described later, the original source in which a translation error has occurred (before precompilation). Display the error point in 1). The user who sees this corrects based on the translation error content. On the other hand, if NO in S39, S
Proceed to 42.

【0047】S42は、制御テキストエディタを起動す
る。続いてS43で制御テキストを表示する(例えば後
述する図9に示すように、制御テキスト画面上に翻訳エ
ラーの発生した原ソース(プレコンパイル前)1)のエ
ラー箇所、ここでは売上ファイルを強調表示する。これ
を見た利用者は翻訳エラー内容をもとに修正する。
In step S42, the control text editor is activated. Then, in S43, the control text is displayed (for example, as shown in FIG. 9 described later, the error location of the original source (before pre-compilation) 1 in which a translation error has occurred on the control text screen), here the sales file is highlighted. To do. The user who sees this corrects based on the translation error content.

【0048】以上によって、原ソース(プレコンパイル
後)3のコンパイル時に翻訳エラーが発生した場合、翻
訳エラー一覧を表示して選択されたエラーに対応する原
ソース(プレコンパイル後)3の部分にカーソルを移動
した後、このカーソル位置から上に検索してファイル名
を見つけ、このファイル名をもとに生成元が項目仕様、
部品テキスト、あるいは制御テキストのいずれかを判別
し、該当する原ソース(プレコンパイル前)1のエラー
発生箇所を画面上に表示する。これを見た利用者が翻訳
エラー情報をもとに容易に修正することが可能となる。
As described above, when a translation error occurs when compiling the original source (after precompilation) 3, the translation error list is displayed and the cursor is moved to the portion of the original source (after precompilation) 3 corresponding to the selected error. After moving, find the file name by searching upward from this cursor position, and the origin is the item specification based on this file name,
Either the part text or the control text is discriminated, and the error occurrence location of the corresponding original source (before precompilation) 1 is displayed on the screen. A user who sees this can easily correct the error based on the translation error information.

【0049】図6は、本発明のコンパイルエラー時の表
示例を示す。図6の(a)は、原ソース(プレコンパイ
ル後)3をコンパイルして翻訳エラーが発生したときに
表示するエラーメッセージ(エラー一覧)の例を示す。
ここでは、図示の下記のように表示する。
FIG. 6 shows a display example when a compile error occurs according to the present invention. FIG. 6A shows an example of an error message (error list) displayed when the original source (after precompilation) 3 is compiled and a translation error occurs.
Here, it is displayed as shown below.

【0050】H;\ABC\SAMP1.CAP 30 代入式の両辺の型が合っていません 54 項目名が未定義であす 第1行目はエラーの発生したファイル名を示す。第2行
および第3行が翻訳エラー情報を示す。先頭の数字は行
数である。
H; \ ABC \ SAMP1.CAP 30 The types on both sides of the assignment expression do not match 54 The item name is undefined The first line shows the file name where the error occurred. The second and third lines show the translation error information. The first number is the number of lines.

【0051】図6の(b)は、図6の(a)でエラー行
(30)をクリック(“30 代入式の両辺の型が合っていませ
ん”を選択)したことに対応して、原ソース(プレコン
パイル後)3の該当するエラー箇所にカーソルを移動さ
せて表示した例を示す。ここでは、行番号30のエント
リがエラー発生箇所である。
FIG. 6B shows an error line in FIG. 6A.
In response to clicking (30) ("Types on both sides of assignment expression do not match" selected), move the cursor to the corresponding error location in the original source (after precompilation) 3 and display. Here is an example. Here, the entry of line number 30 is the error occurrence location.

【0052】図6の(c)は、「原ソース表示」コマン
ドを指定(原ソース(プレコンパイル前)のエラー箇所
を表示するコマンドを選択)したこことに対応して、表
示された項目仕様編集画面およびエラー箇所0001のエン
トリを強調表示した例を示す(図5のS36のYES、
S37、S38で表示した例を示す)。
FIG. 6C shows the item specifications displayed in response to the designation of the "original source display" command (selecting the command for displaying the error part of the original source (before precompilation)). An example in which the edit screen and the entry of the error location 0001 are highlighted is shown (YES in S36 of FIG. 5,
The example displayed in S37 and S38 is shown).

【0053】図7は、本発明の実行エラー時の表示例を
示す。図7の(a)は、コンパイルした実行形式プログ
ラムのデバッグのために実行し、エラーが発生したとき
の表示の例を示す。ここでは、エラーが図示のエラー箇
所で発生した旨を表示する。
FIG. 7 shows a display example at the time of execution error of the present invention. FIG. 7A shows an example of a display when an error occurs when the compiled executable program is executed for debugging. Here, it is displayed that an error has occurred at the error location shown.

【0054】図7の(b)は、図7の(a)の編集ボタ
ンをクリックしたことに対応して、原ソース(プレコン
パイル後)3の該当するエラー箇所にカーソルを移動さ
せて表示した例を示す。
In FIG. 7B, the cursor is moved to the corresponding error location in the original source (after precompilation) 3 in response to clicking the edit button in FIG. Here is an example:

【0055】図7の(c)は、「原ソース表示」コマン
ドを指定(原ソース(プレコンパイル前)のエラー箇所
を表示するコマンドを選択)したこことに対応して、表
示された項目仕様編集画面およびエラー箇所0003のエン
トリを強調表示した例を示す。
FIG. 7C shows the item specifications displayed in response to the designation of the "original source display" command (selecting the command for displaying the error part of the original source (before precompilation)). An example in which the edit screen and the entry of the error location 0003 are highlighted is shown.

【0056】図8は、本発明の部品テキストでエラーが
あった場合の表示例を示す。これは、図7の(c)の項
目仕様編集画面に対応する部品編集画面である。ここで
は、原ソース(プレコンパイル前)1の行番号0008のエン
トリを強調表示して翻訳エラーが発生した旨を表示して
いる。
FIG. 8 shows a display example when there is an error in the component text of the present invention. This is a component edit screen corresponding to the item specification edit screen of FIG. 7C. Here, the entry at line number 0008 in the original source (before precompilation) 1 is highlighted to indicate that a translation error has occurred.

【0057】図9は、本発明の制御テキストでエラーが
あった場合の表示例を示す。これは、図7の(c)の項
目仕様編集画面に対応する制御テキスト画面である。こ
こでは、原ソース(プレコンパイル前)1の売上ファイル
を強調表示して翻訳エラーが発生した旨を表示してい
る。
FIG. 9 shows a display example when there is an error in the control text of the present invention. This is a control text screen corresponding to the item specification edit screen of FIG. 7C. Here, the sales file of the original source (before pre-compilation) 1 is highlighted to show that a translation error has occurred.

【0058】[0058]

【発明の効果】以上説明したように、本発明によれば、
プレコンパイル前の原ソース1の位置情報をプレコンパ
イル後の原ソース3に注釈行などとして付加しておき、
既存のコンパイラ4によってコンパイルしたときの翻訳
エラー情報あるいはデバッグしたときのエラー情報をも
とに位置情報に従いプレコンパイル後およびプレコンパ
イル前の原ソース3、1の対応する箇所を表示などする
構成を採用しているため、翻訳エラーやデバッグエラー
発生時にプレコンパイル後およびプレコンパイル前の原
ソース3、1を表示などし容易に修正することができ
る。これにより、プレコンパイラを使用するプログラム
開発システムの原ソースの修正やデバッグ時の修正を迅
速かつ効率的に行うことが可能となった。
As described above, according to the present invention,
The position information of the source 1 before precompilation is added to the source 3 after precompilation as a comment line,
Based on the translation error information when compiling with the existing compiler 4 or the error information when debugging, it adopts a configuration that displays the corresponding parts of the original sources 3 and 1 after precompilation and before precompilation according to the position information. Therefore, when a translation error or a debug error occurs, the original sources 3 and 1 after precompilation and before precompilation can be displayed and easily corrected. As a result, it has become possible to quickly and efficiently correct the original source of a program development system that uses a precompiler, and make corrections during debugging.

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

【図1】本発明のシステムブロック図である。FIG. 1 is a system block diagram of the present invention.

【図2】本発明の動作説明フローチャートである。FIG. 2 is a flowchart illustrating the operation of the present invention.

【図3】本発明のプレコンパイルのフローチャートであ
る。
FIG. 3 is a flowchart of precompilation of the present invention.

【図4】本発明のプレコンパイルの概要を説明する図で
ある。
FIG. 4 is a diagram illustrating an outline of precompilation of the present invention.

【図5】本発明のエディタが原ソースを表示する場合の
処理フローチャートである。
FIG. 5 is a processing flowchart when the editor of the present invention displays an original source.

【図6】本発明のコンパイルエラー時の表示例である。FIG. 6 is a display example when a compile error occurs according to the present invention.

【図7】本発明の実行エラー時の表示例である。FIG. 7 is a display example at the time of execution error of the present invention.

【図8】本発明の部品テキストでエラーがあった場合の
表示例である。
FIG. 8 is a display example when there is an error in the component text of the present invention.

【図9】本発明の制御テキストでエラーがあった場合の
表示例である。
FIG. 9 is a display example when there is an error in the control text of the present invention.

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

1:原ソース(プレコンパイル前) 2:プレコンパイラ 21:エラー一覧 3:原ソース(プレコンパイル後) 4:コンパイラ 5:実行形式プログラム 6:デバッガ 7:エディタ 71:原ソース(プレコンパイル後)表示 72:原ソース(プレコンパイル前)表示 1: Original source (before precompilation) 2: Precompiler 21: Error list 3: Original source (after precompilation) 4: Compiler 5: Executable program 6: Debugger 7: Editor 71: Original source (after precompilation) display 72: Display original source (before pre-compilation)

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】原ソースをプレコンパイルすると共に原ソ
ースの位置情報を付加するプレコパイラと、 上記位置情報の付加された原ソースをコンパイルすると
共に翻訳エラー情報を出力するコンパイラと、 この出力された翻訳エラー情報をもとに、上記位置情報
の付加された原ソースを参照してプレコンパイル前の原
ソースの該当位置の情報を表示などするエディタとを備
えたことを特徴とするコンパイラシステム。
1. A pre-copper that pre-compiles an original source and adds position information of the original source, a compiler that compiles the original source to which the position information is added and outputs translation error information, and the output translation A compiler system comprising: an editor for displaying information on a corresponding position of a source before precompilation by referring to the source added with the position information based on error information.
【請求項2】原ソースをプレコンパイルすると共に原ソ
ースの位置情報を付加するプレコパイラと、 上記位置情報の付加された原ソースをコンパイルするコ
ンパイラと、 このコンパイルされた実行形式プログラムをデバッグす
ると共にデバッグエラー情報を出力するデバッガと、 この出力されたデバッグエラー情報をもとに、上記位置
情報の付加された原ソースを参照してプレコンパイル前
の原ソースの該当位置の情報を表示などするエディタと
を備えたことを特徴とするコンパイラシステム。
2. A pre-copper for pre-compiling the original source and adding position information of the original source, a compiler for compiling the original source with the position information added, and a debug and debug of the compiled executable program. A debugger that outputs error information, and an editor that, based on this debug error information that is output, refers to the source source to which the above position information was added and displays the relevant position information of the source source before precompilation, etc. A compiler system characterized by having.
【請求項3】上記原ソースの位置情報を、プレコンパイ
ル後の原ソースの注釈行として付加したことを特徴とす
る請求項1あるいは請求項2記載のコンパイラシステ
ム。
3. The compiler system according to claim 1, wherein the position information of the original source is added as a comment line of the original source after precompilation.
【請求項4】上記エディタが翻訳エラー情報あるいはデ
バッグエラー情報の一覧表示し、選択された箇所に対応
する上記プレコンパイル後の原ソースの該当箇所を強調
表示した状態で、当該プレコンパイル後の原ソースの位
置情報をもとにプレコンパイル前の原ソースの該当位置
の情報を併せて表示することを特徴とする請求項1ない
し請求項3記載のいずれかのコンパイラシステム。
4. The precompiled source file after the precompiled source file is highlighted while the editor displays a list of translation error information or debug error information and the selected portion of the precompiled source source is highlighted. 4. The compiler system according to claim 1, wherein the information on the corresponding position of the original source before precompilation is also displayed based on the position information of the source.
JP7169819A 1995-07-05 1995-07-05 Compiler system Withdrawn JPH0922346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7169819A JPH0922346A (en) 1995-07-05 1995-07-05 Compiler system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7169819A JPH0922346A (en) 1995-07-05 1995-07-05 Compiler system

Publications (1)

Publication Number Publication Date
JPH0922346A true JPH0922346A (en) 1997-01-21

Family

ID=15893493

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7169819A Withdrawn JPH0922346A (en) 1995-07-05 1995-07-05 Compiler system

Country Status (1)

Country Link
JP (1) JPH0922346A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000259382A (en) * 1999-03-12 2000-09-22 Dainippon Screen Mfg Co Ltd Method and device for specifying abnormal file and storage medium for storing program for specifying abnormal file
JP2011175365A (en) * 2010-02-23 2011-09-08 Nec Corp Debugging device, debugging method, and debug processing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000259382A (en) * 1999-03-12 2000-09-22 Dainippon Screen Mfg Co Ltd Method and device for specifying abnormal file and storage medium for storing program for specifying abnormal file
JP2011175365A (en) * 2010-02-23 2011-09-08 Nec Corp Debugging device, debugging method, and debug processing program

Similar Documents

Publication Publication Date Title
US5048018A (en) Debugging parallel programs by serialization
JPH09198276A (en) Program debugging system
JP2000122886A (en) Program production system of semiconductor testing device
JP4242361B2 (en) Development support equipment
US6065035A (en) Method and system for procedure boundary detection
JPH0922346A (en) Compiler system
JP2006146955A (en) Development support device
JPS5922140A (en) Interactive compiling system
JP2006318504A (en) Control method of development support device
JPH10289123A (en) Optimization code debugging system
JPH1185536A (en) Device and method for automatically correcting error of source program
JP2672968B2 (en) Source list output processing method for debugging
JPH07261992A (en) Program converting and editing method and program converting and editing device
JPH03144832A (en) Symbolic debugging device for precompiler language program
JPH04367946A (en) Debug information output system
JP3584204B2 (en) Automatic source program converter
JP3063297B2 (en) Language processing program creation device
JP2812302B2 (en) Program development equipment
KARAPATEAS RETARGETING AN ASSEMBLY OPTIMIZER FOR THE MIPS/SCALE ASSEMBLY
JP2000132405A (en) In-line expansion processing device and method
JP2607975B2 (en) Debug method
JPH10133883A (en) Compile system
JP3218998B2 (en) Automatic program synthesizer
JPH0954696A (en) Program generating method and translator, compiler and execution-time library
JPH0546434A (en) Program debugging system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20021001