JPH0548491B2 - - Google Patents
Info
- Publication number
- JPH0548491B2 JPH0548491B2 JP60147856A JP14785685A JPH0548491B2 JP H0548491 B2 JPH0548491 B2 JP H0548491B2 JP 60147856 A JP60147856 A JP 60147856A JP 14785685 A JP14785685 A JP 14785685A JP H0548491 B2 JPH0548491 B2 JP H0548491B2
- Authority
- JP
- Japan
- Prior art keywords
- source program
- output
- language
- unconverted
- compiler
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
- Devices For Executing Special Programs (AREA)
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は言語翻訳システムのソースプログラム
行番号処理システムに関し、特に前段に前処理シ
ステム(プリプロセツサ)を持つ言語処理システ
ムにおけるソースプログラム行番号処理方法に関
する。[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a source program line number processing system for a language translation system, and more particularly to a source program line number processing method in a language processing system having a preprocessor at the front stage. Regarding.
従来の言語翻訳システム(コンパイラ)の前段
にプリプロセツサを用意して、コンパイラ言語の
機能を拡張する方式が広く行われている。その方
式はプリプロセツサが、入力ソースプログラムか
ら、後段のコンパイラが処理可能な出力ソースプ
ログラムを生成する事によつて行うが、コンパイ
ラが持つ各種の機能(構文解析結果表示、オブジ
エクト生成結果表示等)は出力ソースプログラム
に対して機能していた。
A widely used method is to provide a preprocessor before a conventional language translation system (compiler) to extend the functionality of the compiler language. In this method, a preprocessor generates an output source program from an input source program that can be processed by a subsequent compiler, but the compiler's various functions (syntax analysis result display, object generation result display, etc.) It worked for output source programs.
上述した従来のソースプログラムの行番号処理
方式では、コンパイラの各種機能が、コンパイラ
の入力行(プリプロセツサの出力ソースプログラ
ム行)に対して働くので、コンパイラが特定の入
力行を示す為に表示する行番号はプリプロセツサ
が生成した出力ソースプログラムの行番号であ
る。すなわち、利用者はプリプロセツサがいかな
る形式で出力ソースプログラムを生成したか知ら
ないと十分なプログラムの解決が不可能である為
に入力ソースプログラムリストと同時に出力ソー
スプログラムリストを見なければならないか、入
力ソースプログラムと出力ソースプログラムの行
番号対応表が必要となるという欠点がある。
In the conventional source program line number processing method described above, various compiler functions operate on compiler input lines (preprocessor output source program lines), so the compiler displays lines to indicate specific input lines. The number is the line number of the output source program generated by the preprocessor. In other words, if the user does not know in what format the preprocessor has generated the output source program, it is impossible to solve the program satisfactorily. This method has the disadvantage that a line number correspondence table between the source program and the output source program is required.
たとえば、その一例としては次のような欠点が
ある。すなわち、プリプロセツサが検知できない
プログラムの記述誤りをコンパイラが検知した
際、コンパイラはあくまでも出力ソースプログラ
ムの当該行に対してエラーメツセージを出力する
ので、エラーメツセージに付随して出力される行
番号では、入力ソースプログラムのどこにエラー
があつたかを、直接利用者は知る事はできない。 For example, it has the following drawbacks: In other words, when the compiler detects a program description error that cannot be detected by the preprocessor, the compiler only outputs an error message for the relevant line in the output source program. The user cannot directly know where the error occurred in the source program.
本発明の言語翻訳システムのソースプログラム
行番号処理方法は、コンパイラ言語等の言語翻訳
システムと、該言語翻訳システムの前段にサブプ
ロセツサ等の前処理システムとを用意し、前記コ
ンパイラ言語より機能の高い言語を処理し得る言
語処理システムにおいて、前記前処理システムに
は出力ソースプログラム内に無変換の入力ソース
プログラム行を混入する手順を含み、かつ前記言
語翻訳システムには無変換の入力ソースプログラ
ムか、変換後の出力ソースプログラム行かを判別
する手順と、変換後のソースプログラムの記述誤
りを検査する構文解析手順と、該構文解析手順よ
り送出されるエラー信号により前記判別手順から
渡される無変換ソースプログラムの行に対してエ
ラーリストを出力するエラーリスト出力手順とを
含んで構成されている。
The source program line number processing method of the language translation system of the present invention includes a language translation system such as a compiler language, and a preprocessing system such as a subprocessor at the front stage of the language translation system. In a language processing system capable of processing an unconverted input source program, the preprocessing system includes a step of mixing an unconverted input source program line into an output source program, and the language translation system includes an unconverted input source program or a converted input source program line. A procedure for determining subsequent output source program lines, a syntax analysis procedure for checking for writing errors in the source program after conversion, and an error signal sent from the syntax analysis procedure for the unconverted source program passed from the determination procedure. The method includes an error list output procedure for outputting an error list for each row.
次に、本発明の実施例について図面を参照して
説明する。
Next, embodiments of the present invention will be described with reference to the drawings.
第1図は本発明の一実施例を示し、第2図はソ
ースリストおよびエラーリストを示す。第1図に
おいて、本実施例の処理方式はコンパイラ言語等
の言語翻訳システム(コンパイラ)20と、この
コンパイラ20の前段に設けた前処理システム
(プリプロセツサ)10とを有する言語処理シス
テムで、プリプロセツサに、出力ソースプログラ
ム内に入力ソースプログラム行をそのまま変換せ
ずに混入してコンパイラに渡す手段、コンパイラ
に、出力ソースプログラム中において入力ソース
プログラム行か変換された結果の出力ソースプロ
グラム行かを判別する手段、ならびに各出力ソー
スプログラム行に識別フラグを新たに設ける手段
を有する。 FIG. 1 shows an embodiment of the invention, and FIG. 2 shows a source list and an error list. In FIG. 1, the processing method of this embodiment is a language processing system having a language translation system (compiler) 20 such as a compiler language, and a preprocessing system (preprocessor) 10 provided before the compiler 20. , means for inserting the input source program lines into the output source program without converting them and passing them to the compiler; means for the compiler to determine the input source program lines and the converted output source program lines in the output source program; It also has means for newly providing an identification flag for each output source program line.
プリプロセツサ10は入力ソースプログラム1
1を読み取り、無変換ソースプログラム13と変
換ソースプログラムを出力するソースプログラム
読取部12と、読取部12に接続されるソースプ
ログラム変換部14と、読取部12とソースプロ
グラム変換部14とに接続され入力ソースプログ
ラムのリスト16を出力するソースリスト出力部
15と、ソースプログラム変換部14に接続さ
れ、変換された結果の変換後ソースプログラム1
7と、無変換ソースプログラム13とを併合し、
識別フラグを付けた出力ソースプログラム19を
出力するソースプログラム併合出力部18とから
構成されている。出力ソースプログラム19は識
別フラグの付いた出力ソースプログラムで、コン
パイラ20に供給される。 The preprocessor 10 is an input source program 1
a source program reading section 12 that reads 1 and outputs an unconverted source program 13 and a converted source program; a source program converting section 14 connected to the reading section 12; A source list output unit 15 that outputs a list 16 of input source programs, and a converted source program 1 that is connected to the source program conversion unit 14 and that is a converted result.
7 and the unconverted source program 13,
and a source program merging output section 18 that outputs an output source program 19 with an identification flag attached. The output source program 19 is an output source program with an identification flag attached, and is supplied to the compiler 20.
コンパイラ20は出力ソースプログラムを読み
取るソースプログラム読取部21と、この読取部
21に接続され、出力ソースプログラム19が無
変換ソースプログラム行か変換後ソースプログラ
ム行かを識別する識別フラグ判別部22と、この
識別フラグ判別部22に接続され、記述誤りを検
査する構文解析部23と、構文解析結果をエラー
リスト28として出力するエラーリスト出力部2
4と、構文解接部23に接続されるオブジエクト
生成部25と、オブジエクトプログラム27を出
力するオブジエクト出力部26とから構成されて
いる。 The compiler 20 includes a source program reading section 21 for reading an output source program, an identification flag determining section 22 connected to this reading section 21, and for identifying an unconverted source program line or a converted source program line for the output source program 19; A syntax analysis section 23 that is connected to the flag determination section 22 and checks for description errors, and an error list output section 2 that outputs the syntax analysis results as an error list 28.
4, an object generation section 25 connected to the syntax dissection section 23, and an object output section 26 that outputs an object program 27.
以下本実施例の動作について説明する。 The operation of this embodiment will be explained below.
入力ソースプログラム11は、サブプロセツサ
10のソースプログラム読取部12により読み取
られる。ソースプログラム読取部12は、無変換
ソースプログラム13を出力すると共にソースプ
ログラムをソースプログラム変換部14とソース
リスト出力部15に渡す。ソースプログラム変換
部14は入力ソースプログラムを後段のコンパイ
ラ20が処理可能な形式に変換して、このソース
プログラム17を出力する。 The input source program 11 is read by the source program reading section 12 of the sub-processor 10. The source program reading section 12 outputs the unconverted source program 13 and passes the source program to the source program converting section 14 and the source list output section 15. The source program conversion unit 14 converts the input source program into a format that can be processed by the compiler 20 at the subsequent stage, and outputs this source program 17.
ソースリスト出力部15は、入力ソースプログ
ラムのソースリスト16を第2図に示す形式で出
力する。ソースプログラム併合出力部18は無変
換ソースプログラム13と変換後の行の先頭に識
別フラグを付けたソースプログラム17を互い違
いに順番に併合し、識別フラグ付き出力ソースプ
ログラム19として出力する。 The source list output unit 15 outputs a source list 16 of the input source program in the format shown in FIG. The source program merging output unit 18 alternately merges the unconverted source program 13 and the source program 17 with an identification flag attached to the beginning of the converted line in order, and outputs it as an output source program 19 with an identification flag.
出力ソースプログラム19のソースプログラム
はコンパイラ20のソースプログラム読取部21
によつて読み取られ、更に識別フラグ判別部22
によつて無変換ソースプログラムと変換後ソース
プログラムに分類される。変換後ソースプログラ
ムは構文解析部23により記述誤りが検査され
る。エラーリスト出力部24は構文解析部23に
より送出されるエラー信号により、識別フラグ判
別部22から渡される無変換ソースプログラムの
行に対してエラーリスト28を第2図に示す形式
で出力する、構文解析結果はオブジエクト生成部
25によつてオブジエクトプログラムに変換さ
れ、オブジエクト出力部26を介してオブジエク
トプログラム27として出力される。 The source program of the output source program 19 is read by the source program reading section 21 of the compiler 20.
is read by the identification flag discriminator 22.
They are classified into unconverted source programs and converted source programs. The converted source program is checked for writing errors by the syntax analysis unit 23. The error list output unit 24 uses the error signal sent by the syntax analysis unit 23 to output an error list 28 in the format shown in FIG. 2 for the lines of the unconverted source program passed from the identification flag determination unit 22. The analysis result is converted into an object program by the object generation section 25 and outputted as an object program 27 via the object output section 26.
以上説明したように本発明は、コンパイラが処
理する行番号を入力ソースプログラム行番号とす
ることにより、コンパイラの出力するエラーリス
トに無変換ソースプログラムとエラーメツセージ
を出力させるようにする事ができ、利用者がプリ
プロセツサの変換処理を意識する必要がなくな
り、プログラムの解析の効率が向上する効果があ
る。
As explained above, in the present invention, by setting the line number processed by the compiler as the input source program line number, it is possible to output an unconverted source program and an error message in the error list output by the compiler. This eliminates the need for the user to be aware of the preprocessor's conversion processing, and has the effect of improving the efficiency of program analysis.
第1図は本発明の一実施例を示す構成図、第2
図は本実施例におけるソースリストおよびエラー
リストを示す図である。
10……前処理システム(サブプロセツサ)、
11……入力ソースプログラム、12……ソース
プログラム読取部、13……無変換ソースプログ
ラム、14……ソースプログラム変換部、15…
…ソースリスト出力部、16……ソースリスト、
17……変換後ソースプログラム、18……ソー
スプログラム併合出力部、19……出力ソースプ
ログラム、20……言語翻訳システム、21……
ソースプログラム読取部、22……識別フラグ判
別部、23……構文解析部、24……エラーリス
ト出力部、25……オブジエクト生成部、26…
…オブジエクト出力部、27……オブジエクトプ
ログラム、28……エラーリスト。
FIG. 1 is a configuration diagram showing one embodiment of the present invention, and FIG.
The figure is a diagram showing a source list and an error list in this embodiment. 10... Preprocessing system (subprocessor),
11... Input source program, 12... Source program reading section, 13... Non-conversion source program, 14... Source program converting section, 15...
...Source list output section, 16...Source list,
17... Source program after conversion, 18... Source program merging output unit, 19... Output source program, 20... Language translation system, 21...
Source program reading unit, 22...Identification flag determination unit, 23...Syntax analysis unit, 24...Error list output unit, 25...Object generation unit, 26...
...object output section, 27...object program, 28...error list.
Claims (1)
言語翻訳システムの前段にサブプロセツサ等の前
処理システムとを用意し、前記コンパイラ言語よ
り機能の高い言語を処理し得る言語処理システム
において、前記前処理システムには出力ソースプ
ログラム内に無変換の入力ソースプログラム行を
混入する手順を含み、かつ前記言語翻訳システム
には無変換の入力ソースプログラムか、変換後の
出力ソースプログラム行かを判別する手順と、変
換後のソースプログラムの記述誤りを検査する構
文解析手順と、該構文解析手順より送出されるエ
ラー信号により前記判別手順から渡される無変換
ソースプログラムの行に対してエラーリストを出
力するエラーリスト出力手順とを含むことを特徴
とする言語翻訳システムのソースプログラム行番
号処理方法。1. In a language processing system capable of processing a language with higher functionality than the compiled language, which includes a language translation system such as a compiled language, and a preprocessing system such as a sub-processor at the front stage of the language translation system, the preprocessing system includes a step of mixing an unconverted input source program line into an output source program, and the language translation system includes a step of determining whether the input source program is an unconverted input source program or a converted output source program line, and a syntax analysis procedure for checking for errors in the description of the source program; and an error list output procedure for outputting an error list for the lines of the unconverted source program passed from the determination procedure based on the error signal sent from the syntax analysis procedure. A source program line number processing method for a language translation system, comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60147856A JPS628232A (en) | 1985-07-04 | 1985-07-04 | Language translation system source program line number processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60147856A JPS628232A (en) | 1985-07-04 | 1985-07-04 | Language translation system source program line number processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS628232A JPS628232A (en) | 1987-01-16 |
| JPH0548491B2 true JPH0548491B2 (en) | 1993-07-21 |
Family
ID=15439802
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP60147856A Granted JPS628232A (en) | 1985-07-04 | 1985-07-04 | Language translation system source program line number processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS628232A (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH01158534A (en) * | 1987-12-15 | 1989-06-21 | Fujitsu Ltd | Generating system for source program |
| JPH04333778A (en) * | 1991-05-01 | 1992-11-20 | Shuji Takase | Curing device for opening for traveling way |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59183441A (en) * | 1983-03-31 | 1984-10-18 | Fujitsu Ltd | Debug processing system of extended language |
-
1985
- 1985-07-04 JP JP60147856A patent/JPS628232A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS628232A (en) | 1987-01-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2003034367A1 (en) | Information processor, sensor network system, information processing program, computer-readable recorded medium on which information processing program is recorded, and information processing method for sensor network system | |
| US6324498B1 (en) | Method of identifying program compatibility featuring on-screen user interface graphic program symbols and identifiers | |
| JPH0548491B2 (en) | ||
| JPS6180325A (en) | Information input system of pointing device | |
| JPH0317136B2 (en) | ||
| JPS6115236A (en) | Partial production of object list | |
| KR920010380A (en) | Synchronous Control Method for Multiple Processing Systems and Multiple Processing Systems | |
| JPS6345637A (en) | System for detecting error in register allocation | |
| JPH02130626A (en) | Interchanging system for printer device | |
| JPH04342038A (en) | Analyzing method for program abnormality | |
| JPH04338841A (en) | Debugger device | |
| JPH03176740A (en) | Interchange system for source file | |
| JPS62241032A (en) | Calling system for program parts | |
| JPH046019B2 (en) | ||
| JPH04178873A (en) | Certificate issuing and confirming system | |
| JPS63276617A (en) | Command/message local converting system | |
| JPH1097416A (en) | File analysis device | |
| JPH0635752A (en) | Analysis program generation system | |
| JPS6142036A (en) | How to convert source programs | |
| JPS6257036A (en) | Execution module generating device | |
| JPH02204077A (en) | Firmware evaluation system | |
| JPH06282422A (en) | Specifications generating method | |
| JPS63228242A (en) | Dump analyzing system | |
| JPS61210958A (en) | clinical testing system | |
| JPH0580992A (en) | Output system for procedure-function relation chart |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| EXPY | Cancellation because of completion of term |