JPS63228239A - Test system for macro-expansion - Google Patents

Test system for macro-expansion

Info

Publication number
JPS63228239A
JPS63228239A JP62061779A JP6177987A JPS63228239A JP S63228239 A JPS63228239 A JP S63228239A JP 62061779 A JP62061779 A JP 62061779A JP 6177987 A JP6177987 A JP 6177987A JP S63228239 A JPS63228239 A JP S63228239A
Authority
JP
Japan
Prior art keywords
macro
expansion
section
parameter
variable
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
JP62061779A
Other languages
Japanese (ja)
Inventor
Koichi Kagota
篭田 行一
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 JP62061779A priority Critical patent/JPS63228239A/en
Publication of JPS63228239A publication Critical patent/JPS63228239A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To confirm an expanded result within a short time by sequentially executing macro-expansion in each statement and correspondingly displaying an unexpanded macro original sentence and an expanded source program. CONSTITUTION:A macro original sentence reading part 2 inputs a macro original sentence in each statement and a macro-expansion part 7 expands an expansion controlling macro sentence outputted from a macro analysis part 4 while referring a parameter stored in a parameter storing part 5 and a macro variable stored in a variable holding part 6 and sends a source program to a text output part 8. The text output part 8 displays the unexpanded macro original sentence outputted from the reading part 2 and the expanded source program outputted from the expanding part 7 correspondingly to each other and displays the parameter or macro variable value received from an expansion environment reading part 11 to test the macro-expansion. Consequently, power for the macro- expansion test can be saved and the test can be simplified.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はマクロを用いたプログラム開発におけるマクロ
展開のテスト方式に関し、特に展開を制御する展開制御
用マクロ文、パラメータ、およびマクロ変数を含むマク
ロ展開のテスト方式に関する。
Detailed Description of the Invention (Industrial Application Field) The present invention relates to a test method for macro expansion in program development using macros, and in particular to a macro that includes expansion control macro statements, parameters, and macro variables that control expansion. Concerning deployment testing methods.

(従来の技術) 一般に、共用性の高いプログラムの一部をマクロ化して
使用し、プログラム開発することが有効であることは広
く知られている。
(Prior Art) Generally, it is widely known that it is effective to develop a program by converting a part of a highly common program into a macro and using the macro.

従来、この種のマクロ展開のテスト方式ではテストを行
うマクロ原文を呼出すマクロ呼出し文にさまざまなパラ
メータ値?記述したソースプログラムを作成し、マクロ
展開装置によりノースプログラムに組込んだ後、その展
開結果を確認するようになってい虎。
Conventionally, in this type of macro expansion testing method, various parameter values are added to the macro call statement that calls the macro text to be tested. After creating a written source program and incorporating it into a North program using a macro expansion device, the expansion results are checked.

(発明が解決しようとする問題点) 上述した従来のマクロ展開のテスト方式では、テストを
行うマクロ原文を呼出すマクロ呼出し文にさまざまなパ
ラメータ値を記述し九ンースプログラムを作成し、マク
ロ展開装置によりソースプログラムに組込んだ後、その
展開結果を確認するので、確認までに長時間を要すると
いう欠点がある。
(Problems to be Solved by the Invention) In the conventional macro expansion testing method described above, various parameter values are written in the macro call statement that calls the macro text to be tested, a nine-step program is created, and the macro expansion device After incorporating it into the source program, the expansion result is checked, which has the disadvantage that it takes a long time to check.

また、展開結果の確認においてもマクロ原文と、展開後
に組込まれたノースプログラムとの関連づけを人手によ
って行わなければならないという欠点がある。
Furthermore, when checking the expansion results, there is a drawback that the macro original text must be manually correlated with the North program that is incorporated after expansion.

本発明の目的は、マクロ展開をステートメントごとに逐
時的に行い、展開前のマクロ原文と展開後のソースプロ
グラムとを対応づけて表示することにより上記欠点を除
去し、短時間で展開結果を確認できるように構成したマ
クロ展開のテスト方式を提供することにある。
An object of the present invention is to eliminate the above-mentioned drawbacks by sequentially performing macro expansion for each statement and displaying the macro text before expansion and the source program after expansion in a manner that allows expansion results to be obtained in a short time. The object of the present invention is to provide a test method for macro expansion configured to enable confirmation.

(問題点を解決する九めの手段) 本発明によるマクロ展開のテスト方式は、マクロ原文読
取り部と、マクロ解析部と、パラメータ保持部と、変数
保持部と、マクロ展開部と、テキスト出力部とを具備し
て構成したものである。
(Ninth Means to Solve the Problem) The macro expansion test method according to the present invention includes a macro original reading section, a macro analysis section, a parameter holding section, a variable holding section, a macro expansion section, and a text output section. It is constructed by comprising the following.

マクロ原文読取り部は、展開制御用マクロ文を含むマク
ロ原文を読取る念めのものである。
The macro original text reading section is intended to read macro original texts including macro statements for expansion control.

マクロ解析部は、マクロ原文読取シ部によって読取られ
たマクロ原文からパラメータ記述部、マクロ変数記述部
、および残余の文をそれぞれ検出して出力するためのも
のである。
The macro analysis section is for detecting and outputting a parameter description section, a macro variable description section, and a remaining sentence from the macro original read by the macro original reading section.

パラメータ保持部は、マクロ解析部から出力されるパラ
メータ記述部を保持するためのものである。
The parameter holding section is for holding the parameter description section output from the macro analysis section.

変数保持部は、マクロ解析部から出力されるマク9変数
記述部を保持するためのものである。
The variable holding section is for holding the Mac9 variable description section output from the macro analysis section.

マクロ展開部は、マクロ解析部から出力される残余の文
を受けて残余の文に含まれる展開制御用マクロ文をパラ
メータ保持部に保持されているパラメータや変数保持部
に保持されているマクロ変数を参照して展開し、残余の
文に含まれるソースプログラムを出力するためのもので
ある。
The macro expansion section receives the remaining sentences output from the macro analysis section and converts the expansion control macro statements included in the remaining sentences into parameters held in the parameter holding section and macro variables held in the variable holding section. This is used to refer to, expand, and output the source program contained in the remaining statements.

テキスト出力部は、マクロ原文読取り部から出力される
展開前のマクロ原文と、マクロ展開部から出力される展
開後のソースプログラムを対応させて表示出力するため
のものである。
The text output section is for displaying and outputting the unexpanded macro original output from the macro original reading section and the expanded source program output from the macro expansion section in correspondence with each other.

(実施例) 次に、本発明について図面を参照して説明する。(Example) Next, the present invention will be explained with reference to the drawings.

第1図は、本発明によるマクロ展開のテスト方式を実現
する一実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of the macro expansion test method according to the present invention.

第1図において、マクロ展開のテスト方式はマクロ原文
読取り部2と、中断点保持部3と、マクロ解析部4と、
パラメータ保持部5と、変数保持部6と、マクロ展開部
フと、テキスト出力部8と、コマンド入力促進部9と、
コマンド解析部10と、展開環境読出し部11とを具備
して実現したものである。第1図において、12は表示
装置、13はキーボード入力装置である。
In FIG. 1, the macro expansion test method includes a macro original reading section 2, an interruption point holding section 3, a macro analysis section 4,
A parameter holding unit 5, a variable holding unit 6, a macro expansion unit, a text output unit 8, a command input promotion unit 9,
This is realized by including a command analysis section 10 and a deployment environment reading section 11. In FIG. 1, 12 is a display device, and 13 is a keyboard input device.

コマンド入力促進部9は、テストを行うマクロのマクロ
名と、マクロ原文のパラメータ記述部に記述されている
パラメータに対応するパラメータ値と、各種コマンドと
を千−ボードより受付けてコマンド解析部10に出力す
る。
The command input promotion section 9 receives the macro name of the macro to be tested, the parameter values corresponding to the parameters described in the parameter description section of the macro original, and various commands from the board, and sends them to the command analysis section 10. Output.

コマンド解析部10では、入力された各種コマンドを命
令ごとに抽出して出力する。マクロ読込み命令はマクロ
原文読取り部2へ送出され、展開を中断するための中断
点設定命令は、その中断点を示す行番号を中断点保持部
3へ送出される。マクロ原文のパラメータ記述部に記述
されているパラメータに対応するパラメータ値設定命令
は、そのパラメータ値をパラメータ保持部5へ送出され
る。マクロ原文のマクロ変数記述部に記述されているマ
クロ変数や上記パラメータの+’fiを表示するための
表示命令は、展開環境読出し部11へ送出される。
The command analysis unit 10 extracts and outputs various input commands for each instruction. A macro reading command is sent to the macro original text reading section 2, and a break point setting command for interrupting expansion is sent to the break point holding section 3 with the line number indicating the break point. The parameter value setting command corresponding to the parameter described in the parameter description part of the macro original text is sent to the parameter holding part 5. A display command for displaying the macro variables described in the macro variable description section of the macro original text and +'fi of the above-mentioned parameters is sent to the expansion environment reading section 11.

中断点保持部3では、コマンド解析部10から出力され
る展開を中断する行番号を保持する。
The interruption point holding unit 3 holds the line number output from the command analysis unit 10 at which the expansion is interrupted.

マクロ原文読取り部2では、コマンド解析部10から出
力されるマクロ読込み命令を受付けて、マクロ原文を例
えばメモリから1ステートメントずつ入力し、この入力
文が中断点保持部3に保持されている行番号と一致しな
ければ、テキスト出力部8とマクロ解析部4とに上記入
力文を出力する。上記入力文が同一行番号であれば、次
のマクロ読込み命令を受付けるまで上記入力文を保持す
る。
The macro original text reading unit 2 receives the macro reading command output from the command analysis unit 10, inputs the macro original text one statement at a time from memory, and identifies the line number where this input sentence is held in the break point holding unit 3. If they do not match, the input sentence is output to the text output section 8 and the macro analysis section 4. If the input sentences have the same line number, the input sentences are held until the next macro reading command is received.

マクロ解析部4では、受取られたマクロ原文をパラメー
タ記述と、マクロ変数記述と、残余の文とにそれぞれ振
分ける。パラメータ記述はパラメータ保持部5へ送出さ
れ、マクロ変数記述は変数保持部Bへ送出され、残余の
文はマクロ展開部7へ送出される。
The macro analysis unit 4 separates the received macro text into parameter descriptions, macro variable descriptions, and remaining sentences. The parameter description is sent to the parameter holding section 5, the macro variable description is sent to the variable holding section B, and the remaining sentences are sent to the macro expansion section 7.

パラメータ保持部5では、マクロ解析部4から出力され
るパラメータと、コマンド解析部10から出力されるパ
ラメータに対応するパラメータ値とを受取って保持する
The parameter holding unit 5 receives and holds parameters output from the macro analysis unit 4 and parameter values corresponding to the parameters output from the command analysis unit 10.

変数保持部6では、マクロ解析部4から出゛力されるマ
クロ変数を受取って保持する。
The variable holding unit 6 receives and holds macro variables output from the macro analysis unit 4.

マクロ展開部7では、マクロ解析部4から出力される残
余の文に含まれる展開制御用マクロ文をパラメータ保持
部5に保持されているパラメータと、変数保持部$lC
保持されているマクロ変数とを参照して展開し、残余の
文に含まれるノースプログラムをテキスト出力部8へ送
出する。
The macro expansion unit 7 converts the expansion control macro statements included in the remaining sentences output from the macro analysis unit 4 into the parameters held in the parameter holding unit 5 and the variable holding unit $lC.
The stored macro variables are referred to and expanded, and the North program included in the remaining sentences is sent to the text output unit 8.

展開環境読出し部11では、コマンド解析部10から送
出される表示命令を受取り、該当するパラメータやマク
ロ変数の値をパラメータ保持部5と変数保持部6とから
取得し、テキスト出力部8へ送出する。
The deployment environment reading unit 11 receives the display command sent from the command analysis unit 10, obtains the values of the corresponding parameters and macro variables from the parameter holding unit 5 and variable holding unit 6, and sends them to the text output unit 8. .

テキスト出力部8では、マクロ原文読取り部2から出力
される展開前のマクロ原文と、マクロ展開部7カ為ら出
力される展開後のソースプログラムとを受取り、それぞ
れ対応させて表示出力するとともに、展開環境読出し部
11から出力されるパラメータやマクロ変数の値を受取
って表示出力するととくよってマクロ展開をテストする
The text output unit 8 receives the unexpanded macro original output from the macro original reading unit 2 and the expanded source program output from the macro expansion unit 7, and displays and outputs them in correspondence with each other. Macro expansion is tested by receiving and displaying the values of parameters and macro variables output from the expansion environment reading unit 11.

第2図は、第1図によるマクロ展開のテスト実例を示す
説明図である。
FIG. 2 is an explanatory diagram showing a test example of macro expansion according to FIG. 1.

中断点として行番号060と行番号100とを設定した
とき、マクロ展開が行番号060で中断される。ここで
、次のマクロ読込み命令が入力されると、展開ソースプ
ログラムの画面ではマクロ原文の画面で、現在の中断点
を示している反転部分(網かけ部分)の展開制御用マク
ロ文が実行さレテ、t MOVE  I  To  T
−COUNT’ −1tE反転(網かけ)されて表示さ
れる。そこで、マクロ展開が行番号100の中断点に移
行することを示している。
When line numbers 060 and 100 are set as interruption points, macro expansion is interrupted at line number 060. Here, when the next macro reading command is input, the expansion control macro statement in the highlighted part (shaded part) indicating the current interruption point is executed on the macro original screen on the expansion source program screen. Lete, t MOVE I To T
-COUNT' -1tE Displayed inverted (shaded). This shows that the macro expansion moves to the interruption point at line number 100.

(発明の効果) 以上説明したように本発明は、マクロ展開をステートメ
ントごとに逐時的だ行い、展開前のマクロ原文と展開後
のソースプログラムとを対応づけて表示することにより
、マクロ展開のテストが省力化され、且つ、簡素化され
るという効果がある。
(Effects of the Invention) As explained above, the present invention performs macro expansion for each statement one by one, and displays the macro original text before expansion and the source program after expansion in association with each other. This has the effect of saving labor and simplifying testing.

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

第1図は、本発明によるマクロ展開のテスト方式を実現
する一実施例を示すブロック図である。 第2図は、第1図のマクロ展開のテスト実例を示す説明
図である。 2・・・マクロ原文読取り部 3・・・中断点保持部 4・・・マクロ解析部 500.パラメータ保持部 6・・・変数保持部 7・・・マクロ展開部 8・φ・テキスト出力部 9・・・コマンド入力促進部 10・・・コマンド解析部 11・・・展開環境読出し部 12・・・表示装置 13・・・平−ボード入力装置
FIG. 1 is a block diagram showing an embodiment of the macro expansion test method according to the present invention. FIG. 2 is an explanatory diagram showing a test example of the macro expansion shown in FIG. 2... Macro original reading unit 3... Interruption point holding unit 4... Macro analysis unit 500. Parameter holding section 6...Variable holding section 7...Macro expansion section 8, φ, text output section 9...Command input promotion section 10...Command analysis section 11...Deployment environment reading section 12...・Display device 13...flat board input device

Claims (1)

【特許請求の範囲】[Claims] 展開制御用マクロ文を含むマクロ原文を読取るためのマ
クロ原文読取り部と、前記マクロ原文読取り部によつて
読取られたマクロ原文からパラメータ記述部、マクロ変
数記述部、および残余の文をそれぞれ検出して出力する
ためのマクロ解析部と、前記マクロ解析部から出力され
るパラメータ記述部を保持するためのパラメータ保持部
と、前記マクロ解析部から出力されるマクロ変数記述部
を保持するための変数保持部と、前記マクロ解析部から
出力される残余の文を受けて前記残余の文に含まれる展
開制御用マクロ文を前記パラメータ保持部に保持されて
いるパラメータや前記変数保持部に保持されているマク
ロ変数を参照して展開し、前記残余の文に含まれるソー
スプログラムを出力するためのマクロ展開部と、前記マ
クロ原文読取り部から出力される展開前のマクロ原文と
前記マクロ展開部から出力される展開後のソースプログ
ラムを対応させて表示出力するためのテキスト出力部と
を具備して構成したことを特徴とするマクロ展開のテス
ト方式。
A macro original text reading section for reading a macro original text including an expansion control macro statement, and detecting a parameter description part, a macro variable description part, and a remaining sentence from the macro original text read by the macro original text reading part. a macro analysis section for outputting the data, a parameter holding section for holding the parameter description section output from the macro analysis section, and a variable holding section for holding the macro variable description section output from the macro analysis section. and the remaining sentence outputted from the macro analysis section, the macro statement for expansion control included in the remaining sentence is stored in the parameter holding section and the variable holding section. a macro expansion section for referencing and expanding a macro variable and outputting a source program included in the remaining statement; a macro original text before expansion output from the macro original reading section; and a macro source text output from the macro expansion section. 1. A test method for macro expansion, comprising: a text output section for displaying and outputting a source program after expansion.
JP62061779A 1987-03-17 1987-03-17 Test system for macro-expansion Pending JPS63228239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62061779A JPS63228239A (en) 1987-03-17 1987-03-17 Test system for macro-expansion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62061779A JPS63228239A (en) 1987-03-17 1987-03-17 Test system for macro-expansion

Publications (1)

Publication Number Publication Date
JPS63228239A true JPS63228239A (en) 1988-09-22

Family

ID=13180920

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62061779A Pending JPS63228239A (en) 1987-03-17 1987-03-17 Test system for macro-expansion

Country Status (1)

Country Link
JP (1) JPS63228239A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006146731A (en) * 2004-11-24 2006-06-08 Ricoh Co Ltd Program, storage medium, assembler device, compiler device, simulator device and emulator device
US7571431B2 (en) 2003-04-29 2009-08-04 Microsoft Corporation Processing macro information and displaying via GUI in different tools

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7571431B2 (en) 2003-04-29 2009-08-04 Microsoft Corporation Processing macro information and displaying via GUI in different tools
JP2006146731A (en) * 2004-11-24 2006-06-08 Ricoh Co Ltd Program, storage medium, assembler device, compiler device, simulator device and emulator device
JP4594704B2 (en) * 2004-11-24 2010-12-08 株式会社リコー Program development support system, program and recording medium

Similar Documents

Publication Publication Date Title
JPS63228239A (en) Test system for macro-expansion
JP2861962B2 (en) Computer program simulation apparatus and method
KR880006614A (en) Display method in software development support system
JP2005316710A (en) Software test support device
JPS62162105A (en) Flow chart type programmable controller
JPS6380338A (en) Supporting system for single unit test of program module based on conversational symbolic debug mechanism
KR100287891B1 (en) Test Subroutine Processing Equipment and Processing Method
JP2000076094A (en) Simulator
JPS5949609A (en) Programmable controller equipped with simulation performing function
JPH0423102A (en) Programming device for programmable controller
JPH01244501A (en) Pc trace control system
JPH08171506A (en) Automatic inspection device
JPH0588877A (en) Test system for macro language
JPH04148336A (en) Fortran program grammar analyzing system
JPH07191858A (en) Simulation interpreter
JP2003015910A (en) Program development support system
JPS63238627A (en) Editing and outputting system for assemble list
JPH06138911A (en) Programming device
JPS6370179A (en) Logic ic tester
JPH022432A (en) Programming language depending type developing device
KR970016999A (en) Simulation control method by designating node of simulator
JPH07129411A (en) Machine language translating device
JPH0743431A (en) Displaying method for signal name of device pin of sample ic
JPS60171546A (en) Debug system of input and output device
JPS61187007A (en) Sequence controller