JPH0196732A - Output system for macro-evolution list - Google Patents

Output system for macro-evolution list

Info

Publication number
JPH0196732A
JPH0196732A JP62253715A JP25371587A JPH0196732A JP H0196732 A JPH0196732 A JP H0196732A JP 62253715 A JP62253715 A JP 62253715A JP 25371587 A JP25371587 A JP 25371587A JP H0196732 A JPH0196732 A JP H0196732A
Authority
JP
Japan
Prior art keywords
information
list
macro
source
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP62253715A
Other languages
Japanese (ja)
Inventor
Yoshitaka Akiyama
秋山 美登
Eiichi Tanaka
栄一 田中
Hideko Maeda
秀子 前田
Fujio Komiya
小宮 富士男
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.)
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP62253715A priority Critical patent/JPH0196732A/en
Publication of JPH0196732A publication Critical patent/JPH0196732A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the intermediate information quantity of a compiler and at the same time to edit a source list only when it is needed by producing the source information (intermediate information) and a macro-definition information (intermediate information) and setting a pointer between these two information. CONSTITUTION:In a source analyzing step 16, the source is supplied from a source library 14 and a macrolibrary 15 for production of the source information (intermediate information) 18 and the macro-definition information (intermediate information) 19. A pointer is set between both information 18 and 19. Thus only a single piece of information 19 suffices regardless of the calling frequency of the same macroinstruction. As a result, the intermediate information quantity is reduced. Furthermore the presence or absence of the list output is decided in a step 20. Then both information 18 and 19 are supplied in a step 21 only at request of the list output and edited into the form of an output list in a step 22. This output list is outputted as a source list.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、マクロ機能を有する言語プロセッサのリスト
出力処理に係り、特にマクロ展開リストの出力に好適な
方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to list output processing of a language processor having a macro function, and particularly to a method suitable for outputting a macro expansion list.

〔従来の技術〕[Conventional technology]

従来の方式では、中間情報はマクロ定義中の可変記号を
すべて置換した形で保持し、リスト出力時には中間情報
をそのまま出力していた。
In the conventional method, intermediate information is held in a form in which all variable symbols in the macro definition are replaced, and when a list is output, the intermediate information is output as is.

しかし、この方法では、言語プロセッサのコンパイル性
能に対する配慮がされていなかった。
However, this method does not take into consideration the compilation performance of the language processor.

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

上記従来技術は、第2図、ソースリスト出力機。 The above conventional technology is shown in FIG. 2, a source list output device.

構に示すように、1のソースライブラリと2のマクロラ
イブラリから3のマクロ処理部がソースプログラムを入
力し、出力リストを4の中間情報(コンパイラ出力ファ
イル)として編集して、1の出力処理部では、4の中間
情報を6のソースリスト(マクロ展開リスト)として出
力するのみの機構である。
As shown in the structure, the macro processing unit 3 inputs the source program from the source library 1 and the macro library 2, edits the output list as intermediate information (compiler output file) in 4, and outputs it to the output processing unit 1. This is a mechanism that only outputs the intermediate information in 4 as a source list (macro expansion list) in 6.

上記従来方式では、以下の2点について配慮がされてい
ない。
In the conventional method described above, consideration is not given to the following two points.

■ 同一マクロを呼出す回数が多い場合には。■ If the same macro is called many times.

同一のマクロ定義情報が個々の中間情報に入るため、−
量情報量が増大する。
Since the same macro definition information is included in each intermediate information, -
The amount of information increases.

■ リスト出力の有無Kかかわらず、中間情報が無条件
にマクロ定義中の可変記号まで置換したリスト形式にな
っているため、リスト出力不要時にはコンパイル速度が
遅くなる。
■Regardless of whether or not a list is output, the intermediate information is in a list format in which variable symbols in macro definitions are unconditionally replaced, so the compilation speed becomes slow when list output is not required.

という問題点があった。There was a problem.

本発明の目的は、上記問題点を解決する為に。The purpose of the present invention is to solve the above problems.

中間情報tを最小にし、出力ツースリストの編集箇所を
変更することにより、コンパイラの性能向上を図ること
にある。
The objective is to improve the performance of the compiler by minimizing the intermediate information t and changing the edited part of the output teeth list.

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

上記目的は、マクロ展開リストの出力に於いて、第2図
の本発明の機構に示すように、以下の2点の手法を導入
することにより達成される。
The above object is achieved by introducing the following two methods in outputting the macro expansion list, as shown in the mechanism of the present invention in FIG.

■ 9のマクロ処理部では、7のソースライブラリ及び
8のマクロライブラリよりソースを入力し、10の中間
情報(ソース情報)、と11の。
(2) The macro processing unit 9 inputs sources from the source library 7 and the macro library 8, intermediate information (source information) 10, and 11.

中間情報(マクロ定義情報)を別ファイルとして保持し
、10の中間情報から11の中間情報へはポインタを張
る。
Intermediate information (macro definition information) is held as a separate file, and a pointer is placed from intermediate information 10 to intermediate information 11.

■ 12のリスト出力処理部では、リスト出力型時のみ
、10の中間情報(ソース情報)から11の中間情報(
マクロ定義情報)へのポインタをもとに、出力リストの
編集を行い、15のソースリスト(マクロ展開リスト)
として出力する。
■ The list output processing section 12 outputs intermediate information 11 (source information) from intermediate information 10 (source information) only when the list output type is used.
Edit the output list based on the pointer to the macro definition information) and create 15 source lists (macro expansion list)
Output as .

〔作用〕[Effect]

第3図は1本発明の流れを示す図である。 FIG. 3 is a diagram showing the flow of the present invention.

16のソース解析で14のソースライブラリ及び15の
フクロライブラリからソースを入力し、17の中間情報
(ソース情報)と18の中間情報(マクロ定義情報)を
作成し、18から19へはポインタを張っておくだけに
する。
Source analysis of 16 inputs sources from 14 source libraries and 15 fukuro libraries, creates 17 intermediate information (source information) and 18 intermediate information (macro definition information), and puts a pointer from 18 to 19. Just leave it there.

こ九により、同一マクロが何回呼出されても19の中間
テキスト(マクロ定義情報)は、1つだけとなり、中間
情報量を減少させることができる。
As a result, no matter how many times the same macro is called, there will be only one intermediate text (macro definition information) in 19, and the amount of intermediate information can be reduced.

さらに20でリスト出力の有無を判定し、リスト出力型
時のみ、21T18と19の中間情報を入力し、22で
出力リストの形式に編集し、23でソースリスト(マク
ロ展開リスト)として出力する。
Further, at 20, it is determined whether or not to output a list, and only in the case of list output type, the intermediate information of 21T18 and 19 is input, at 22 it is edited into an output list format, and at 23 it is output as a source list (macro expansion list).

こ九により、リスト出力不要時には、出力リストの編集
が行われなくなる為、コンパイル性能が向上する。
This feature improves compilation performance because the output list is not edited when it is not necessary to output the list.

〔実施例〕〔Example〕

以下1本発明を図面を参照して本発明の一実施例を詳細
に説明する。
Hereinafter, one embodiment of the present invention will be described in detail with reference to the drawings.

第4図は、受は取ったパラメータを、L)C(定数定義
)命令の定数として展開する25のマクロ定義及び26
のマクロ呼出し文の例である。
Figure 4 shows 25 macro definitions and 26
This is an example of a macro call statement.

このマクロ展開では、定数の値以外の部分、27の「υ
C」等は、何回呼び出されても固定である。
In this macro expansion, the part other than the constant value, 27 “υ
C" etc. are fixed no matter how many times they are called.

第5図は、第4図のマクロ展開に対する中間情報の構成
を示したものである。
FIG. 5 shows the structure of intermediate information for the macro expansion in FIG. 4.

28の中間情報(マクロ定義情報)として、29の一文
単位のリスト情報を持つ。−文単位に持つ情報として、
30の可変記号の記述されている位置(相対ロケーシヨ
ン)と、可変記号の長さを持つ可変記号情報、31のマ
クロ定義内に記述された一文を編集し、圧縮したソース
情報がある。
As 28 intermediate information (macro definition information), 29 single-sentence list information is provided. -As information held in each sentence,
There is variable symbol information with the position (relative location) where variable symbols are described in 30 and the length of the variable symbol, and source information that is an edited and compressed sentence written in a macro definition in 31.

32の中間情報(ソース情報)として、33の一文単位
のリスト情報を持つ。−文単位に持つ情報として、54
のマクロ定義リスト情報へのポイン)t−持つ1文ヘッ
ダ情報、35の可変記号の置換後の長。
As 32 intermediate information (source information), 33 single-sentence list information is provided. -54 pieces of information per sentence
(Point to macro definition list information) t-1 sentence header information with 35 variable symbols length after replacement.

さ、値を持つ可変記号置換情報が、るる。The variable symbol substitution information with the value is Ruru.

本例では、可変記号の個数は一文に一個しか存在しない
が、−文に可変記号が複数個存在する場合は、29のマ
クロ定義の一文単位のリスト情報。
In this example, only one variable symbol exists in one sentence, but if a plurality of variable symbols exist in a - sentence, list information for each sentence of the macro definition in 29 is provided.

及び55のマクロ展開の一文単位のリスト情報に可変記
号の個数分、30のiクロ定義の可変記号情報と、35
のマクロ展開の可変記号置換情報を持つ。
and 55 macro expansion sentence unit list information for the number of variable symbols, 30 i-cro definition variable symbol information, 35
Contains variable symbol substitution information for macro expansion.

第4図、第5図より、マクロ展開後リストを出力する場
合は、中間情報(ソース情報)のマクロ展開の文ヘッダ
情報からマクロ定義の一文単位のリスト情報を得る。次
に、マクロ定義のソース情報と、可変記号情報から求め
た可変記号の位置に。
4 and 5, when outputting a list after macro expansion, list information for each sentence of the macro definition is obtained from sentence header information of the macro expansion of intermediate information (source information). Next, the position of the variable symbol determined from the source information of the macro definition and the variable symbol information.

マクロ展開の可変記号置換情報の値を置換する。Replaces the value of variable symbol replacement information in macro expansion.

この際、可変記号の長さと可変記号情報情報の長さの組
合せKより出力リストの編集を行い、1り口展開リスト
を出力する。
At this time, the output list is edited based on the combination K of the length of the variable symbol and the length of the variable symbol information information, and a single expansion list is output.

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

本発明によれば、コンパイラの中間情報計を減少させる
ことができ、また必要時のみソースリストの編集を行′
うため、プログラムのコンパイル性能(所要メモリ倉、
コンパイル速度)の向上に効果がある。
According to the present invention, the intermediate information meter of the compiler can be reduced, and the source list can be edited only when necessary.
program compilation performance (required memory capacity,
This is effective in improving compilation speed).

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

第1図は1本発明の一実施例の構成図、第2図は従来技
術の構成図、第3図は本発明の動作手順を示すフローチ
ャート、第4図は本発明の一実施例のプログラム図、第
5図は本発明の一実施例の中間情報形式の説明図である
。 1・・・ソースライブラリ、2・・・マクロライブラリ
。 3・・・マクロ処理部、5・・・リスト出力処理部、7
・・・。 ソースライブラリ、8・・・マクロライブラリ、9・・
・マクロ処理部、12・・・リスト出力処理部、14・
・・ソースライブラリ、15・、・・マクロライブラリ
、16・・・ソース解析、17・・・中間情報の作成、
20・・・リスト出力有無の判定、21・・・中間情報
の入力、22・・・出力リスト 。 の編集、23・・・リストの出力、25・・・プログラ
ム中のマクロ定義、26・・・マクロ呼出文、27・・
・マクロ定義中の固定部分。 第 1 凹 第3図 第 4− 図 第 5 回
Fig. 1 is a block diagram of an embodiment of the present invention, Fig. 2 is a block diagram of a prior art, Fig. 3 is a flowchart showing the operating procedure of the present invention, and Fig. 4 is a program of an embodiment of the present invention. FIG. 5 is an explanatory diagram of an intermediate information format according to an embodiment of the present invention. 1... Source library, 2... Macro library. 3... Macro processing section, 5... List output processing section, 7
.... Source library, 8... Macro library, 9...
・Macro processing section, 12...List output processing section, 14.
... Source library, 15... Macro library, 16... Source analysis, 17... Creation of intermediate information,
20... Determining whether to output the list, 21... Inputting intermediate information, 22... Output list. Editing, 23... Output of list, 25... Macro definition in program, 26... Macro call statement, 27...
・Fixed part in macro definition. 1st Concave Figure 3 Figure 4- Figure 5

Claims (1)

【特許請求の範囲】[Claims] 1、マクロ機能を有する言語で記述されたプログラムの
ソースリスト出力において、ソース情報と展開対象とな
るマクロ定義情報を別ファイルとし、ソース情報には可
変記号の置換情報とマクロ定義情報へのポインタを設け
、ソースリスト出力時に出力リストの編集を行うことを
特徴とするマクロ展開リストの出力方式。
1. When outputting the source list of a program written in a language with macro functions, the source information and the macro definition information to be expanded are separated into separate files, and the source information includes replacement information for variable symbols and a pointer to the macro definition information. A method for outputting a macro expansion list, characterized in that the output list is edited at the time of outputting the source list.
JP62253715A 1987-10-09 1987-10-09 Output system for macro-evolution list Pending JPH0196732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62253715A JPH0196732A (en) 1987-10-09 1987-10-09 Output system for macro-evolution list

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62253715A JPH0196732A (en) 1987-10-09 1987-10-09 Output system for macro-evolution list

Publications (1)

Publication Number Publication Date
JPH0196732A true JPH0196732A (en) 1989-04-14

Family

ID=17255140

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62253715A Pending JPH0196732A (en) 1987-10-09 1987-10-09 Output system for macro-evolution list

Country Status (1)

Country Link
JP (1) JPH0196732A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009187098A (en) * 2008-02-04 2009-08-20 Canon Inc Image forming device, control method therefor, program and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009187098A (en) * 2008-02-04 2009-08-20 Canon Inc Image forming device, control method therefor, program and storage medium

Similar Documents

Publication Publication Date Title
US6243864B1 (en) Compiler for optimizing memory instruction sequences by marking instructions not having multiple memory address paths
JPH0721033A (en) Device and method for processing language
US6611956B1 (en) Instruction string optimization with estimation of basic block dependence relations where the first step is to remove self-dependent branching
JPH11250112A (en) Method and device for synthesizing hardware and recording medium recorded with hardware synthesizing program
JPH10301790A (en) Assemble processing system
JPH0196732A (en) Output system for macro-evolution list
JPH01118931A (en) Program conversion system
JPH09101880A (en) Program analyzer
JP2750341B2 (en) Graphical language translator
JP3323147B2 (en) Compiling device, compiling method, and recording medium recording compiler program
JP2765911B2 (en) Data driven control method and compiling device
JPS62169238A (en) Program execution analysis tool
JP3114884B2 (en) Fuzzy inference processing compilation system
JPH04273328A (en) Generation system for cross-reference list
JPH08286927A (en) Assembler processing system
JPH06214777A (en) Method and device for developiig program
JPH0561687A (en) Processing system for compiler
JP2000207184A (en) Program source description restandardizing device
JPS63271636A (en) Macroprocessor for language
JPH0477960A (en) Control system for slip generation system
JPH05250210A (en) Program trace system
JPH05100866A (en) Compile/link system
JPH02159629A (en) Computer language translating system
JP2001331312A (en) System for acquiring related information among plural programs
JPH0455937A (en) Program clean copy processor