JPS628232A - Processing system for source program line number of language translation system - Google Patents

Processing system for source program line number of language translation system

Info

Publication number
JPS628232A
JPS628232A JP60147856A JP14785685A JPS628232A JP S628232 A JPS628232 A JP S628232A JP 60147856 A JP60147856 A JP 60147856A JP 14785685 A JP14785685 A JP 14785685A JP S628232 A JPS628232 A JP S628232A
Authority
JP
Japan
Prior art keywords
source program
output
compiler
language
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.)
Granted
Application number
JP60147856A
Other languages
Japanese (ja)
Other versions
JPH0548491B2 (en
Inventor
Masaaki Takahashi
高橋 雅昭
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 Corp
Original Assignee
NEC Corp
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 Corp filed Critical NEC Corp
Priority to JP60147856A priority Critical patent/JPS628232A/en
Publication of JPS628232A publication Critical patent/JPS628232A/en
Publication of JPH0548491B2 publication Critical patent/JPH0548491B2/ja
Granted legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve the efficiency of an analysis of a program by providing a preprocessing system with a means which puts unchanged input source program lines in an output source program and a compiler with a decision means. CONSTITUTION:The source program merging and output part 18 of a preprocessor 10 merges an unchanged source program 13 with a source program 17 which has a discrimination flag added to the head of a changed line and outputs an output source program 19 having the discrimination flag. The identification flag decision part 22 of the compiler 20 classifies the unconverted source program and source program after conversion. A line number that the compiler processes is regarded as an input source program number, and then a user need not consider the exchange processing of the preprocessor.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は言語翻訳システムのソースプログラム行番号処
理システムに関し、特に前段に前処理システム(プリプ
ロセッサ)を持つ言語処理システムにおけるソースプロ
グラム行番号処理方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] 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 preprocessing system (preprocessor) at the front stage. Regarding.

〔従来の技術〕[Conventional technology]

従来の言語翻訳システム(コンパイラ)の前段にプリプ
ロセッサを用意して、コンパイラ言語の機能を拡張する
方式が広く行われている。その方式はプリプロセ、すが
、入力ソースプログラムから、後段のコンパイラが処理
可能な出力ノースプログラムを生成する事によって行う
が、コンパイラが持つ各種の機能(構文解析結果表示、
オブジェクト生成結果表示等)は出力ソースプログラム
に対して機能していた。
A widely used method is to provide a preprocessor before a conventional language translation system (compiler) to extend the functionality of the compiled language. This method is performed by preprocessing, which generates an output north program from the input source program that can be processed by the compiler at the later stage.
(object generation result display, etc.) was functioning for the output source program.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来のソースプログラムの行番号処理方式では
、コンパイラの各種機能が、コンパイラ′の入力行(プ
リプロセッサの出力ソースプログラム行)に対して働く
ので、コンパイラが特定の入力行を示す為に表示する行
番号はプリプロセッサが生成した出力ソースプログラム
の行番号である。
In the conventional source program line number processing method described above, various functions of the compiler operate on the compiler's input line (preprocessor output source program line), so the compiler displays a line number to indicate a specific input line. The line number is the line number of the output source program generated by the preprocessor.

すなわち、利用者はプリプロセッサがいかなる形式で出
力ソースプログラムを生成したか知らないと十分なプロ
グラムの解決が不可能である為に入力ソースプログラム
リストと同時に出力ソースプログラムリストを見なけれ
はならないか、入力ソースプログラムと出力ソースプロ
グラムの行番号対応表が会費となるという欠点がある。
In other words, if the user does not know the format in which the output source program was generated by the preprocessor, it will be impossible to solve the program satisfactorily, so the user must see the output source program list at the same time as the input source program list, The disadvantage is that the line number correspondence table between the source program and the output source program is a membership fee.

たとえば、その−例としては次のような欠点がある。す
なわち、プリプロセ、すが検知できないプログラムの記
述誤りをコンパイラが検知した際、コンパイラはあくま
でも出力ソースプログラムの皇該行に対してエラーメツ
セージを出力するので、エラーメツセージに付随して出
力される行番号では、入力ソースプログラムのどこにエ
ラーがあったかを、直接利用者は知る事はできない。
For example, it has the following disadvantages: 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, so the line number output along with the error message is Therefore, the user cannot directly know where the error is in the input source program.

〔問題点を解決するための手段〕[Means for solving problems]

本発明の言語翻訳システムのソースプログラム行番号処
理方式は、コンパイラ言語等の言語翻訳システムと、該
言語翻訳システムの前段にサブプロセッサ等の前処理シ
ステムとを用意し、前記コンパイラ言語より機能の高い
言語を処理できるようにした言語処理システムであって
、前記前処理システムに出力ソースプログラム内に無変
換の入力ソースプログラム行を混入する手段を有し、コ
ンパイラに無変換の入力ソースプログラムか、変換後の
出力ソースプログラム行かを判別する手段を有している
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, which has higher functionality than the compiler language. A language processing system capable of processing a language, wherein the preprocessing system includes means for mixing unconverted input source program lines into an output source program, and the compiler has a means for incorporating unconverted input source program lines into an output source program. It has means for determining the subsequent output source program line.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
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 translation system such as a compiler language (
A language processing system that includes a preprocessor (compiler) 20 and a preprocessing system (preprocessor) 10 provided before the compiler 20, which allows the preprocessor to mix input source program lines into an output source program without converting them. The compiler includes means for determining an input source program line in the output source program and an output source program line as a result of conversion, and means for newly providing an identification flag for each output source program line.

プリプロセッサ10は入力ソースプログラム11を読み
取り、無変換ソースプログラム13と変換ソースプログ
ラムを出力するソースプログラム読取部12と、読取部
12に接続されるソースプログラム変換部14と、読取
部12とソースプログラム変換部14とに接続され入力
ソースプログラムのリスト16を出力するソースリスト
出力部15と、ソースプログラム変換部14に接続され
、変換された結果の変換後ソースプログラム17と、無
変換ソースプログラム13とを併合し、識別フラグを付
けた出力ソースプログラム19を出力するソースプログ
ラム併合出力部18とから構成されている。出力ソース
プログラム19は識別フラグの付いた出力ソースプログ
ラムで、コンパイラ20に供給される。
The preprocessor 10 includes a source program reading section 12 that reads an input source program 11 and outputs an unconverted source program 13 and a converted source program, a source program converting section 14 connected to the reading section 12, and a source program converting section 14 connected to the reading section 12. A source list output section 15 is connected to the input source program section 14 and outputs a list 16 of input source programs; and a source program merging output unit 18 that outputs an output source program 19 that has been merged and has 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; connected to the flag determination unit 22;
A syntax analysis unit 23 that checks for description errors, and an error list output unit 2 that outputs the syntax analysis results as an error list 28.
4, an object generation section 25 connected to the syntax analysis 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 unit 12 includes an unconverted source program 13
At the same time, the source program is passed to the source program converting section 14 and the source list outputting 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は無変換ソースプログラム1
3と変換後の行の先頭に識別フラグを付けたソースプロ
グラム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 is the unconverted source program 1
3 and the source program 17 with an identification flag attached to the beginning of the converted line are merged and output as an output source program 19 with an identification flag.

出力ソースプログラム19のソースプログラムはコンパ
イラ20のソースプログラム読取部21によって読み取
られ、更に識別フラグ判別部22によって無変換ソース
プログラムと変換後ソースプログラムに分類される。変
換後ソースプログラムは構文解析部23により記述誤り
が検査される。
The source program of the output source program 19 is read by the source program reading section 21 of the compiler 20, and further classified into an unconverted source program and a converted source program by the identification flag discriminating section 22. The converted source program is checked for writing errors by the syntax analysis unit 23.

エラーリスト出力部24は構文解析部23により送出さ
れるエラー信号により、識別フラグ判別部22から渡さ
れる無変換ソースプログラムの行に対してエラーリスト
28を第2図に示す形式で出力する、構文解析結果はオ
ブジェクト生成部25によってオブジェクトプログラム
に変換され、オブジェクト出力部26を介してオブジェ
クトプログラム27として出力される。
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.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、コンパイラが処理する行
番号を入力ソースプログラム行番号とすることにより、
利用者がプリプロセッサの変換処理を意識する必賛がな
くなり、プログラムの解析の効率が向上する効果がある
As explained above, the present invention uses the input source program line number as the line number processed by the compiler.
This eliminates the need for users to be aware of the preprocessor's conversion processing, and has the effect of improving the efficiency of program analysis.

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

第1図は本発明の一実施例を示す構成図、第2図は本実
施例におけるソースリストおよび工2−リストを示す図
7゛あり。 10・・・・・・前処理システム(サブプロセッサ)、
11・・・・・・入力ソースプログラム、12・・・・
・・ソースプログラム読取部、13・・・・・・無変換
ソースプログラム、14・・・・・・ソースプログラム
変換部、15・・・・・・ソースリスト出力部、16・
・・・・・ソースリスト、17・・・・・・変換後ソー
スプログラム、18・・−・・・ソースプログラム併合
出力部、19・・・・・・出力ソースプログラム、20
・・・・・・言語翻訳システム、21・・・・・・ソー
スプログラム読取部、22・・・・・・識別フラグ判別
部、23・・・・・・構文解析部、24・・・・・・エ
ラーリスト出力部、25・・・・・・オブジェクト生成
部、26・・・・・・オブジェクト出力部、27・・・
・・・オブジェクトプログラム、28・・・・・・エラ
ーリスト。 第2図 入カッースフ’oグラ4 コ*便後(表示されない) エラー〆ッセージ
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a diagram 7 showing a source list and a work list in this embodiment. 10...Pre-processing system (sub-processor),
11... Input source program, 12...
... Source program reading unit, 13... Non-conversion source program, 14... Source program conversion unit, 15... Source list output unit, 16.
... Source list, 17 ... Source program after conversion, 18 ... Source program merging output section, 19 ... Output source program, 20
... Language translation system, 21 ... Source program reading section, 22 ... Identification flag determination section, 23 ... Syntax analysis section, 24 ... ...Error list output section, 25...Object generation section, 26...Object output section, 27...
...Object program, 28...Error list. Figure 2 Entered Cassufu'o Gra 4 After ko*mail (not displayed) Error message

Claims (1)

【特許請求の範囲】[Claims] コンパイラ言語等の言語翻訳システムと、該言語翻訳シ
ステムの前段にサブプロセッサ等の前処理システムとを
用意し、前記コンパイラ言語より機能の高い言語を処理
し得る言語処理システムであって、前記前処理システム
に出力ソースプログラム内に無変換の入力ソースプログ
ラム行を混入する手段を設け、前記言語翻訳システムに
無変換の入力ソースプログラムか、変換後の出力ソース
プログラム行かを判別する手段を設けたことを特徴とす
る言語翻訳システムのソースプログラム行番号処理方式
A language processing system capable of processing a language with higher functionality than the compiler language, comprising a language translation system such as a compiler language, and a preprocessing system such as a sub-processor at the front stage of the language translation system, the language processing system comprising: a language translation system such as a compiler language; The system is provided with means for mixing unconverted input source program lines into the output source program, and the language translation system is provided with means for determining whether the input source program lines are unconverted or the output source program lines after conversion. Features a source program line number processing method for language translation systems.
JP60147856A 1985-07-04 1985-07-04 Processing system for source program line number of language translation system Granted JPS628232A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60147856A JPS628232A (en) 1985-07-04 1985-07-04 Processing system for source program line number of language translation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60147856A JPS628232A (en) 1985-07-04 1985-07-04 Processing system for source program line number of language translation system

Publications (2)

Publication Number Publication Date
JPS628232A true JPS628232A (en) 1987-01-16
JPH0548491B2 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 Processing system for source program line number of language translation system

Country Status (1)

Country Link
JP (1) JPS628232A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
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

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59183441A (en) * 1983-03-31 1984-10-18 Fujitsu Ltd Debug processing system of extended language

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59183441A (en) * 1983-03-31 1984-10-18 Fujitsu Ltd Debug processing system of extended language

Cited By (2)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
JPH0548491B2 (en) 1993-07-21

Similar Documents

Publication Publication Date Title
ATE171286T1 (en) METHOD AND SYSTEM FOR DYNAMIC PRINTER ''TIME OUT''
JPS628232A (en) Processing system for source program line number of language translation system
JPS6180325A (en) Information input system of pointing device
JPS63120338A (en) Program converting device
JP2718427B2 (en) Data access method in large-scale knowledge base
JPS6115236A (en) Partial production of object list
JPS5856025A (en) Common control system for output display sentence
JPS62241032A (en) Calling system for program parts
JPS58121450A (en) Automatic comment implementing device
JPS6345637A (en) System for detecting error in register allocation
JPS63238629A (en) Automatic conversion processing system for label in program components
KR920010380A (en) Synchronous Control Method for Multiple Processing Systems and Multiple Processing Systems
JPH01263866A (en) Stock price data processing system
JPS6359647A (en) Display system for exceptional event information
JPS636555A (en) Typesetting system
JPH06282422A (en) Specifications generating method
JPH01274241A (en) Instruction string generating system
JPH1097416A (en) File analyzing device
JPH046019B2 (en)
JPH10333717A (en) Sequencer soft design supporting soft concept
JPS63245519A (en) Program control structure generating device
JPH04230511A (en) Mouse interface circuit
JPS629435A (en) Automatic program production system
JPS6155738A (en) Determining system of operation mode
JPH01119848A (en) Preparing program for control card for batch processing in computer

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term