JPH0375936A - Debugging information output system for language processing program - Google Patents

Debugging information output system for language processing program

Info

Publication number
JPH0375936A
JPH0375936A JP1212264A JP21226489A JPH0375936A JP H0375936 A JPH0375936 A JP H0375936A JP 1212264 A JP1212264 A JP 1212264A JP 21226489 A JP21226489 A JP 21226489A JP H0375936 A JPH0375936 A JP H0375936A
Authority
JP
Japan
Prior art keywords
line
processing
source
output
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.)
Pending
Application number
JP1212264A
Other languages
Japanese (ja)
Inventor
Kaoru Matsuo
松尾 薫
Yoichi Hirasawa
平澤 陽一
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 JP1212264A priority Critical patent/JPH0375936A/en
Publication of JPH0375936A publication Critical patent/JPH0375936A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To enable a user to easily understand the structure of a source program and the flow of processing by adding the function which outputs source line information to source lines indicating the start and the end of a source constituting a structure block. CONSTITUTION:At the time of execution of a language processing program, source line information is outputted to source lines indicating the start and the end of the source constituting the block structure with respect to parts constituting the block structure of the source program. Source line information is outputted to all source lines with respect to the other parts of the source program. Thus, row numbers are outputted in consideration of the structure block of source program information. As the result, the structure of the source program and the flow of processing are easy to understand to improve the debugging effect at the time of analyzing the program by a debugger.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は言語処理プログラムの実行方式に関し、特にソ
ースプログラムによるデバッグを行なうプログラムの開
発(修正)に必要なデバッグ用ソースライン情報を作成
する機能を有する言語処理プログラムのデバッグ情報出
力方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to an execution method for a language processing program, and in particular, a function for creating debugging source line information necessary for developing (modifying) a program that is debugged using a source program. The present invention relates to a debug information output method for a language processing program having a language processing program.

〔従来の技術〕[Conventional technology]

従来の技術では、高級言語で書かれたソースプログラム
から作成された実行ファイルをデバッグする際、高級言
語デバッガ(以後、旧gh LevelLanguag
e Debugger=HLLDと呼ぶ)と呼ばれるア
プリケーション・ソフトに依って、実際に実行ファイル
を実行にかけながら、ソース・プログラムの行単位で処
理を停止(以後、ブレークと呼ぶ)させ、ブレークされ
た時点での各変数値やレジスタ値を表示させて、デバッ
グを行なっていた。
With conventional technology, when debugging an executable file created from a source program written in a high-level language, a high-level language debugger (hereinafter referred to as gh LevelLanguage)
e Debugger (called HLLD) is used to actually execute the executable file while stopping processing line by line in the source program (hereinafter referred to as a break), and stopping the processing at the point at which the break occurs. Debugging was performed by displaying the values of each variable and register.

これは、高級言語デバッガが入力ソースプログラムの行
単位のデバッグを実現する上で必要となるライン・デバ
ッグ情報テーブルが、以下の様な過程で生成されている
為である。
This is because the line debug information table, which is necessary for the high-level language debugger to realize line-by-line debugging of the input source program, is generated in the following process.

先ず、言語処理プログラムによって、ソースプ□ダラム
の1行毎の行数とその相対アドレスをセットされたライ
ン・デバッグ情報テーブルが、オブジェクト情報と共に
オブジェクト・ファイルに出力される。次に、前述のオ
ブジェクト・ファイルを入力ファイルとするリンカが、
前記オブジェクトファイル保有のライン・デバッグ情報
テーブルとその他のオブジェクト情報から、前述のライ
ン・デバッグ情報テーブルの行単位に絶対アドレスを決
定する。これにより前記リンカは、高級言語デバッガの
入力ソースプログラムの行単位のデバッグを可能にする
デバッグ情報を生威し、これを実行形式のファイル(以
降、ロードモジュール・ファイルと呼ぶ)中に他の情報
と共に出力する。
First, the language processing program outputs a line debug information table in which the number of lines per line of the source program and their relative addresses are set together with object information to an object file. Next, the linker, which takes the aforementioned object file as an input file,
From the line debug information table held in the object file and other object information, an absolute address is determined for each line of the line debug information table. As a result, the linker generates debug information that enables line-by-line debugging of the input source program of the high-level language debugger, and stores this information in an executable file (hereinafter referred to as a load module file) along with other information. Output with.

前記高級言語デバッガを組込んだデバッグ装置に、前記
ロードモジュール・ファイルをダウンロードし、これを
実行させると、高級言語デバッガはライン・デバッグ情
報テーブルから得られるソースプロダラムの行単位の実
アドレスと、デバッグ装置で捉えた実行中のロードモジ
ュール・ファイルのアドレスとを比較し、これと一致し
たら処理を停止させる。また、前記の高級言語デバッガ
の機能として、シンボル情報やセグメント情報などをデ
バッグ装置に付属する表示装置に出力することが可能で
ある。この様に、高級言語デバッガはロードモジュール
・ファイル中に生成されたライン・デバッグ情報に依っ
て、入力ソースプロダラムの行単位でのデバッグが可能
となる。
When the load module file is downloaded and executed by a debugging device incorporating the high-level language debugger, the high-level language debugger receives the real address of the source program in line units obtained from the line debug information table, It compares the address of the load module file being executed captured by the debugging device, and if it matches, stops the process. Further, as a function of the high-level language debugger, it is possible to output symbol information, segment information, etc. to a display device attached to the debug device. In this way, the high-level language debugger can debug the input source program line by line based on the line debug information generated in the load module file.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

現在、ソフトウェアの構築の段階に於いて、その作法に
於ける手段として、構造化プログラミング手法が特に重
要視されてきている。また、C言語や構造化アセンブラ
等、構造化プログラミングを可能とする高級言語処理プ
ログラムの種類も多様化してきた。こうした現状から、
特に大規模なプログラムの開発のデバッグの初期段階に
於いては、複雑なソースプログラム情報よりは、まず、
そのプログラムがどのような構造を持っているか、どの
様な処理の流れになっているかといった大まかな情報を
読取るために、簡略された構造ブロック単位のデバッグ
が効果的である。
At present, structured programming methods are becoming particularly important as a means of etiquette at the stage of software construction. Furthermore, the types of high-level language processing programs that enable structured programming, such as the C language and structured assembler, have diversified. Given this current situation,
Especially in the early stages of debugging a large-scale program, it is better to use complex source program information.
Simplified debugging in units of structural blocks is effective for reading general information such as what kind of structure the program has and what kind of processing flow it is.

ここで述べる構造化プログラミングとは、プログラムの
1つの命令を表す基本部と、順次処理ルーチンを表す連
続部と、同じ部分が繰返しあられれる構成要素の繰返し
処理部と、複数の選択肢から1個を選択する選択処理部
をプログラムの構成要素として構築するプログラミング
手法である。
The structured programming described here consists of a basic part that represents one command of a program, a continuous part that represents a sequential processing routine, a repetitive processing part that is a component in which the same part is repeated, and one option from multiple choices. This is a programming method in which the selection processing unit to be selected is constructed as a component of the program.

また、構造ブロックとは、前記構造化プログラミングの
構成要素のうち繰返し処理部と選択処理部として言語処
理プログラムが認識する1つの文の集合体である。前記
言語処理プログラムは、1個の構造ブロックを構造ブロ
ックの始りと機能を示す予約後によって、構造ブロック
の終りを同じく予約後かあるいは文字によって認識する
ものである。
Furthermore, a structural block is a collection of sentences that the language processing program recognizes as an iteration processing section and a selection processing section among the structural elements of the structured programming. The language processing program recognizes one structural block by the beginning of the structural block and a reservation indicating the function, and recognizes the end of the structural block either by the same reservation or by a character.

上述した従来の言語処理プログラムの実行形式のファイ
ルでは、高級言語デバッガは単に入力ソースプログラム
の16単位のライン・デバッグを可能にしているだけで
あるため、ソースプログラムの大きな処理の流れを理解
する上で、情報を収集する単位としては細かく、情報が
多すぎて理解しにくいものとなっている。
In the executable format file of the conventional language processing program mentioned above, the high-level language debugger simply enables line debugging of 16 units of the input source program, so it is difficult to understand the large processing flow of the source program. As a unit of information collection, it is very detailed and contains too much information, making it difficult to understand.

上述した従来の言語処理プログラムの実行形式が入力ソ
ースプログラムの16単位のブレークのみを可能にする
ライン・デバッグ情報だけ出力していたのに対して、本
発明は前述のライン・デバッグ情報出力機能に加え、構
造ブロックを構成するソースの始りと終りを表すソース
ラインに対して、構造ブロック単位のデバッグを可能に
するソースライン情報(以降、構造ブロック・デバッグ
情報と呼ぶ)を出力する機能を付加したところに相違点
がある。
While the above-mentioned conventional language processing program execution format outputs only line debug information that enables only 16-unit breaks in the input source program, the present invention provides the above-mentioned line debug information output function. In addition, a function has been added to output source line information (hereinafter referred to as structural block debug information) that enables debugging of each structural block for the source lines that represent the beginning and end of the sources that make up a structural block. There is a difference there.

〔課題を解決するための手段〕[Means to solve the problem]

本発明は、言語処理プログラムの実行方式において、キ
ーボードから入力される起動待を解析し保存する手段と
、ソースプログラム情報を入力する手段と、入力された
ソースプログラム情報を解析してオブジェクト情報を生
成する手段と、入力されたソースプログラム情報を解析
して構造ブロック・デバッグ情報を生成する手段と、オ
ブ6 ジェクト情報と構造ブロック・デバッグ情報を付加情報
としてオブジェクト・ファイルに出力する手段とをもつ
言語処理プログラムの実行方式において、構造ブロック
・デバッグ情報をもつ実行形式な生成する事を特徴とす
る。
In an execution method for a language processing program, the present invention provides means for analyzing and saving a startup wait input from a keyboard, a means for inputting source program information, and generating object information by analyzing the input source program information. 6. A language that has a means for analyzing input source program information to generate structural block debugging information, and a means for outputting object information and structural block debugging information as additional information to an object file. The processing program execution method is characterized by generating an executable format with structure blocks and debug information.

〔実施例〕〔Example〕

以下に、本発明の実施例について図面を参照しながら、
説明する。第1図は、本発明の一実施例を示すシステム
構成図である。第1図において、本発明の一実施例にお
ける言語処理プログラム102は、キーボード105か
ら入力された起勤行を解析する起勤行解析部106、前
記起勤行解析部106の解析結果を保存する保存部10
7、入力ファイル101からソースプログラム情報を入
力する入力部108、前記入力部108から入力された
ソースプログラムの行情報をリスト・ファイル103に
出力するリスト出力部110、同じく前記入力部108
から入力されたソースプログラムを解析してオブジェク
ト情報を出力する構文解析部109、前記構文解析部1
09の解析−7ス 結果である入力ソースプログラム情報から各種オブジェ
クト情報(セグメント情報、シンボル情報、テキスト・
コード情報等)を生成するオブジェクト情報生成部11
1.同じく前記構文解析部109の解析結果である入力
したソースプログラム情報から構造ブロック・デバッグ
情報を生成する構造ブロック・デバッグ情報生成部11
2、生成されたオブジェクト情報をオブジェクト・ファ
イル104に出力するオブジェクト出力部113とを含
む。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
explain. FIG. 1 is a system configuration diagram showing an embodiment of the present invention. In FIG. 1, a language processing program 102 according to an embodiment of the present invention includes a starting line analysis unit 106 that analyzes a starting line input from a keyboard 105, and a storage unit 10 that stores the analysis results of the starting line analysis unit 106.
7. An input unit 108 that inputs source program information from the input file 101; a list output unit 110 that outputs line information of the source program input from the input unit 108 to the list file 103;
a syntax analysis unit 109 that analyzes a source program input from the syntax analysis unit 109 and outputs object information;
Various object information (segment information, symbol information, text,
Object information generation unit 11 that generates code information, etc.)
1. A structural block/debug information generation unit 11 generates structural block/debug information from input source program information, which is also an analysis result of the syntax analysis unit 109.
2. An object output unit 113 that outputs the generated object information to the object file 104.

第2図は前記入力ファイル101の内容である。FIG. 2 shows the contents of the input file 101.

左側の数字は説明のために付けたソースプログラムの行
番号である。
The numbers on the left are the line numbers of the source program for explanation purposes.

ここで、第2図に示した入力ファイル101の各ソース
行の解析内容を説明する。
Here, the analysis contents of each source line of the input file 101 shown in FIG. 2 will be explained.

前述の高級言語デバッガは、実行形式のロードモジュー
ル・ファイルに実行をかけながら入力ソースプログラム
の行単位のデバッグを可能にするために、デバッグ情報
として入力ソースプログラムの実行時の絶対アドレス情
報が必要であるが、8− これらの情報は入力ソースプログラムの全ラインから得
る必要はない。この為、言語処理プログラムは入力ソー
スプログラムから得られるライン・デバッグ情報の収集
時に、必要とするソースラインの情報のみを選抜してオ
ブジェクト・ファイルに出力する必要がある。従って、
各ソース行の構文解析時には、第1〜2行目はプログラ
ムの各関数の始りを表す行として、また第6〜10行目
と12行目はプログラムソース行として、それぞれソー
スの行数とその相対アドレス情報をセットしたライン・
デバッグ情報を生威しオブジェクト・ファイルに出力す
る必要がある。第3〜4行目はデータ記述行で、第5行
目と第11行目は空白行であるため、いずれも前述のラ
イン・デバッグ情報をオブジェクト・ファイルに生成す
る必要がない。また、第6行目と第8行目は構造ブロッ
ク・プログラミングの始りを示す予約語行として、第3
〜4行目と第5行目と第11行目はその他のソース行と
して、それ以外の行は一般予約語行としてみなされる。
The above-mentioned high-level language debugger requires absolute address information during execution of the input source program as debugging information in order to enable line-by-line debugging of the input source program while executing the executable load module file. However, these information need not be obtained from all lines of the input source program. For this reason, when the language processing program collects line debug information obtained from the input source program, it is necessary to select only the necessary source line information and output it to the object file. Therefore,
When parsing each source line, the 1st and 2nd lines are treated as lines that represent the start of each function in the program, and the 6th to 10th lines and the 12th line are treated as program source lines. The line that set the relative address information.
It is necessary to generate debug information and output it to an object file. The 3rd and 4th lines are data description lines, and the 5th and 11th lines are blank lines, so there is no need to generate the above-mentioned line debug information in the object file. Additionally, the 6th and 8th lines are reserved word lines that indicate the beginning of structure block programming.
The 4th, 5th, and 11th lines are regarded as other source lines, and the other lines are regarded as general reserved word lines.

一般予約語の中でも第9〜1〇−9ぐ 行目は構造ブロックの終りを表す一般予約語行とみなさ
れる。
Among the general reserved words, lines 9 to 10-9 are regarded as general reserved word lines representing the end of the structure block.

第3図は、従来の言語処理プログラム102が第2図の
ソースプログラムから行単位のデバッグ情報を出力する
ライン・デバッグ情報テーブル301で、第4図は第1
の実施例の言語処理プログラムが構造ブロック単位のデ
バッグ情報を出力するデバッグ情報テーブル401であ
る。また、前記ライン・デバッグ情報テーブル301と
デバッグ情報テーブル401のテーブル・フォーマット
は同一形式である。
FIG. 3 shows a line debug information table 301 in which the conventional language processing program 102 outputs line-by-line debug information from the source program shown in FIG.
This is a debug information table 401 in which the language processing program of the embodiment outputs debug information in units of structural blocks. Further, the table formats of the line debug information table 301 and the debug information table 401 are the same.

第6図は従来の、第7図は第1の実施例の言語処理プロ
グラム102のフローチャートである。
FIG. 6 is a flowchart of the language processing program 102 of the conventional language processing program 102, and FIG. 7 is a flowchart of the language processing program 102 of the first embodiment.

ここで第6図のフローチャートを参照しながら、従来の
言語処理プログラム102の各処理の機能を説明する。
Here, the functions of each process of the conventional language processing program 102 will be explained with reference to the flowchart of FIG.

従来の言語処理プログラム102は、行数カウンタ初期
化処理601.1行ソース入力処理602、ソース終り
判定処理603、終了処理604、行数カウントアツプ
処理605、相対アドレス計算処理606、構文解析処
理607、10− オブジェクト出力処理608、リスト出力判定処理60
9.1行ソース出力処理610の処理、デバッグ・オプ
ション判定処理611、ライン・デバッグ情報テーブル
出力処理612から構成されている。
The conventional language processing program 102 includes a line counter initialization process 601, a one line source input process 602, an end of source determination process 603, an end process 604, a line count up process 605, a relative address calculation process 606, and a syntax analysis process 607. , 10- Object output processing 608, list output determination processing 60
9. The process consists of a one-line source output process 610, a debug option determination process 611, and a line debug information table output process 612.

行数カウンタ初期化処理601は入カンースフログラム
の行数カウンタをOデータで初期化する処理である。
The line number counter initialization process 601 is a process for initializing the line number counter of the input conversation flowgram with O data.

1行ソース入力処理602は、現在読み込みポインタが
指している入力ファイル101からソースプログラムを
1行単位で読み込む。この後の読み込みポインタは、読
み込んだソースプログラムノ次の行を指している。
Single-line source input processing 602 reads the source program line by line from the input file 101 currently pointed to by the read pointer. After this, the read pointer points to the next line of the loaded source program.

ソース終り判定処理603は、前記1行ソース入力処理
602で入力ファイル101からソースプログラムを1
行読み込んだ結果、それが入力ファイル101の終りで
あるか否かの判定を行なう。
The source end determination process 603 is performed by inputting one source program from the input file 101 in the one-line source input process 602.
As a result of reading a line, it is determined whether it is the end of the input file 101 or not.

終了処理604は、前記ソース終り判定処理603によ
って入力ファイル101の終りであった場合に行なう終
了処理である。
End processing 604 is an end processing performed when the source end determination processing 603 determines that the input file 101 has reached the end.

行数カウントアツプ処理605は入力ソースプログラム
を1行読み込む度にその読み込んだ行数をカウントアツ
プする処理である。
The line count up process 605 is a process that counts up the number of lines read each time one line of the input source program is read.

相対アドレス計算処理606は、読み込んだソースプロ
グラムの始る相対アドレスを算出する。
Relative address calculation processing 606 calculates the relative address at which the read source program starts.

構文解析処理607は、1行ソース入力処理602で読
み込んだソースプログラム情報を解析しオブジェクト情
報(セグメント情報、シンボル情報、テキスト・コード
情報等)を生成する。
The syntax analysis process 607 analyzes the source program information read in the one-line source input process 602 and generates object information (segment information, symbol information, text/code information, etc.).

オブジェクト出力処理608は、前記構文解析処理60
7が生成したオブジェクト情報をオブジェクト・ファイ
ル104に出力する。
The object output process 608 is the syntax analysis process 60
7 outputs the generated object information to the object file 104.

リスト出力判定処理609は、第1図の保存部107に
リスト出力を行なう命令があるか否かの判定を行なう。
List output determination processing 609 determines whether or not there is a command to output a list in the storage unit 107 in FIG.

1行ソース出力処理610は、1行ソース入力処理60
2で読み込んだソースプログラム情報に行番号等を付加
してリスト・ファイル103に出力する。
The one-line source output process 610 is the one-line source input process 60
Line numbers and the like are added to the source program information read in step 2 and output to the list file 103.

デバッグ・オプション判定処理611は、保存部107
内にライン・デバッグ情報のテーブル出力の命令がある
か否かを判定する。
The debug option determination process 611 is performed by the storage unit 107
It is determined whether there is an instruction to output a table of line debug information in the file.

ライン・デバッグ情報テーブル出力処理612は、読み
込んだソースプログラムの行数とその相対アドレスをオ
ブジェクト・ファイル104内のライン・デバッグ情報
テーブル301に出力する。
The line debug information table output process 612 outputs the number of lines of the read source program and its relative address to the line debug information table 301 in the object file 104.

ここで第6図で示した従来の言語処理プログラム102
の処理の流れを追いながら、第2図に示したソースプロ
グラムから第3図に示したライン・デバッグ情報テーブ
ル301が生成される過程を説明する。
Here, the conventional language processing program 102 shown in FIG.
The process of generating the line debug information table 301 shown in FIG. 3 from the source program shown in FIG. 2 will be explained while following the processing flow.

以下に従来の言語処理プログラム102の処理の流れを
説明する。
The processing flow of the conventional language processing program 102 will be explained below.

先ず、入力ソースプログラムの行数カウンタをOデータ
で初期化する。次に、入力ファイル101から1行ソー
スプログラムを読み込む為の1行ソース入力処理602
を実行する。1行ソース入力処理602によって入力さ
れたソースプログラム情報は、ソース終り判定処理60
3によって3 ソースプログラムの終りか否かが判定される。判定の結
果路りであれば、終了処理604を行なって処理を終了
する。ソースプログラムの終りでなければ、行数をカウ
ントアツプする処理605と、その入力ソースプログラ
ムの相対アドレス計算処理606を行ない、次に入力し
たソースプログラム1行の構文解析処理607を行なう
。構文解析処理607は1行ソース入力処理602で読
み込んだソースプログラム情報を解析しオブジェクト情
報を生成する。前記構文解析処理607によって生成さ
れたオブジェクト情報はオブジェクト出力処理608が
オブジェクト・ファイル104に出力する。次に、リス
ト出力判定処理609が行なわれる。リスト出力判定処
理609では保存部107内にリスト出力を行なう命令
があれば1行ソース出力処理610を実行し、続いてデ
バッグ・オプション判定処理611を行なう。前記リス
ト出力判定処理609の判定の結果、リスト出力命令が
保存部107に無い場合1行ソース出力処理610は行
なわず、デバッグ・オプション判定=14− 処理611を行なう。デバッグ・オプション判定処理6
11は、保存部107内にライン・デバッグ情報のライ
ン・デバッグ情報テーブル301の出力の命令があれば
、読み込んだソースプログラムの行数とその相対アドレ
スをライン・デバッグ情報テーブル出力処理612を行
なう。前記デバッグ・オプション判定処理611の判定
の結果、ライン・デバッグ情報のテーブル出力命令が保
存部107に無い場合ライン・デバッグ情報テーブル出
力処理612は行なわない。その後、処理は再び1行ソ
ース入力処理602に移る。この様にしてソースプログ
ラムの終りが来るまでオブジェクト出力とリスト出力と
ライン・デバッグ情報テーブル301の出力が繰返し行
なわれる。
First, the line number counter of the input source program is initialized with O data. Next, one-line source input processing 602 for reading a one-line source program from the input file 101
Execute. The source program information input by the one-line source input process 602 is processed by the source end determination process 60.
3 determines whether it is the end of the 3 source program. If the result of the determination is yes, a termination process 604 is performed to terminate the process. If it is not the end of the source program, a process 605 for counting up the number of lines, a process 606 for calculating the relative address of the input source program, and then a syntax analysis process 607 for one line of the input source program. A syntax analysis process 607 analyzes the source program information read in the one-line source input process 602 and generates object information. The object information generated by the syntax analysis process 607 is outputted to the object file 104 by an object output process 608. Next, list output determination processing 609 is performed. In list output determination processing 609, if there is an instruction to output a list in storage unit 107, one line source output processing 610 is executed, followed by debug option determination processing 611. As a result of the determination in the list output determination process 609, if there is no list output command in the storage unit 107, the one-line source output process 610 is not performed, and the debug option determination=14- process 611 is performed. Debug option judgment processing 6
If there is an instruction to output the line debug information table 301 of line debug information in the storage unit 107, 11 performs line debug information table output processing 612 for the number of lines of the read source program and its relative address. As a result of the determination in the debug option determination process 611, if there is no line debug information table output command in the storage unit 107, the line debug information table output process 612 is not performed. After that, the process returns to the one-line source input process 602. In this manner, object output, list output, and line debug information table 301 output are repeated until the end of the source program is reached.

次に、第7図のフローチャートを参照しながら、第1の
実施例の言語処理プログラム102の各処理の機能を説
明する。実施例1の言語処理プログラム102は、行数
カウンタと予約語フラグの初期化処理701,1行ソー
ス入力処理702、ソース終り判定処理703、終了処
理704、行数カウントアツプ処理705、相対アドレ
ス計算処理706、構文解析処理707、オブジェクト
出力処理708、リスト出力判定処理709.1行ソー
ス出力処理710、デバッグ・オプション判定処理71
1、予約語フラグ判定処理712、構造ブロック終り判
定処理713、予約語フラグOFF処理714、予約語
判定処理715、予約語フラグON処理717、デバッ
グ情報テーブル出力処理718から構成される。
Next, the functions of each process of the language processing program 102 of the first embodiment will be explained with reference to the flowchart of FIG. The language processing program 102 of the first embodiment includes initialization processing 701 of the line number counter and reserved word flag, single line source input processing 702, source end determination processing 703, termination processing 704, line number count up processing 705, and relative address calculation. Processing 706, Syntax analysis processing 707, Object output processing 708, List output determination processing 709. One line source output processing 710, Debug option determination processing 71
1, a reserved word flag determination process 712, a structure block end determination process 713, a reserved word flag OFF process 714, a reserved word determination process 715, a reserved word flag ON process 717, and a debug information table output process 718.

以下に第1の実施例の各処理の機能を説明する。The functions of each process in the first embodiment will be explained below.

但し、1行ソース入力処理702、ソース終判定処理7
03、終了処理704、行数カウントアツプ処理705
、相対アドレス計算処理706、構文解析処理707、
オブジェクト出力処理708、リスト出力判定処理70
9.1行ソース出力処理710、及び全体の処理の流れ
は第6図で説明した従来の処理と同様である。
However, one line source input processing 702, source end determination processing 7
03, end processing 704, line count up processing 705
, relative address calculation processing 706, syntax analysis processing 707,
Object output processing 708, list output determination processing 70
9. The one-line source output process 710 and the overall process flow are similar to the conventional process described in FIG.

その他の各処理内容は以下の通りである。Other processing details are as follows.

行数カウンタと予約語フラグの初期化処理701は、行
数カウンタを0データで、予約語フラグをOFFで初期
化する。
The line number counter and reserved word flag initialization process 701 initializes the line number counter with 0 data and the reserved word flag with OFF.

デバッグ・オプション判定処理711は、保存部107
内にライン・デバッグ情報あるいは構造ブロック・デバ
ッグ情報の第4図のデバッグ情報テーブル401への出
力命令があるか否かを判定する。
The debug option determination process 711 is performed by the storage unit 107
It is determined whether or not there is an instruction to output line debug information or structural block debug information to the debug information table 401 in FIG. 4.

予約語フラグ判定処理712は、現在処理中の入力ソー
スプログラムが構造ブロックプログラミング(以降、構
造ブロック・プログラミングと呼ぶ)か否かを判定する
処理である。
The reserved word flag determination process 712 is a process for determining whether the input source program currently being processed is structured block programming (hereinafter referred to as structural block programming).

構造ブロック終り判定処理713は、現在読み込んだソ
ースが構造ブロック・プログラミングの終了を示す予約
語行か否かを判定する処理である。
The structure block end determination process 713 is a process for determining whether the currently read source is a reserved word line indicating the end of structure block programming.

予約語フラグOFF処理714は、現在構造ブロック・
プログラミングが終了したことを示す為に、予約語フラ
グをOFFする処理である。
Reserved word flag OFF processing 714 is performed when the current structure block
This is the process of turning off the reserved word flag to indicate that programming has ended.

予約語判定処理715は、1行ソース入力処理702が
読み込んだソースプログラム構造ブロックの始りを示す
予約語行か、一般予約語行か、その他のソース行かを判
定する処理を行なう。
Reserved word determination processing 715 performs processing to determine whether a reserved word line indicating the beginning of the source program structure block read by single-line source input processing 702, a general reserved word line, or other source line is present.

17− 予約語フラグON処理717は、構造ブロック・プログ
ラミング中であることを示す為に、予約語フラグをON
する処理である。
17- Reserved word flag ON processing 717 turns on the reserved word flag to indicate that structure block programming is in progress.
This is the process of

デバッグ情報テーブル出力処理718は、読み込んだソ
ースプログラムの行数とその相対アドレスを、オブジェ
クト・ファイル104内のデバッグ情報テーブル401
に出力する。
The debug information table output process 718 outputs the number of lines of the read source program and their relative addresses to the debug information table 401 in the object file 104.
Output to.

ここで第1の実施例の言語処理プログラム102の処理
の流れを追いながら、第2図に示したソースプログラム
から第4図に示したデバッグ情報テーブル401が生成
される過程を説明する。
Here, the process of generating the debug information table 401 shown in FIG. 4 from the source program shown in FIG. 2 will be explained while following the processing flow of the language processing program 102 of the first embodiment.

先ず、入力ソースプログラムの行数カウンタを0データ
で、予約語フラグをOFFで初期化する処理701を行
なう。次に、入力ファイル101から1行ソースプログ
ラムを読み込む為の1行ソース入力処理702を実行す
る。1行ソース入力処理702によって入力されたソー
スプログラム情報は、ソース終り判定処理703によっ
てソースプログラムの終りか否かが判定される。判定の
結果路りであれば、終了処理704を行なっ18− て処理を終了する。ソースプログラムの終りでなければ
、行数をカウントアツプする処理705と、その入力ソ
ースプログラムの相対アドレス計算処理706を行ない
、次に入力したソースプログラム1行の構文解析処理7
07を行なう。構文解析処理707は1行ソース入力処
理702で読み込んだソースプログラム情報を解析しオ
ブジェクト情報を生成する。前記構文解析処理707に
よって生成されたオブジェクト情報はオブジェクト出力
処理708がオブジェクト・ファイル104に出力する
。次に、リスト出力判定処理709が行なわれる。リス
ト出力判定処理709では保存部107内にリスト出力
を行なう命令があれば1行ソース出力処理710を実行
し、続いてデバッグ・オプション判定処理711を行な
う。前記リスト出力判定処理709の判定の結果、リス
ト出力命令が保存部107に無い場合1行ソース出力処
理710を行なわず、デバッグ・オプション判定処理7
11を行なう。以上の処理は、データの初期化処理の一
部分を除いて従来の言語処理プログラム102の処理の
流れとほぼ同様である。
First, processing 701 is performed to initialize the line number counter of the input source program with 0 data and the reserved word flag with OFF. Next, a one-line source input process 702 for reading a one-line source program from the input file 101 is executed. The source program information input by the one-line source input process 702 is judged by the source end judgment process 703 as to whether or not it is the end of the source program. If the result of the determination is yes, a termination process 704 is performed and the process is terminated. If it is not the end of the source program, a process 705 of counting up the number of lines, a process 706 of calculating the relative address of the input source program, and then a syntax analysis process 7 of one line of the input source program.
Do 07. A syntax analysis process 707 analyzes the source program information read in the one-line source input process 702 and generates object information. The object information generated by the syntax analysis process 707 is outputted to the object file 104 by an object output process 708. Next, list output determination processing 709 is performed. In list output determination processing 709, if there is an instruction to output a list in storage unit 107, one line source output processing 710 is executed, followed by debug option determination processing 711. As a result of the determination in the list output determination process 709, if there is no list output command in the storage unit 107, the one-line source output process 710 is not performed and the debug option determination process 7 is performed.
Do step 11. The above processing is almost the same as the processing flow of the conventional language processing program 102, except for a part of the data initialization processing.

続いて、水弟1の実施例の言語処理プログラム102の
特徴を示す処理の流れについて説明する。
Next, the flow of processing showing the characteristics of the language processing program 102 of the embodiment of Mizuei 1 will be explained.

前記デバッグ・オプション判定処理711は、保存部1
07内にライン・デバッグ情報あるいは構造ブロック・
デバッグ情報のデバッグ情報テーブル401への出力命
令があるか否かを判定する処理である。前記デバッグ・
オプション判定処理711の判定の結果、ライン・デバ
ッグ情報のテーブル出力命令及び構造ブロック・デバッ
グ情報のテーブル出力命令が保存部107に無い場合、
処理はそのまま1行ソース入力処理702に移る。
The debug option determination process 711 is performed in the storage unit 1.
07 contains line debug information or structure block information.
This is a process of determining whether there is an instruction to output debug information to the debug information table 401. The debug
As a result of the determination in the option determination process 711, if there is no table output command for line debug information or table output command for structural block debug information in the storage unit 107,
The process moves directly to the one-line source input process 702.

保存部107内にライン・デバッグ情報のテーブル出力
の命令があれば、読み込んだソースプログラムの行数と
その相対アドレスをデバッグ情報テーブル401に出力
するデバッグ情報テーブル出力処理718を行なう。保
存部107内に構造ブロック・デバッグ情報のテーブル
出力の命令があれば、以下の処理を行なう。先ず、現在
処理中の入力ソースプログラムが構造ブロック・プログ
ラミング内か否かを判定する予約語フラグ判定処理71
2を行なう。予約語フラグ判定処理712の判定結果、
予約語フラグが構造ブロック・プログラミング中である
ことを示すON状態の場合、現在読み込んだソースが構
造ブロック・プログラミングの終了を示す予約語行であ
るか否かを判定する構造ブロック終り判定処理713を
行なう。
If there is a command to output a table of line debug information in the storage unit 107, a debug information table output process 718 is performed to output the number of lines of the read source program and its relative address to the debug information table 401. If there is a command to output a table of structural block debug information in the storage unit 107, the following processing is performed. First, reserved word flag determination processing 71 determines whether the input source program currently being processed is within structure block programming.
Do step 2. Judgment result of reserved word flag judgment process 712,
When the reserved word flag is in the ON state indicating that structure block programming is in progress, a structure block end determination process 713 is executed to determine whether the currently read source is a reserved word line indicating the end of structure block programming. Let's do it.

構造ブロック終り判定処理713の結果が構造ブロック
・プログラミングの終了を示す予約語ではなかった場合
、処理はそのまま1行ソース入力処理702に移る。構
造ブロック終り判定処理713の判定の結果、現在読み
込んだソースが構造ブロック・プログラミングの終了を
示す予約語行であった場合、予約語フラグをOFFにし
、処理は再び1行ソース入力処理702に移る。前記予
約語フラグ判定処理712の判定結果、予約語フラグが
構造ブロック・プログラミング中ではないことを示すO
FF状態の場合、次の様な処理を行なう。まず、1行ソ
ース入力処理702が読み込んだソースプログラムが構
造ブロックの始りを示す一21= 予約語の行か、一般予約語の行か、その他のソース行か
を判定する予約語判定処理715を行なう。
If the result of the structure block end determination process 713 is not a reserved word indicating the end of structure block programming, the process directly advances to the one-line source input process 702. As a result of the judgment in the structure block end judgment process 713, if the currently read source is a reserved word line indicating the end of structure block programming, the reserved word flag is turned OFF and the process returns to the one-line source input process 702. . As a result of the reserved word flag determination process 712, the reserved word flag indicates that the reserved word flag is not being used for structure block programming.
In the FF state, the following processing is performed. First, when the source program read by the one-line source input process 702 indicates the beginning of a structure block, a reserved word determination process 715 is performed to determine whether the source program is a reserved word line, a general reserved word line, or another source line.

判定の結果その他のソース行を示した場合、そのまま1
行ソース入力処理702に移る。安定の結果が構造ブロ
ック・プログラミングの始りを示す予約語の場合、予約
語フラグをONする。判定の結果が一般予約語を示した
場合、予約語フラグをOFFにする。その後、デバッグ
情報テーブル401へ読み込んだソースプログラムの行
数とその相対アドレスを出力するデバッグ情報テーブル
出力処理718を行ない、1行ソース入力処理702に
戻る。
If the result of the judgment indicates other source lines, leave it as 1.
The process moves to row source input processing 702. If the stable result is a reserved word indicating the start of structure block programming, the reserved word flag is turned ON. If the result of the determination indicates a general reserved word, the reserved word flag is turned OFF. Thereafter, a debug information table output process 718 is performed to output the number of lines of the source program read into the debug information table 401 and their relative addresses, and the process returns to the one line source input process 702.

この様にしてソースプログラムの終りが来るまでオブジ
ェクト出力とリスト出力と行単位あるいは構造ブロック
単位のデバッグ情報テーブル401の出力が繰返し行な
われる。
In this manner, object output, list output, and output of the debug information table 401 on a line-by-line or structural-block basis are repeatedly performed until the end of the source program is reached.

ここで上記第1の実施例の言語処理プログラム102の
処理の流れを追いながら、第2図に示した入力ソースプ
ログラムから第4図に示した構造ブロックのデバッグ情
報テーブル401が生成さ2 れろ過程を順に説明する。但し、行数カウンタと予約語
フラグの初期化処理701から1行ソース出力処理71
0迄の処理は従来の言語処理プログラム102の処理の
流れと同様である。ここでは特にデバッグ・オプション
が構造ブロック・デバッグ情報のデバッグ情報テーブル
401への出力命令になっている場合に関して、デバッ
グ・オプション判定処理711以降の処理の流れを説明
する。
Here, while following the processing flow of the language processing program 102 of the first embodiment, the debug information table 401 of the structure block shown in FIG. 4 is generated from the input source program shown in FIG. 2. will be explained in order. However, from the line number counter and reserved word flag initialization process 701 to the one line source output process 71
The processing up to 0 is the same as the processing flow of the conventional language processing program 102. Here, the flow of processing after the debug option determination process 711 will be described, particularly in the case where the debug option is an instruction to output structural block debug information to the debug information table 401.

デバッグ・オプション判定処理711が処理される時点
では入力ソースプログラムの各行は読み込まれ、その行
数カウント及び相対アドレスの値が既に求められている
At the time the debug option determination process 711 is processed, each line of the input source program has been read, and the line count and relative address values have already been determined.

デバッグ・オプション判定処理711は起勤行の解析結
果が保存された保存部107からデバッグ・オプション
命令として構造ブロック・デバッグ情報のデバッグ情報
テーブル401への出力命令を見つけると、予約語フラ
グ判定処理712へ処理を進める。予約語フラグは初期
値ではOFF状態なので、予約語フラグ判定処理712
の判定結果は1行ソース入力処理702が読み込んだ入
力ソースの予約語判定処理715へ処理を進める。
When the debug option determination process 711 finds an output command for the structure block debug information to the debug information table 401 as a debug option command from the storage unit 107 where the analysis results of the starting line are stored, the process proceeds to the reserved word flag determination process 712. Proceed with the process. Since the reserved word flag is in the OFF state by default, reserved word flag determination processing 712
As a result of the determination, the processing proceeds to reserved word determination processing 715 for the input source read by the one-line source input processing 702.

第2図の入力プログラム1〜2行目は一般予約語として
扱われるので、予約語判定処理715の判定結果、次に
その行の行数と相対アドレスをデバッグ情報テーブル4
01へ出力するデバッグ情報テーブル出力処理718を
行ない、2行目を読み込む為に1行ソース入力処理70
2へ処理を進める。入力ソースプログラムの2行目に関
しても1行目同様にその行の行数と相対アドレスをデバ
ッグ情報テーブル401へ出力するデバッグ情報テーブ
ル出力処理718が行なわれ、3行目を読み込む為にま
た1行ソース入力処理702へ処理を進める。3〜5行
目はその他の予約語として扱われるので、予約語判定処
理715で判定された結果、デバッグ情報テーブル40
1へは何も出力せず、次の行を読み込む為に1行ソース
入力処理702へ処理が進められる。6行目は構造ブロ
ック・プログラミングの始りを示す予約語として扱われ
るので、予約語判定処理7150判定後、予約語フラグ
ON処理717を実行し、そのソース行の行数カウント
と相対アドレスをデバッグ情報テーブル401に出力す
る処理718を行なう。
Since the first and second lines of the input program in FIG. 2 are treated as general reserved words, the judgment results of the reserved word judgment process 715 are then used to store the line number and relative address of the lines in the debug information table 715.
Perform debug information table output processing 718 to output to 01, and perform one-line source input processing 70 to read the second line.
Proceed to step 2. Regarding the second line of the input source program, debug information table output processing 718 is performed to output the line number and relative address of that line to the debug information table 401 in the same way as the first line, and one more line is executed to read the third line. The process advances to source input processing 702 . Lines 3 to 5 are treated as other reserved words, so as a result of the reserved word determination process 715, the debug information table 40
Nothing is output to 1, and the process proceeds to 1-line source input processing 702 to read the next line. The 6th line is treated as a reserved word that indicates the start of structure block programming, so after the reserved word determination process 7150 is determined, the reserved word flag ON process 717 is executed to debug the line count and relative address of that source line. A process 718 for outputting to the information table 401 is performed.

その後、7行目を読み込む為に1行ソース入力処理70
2へ進む。7〜9行目の処理は、予約語フラグ判定処理
712では予約語フラグが先の入力ツースフログラムの
6行目の処理の流れの中でON状態にされているので、
予約語フラグ判定処理712の結果、構造ブロック終り
判定処理713を実行する。7〜9行目のソースは構造
ブロック終り判定処理7130判定結果、先に読み込ん
だ6行目の構造ブロック・プログラミングの終りを表し
ているのではないので、そのまま次の行を読み込む為に
1行ソース入力処理702へ処理を進める。10行目の
処理は、予約語フラグ判定処理712では予約語フラグ
がON状態なので構造ブロック終り判定処理713を実
行する。10行目は先に読み込んだ6行目の構造ブロッ
ク・プログラミングの終わりを表しているので、構造ブ
ロック終り判定処理713の判定結果、予約語フラグ5 OFF処理714を実行し、11行目を読み込む為に1
行ソース入力処理702へ進む。11行目は3〜5行目
同様、その他の予約語として扱われるので、予約語判定
処理715で判定された結果、デバッグ情報テーブル4
01へは何も出力せず、12行目を読み込む為に1行ソ
ース入力処理702へ処理が進められる。12行目は一
般の予約語として扱われるので、予約語判定処理715
の判定後、そのソース行の行数カウントと相対アドレス
をデバッグ情報テーブル401に出力する処理718を
行なう。その後、次の行を読み込む為に1行ソース入力
処理702へ進む。1行ソース入力処理702実行後、
その行が入力ファイル101の終了かどうかを判定する
ソース終り判定処理703が実行される。第2図に示し
た入力ソースプログラムにはこの時点で終了したと判定
され、終了処理704が実行され、この第1の実施例の
言語処理プログラム102は第2図の入力ソースプログ
ラムの処理を終了する。
After that, one line source input process 70 to read the seventh line
Proceed to 2. In the processing on lines 7 to 9, in the reserved word flag determination process 712, the reserved word flag was set to ON in the flow of processing on line 6 of the previous input teeth flowgram.
As a result of reserved word flag determination processing 712, structural block end determination processing 713 is executed. The source in lines 7 to 9 is the result of the structure block end judgment process 7130, and does not represent the end of the structure block programming in line 6 that was read earlier, so one line is read in to read the next line. The process advances to source input processing 702 . In the process on the 10th line, since the reserved word flag is in the ON state in the reserved word flag determination process 712, a structure block end determination process 713 is executed. The 10th line represents the end of the structure block programming of the 6th line read earlier, so based on the judgment result of the structure block end judgment process 713, the reserved word flag 5 OFF process 714 is executed and the 11th line is read. for 1
The process advances to row source input processing 702. Like lines 3 to 5, the 11th line is treated as another reserved word, so as a result of the reserved word determination process 715, the debug information table 4
Nothing is output to 01, and the process advances to 1-line source input processing 702 to read the 12th line. Since the 12th line is treated as a general reserved word, the reserved word determination process 715
After the determination, processing 718 is performed to output the line count and relative address of the source line to the debug information table 401. Thereafter, the process advances to one-line source input processing 702 to read the next line. After executing the one-line source input process 702,
Source end determination processing 703 is executed to determine whether the line is the end of the input file 101. It is determined that the input source program shown in FIG. 2 has ended at this point, and termination processing 704 is executed, and the language processing program 102 of this first embodiment ends the processing of the input source program shown in FIG. do.

以上の説明により、本発明の第1の実施例は構6 造ブロック単位のデバッグ情報をオブジェクト・ファイ
ル104に出力する事が可能となる。また、リンカは前
述のオブジェクト・ファイル104から得られるデバッ
グ情報テーブル401の形式が、従来のライン・デバッ
グ情報テーブル301と同様の形式であることから、従
来通りの処理によって、入力ソースプログラムの構造ブ
ロック単位のデバッグを可能にするデバッグ情報をロー
ドモジュール・ファイルに出力することが可能となる。
As described above, the first embodiment of the present invention can output debug information in units of six structural blocks to the object file 104. In addition, since the format of the debug information table 401 obtained from the object file 104 described above is the same as the conventional line debug information table 301, the linker can extract the structural blocks of the input source program through conventional processing. It becomes possible to output debug information that enables unit debugging to the load module file.

第1の実施例では構造ブロックの中に更に構造ブロック
があった場合でも、外側の構造ブロックに関する構造ブ
ロック単位のデバッグ情報出力のみ行なっていた。これ
に対し第2の実施例では構造ブロックの中に更に構造ブ
ロックがあった場合でも、外側の構造ブロックのデバッ
グ情報出力に加えて中にある構造ブロックのデバッグ情
報テーブルの出力を行なう点が異なる。
In the first embodiment, even if there is another structural block within the structural block, only the debug information for each structural block regarding the outer structural block is output. On the other hand, the second embodiment differs in that even if there is another structural block within a structural block, the debugging information table of the internal structural block is output in addition to the debugging information of the outer structural block. .

本発明の第2の実施例について図面を参照しながら詳し
く説明する。
A second embodiment of the present invention will be described in detail with reference to the drawings.

第5図は、第2の実施例の言語処理プログラム102が
第2図のソースプログラムから構造ブロック単位のデバ
ッグ情報を出力するデバッグ情報テーブル501である
。また、第3図の従来のライン・デバッグ情報テーブル
301と第4図の第1の実施例のデバッグ情報テーブル
401と第5図の第2実施例のデバッグ情報テーブル5
01のテーブル・フォーマットは同一形式である。
FIG. 5 is a debug information table 501 in which the language processing program 102 of the second embodiment outputs debug information for each structural block from the source program of FIG. 2. Further, the conventional line debug information table 301 in FIG. 3, the debug information table 401 in the first embodiment in FIG. 4, and the debug information table 5 in the second embodiment in FIG.
The table format of 01 is the same format.

第8図は第2の実施例の言語処理プログラム102の処
理を表したフローチャートである。
FIG. 8 is a flowchart showing the processing of the language processing program 102 of the second embodiment.

第2の実施例の言語処理プログラム102は、行数カウ
ンタとブロック終了フラグと構造ブロック・カウンタの
初期化処理801.1行ソース入力処理802、ソース
終り判定処理803、終了処理804、行数カウントア
ツプ処理805、相対アドレス計算処理806、構文解
析処理807、オブジェクト出力処理808、リスト出
力判定処理809.1行ソース出力処理8101デバツ
グ・オプション判定処理811、予約語判定処理812
、構造ブロック・カウントアツプ処理813、ブロック
終了フラグ判定処理814、ブロック終了フラグOFF
処理815、デバッグ情報テーブル出力処理816、構
造ブロック・カウント判定処理817、ブロック終了フ
ラグ判定処理818、ブロック終了フラグOFF処理8
19、デバッグ情報テーブル出力処理820、構造ブロ
ック終り判定処理821、ブ□ツク終了フラグON処理
822、構造ブロック・カウンタのレベル合せ処理82
3から構成される。
The language processing program 102 of the second embodiment includes initialization processing 801 of a line counter, block end flag, and structure block counter, one-line source input processing 802, end-of-source determination processing 803, termination processing 804, and line number counting. Up processing 805, relative address calculation processing 806, syntax analysis processing 807, object output processing 808, list output judgment processing 809.1 line source output processing 8101 debug option judgment processing 811, reserved word judgment processing 812
, structure block count up processing 813, block end flag determination processing 814, block end flag OFF
Process 815, debug information table output process 816, structural block count determination process 817, block end flag determination process 818, block end flag OFF process 8
19. Debug information table output processing 820, structural block end determination processing 821, block end flag ON processing 822, structural block counter level matching processing 82
Consists of 3.

ここで第2の実施例の各処理の機能を説明する。Here, the functions of each process in the second embodiment will be explained.

但し、1行ソース入力処理802、ソース終り判定処理
803、終了処理804、行数カウントアツプ処理80
5、相対アドレス計算処理806、構文解析処理807
、オブジェクト出力処理808、リスト出力判定処理8
09.1行ソース出力処理810、デバッグ・オプショ
ン判定処理811、予約語判定処理812、デバッグ情
報テーブル出力処理816と820、構造ブロック終り
判定処理821及び全体の処理の流れは第7図で説明し
た第1の実施例の処理と同様である。
However, one line source input process 802, source end determination process 803, end process 804, line count up process 80
5. Relative address calculation processing 806, syntax analysis processing 807
, object output processing 808 , list output determination processing 8
09.1 line source output processing 810, debug option determination processing 811, reserved word determination processing 812, debug information table output processing 816 and 820, structure block end determination processing 821, and the overall processing flow are explained in FIG. The processing is similar to that of the first embodiment.

その他の各処理内容は以下の通りである。Other processing details are as follows.

29、− 行数カウンタとブロック終了フラグと構造ブロック・カ
ウンタの初期化処理801は、行数カウンタと構造ブロ
ック・カウンタをOデータで、ブロック終了フラグをO
FFで初期化する。
29, - Initialization process 801 of the line number counter, block end flag, and structure block counter sets the line number counter and structure block counter to O data, and sets the block end flag to O.
Initialize with FF.

構造ブロック・カウントアツプ処理813は、1行ソー
ス入力処理802の読み込んだソースが構造ブロック・
プログラミングの始りを表す予約語であった場合に、そ
の構造ブロックの階層の深さをカウントアツプする為の
処理である。
The structure block count-up process 813 is performed when the source read in the one-line source input process 802 is a structure block.
This is a process to count up the depth of the structure block when it is a reserved word that represents the beginning of programming.

ブロック終了フラグ判定処理814と818は、現在読
み込んでいるソース行の1行前のソースが構造ブロック
・プログラミングの終りを表す行であったか否かを判定
する処理である。
Block end flag determination processes 814 and 818 are processes for determining whether the source line one line before the currently read source line is a line representing the end of structure block programming.

ブロック終了フラグOFF処理815と819は、前記
ブロック終了フラグがON状態の場合にこれをOFF状
態にする処理である。
Block end flag OFF processes 815 and 819 are processes for turning off the block end flag when it is in the ON state.

構造ブロック・カウント判定処理817は、構造ブロッ
ク・プログラミングの現在の階層の深さを判定する処理
である。
The structural block count determination process 817 is a process for determining the depth of the current hierarchy of structural block programming.

ブロック終了フラグON処理822は、構造ブ0− ロック終り判定処理8210判定結果、現在読み込んだ
ソース行が構造ブロック・プログラミングの終りを表す
行であった場合に、前記ブロック終了フラグをON状態
にする処理である。
The block end flag ON process 822 turns the block end flag ON if the currently read source line is a line representing the end of structure block programming as a result of the structure block 0-lock end judgment process 8210. It is processing.

構造ブロック・カウンタのレベル合せ処理823は、構
造ブロック終り判定処理8210判定結果、現在読み込
んだソース行が構造ブロック・プログラミングの終りを
表す行であった場合に、構造ブロック・プログラミング
の階層レベルを合せる処理を行なう。
The structure block counter level matching process 823 matches the hierarchical level of the structure block programming if the currently read source line is a line representing the end of the structure block programming as a result of the judgment in the structure block end judgment process 8210. Process.

ここで第2の実施例の言語処理プログラム102の処理
の流れを追いながら、第2図に示したソースプログラム
から第5図に示したデバッグ情報テーブル501が生成
される過程を説明する。
Here, the process of generating the debug information table 501 shown in FIG. 5 from the source program shown in FIG. 2 will be explained while following the processing flow of the language processing program 102 of the second embodiment.

先ず、入力ソースプログラムの行数カウンタと構造ブロ
ック・カウンタを0データで、ブロック終了フラグをO
FFで初期化する処理801を行なう。次に、入力ファ
イル101から1行ソースプログラムを読み込む為の1
行ソース入力ソース入力処理802を実行する。1行ソ
ース入力処理802によって入力されたソースプログラ
ム情報は、ソース終り判定処理803によってソースプ
ログラムの終りか否かが判定される。判定の結果路りで
あれば、終了処理804を行なって処理を終了する。ソ
ースプログラムの終りでなげれば、行数をカウントアツ
プする処理805と、その入力ソースプログラムの相対
アドレス計算処理806を行ない、次に入力したソース
プログラム1行の構文解析処理807を行なう。構文解
析処理807は1行ソース入力処理802で読み込んだ
ソースプログラム情報を解析しオブジェクト情報な生成
する。前記構文解析処理807によって生成されたオブ
ジェクト情報はオブジェクト出力処理808がオブジェ
クト・ファイル104に出力する。次に、リスト出力判
定処理809が行なわれる。リスト出力判定処理809
では保存部107内にリスト出力を行なう命令があれば
1行ソース出力処理810を実行し、続いてデバッグ・
オプション判定処理811を行なう。前記リスト出力判
定処理809の判定の結果、リスト出力命令が保存部1
07に無い場合1行ソース出力処理810を行なわず、
デバッグ・オプション判定処理811を行なう。以上の
処理は、データの初期化処理部分を一部除いて第1の実
施例の言語処理プログラム102の処理の流れと同じで
ある。
First, set the line number counter and structure block counter of the input source program to 0 data, and set the block end flag to O.
Processing 801 for initializing the FF is performed. Next, 1 to read a one-line source program from the input file 101.
Row source input source input processing 802 is executed. The source program information input by the one-line source input process 802 is judged by the source end judgment process 803 as to whether or not it is the end of the source program. If the result of the determination is yes, a termination process 804 is performed to terminate the process. If the source program ends, a process 805 for counting up the number of lines, a process 806 for calculating the relative address of the input source program, and then a syntax analysis process 807 for one line of the input source program. A syntax analysis process 807 analyzes the source program information read in the one-line source input process 802 and generates object information. The object information generated by the syntax analysis process 807 is outputted to the object file 104 by an object output process 808. Next, list output determination processing 809 is performed. List output determination processing 809
Now, if there is an instruction to output a list in the storage unit 107, execute the one-line source output process 810, and then perform debugging.
Option determination processing 811 is performed. As a result of the determination in the list output determination process 809, the list output command is
If it is not in 07, do not perform the one-line source output process 810,
Debug option determination processing 811 is performed. The above processing is the same as the processing flow of the language processing program 102 of the first embodiment, except for part of the data initialization processing part.

続いて、第2の実施例の言語処理プログラム102の特
徴を示す処理の流れについて説明する。
Next, a processing flow showing the characteristics of the language processing program 102 of the second embodiment will be explained.

前記デバッグ・オプション判定処理811は、保存部1
07内にライン・デバッグ情報あるいは構造ブロック・
デバッグ情報のデバッグ情報テーブル401への出力命
令があるか否かを判定する処理である。前記デバッグ・
オプション判定処理711の判定の結果、ライン・デバ
ッグ情報のテーブル出力命令及び構造ブロック・デバッ
グ情報のテーブル出力命令が保存部107に無い場合、
処理はそのまま1行ソース入力処理802に移る。
The debug option determination process 811 is performed in the storage unit 1.
07 contains line debug information or structure block information.
This is a process of determining whether there is an instruction to output debug information to the debug information table 401. The debug
As a result of the determination in the option determination process 711, if there is no table output command for line debug information or table output command for structural block debug information in the storage unit 107,
The process moves directly to the one-line source input process 802.

保存部10.7内にライン・デバッグ情報のテーブル出
力の命令があれば、読み込んだソースプログラムの行数
とその相対アドレスをデバッグ情報テーブル501に出
力するデバッグ情報テーブル33− 出力処理816を行なう。保存部107内に構造ブロッ
ク・デバッグ情報のテーブル出力の命令があれば、以下
の処理を行なう。先ず、1行ソース入力処理802が読
み込んだソースプログラムが構造ブロックの始りを示す
予約語の行か、一般予約語の行か、その他のソース行か
を判定する予約語判定処理812を行なう。判定の結果
その他のソース行を示した場合、そのまま1行ソース入
力処理802に移る。判定の結果が構造ブロック・プロ
グラミングの始りを示す予約語の場合、構造ブロック・
プログラミングの階層レベルを表す構造ブロック・カウ
ントアツプ処理813を行なう。
If there is an instruction to output a table of line debug information in the storage unit 10.7, a debug information table 33-output process 816 is performed to output the number of lines of the read source program and its relative address to the debug information table 501. If there is a command to output a table of structural block debug information in the storage unit 107, the following processing is performed. First, the source program read by the one-line source input process 802 performs a reserved word determination process 812 that determines whether a reserved word line indicating the start of a structure block, a general reserved word line, or other source lines are identified. If the result of the determination indicates another source line, the process directly advances to the one-line source input process 802. If the result of the determination is a reserved word that indicates the start of structure block programming, the structure block
A structural block count-up process 813 representing hierarchical levels of programming is performed.

この後、ブロック終了フラグ判定処理814を実行し、
判定結果がブロック終了フラグがON状態で、現在読み
込んでいるソース行の1行前のソースが構造ブロック・
フログラミングの終りを表す行であった場合、ブロック
終了フラグをOFF状態にする処理815を行ない、デ
バッグ情報テーブル501に読み込んだソースの行数と
相対アドレスを出力する処理816を行ない、ブロック
終31.4− 了フラグがOFF状態の場合は、そのまま前記デバッグ
情報テーブル出力処理816を行なう。その後、1行ソ
ース入力処理802に処理を戻す。
After this, block end flag determination processing 814 is executed,
The judgment result is that the block end flag is ON, and the source line before the currently read source line is a structure block.
If the line indicates the end of the block programming, a process 815 is performed to turn off the block end flag, a process 816 is performed to output the number of lines of the source read into the debug information table 501, and the relative address, and the block end flag 31 is output. .4- If the completion flag is in the OFF state, the debug information table output processing 816 is performed as is. Thereafter, the process returns to the one-line source input process 802.

前記予約語判定処理812の判定結果が一般予約語の場
合、構造ブロック・カウント判定処理817を行なう。
If the result of the reserved word determination process 812 is a general reserved word, a structural block count determination process 817 is performed.

構造ブロック・プログラミングの現在の階層を深さを示
す構造ブロック・カウンタの値が0の場合、読み込んだ
その行の行数と相対アドレスをデバッグ情報テーブル5
01に出力し、そのまま1行ソース入力処理802へ処
理を戻す。前記構造ブロック・カウンタがO以外の値の
場合、ブロック終了フラグ判定処理818を行なう。ブ
ロック終了フラグが現在読み込んでいるソース行の1行
前の行が構造ブロック・フログラミングの終りを表す行
であったことを示すON状態の場合、現在読み込んでい
るソース行の行数と相対アドレスをデバッグ情報テーブ
ル501に出力し、構造ブロック終り判定処理821を
行なう。
If the value of the structure block counter that indicates the depth of the current layer of structure block programming is 0, the number of read lines and the relative address are displayed in the debug information table 5.
01, and the process returns to the one-line source input process 802. If the structural block counter has a value other than O, block end flag determination processing 818 is performed. If the block end flag is ON, indicating that the line before the currently read source line was the line that represents the end of structure block programming, the line number and relative address of the currently read source line. is output to the debug information table 501, and a structural block end determination process 821 is performed.

ブロック終了フラグがOFFの場合、そのまま構造ブロ
ック終り判定処理821を行なう。構造ブロック終り判
定処理821の判定の結果、現在読み込んだソース行が
構造ブロック・プログラミングの終りを表す行であった
場合に、ブロック終了フラグをON状態にする処理82
2を行ない、続いて構造ブロック・プログラミングの階
層レベルを合せる処理823を行なう。そうでなかった
場合、そのまま1行ソース入力処理802へ処理を戻す
If the block end flag is OFF, the structural block end determination process 821 is directly performed. If the result of the judgment in the structure block end judgment process 821 is that the currently read source line is a line representing the end of structure block programming, a process 82 for turning on the block end flag.
2 is performed, and then processing 823 for matching the hierarchical levels of structure block programming is performed. If not, the process returns to the one-line source input process 802.

この様にしてソースプログラムの終りが来るまでオブジ
ェクト出力とリスト出力と行単位あるいは構造ブロック
単位のデバッグ情報テーブル501の出力が繰返し行な
われる。
In this manner, object output, list output, and output of the debug information table 501 on a line-by-line or structural-block basis are repeatedly performed until the end of the source program is reached.

ここでこの第2の実施例の言語処理プログラム102の
処理の流れを追いながら、第2図に示した入力ソースプ
ログラムから第5図に示した構造ブロックのデバッグ情
報テーブル501が生成される過程を順に説明する。但
し、行数カウンタと構造ブロック・カウンタとブロック
終了フラグの初期化処理801からデバッグ・オプショ
ン判定処理811迄の処理は第1の実施例の言語処理プ
ログラム102の処理の流れと同様である。ここでは特
にデバッグ・オプションが構造ブロック・デバッグ情報
のデバッグ情報テーブル501への出力命令になってい
る場合に関して、予約語判定処理812以降の処理の流
れを説明する。
Here, while following the processing flow of the language processing program 102 of this second embodiment, we will explain the process by which the debug information table 501 of the structure block shown in FIG. 5 is generated from the input source program shown in FIG. I will explain them in order. However, the processing from initialization processing 801 of the line number counter, structure block counter, and block end flag to debug option determination processing 811 is the same as the processing flow of the language processing program 102 of the first embodiment. Here, the flow of processing after the reserved word determination process 812 will be described, particularly in the case where the debug option is an output command for structural block debug information to the debug information table 501.

予約語判定処理812が処理される時点では入力ソース
プログラムの各行は読み込まれ、その行数カウント及び
相対アドレスの値が既に求められている。デバッグ・オ
プション判定処理811が保存部107からデバッグ・
オプション命令として構造ブロック・デバッグ情報のデ
バッグ情報テーブル501への出力命令を見つけると、
予約語判定処理812へ処理を進める。第2図の入力プ
ログラム1〜2行目は一般予約語として扱われるので、
予約語判定処理812の判定結果、構造ブロック・カウ
ント判定処理817へと処理を進める。構造ブロック・
カウンタは初期値の0データのままなので、次にその行
の行数と相対アドレスをデバッグ情報テーブル501へ
出力するデバッグ情報テーブル出力処理816を行ない
、?37−。
At the time the reserved word determination process 812 is processed, each line of the input source program has been read, and the line count and relative address values have already been determined. The debug option determination process 811 stores the debug option from the storage unit 107.
When an instruction to output structure block debug information to the debug information table 501 is found as an optional instruction,
The process advances to reserved word determination processing 812. Lines 1 and 2 of the input program in Figure 2 are treated as general reserved words, so
Based on the determination result of reserved word determination processing 812, the process advances to structural block count determination processing 817. Structural block/
Since the counter remains at its initial value of 0 data, next the debug information table output process 816 is performed to output the line number and relative address of that line to the debug information table 501. 37-.

行目を読み込む為に1行ソース入力処理702へ処理を
戻す。入力ソースプログラムの2行目に関しても1行目
同様にその行の行数と相対アドレスをデバッグ情報テー
ブル501へ出力するデバッグ情報テーブル出力処理8
16が行なわれ、3行目を読み込む為にまた1行ソース
入力処理802へ処理を戻す。3〜5行目はその他の予
約語として扱われるので、予約語判定処理812で判定
された結果、デバッグ情報テーブル501へは何も出力
せず、次の行を読み込む為に1行ソース入力処理802
へ処理が戻される。6行目は構造ブロック・プログラミ
ングの始りを示す予約語として扱われるので、予約語判
定処理812の判定後、構造ブロック・カウントアツプ
処理813を行ない、続いてブロック終了フラグ判定処
理814を行なう。ブロック終了フラグはこの時点では
まだOFFの状態なので、6行目の行数と相対アドレス
をデバッグ情報テーブル501に出力する処理816を
行なう。その後、7行目を読み込む為に1行ソース入力
処理802へ進む。7行目の処理=38−\ は、前記予約語判定処理812で一般予約語として判定
され、続いて構造ブロック・カウント判定処理を行なう
。構造ブロック・カウンタはこの時点では1なので、次
にブロック終了フラグ判定処理818が行なわれる。ブ
ロック終了フラグはこの時点ではOFFである為、次に
そのソースが構造ブロック・プログラミングの終りを示
す行かどうかを判定する構造ブロック終り判定処理82
1を行ない、7行目が構造ブロックの終りではないこと
から、8行目の読み込みを行なう為の1行ソース入力処
理802へ処理を戻す。8行目は構造ブロック・プログ
ラミングの始りを表す予約語なので、予約語判定処理8
12以降は、6行目同様に構造ブロック・カウントアツ
プ処理813を行ない、続いてブロック終了フラグ判定
処理814を行なう。ブロック終了フラグはこの時点で
はまだOFFの状態なので、8行目の行数と相対アドレ
スをデバッグ情報テーブル501に出力する処理816
を行なう。その後、9行目を読み込む為に1行ソース入
力処理802へ進む。9行目のソースは前述の8行目の
構造ブロック・プログラミングの終りを表す一般予約語
である為、その処理の流れは、先ず、予約語判定処理8
12で一般予約語として判定された後、構造ブロック・
カウント判定処理817を行なう。構造ブロック・カウ
ンタはこの時点では2なので、次にブロック終了フラグ
判定処理818が行なわれる。ブロック終了フラグはこ
の時点ではOFFである為、次のそのソースが構造ブロ
ック・プログラミングの終りを示す行かどうかを判定す
る構造ブロック終り判定処理821を行なう。構造ブロ
ック・プログラミングの終りを表す一般予約語であるの
で、判定の結果ブロック終了フラグをON状態する処理
822に処理を進める。次に、構造ブロック・カウンタ
のレベル合せ処理823を行なう。ここでは8行目の構
造ブロック・プログラミングの開始以前の階層レベルに
構造ブロック・カウンタを戻す為、構造ブロック・カウ
ンタは1となる。その後処理は10行目の読み込みの為
に1行ソース入力処理802に戻る。10行目のソース
は前述の6行目の構造ブロック・プログラミングの終り
を表す一般予約語である為、その処理の流れは、先ず、
予約語判定処理812で一般予約語として判定された後
、構造ブロック・カウント判定処理817を行なう。構
造ブロック・カウンタはこの時点では土なので、次にブ
ロック終了フラグ判定処理818が行なわれる。ブロッ
ク終了フラグはこの時点では立Xである為、次にブロッ
ク終了フラグをOFF状態する処理819に処理を進め
、その10行目の行数と相対アドレスをデバッグ情報テ
ーブル501に出力する処理820を行なう。
In order to read the first line, the process returns to the one-line source input process 702. Debug information table output processing 8 for outputting the line number and relative address of the second line of the input source program to the debug information table 501 in the same way as for the first line.
16 is performed, and the process returns to the one-line source input process 802 to read the third line. The 3rd to 5th lines are treated as other reserved words, so as a result of the determination in reserved word determination processing 812, nothing is output to the debug information table 501, and single-line source input processing is performed to read the next line. 802
Processing is returned to. The sixth line is treated as a reserved word indicating the start of structural block programming, so after the reserved word determination process 812, a structural block count-up process 813 is performed, followed by a block end flag determination process 814. Since the block end flag is still in the OFF state at this point, processing 816 is performed to output the line number and relative address of the sixth line to the debug information table 501. Thereafter, the process advances to one-line source input processing 802 to read the seventh line. The process =38-\ on the seventh line is determined as a general reserved word in the reserved word determination process 812, and then a structural block count determination process is performed. Since the structure block counter is 1 at this point, block end flag determination processing 818 is performed next. Since the block end flag is OFF at this point, the next step is a structure block end determination process 82 that determines whether the source line indicates the end of structure block programming.
1, and since the 7th line is not the end of the structure block, the process returns to the 1-line source input process 802 for reading the 8th line. The 8th line is a reserved word that represents the beginning of structure block programming, so reserved word determination processing 8
From 12 onwards, similar to the 6th line, structural block count up processing 813 is performed, followed by block end flag determination processing 814. Since the block end flag is still in the OFF state at this point, processing 816 outputs the line number and relative address of the 8th line to the debug information table 501.
Do this. Thereafter, the process advances to 1-line source input processing 802 to read the 9th line. Since the source on the 9th line is a general reserved word that represents the end of the structure block programming on the 8th line, the processing flow first starts with the reserved word determination process 8.
After being determined as a general reserved word in step 12, the structure block
Count determination processing 817 is performed. Since the structure block counter is 2 at this point, block end flag determination processing 818 is performed next. Since the block end flag is OFF at this point, a structure block end determination process 821 is performed to determine whether the next source indicates the end of the structure block programming. Since this is a general reserved word indicating the end of structure block programming, the process advances to step 822 where the block end flag is turned on as a result of the determination. Next, level matching processing 823 of the structure block counter is performed. Here, the structure block counter becomes 1 because the structure block counter is returned to the hierarchical level before the start of structure block programming on the 8th line. After that, the process returns to the one-line source input process 802 to read the tenth line. Since the source on the 10th line is a general reserved word that represents the end of the structure block programming on the 6th line, the processing flow is as follows:
After the word is determined as a general reserved word in reserved word determination processing 812, structural block count determination processing 817 is performed. Since the structure block counter is empty at this point, block end flag determination processing 818 is performed next. Since the block end flag is set to X at this point, the process then proceeds to step 819 where the block end flag is turned OFF, and then step 820 where the line number and relative address of the 10th line are output to the debug information table 501. Let's do it.

続いてそのソースが構造ブロック・プログラミングの終
りを示す行かどうかを判定する構造ブロック終り判定処
理821を行ない、判定の結果ブロック終了フラグをO
N状態する処理822に処理を進める。次に、構造ブロ
ック・カウンタのレベル合せ処理823を行なう。ここ
では6行目の構造ブロック・プログラミングの開始以前
の階層レベルに構造ブロック・カウンタを戻す為、構造
ブロック・カウンタは立となる。その後処理は1141
− 行目の読み込みの為に1行ソース入力処理802に戻る
。11行目はその他の予約語として扱われるので予約語
判定処理812の判定結果、そのまま12行目を読み込
む為に1行ソース入力処理802に戻る。12行目は一
般予約語として扱われるので予約語判定処理812以降
、次の様な処理に進む。前記予約語判定処理812の判
定結果構造ブロック・カウント判定処理817を行ない
、構造ブロック・カウンタがこの時点でOである為、1
2行目の行数とその相対アドレスをデバッグ情報テーブ
ル501に出力する処理816をおこなう。その後、次
の行を読み込む為に1行ソース入力処理802へ処理が
戻る。1行ソース入力処理802実行後、その行が入力
ファイル101の終了かどうかを判定するソース終り判
定処理703が実行される。第2図に示した入力ソース
プログラムはこの時点で終了したと判定され、終了処理
804が実行され、第2の実施例の言語処理プログラム
102は第2図の入力ソースプログラムの処理を終了す
る。
Next, a structure block end judgment process 821 is performed to judge whether the source line indicates the end of structure block programming, and as a result of the judgment, the block end flag is set to O.
The process advances to process 822 for entering the N state. Next, level matching processing 823 of the structure block counter is performed. Here, since the structure block counter is returned to the hierarchical level before the start of structure block programming on the 6th line, the structure block counter becomes erect. The subsequent processing is 1141
- Return to the 1-line source input process 802 to read the 1st line. Since the 11th line is treated as another reserved word, the process returns to the 1-line source input process 802 to read the 12th line as is based on the determination result of the reserved word determination process 812. Since the 12th line is treated as a general reserved word, the process proceeds from reserved word determination processing 812 onward to the following processing. As a result of the reserved word determination processing 812, the structural block count determination processing 817 is performed, and since the structural block counter is O at this point, the result is 1.
A process 816 is performed to output the second line number and its relative address to the debug information table 501. Thereafter, the process returns to the one-line source input process 802 to read the next line. After executing the one-line source input process 802, the end-of-source determination process 703 is executed to determine whether that line is the end of the input file 101. It is determined that the input source program shown in FIG. 2 has ended at this point, and end processing 804 is executed, and the language processing program 102 of the second embodiment ends the processing of the input source program shown in FIG.

2− 以上の説明により、本発明の第2の実施例は構造ブロッ
クの中にある構造ブロックのデバッグ情報をオブジェク
ト・ファイル104に出力する事が可能となる。また、
リンカは前述のオブジェクト・ファイル104から得ら
れるデバッグ情報テーブル501の形式が、従来のライ
ン・デバッグ情報テーブル301と同様の形式であるこ
とから、従来通りの処理によって、入力ソースプログラ
ムの階層構造になった構造ブOツクに関してもデバッグ
情報をロードモジュール・ファイルに出力することが可
能となる。
2- According to the above explanation, the second embodiment of the present invention can output debug information of a structural block within a structural block to the object file 104. Also,
Since the format of the debug information table 501 obtained from the object file 104 described above is similar to the conventional line debug information table 301, the linker uses conventional processing to create a hierarchical structure of the input source program. It is also possible to output debug information to the load module file regarding the structured block.

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

この発明によって、言語処理プ□ダラムの構文解析によ
りソースプログラム中の構造ブロックを判定し、デバッ
グ用ソースライン情報として、ンースフログラム情報の
構造ブロックを考慮した行番号情報の出力をすることが
可能になる。その結果デバッガによりプログラム解析を
行なう場合、ソースプログラムの構造、処理の流れを理
解しやすく、デバッグ効率をあげるという優れた効果が
ある。
This invention makes it possible to determine the structural blocks in a source program by syntactic analysis of a language processing program, and to output line number information that takes into account the structural blocks of source program information as source line information for debugging. . As a result, when a program is analyzed using a debugger, it is easy to understand the structure and processing flow of the source program, which has the excellent effect of increasing debugging efficiency.

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

第1図は、本発明の実施例を示すシステム構成図、第2
図は、入力ファイルの内容を示す図、第3図は、従来の
ライン・デバッグ情報テーブル301を示す図、第4図
は、第1の実施例のデバッグ情報テーブル401を示す
図、第5図は、第2の実施例のデバッグ情報テーブル5
01を示す図、第6図は、従来の言語処理プログラムの
フローチャートを示す図、第7図は、第1の実施例ノ言
語処理プログラムのフローチャートを示す図、第8図は
、第2の実施例の言語処理プログラムのフローチャート
を示す図である。 101・・・・・・入力ファイル、102・・・・・・
言語処理プ巨グラム、103・・・・・・リスト・ファ
イル、104・・・・・・オブジェクト・ファイル、1
05・・・・・・キーボード、106・・・・・・起勤
行解析部、107・・・・・・保存部、108・・・・
・・入力部、109・・・・・・構文解析部、110・
・・・・・リスト出力部、111・・・・・・オブジェ
クト情報生成部、112・・・・・・構造ブロック・デ
バッグ情報生成部、113・・・・・・オブジェクト出
力部、601・・・・・・行数カウンタ初期化処理、6
02・・・・・・1行ソース入力処理、603・・・・
・・ソース終り判定処理、604・・・・・・終了処理
、605・・・・・・行数カウントアツプ処理、606
・・・・・・相対アドレス計算処理、607・・・・・
・構文解析処理、608・・・・・・オブジェクト出力
処理、609・・・・・・リスト出力判定処理、610
・・・・・・1行ソース出力処理、611・・・・・・
デバッグ・オプション判定処理、612・・・・・・ラ
イン・デバッグ情報テーブル出力処理、701・・・・
・・行数カウンタ、予約語フラグ初期化処理、702・
・・・・・1行ソース入力処理、703・・・・・・ソ
ース終り判定処理、704・・・・・・終了処理、70
5・・・・・・行数カウントアツプ処理、706・・・
・・・相対アドレス計算処理、707・・・・・・構文
解析処理、708・・・・・・オブジェクト出力処理、
709・・・・・・リスト出力判定処理、710・・・
・・・l6ソース出力処理、γ11・・・・・デバッグ
・オプション判定処理、712・・・・・・予約語フラ
グ判定処理、713・・・・・・構造ブロック終り5 判定処理、714・・・・・・予約語フラグOFF処理
、715・・・・・・予約語判定処理、717・・・・
・・、予約語フラグON処理、718・・・・・・デバ
ッグ情報テーブル出力処理、801・・・・・・行数カ
ウンタ、構造ブロック・カウンタ、ブロック終了フラグ
初期化処理、802・・・・・・1行ソース入力処理、
803・・・・・・ソース終り判定処理、804・・・
・・・終了処理、805・・・・・・行数カウントアツ
プ処理、806・・・・・・相対アドレス計算処理、8
07・・・・・・構文解析処理、808・・・・・・オ
ブジェクト出力処理、809・・・・・・リスト出力判
定処理、810・・・・・・1行ソース出力処理、81
1・・・・・・デバッグ・オプション判定処理、812
・・・・・・予約語判定処理、813・・・・・・構造
ブロック・カウントアツプ判定処理、814,818・
・・・・・ブロック終了フラグ判定処理、815,81
9・・・・・・ブロック終了フラグOFF処理、816
,820・・・・・・デバッグ情報テーブル出力処理、
817・・・・・・構造ブロック・カウント判定処理、
821・・・・・・構造ブロック終り判定処理、822
・・・・・・ブロック終了フラグON処理、823・・
・・・・構造ブロック・カウ46〜 ンタのレベル合せ処理。
FIG. 1 is a system configuration diagram showing an embodiment of the present invention, and FIG.
3 shows the contents of the input file, FIG. 3 shows the conventional line debug information table 301, FIG. 4 shows the debug information table 401 of the first embodiment, and FIG. is the debug information table 5 of the second embodiment
01, FIG. 6 is a flowchart of the conventional language processing program, FIG. 7 is a flowchart of the language processing program of the first embodiment, and FIG. 8 is the flowchart of the language processing program of the first embodiment. FIG. 3 is a diagram illustrating a flowchart of an example language processing program. 101... Input file, 102...
Language processing program, 103...List file, 104...Object file, 1
05... Keyboard, 106... Commencement line analysis department, 107... Storage department, 108...
...Input section, 109...Syntax analysis section, 110.
... List output section, 111 ... Object information generation section, 112 ... Structure block debug information generation section, 113 ... Object output section, 601 ... ...Line number counter initialization processing, 6
02...1 line source input processing, 603...
... Source end determination processing, 604 ... End processing, 605 ... Line count up processing, 606
...Relative address calculation processing, 607...
・Syntax analysis processing, 608...Object output processing, 609...List output determination processing, 610
...One line source output processing, 611...
Debug option determination processing, 612...Line debug information table output processing, 701...
・・Line number counter, reserved word flag initialization processing, 702・
...One line source input processing, 703... Source end determination processing, 704... End processing, 70
5... Line count up processing, 706...
... Relative address calculation processing, 707 ... Syntax analysis processing, 708 ... Object output processing,
709...List output determination processing, 710...
... l6 source output processing, γ11 ... debug option judgment processing, 712 ... reserved word flag judgment processing, 713 ... end of structure block 5 judgment processing, 714 ... ... Reserved word flag OFF processing, 715 ... Reserved word determination processing, 717 ...
. . . Reserved word flag ON processing, 718 . . . Debug information table output processing, 801 . . . Line number counter, structure block counter, block end flag initialization processing, 802 . . .・One-line source input processing,
803... Source end determination processing, 804...
... End processing, 805 ... Line count up processing, 806 ... Relative address calculation processing, 8
07...Syntax analysis processing, 808...Object output processing, 809...List output determination processing, 810...1 line source output processing, 81
1...Debug option judgment processing, 812
...Reserved word judgment processing, 813... Structure block count up judgment processing, 814, 818.
...Block end flag determination processing, 815, 81
9...Block end flag OFF processing, 816
, 820...Debug information table output processing,
817... Structure block count judgment processing,
821...Structure block end determination processing, 822
...Block end flag ON processing, 823...
...Structural block counter 46~ Level adjustment processing of the counter.

Claims (1)

【特許請求の範囲】[Claims]  入力されたソースプログラム情報を解析してデバッグ
用ソースライン情報を生成する手段を持つ言語処理プロ
グラムの実行方式において、ソースプログラムのブロッ
ク構造を構成する部分については、ブロック構造を構成
するソースの始りと終りを表すソースラインに対してソ
ースライン情報を出力し、ソースプログラムのブロック
構造以外の部分については全ソースラインに対してソー
スライン情報を出力することを特徴とする言語処理プロ
グラムのデバッグ情報出力方式。
In the execution method of a language processing program that has a means to analyze input source program information and generate source line information for debugging, for the part that makes up the block structure of the source program, the beginning of the source that makes up the block structure is A debugging information output for a language processing program characterized in that source line information is output for a source line that indicates the end of the source program, and source line information is output for all source lines for parts other than the block structure of the source program. method.
JP1212264A 1989-08-18 1989-08-18 Debugging information output system for language processing program Pending JPH0375936A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1212264A JPH0375936A (en) 1989-08-18 1989-08-18 Debugging information output system for language processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1212264A JPH0375936A (en) 1989-08-18 1989-08-18 Debugging information output system for language processing program

Publications (1)

Publication Number Publication Date
JPH0375936A true JPH0375936A (en) 1991-03-29

Family

ID=16619703

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1212264A Pending JPH0375936A (en) 1989-08-18 1989-08-18 Debugging information output system for language processing program

Country Status (1)

Country Link
JP (1) JPH0375936A (en)

Similar Documents

Publication Publication Date Title
US7266809B2 (en) Software debugger and software development support system for microcomputer operable to execute conditional execution instruction
US6003143A (en) Tool and method for diagnosing and correcting errors in a computer program
US5504902A (en) Multi-language generation of control program for an industrial controller
US5946488A (en) Method for selectively and incrementally displaying the results of preprocessing
JP4140980B2 (en) A syntax-independent display method for computer programs that display program trees.
JP3033937B2 (en) Computer system for visualizing the execution of an object-oriented program
JP3612294B2 (en) Debugging method and debugging device
JPH08202545A (en) Object-oriented system and method for generation of target language code
JPH08115209A (en) System and method for creation of source code
US6839893B2 (en) Debugger capable of providing warnings for unreachable breakpoints
US5822592A (en) Method and system for determining source code location
JP3130828B2 (en) Assembly processing method
US6198813B1 (en) System and method for providing call processing services using call independent building blocks
JPH0375936A (en) Debugging information output system for language processing program
JPH0934698A (en) Software generating method and software developing and supporting method
JP3011115B2 (en) Debug system
JPH04367946A (en) Debug information output system
JPH0350641A (en) Debug information output system for language processing program
JP2811804B2 (en) Variable output range specification method
JPH0792771B2 (en) Program execution status display system
JPH04288635A (en) Debugging information output system
JPS61235950A (en) Method of constructing code generator
Koskimies et al. Viewing Object-Oriented Programs Through Scenario Diagrams
JPH044434A (en) Program tracing method
Hinkle et al. Breakpoints Revisited