JPH07129381A - Program document creation device - Google Patents
Program document creation deviceInfo
- Publication number
- JPH07129381A JPH07129381A JP29726193A JP29726193A JPH07129381A JP H07129381 A JPH07129381 A JP H07129381A JP 29726193 A JP29726193 A JP 29726193A JP 29726193 A JP29726193 A JP 29726193A JP H07129381 A JPH07129381 A JP H07129381A
- Authority
- JP
- Japan
- Prior art keywords
- program
- document data
- document
- elements
- data
- 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.)
- Withdrawn
Links
Landscapes
- Stored Programmes (AREA)
Abstract
(57)【要約】
【目的】 高品質なドキュメントを常に得ることができ
るようにする。
【構成】 プログラムファイル記憶装置6から入力した
プログラムを文書データ生成装置2により解析して各要
素に分解し、この解析の結果に基づいて生成した文書デ
ータのテンプレートの内容をユーザが端末装置7を用い
て記述することによって文書データを生成できるように
するとともに、この文書データの要素と上記プログラム
の要素とを比較合成装置4により比較し、全てのプログ
ラムの要素に対応する文書データの要素のみを相互に合
成してドキュメントを作成するようにすることにより、
プログラムの各要素毎にその内容を記述した詳細なドキ
ュメントを常に作成できるようにし、プログラムの内容
を変更した場合には、変更後のプログラムに対応したド
キュメントを作成できるようにして、一定の品質以上の
ドキュメントを常に作成できるようにする。
(57) [Summary] [Purpose] To always obtain high-quality documents. [Structure] A program input from a program file storage device 6 is analyzed by a document data generation device 2 and decomposed into respective elements, and a user sets the content of a template of document data generated based on the result of this analysis on a terminal device 7. The document data can be generated by using the description, and the elements of the document data are compared with the elements of the program by the comparison / combination device 4, and only the elements of the document data corresponding to the elements of all the programs are compared. By composing each other to create a document,
It is possible to always create a detailed document that describes the contents of each element of the program, and if the contents of the program are changed, create a document corresponding to the changed program so that it has a certain quality or higher. Always be able to create documents.
Description
【0001】[0001]
【産業上の利用分野】本発明は、プログラムドキュメン
ト作成装置に関し、特に、既存のソースプログラムの動
作内容や処理内容などに関するドキュメントを作成する
プログラムドキュメント作成装置に用いて好適なもので
ある。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program document creating apparatus, and more particularly, it is suitable for use in a program document creating apparatus for creating a document relating to operation contents and processing contents of an existing source program.
【0002】[0002]
【従来の技術】従来より、ソフトウェアの開発を行う際
には、ソフトウェアの維持、管理などを容易にするため
に、作成したプログラムの動作/処理内容を記述したド
キュメントを作成することが行われている。そして、既
に作成したプログラムに基づいて、そのプログラムの動
作/処理内容を表すドキュメントを作成する技術が開発
されている。2. Description of the Related Art Conventionally, when developing software, in order to facilitate maintenance and management of the software, a document describing the operation / processing contents of the created program is created. There is. Then, based on the already created program, a technique for creating a document representing the operation / processing content of the program has been developed.
【0003】このように、既存のプログラムからその内
容を表すドキュメントを作成するためのシステムとし
て、1つのプログラム中においてプログラムとドキュメ
ントとを1つのファイルとして記述できるようにしたW
EBシステムと呼ばれるシステムが知られている。WE
Bシステムは、プログラミング言語と文書整形言語とを
組み合わせたシステムである。As described above, as a system for creating a document representing the contents of an existing program, the program and the document can be described as one file in one program.
A system called an EB system is known. WE
The B system is a system that combines a programming language and a document formatting language.
【0004】図12は、WEBシステムで行われる処理
の概略を示す動作説明図である。図12に示すように、
このWEBシステムにおいては、WEB言語で記述した
データをTANGLEと呼ばれるプログラムで処理すると、プ
ログラムのソースコードが得られる。そして、このよう
にして得られたプログラムのソースコードがコンパイラ
にかけられることにより、オブジェクトが生成される。FIG. 12 is an operation explanatory view showing the outline of the processing performed in the WEB system. As shown in FIG.
In this WEB system, if the data described in the WEB language is processed by a program called TANGLE, the source code of the program can be obtained. Then, the source code of the program thus obtained is applied to the compiler to generate an object.
【0005】一方、WEB言語で記述したデータをWEAV
E と呼ばれるプログラムで処理すると、プログラムのソ
ースコードを含んだドキュメントのソースコードが得ら
れる。そして、このようにして得られたドキュメントの
ソースコードが文書フォーマッタで清書されることによ
り、ドキュメントが生成される。On the other hand, data described in the WEB language is WEAV
Processing with a program called E yields the source code for the document that contains the source code for the program. Then, the source code of the document thus obtained is fine-written by the document formatter to generate the document.
【0006】このように、WEBシステムでは、WEB
言語で記述されたデータ中のプログラムコードに相当す
る部分に基づいてオブジェクトが生成され、文書コード
に相当する部分に基づいてドキュメントが生成される。As described above, in the WEB system, the WEB
An object is generated based on the portion corresponding to the program code in the data described in the language, and a document is generated based on the portion corresponding to the document code.
【0007】[0007]
【発明が解決しようとする課題】しかしながら、上述の
ようなWEBシステムでは、WEB言語で記述されたデ
ータ中のプログラムコードに相当する部分と、文書コー
ドに相当する部分とは互いに独立性が非常に高く、両者
は別々に処理されていた。However, in the WEB system as described above, the part corresponding to the program code in the data described in the WEB language and the part corresponding to the document code are very independent from each other. High, both were treated separately.
【0008】また、上述のようなWEBシステムは、プ
ログラムソースとドキュメントとの関係をチェックする
機構を備えていないため、あるプログラムに対してその
内容とは全く関係のないドキュメントを記述してしまっ
たとしても、その誤りを検出することはできなかった。Further, since the WEB system as described above does not have a mechanism for checking the relationship between the program source and the document, the document which has nothing to do with the content of the program has been described. However, I could not detect the error.
【0009】このため、例えば、プログラムに変数や関
数が新たに加えられた場合や、プログラムから既存の変
数や関数が削除された場合などのように、プログラムの
内容が変更された場合に、このプログラムの変更を反映
したドキュメントが常に得られるとは限らないという問
題があった。Therefore, when the contents of the program are changed, such as when a variable or function is newly added to the program or when an existing variable or function is deleted from the program, There was a problem that the document reflecting the program change was not always obtained.
【0010】また、WEB言語でデータを記述するユー
ザごとにそのデータの内容が異なるので、ユーザがWE
B言語で記述したデータに基づいて生成されるドキュメ
ントの内容もまちまちとなり、一定の品質以上のドキュ
メントが必ずしも得られるとは限らないという問題があ
った。Further, since the content of the data is different for each user who describes the data in the WEB language,
The content of the document generated based on the data described in the B language varies, and there is a problem that a document having a certain quality or higher is not always obtained.
【0011】本発明は、このような問題を解決するため
になされたものであり、高品質なドキュメントを常に得
ることができるプログラムドキュメント作成装置を提供
することを目的とする。The present invention has been made in order to solve such a problem, and an object of the present invention is to provide a program document creating apparatus which can always obtain a high quality document.
【0012】[0012]
【課題を解決するための手段】本発明のプログラムドキ
ュメント作成装置は、入力したプログラムをそのプログ
ラミング言語の文法に従って構文解析し、上記プログラ
ムを種々の要素に分解するプログラム解析手段と、上記
プログラム解析手段により分解されたプログラムの要素
毎に、テンプレート形式で文書を記述することによっ
て、上記プログラムの内容を表す文書データを生成する
文書データ生成手段と、上記文書データをその文法規則
に従って解析し、上記文書データを種々の要素に分解す
る文書データ解析手段と、上記プログラム解析手段によ
り分解されたプログラムの要素と、上記文書データ解析
手段により分解された文書データの要素とを比較し、上
記プログラムの要素に対応する文書データの要素が存在
するか否かを確認する比較手段と、上記比較手段による
比較の結果、上記プログラムの要素に対して上記文書デ
ータの要素が不足していないと判断されたときに、両要
素間で一致が検出された要素を合成してプログラムドキ
ュメントを生成する合成手段とを設けたものである。A program document creating apparatus of the present invention is a program analysis means for parsing an input program according to the grammar of its programming language, and for decomposing the program into various elements, and the program analysis means. Document data generating means for generating document data representing the contents of the program by describing the document in the template format for each element of the program decomposed by The document data analysis means for decomposing data into various elements, the element of the program decomposed by the program analysis means, and the element of document data decomposed by the document data analysis means are compared to obtain the element of the program. Check whether the corresponding document data element exists As a result of comparison by the comparing means and the comparing means, when it is determined that the elements of the document data are not insufficient for the elements of the program, the elements for which a match is detected between the two elements are combined. And a synthesizing means for generating a program document.
【0013】また、本発明の他の特徴とするところは、
上記比較手段による比較の結果、上記プログラムの要素
に対して上記文書データの要素が不足していると判断さ
れたときは、エラーを発生するようにしたものである。Another feature of the present invention is that
As a result of the comparison by the comparison means, when it is determined that the elements of the document data are insufficient with respect to the elements of the program, an error is generated.
【0014】[0014]
【作用】本発明は上記技術手段より成るので、入力され
たプログラムの解析結果に基づいて、プログラムの各要
素についての内容がテンプレート形式でユーザにより記
述されていくことによって文書データが生成され、この
文書データが対応するプログラムに合成されてドキュメ
ントが作成されることとなり、上記プログラムとの間で
その内容にズレがなく、しかも、プログラムの各要素毎
にその内容を記述した詳細なドキュメントが常に作成さ
れる。Since the present invention comprises the above technical means, the content of each element of the program is described in the template format by the user on the basis of the analysis result of the inputted program to generate the document data. Since the document data will be combined with the corresponding program to create a document, there will be no difference in its contents from the above programs, and detailed documents will be created that describe the contents for each element of the program. To be done.
【0015】さらに、上記プログラムの要素と文書デー
タの要素との合成に際して、両要素が比較され、プログ
ラムの要素に対して文書データの要素が不足していない
と判断されたときに、一致が検出された要素同志が相互
に合成されてドキュメントが作成されることとなるの
で、例えば、変数や関数が追加されたり、削除されたり
することによってプログラムの内容が変更された場合に
は、その変更後のプログラムに対応した詳細なドキュメ
ントが作成される。Further, when the elements of the program and the elements of the document data are combined, the two elements are compared, and when it is determined that the elements of the document data are not insufficient for the elements of the program, a match is detected. Documents will be created by composing the created elements with each other, so if, for example, the contents of the program are changed by adding or deleting variables or functions, after the change A detailed document corresponding to the program will be created.
【0016】[0016]
【実施例】以下、本発明の一実施例を図面に基づいて説
明する。図1は、本実施例のプログラムドキュメント作
成装置の概略的な構成を示すブロック図である。図1に
おいて、プログラムドキュメント作成装置1は、文書デ
ータ生成装置2、文書データファイル記憶装置3、比較
合成装置4および構造化ドキュメントファイル記憶装置
5により構成されている。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of a program document creation device of this embodiment. In FIG. 1, the program document creation device 1 is composed of a document data generation device 2, a document data file storage device 3, a comparison and synthesis device 4, and a structured document file storage device 5.
【0017】上記のようなプログラムドキュメント作成
装置1の構成において、文書データ生成装置2は、計算
機言語で記述されたプログラムをプログラムファイル記
憶装置6から読み出し、これを計算機言語の文法に従っ
て入力プログラムを解析することにより、後述するよう
な文書データのテンプレートを生成する。In the configuration of the program document creation device 1 as described above, the document data creation device 2 reads the program described in the computer language from the program file storage device 6 and analyzes the read program according to the grammar of the computer language. By doing so, a template of document data as described later is generated.
【0018】そして、文書データ生成装置2は、端末装
置7から入力される情報を上述のテンプレートに組み込
んで文書データを生成し、この生成した文書データを文
書データファイル記憶装置3に供給する。文書データフ
ァイル記憶装置3は、与えられた文書データを文書デー
タファイルとして格納する。Then, the document data generation device 2 incorporates the information input from the terminal device 7 into the above-mentioned template to generate document data, and supplies the generated document data to the document data file storage device 3. The document data file storage device 3 stores the given document data as a document data file.
【0019】また、比較合成装置4には、計算機言語で
記述されたプログラムがプログラムファイル記憶装置6
から入力されるとともに、上述のようにして生成された
文書データが文書データファイル記憶装置3から入力さ
れる。In the comparison / synthesis device 4, a program written in a computer language is stored in the program file storage device 6
And the document data generated as described above are input from the document data file storage device 3.
【0020】比較合成装置4は、入力されたプログラム
を計算機言語の文法に従って解析するとともに、文書デ
ータの文法に従って入力文書データを解析し、それぞれ
の要素を比較して合成することにより、後述するような
構造化ドキュメントを生成する。The comparison / synthesis device 4 analyzes the input program according to the grammar of the computer language, analyzes the input document data according to the grammar of the document data, compares the respective elements, and synthesizes them, which will be described later. Generate structured documents.
【0021】そして、生成した構造化ドキュメントを構
造化ドキュメントファイルとして構造化ドキュメントフ
ァイル記憶装置5に格納するとともに、プリンタや文書
清書システムなどの印刷装置8に出力する。Then, the generated structured document is stored as a structured document file in the structured document file storage device 5 and is output to the printing device 8 such as a printer or a document clearing system.
【0022】次に、上述したプログラムドキュメント作
成装置1における文書データ生成装置2および比較合成
装置4の詳細な構成とその動作とについて、図2〜図1
1を参照しながら詳しく説明する。なお、図2は、文書
データ生成装置2の構成を示す図であり、図3は、比較
合成装置4の構成を示す図である。以下では、C++言語
の文字列に関するクラスStringについての構造化ドキュ
メントを作成する場合を例にとって説明する。Next, detailed configurations and operations of the document data generation device 2 and the comparison and synthesis device 4 in the program document creation device 1 described above will be described with reference to FIGS.
This will be described in detail with reference to 1. 2 is a diagram showing the configuration of the document data generation device 2, and FIG. 3 is a diagram showing the configuration of the comparison and synthesis device 4. In the following, a case will be described as an example in which a structured document for a class String relating to a character string in the C ++ language is created.
【0023】まず、図2に示す文書データ生成装置2に
おいて、入力部11は、プログラムファイル記憶装置6
に格納されているプログラムのうち、例えば、図4に示
すようなプログラムを取り込む。そして、入力部11
は、プログラムファイル記憶装置6から取り込んだプロ
グラムをプログラム解析部12に供給する。First, in the document data generating apparatus 2 shown in FIG. 2, the input unit 11 is the program file storage device 6.
Of the programs stored in, the program shown in FIG. 4, for example, is loaded. Then, the input unit 11
Supplies the program loaded from the program file storage device 6 to the program analysis unit 12.
【0024】プログラム解析部12は、入力されたプロ
グラムをC++言語の文法規則に従って解析する。すなわ
ち、プログラム解析部12は、図4のようなプログラム
を複数の要素に分解し、それぞれの要素に名前を付ける
ことによって、図5に示すようなプログラムの解析結果
を得る。そして、プログラム解析部12は、このように
して得られる解析の結果を、テンプレート生成部13に
供給する。The program analysis unit 12 analyzes the input program according to the grammatical rules of the C ++ language. That is, the program analysis unit 12 decomposes the program as shown in FIG. 4 into a plurality of elements, and names each element to obtain the analysis result of the program as shown in FIG. Then, the program analysis unit 12 supplies the analysis result thus obtained to the template generation unit 13.
【0025】なお、図5において、各行のデータは、プ
ログラム解析部12が分解したプログラムの要素をそれ
ぞれ示している。また、各行のclass String,ptr,getpt
r(),length()の文字は、それぞれプログラムの要素に付
けた名前を示している。Note that, in FIG. 5, the data in each row shows the elements of the program decomposed by the program analysis unit 12. Also, class String, ptr, getpt of each line
The characters r () and length () indicate the names given to the elements of the program.
【0026】次いで、テンプレート生成部13は、プロ
グラム解析部12による解析の結果に基づいて、図6に
示すような文書データのテンプレートを生成する。この
文書データのテンプレートは、プログラム解析部12が
分解した上述のような各プログラムの要素毎に、各要素
に応じた必須項目を列挙したものである。Next, the template generator 13 generates a template of document data as shown in FIG. 6 based on the analysis result by the program analyzer 12. This document data template enumerates the essential items corresponding to each element of each program as described above decomposed by the program analysis unit 12.
【0027】すなわち、図6において、“class Strin
g”の要素の必須項目は、%status,%classlevel,%descri
ption,%history で示される4つの項目から成ってい
る。ここで、%status で示される項目は、例えば、実験
中、デバッグ中、あるいは公開済などのように、そのク
ラスの設計開発状況を示す項目である。That is, in FIG. 6, "class Strin
The required items for the g ”element are% status,% classlevel,% descri
It consists of four items indicated by ption and% history. Here, the item indicated by% status is an item indicating the design and development status of the class, such as, for example, during experiment, during debugging, or already published.
【0028】また、%classlevel で示される項目は、例
えば、共通で使用可能、通信関連で使用可能、あるいは
GUI関連で使用可能などのように、そのクラスのカテ
ゴリを示す項目である。さらに、%descriptionで示され
る項目は、そのクラスの機能説明を示す項目であり、%h
istoryで示される項目は、そのクラスの作成履歴を示す
項目である。The item indicated by% classlevel is, for example, an item showing how the category of the class can be used in common, used in communication, or used in GUI. Furthermore, the item indicated by% description is an item indicating the functional description of the class, and% h
The item indicated by istory is an item indicating the creation history of the class.
【0029】一方、“ptr ”の要素の必須項目は、%des
cription,%noteで示される2つの項目から成っている。
ここで、%note で示される項目は、その要素を使用する
に当たっての注意事項を示す項目である。On the other hand, the required items of the "ptr" element are% des
It consists of two items indicated by cription and% note.
Here, the item indicated by% note is an item indicating a caution when using the element.
【0030】また、“getptr()”の要素および“length
()”の要素の必須項目は、それぞれ%description,%retu
rn,%noteで示される3つの項目から成っている。ここ
で、%return で示される項目は、関数の返り値を示す項
目である。上述した“ptr ”の要素は変数型の要素であ
るため、%return の項目は不要であるが、“getptr()”
の要素と“length()”の要素とは関数型の要素であるた
め、%return の項目が必要である。The elements of "getptr ()" and "length"
The required items of () ”are% description and% retu, respectively.
It consists of three items indicated by rn and% note. Here, the item indicated by% return is an item indicating the return value of the function. Since the element of "ptr" mentioned above is a variable type element, the item of% return is unnecessary, but "getptr ()"
Since the element of and the element of “length ()” are functional elements, the item of% return is necessary.
【0031】なお、テンプレート生成部13は、プログ
ラムファイル記憶装置6から入力されたプログラムにつ
いて既に作成済みの文書データが文書データファイル記
憶装置3に格納されていることが入力部11により確認
された場合は、その文書データを参照してテンプレート
を生成するようにする。When the input unit 11 confirms that the template data generated by the program input from the program file storage device 6 is already stored in the document data file storage device 3, the template generation unit 13 confirms. Generates a template by referring to the document data.
【0032】そして、テンプレート生成部13は、以上
のようにして生成した文書データのテンプレートを端末
装置7の表示部に表示し、ユーザによってこのテンプレ
ートの編集作業が行われるのを待つ。Then, the template generating unit 13 displays the template of the document data generated as described above on the display unit of the terminal device 7, and waits for the user to edit this template.
【0033】その後、ユーザが端末装置7のキーボード
などを操作して、表示部におけるテンプレートの表示項
目に沿ってその内容を記述していくと、文書データ生成
部14は、文書データのテンプレート中に各項目の記述
内容を組み込んで、例えば、図7のような文書データを
生成する。After that, when the user operates the keyboard of the terminal device 7 or the like to describe the contents in accordance with the display items of the template on the display unit, the document data generation unit 14 writes in the template of the document data. By incorporating the description content of each item, for example, document data as shown in FIG. 7 is generated.
【0034】そして、文書データ生成部14は、このよ
うにして生成した文書データを出力部15を介して文書
データファイル記憶装置3に供給する。文書データファ
イル記憶装置3は、与えられた文書データを文書データ
ファイルとして格納する。Then, the document data generation unit 14 supplies the document data thus generated to the document data file storage device 3 via the output unit 15. The document data file storage device 3 stores the given document data as a document data file.
【0035】次に、図3に示す比較合成装置4におい
て、入力部22は、上述のようにして生成した文書デー
タを文書データファイル記憶装置3から取り込み、この
文書データを文書データ解析部24に供給する。また、
入力部21は、図4に示したプログラムをプログラムフ
ァイル記憶装置6から取り込み、このプログラムをプロ
グラム解析部23に供給する。Next, in the comparison / synthesis device 4 shown in FIG. 3, the input unit 22 takes in the document data generated as described above from the document data file storage device 3, and the document data is stored in the document data analysis unit 24. Supply. Also,
The input unit 21 takes in the program shown in FIG. 4 from the program file storage device 6 and supplies the program to the program analysis unit 23.
【0036】プログラム解析部23は、入力されたプロ
グラムをC++言語の文法規則に従って解析する。この場
合、プログラム解析部23に入力されるプログラムは、
図2のプログラム解析部12に入力されるプログラムと
同じであり、その解析結果も、図5に示したものと同じ
になる。そして、プログラム解析部23は、このプログ
ラムの解析の結果得られる図5のようなデータを比較部
25に供給する。The program analysis unit 23 analyzes the input program according to the grammatical rules of the C ++ language. In this case, the program input to the program analysis unit 23 is
The program is the same as that input to the program analysis unit 12 in FIG. 2, and the analysis result is also the same as that shown in FIG. Then, the program analysis section 23 supplies the data as shown in FIG. 5 obtained as a result of the analysis of this program to the comparison section 25.
【0037】一方、文書データ解析部24は、入力され
た文書データをその文法に従って解析する。そして、文
書データ解析部24は、この文書データの解析の結果得
られる図8のようなデータを比較部25に供給する。On the other hand, the document data analysis unit 24 analyzes the input document data according to its grammar. Then, the document data analysis unit 24 supplies the data shown in FIG. 8 obtained as a result of the analysis of the document data to the comparison unit 25.
【0038】なお、図8において、class String,ptr,g
etptr(),length()の各データは、それぞれ文書データの
要素を示している。また、class String,ptr,getptr(),
length()の文字は、それぞれ文書データの要素の名前を
示している。In FIG. 8, class String, ptr, g
Each data of etptr () and length () represents an element of document data. Also, class String, ptr, getptr (),
The characters of length () indicate the names of the elements of the document data.
【0039】次いで、比較部25は、上述のようにして
プログラム解析部23が解析したプログラムの要素と、
文書データ解析部24が解析した文書データの要素とを
比較し、それぞれに同じ名前の要素が存在するかどうか
を確認する。そして、比較部25は、その比較の結果に
応じて、入力したプログラムおよび文書データの中か
ら、所定の要素を合成部26に供給する。Next, the comparison unit 25 compares the elements of the program analyzed by the program analysis unit 23 as described above,
The document data analysis unit 24 compares the elements of the document data analyzed and confirms whether or not there is an element with the same name in each. Then, the comparison unit 25 supplies a predetermined element from the input program and document data to the synthesis unit 26 according to the result of the comparison.
【0040】すなわち、図5および図8に示した上述の
例のように、プログラムの要素と文書データの要素との
間ですべての要素の名前が一致している場合は、比較部
25は、そのすべての要素を合成部26に供給する。That is, when the names of all the elements of the program element and the element of the document data match, as in the above-described example shown in FIGS. 5 and 8, the comparison unit 25 All the elements are supplied to the synthesis unit 26.
【0041】一方、文書データの要素に対してプログラ
ムの要素が不足しているような場合は、比較部25は、
両者の名前が一致する要素のみを合成部26に供給す
る。例えば、図9に示すように、文書データの要素とし
て存在する“length()”の要素がプログラムの要素とし
ては存在しない場合には、比較部25は、文書データの
“length()”の要素は合成部26に供給せず、両者の名
前が一致する“class String,ptr,getptr() ”の要素の
みを合成部26に供給する。On the other hand, when there are insufficient program elements with respect to the document data elements, the comparison unit 25
Only the elements having the same name are supplied to the synthesizing unit 26. For example, as shown in FIG. 9, when the element of “length ()” existing as the element of document data does not exist as the element of the program, the comparison unit 25 determines that the element of “length ()” of the document data. Does not supply the synthesizing unit 26, but supplies only the elements of "class String, ptr, getptr ()" having the same names to the synthesizing unit 26.
【0042】さらに、これとは逆に、プログラムの要素
に対して文書データの要素が不足している場合は、プロ
グラム中には存在するにもかかわらず、文書データには
存在しない要素があることになるので、プログラムの正
しいドキュメントを得ることができない。On the contrary, when the elements of the document data are insufficient for the elements of the program, there must be some elements that are present in the program but not in the document data. So I can't get the correct documentation for the program.
【0043】したがって、この場合には、比較部25
は、例えば、端末装置7の表示部にエラー表示をして、
文書データの要素が不足していることをユーザに知らせ
る。そして、このようなエラーの発生を確認して、ユー
ザが文書データを生成し直すことにより、正しいドキュ
メントを常に得ることができるようにする。Therefore, in this case, the comparison unit 25
Displays an error on the display unit of the terminal device 7,
Notify the user that the document data element is missing. Then, by confirming the occurrence of such an error and regenerating the document data by the user, a correct document can always be obtained.
【0044】次いで、合成部26は、比較部25から入
力されたプログラムの要素と文書データの要素とを相対
応させて合成する。この合成の結果を、図10に示す。
さらに、合成部26は、端末装置7から与えられる所定
のパラメータに基づいて、図10に示した合成の結果を
調整し、この調整の結果得られるデータを出力部27に
供給する。Next, the synthesizing section 26 synthesizes the elements of the program and the elements of the document data input from the comparing section 25 in correspondence with each other. The result of this synthesis is shown in FIG.
Furthermore, the synthesizing unit 26 adjusts the result of the synthesizing shown in FIG. 10 based on a predetermined parameter given from the terminal device 7, and supplies the data obtained as a result of this adjustment to the output unit 27.
【0045】すなわち、合成部26は、例えば、プログ
ラム解析部23によるプログラムの解析の結果得られる
データ中にprivate 部を含んでいる要素は出力部27に
供給しないように調整することができる。図10の例で
は、合成部26は、private部を含んでいる“ptr ”以
外の要素を出力部27に供給する。That is, the synthesizing unit 26 can be adjusted, for example, so that an element including a private portion in the data obtained as a result of the analysis of the program by the program analyzing unit 23 is not supplied to the output unit 27. In the example of FIG. 10, the synthesis unit 26 supplies the output unit 27 with elements other than “ptr” including the private portion.
【0046】また、合成部26は、例えば、文書データ
解析部24による文書データの解析の結果得られるデー
タのうち、noteに関する部分のデータは出力部27に供
給しないように調整することができる。図10の例で
は、合成部26は、“ptr ”の要素中のnoteの行を除い
た部分のデータを出力部27に供給する。Further, the synthesizing section 26 can be adjusted so that, for example, of the data obtained as a result of the analysis of the document data by the document data analyzing section 24, the data related to note is not supplied to the output section 27. In the example of FIG. 10, the synthesizing unit 26 supplies the data of the portion excluding the note line in the element of “ptr” to the output unit 27.
【0047】次いで、出力部27は、合成部26から与
えられるデータを構造化ドキュメントファイル記憶装置
5に供給する。そして、構造化ドキュメントファイル記
憶装置5は、与えられたデータを構造化ドキュメントフ
ァイルとして格納する。このようにして、プログラムの
内容をその属性名、簡単な機能説明、注意事項などを各
要素毎に詳細に記述した構造化ドキュメントを得る。Next, the output unit 27 supplies the data supplied from the synthesizing unit 26 to the structured document file storage device 5. Then, the structured document file storage device 5 stores the given data as a structured document file. In this way, a structured document is obtained in which the contents of the program are described in detail for each element, such as the attribute name, simple function description, and notes.
【0048】また、出力部27は、上述の合成部26か
ら与えられるデータを、印刷装置8が理解できるフォー
マットに変換して印刷装置8に出力する。そして、印刷
装置8は、与えられたデータに基づいて、図11に示す
ようなドキュメントの印刷を実行する。Further, the output unit 27 converts the data given from the above-mentioned synthesizing unit 26 into a format understandable by the printing apparatus 8 and outputs it to the printing apparatus 8. Then, the printing device 8 prints the document as shown in FIG. 11 based on the given data.
【0049】以上のように、本実施例のプログラムドキ
ュメント作成装置では、入力したプログラムをその文法
規則に従って解析し、その解析の結果に基づいて文書デ
ータのテンプレートを生成するとともに、このテンプレ
ートを端末装置の表示部に表示する。次いで、ユーザが
この表示内容を参照してテンプレート中の必須項目の内
容を記述していくことによって、文書データを生成する
ようにしている。As described above, in the program document creating apparatus of this embodiment, the inputted program is analyzed according to its grammatical rules, a template of document data is generated based on the result of the analysis, and this template is used by the terminal device. Is displayed on the display. Next, the user refers to the displayed contents and describes the contents of the essential items in the template to generate the document data.
【0050】そして、この文書データの生成の際に、必
須項目の記述漏れなどがあった場合には、エラーを発生
してユーザにその旨を知らせる。そして、記述漏れのあ
った項目の内容をユーザが追加して記述することによっ
て文書データを完成させるようにしているので、誰が作
成しても必須項目の欠落がない一定の品質以上のドキュ
メントを作成することができる。When there is a description omission of an essential item during the generation of this document data, an error is generated and the user is informed accordingly. Since the user completes the document data by adding and describing the contents of the items for which there are omissions, no matter who creates the documents, the documents of a certain quality or higher will be created without missing required items. can do.
【0051】また、本実施例のプログラムドキュメント
作成装置では、上述のように、入力したプログラムの解
析結果に基づいて生成したテンプレートの必須項目をユ
ーザが埋めていくことによって文書データを生成するよ
うにしている。このため、通常は、プログラムと文書デ
ータとの間では、その内容にズレはない。Further, in the program document creating apparatus of the present embodiment, the user fills in the required items of the template created based on the analysis result of the input program, as described above, to create the document data. ing. Therefore, normally, there is no difference in the contents between the program and the document data.
【0052】これに対して、あるプログラムについて既
に生成済みの文書データを利用してドキュメントを作成
する場合には、プログラムに変数や関数を新たに加えた
り、逆に、プログラムから変数や関数を削除したりする
ことによって、プログラムの内容と文書データの内容と
にズレが生じることがある。On the other hand, when a document is created using document data that has already been generated for a certain program, variables or functions are newly added to the program, or conversely, variables or functions are deleted from the program. As a result, the contents of the program and the contents of the document data may deviate.
【0053】そこで、本実施例のプログラムドキュメン
ト作成装置では、プログラムに変数や関数を新たに加え
ることによって、プログラムの要素に対して文書データ
の要素が不足するような場合には、エラーを発生してユ
ーザにその旨を知らせ、文書データを生成し直すように
している。Therefore, in the program document creating apparatus of this embodiment, an error occurs when the elements of the document data are insufficient with respect to the elements of the program by newly adding variables and functions to the program. The user is informed of that fact and the document data is regenerated.
【0054】一方、プログラムから変数や関数を削除す
ることによって、文書データの要素に対してプログラム
の要素が不足するような場合には、文書データにのみ存
在する要素は無視してドキュメントを作成するようにし
ている。したがって、プログラムの変更を反映したドキ
ュメントを常に作成することができる。On the other hand, by deleting variables and functions from the program, when the elements of the program are insufficient for the elements of the document data, the elements existing only in the document data are ignored to create the document. I am trying. Therefore, it is possible to always create a document that reflects the changes in the program.
【0055】さらに、本実施例のプログラムドキュメン
ト作成装置では、所定のパラメータを用いて構造化ドキ
ュメントの内容を調整できるようにしているので、プロ
グラムの開発者や利用者などの対象のレベルに応じた複
数のドキュメントを1つのプログラムから作成すること
ができる。Further, in the program document creating apparatus of the present embodiment, the contents of the structured document can be adjusted by using the predetermined parameters, so that it can be adjusted according to the level of the target such as the program developer or the user. Multiple documents can be created from one program.
【0056】[0056]
【発明の効果】以上説明したように本発明によれば、入
力したプログラムの解析結果に基づいて、プログラムの
各要素についての内容をテンプレート形式でユーザが記
述していくことによって文書データが生成されるととも
に、この文書データの要素と上記プログラムの要素とが
比較され、プログラムの要素に対して文書データの要素
が不足していないと判断されたときに、一致が検出され
た要素同志が相互に合成されてドキュメントが作成され
るので、プログラムの各要素毎にその内容を記述した詳
細なドキュメントを常に作成することができ、さらに、
対象となるプログラムの内容を変更した場合にも、その
プログラムの変更を反映した詳細なドキュメントを作成
することができる。したがって、誰が作成しても、一定
の品質以上のドキュメントを常に作成することができ、
このため、例えば、プログラム部品の検索や、プログラ
ムソースの再利用を容易にして、プログラムの編集を効
率的に行うようにすることができる。As described above, according to the present invention, the document data is generated by the user describing the content of each element of the program in the template format based on the analysis result of the input program. At the same time, the elements of this document data are compared with the elements of the above program, and when it is determined that the elements of the document data are not insufficient for the elements of the program, the elements for which a match has been detected are mutually Since the document is created by synthesizing, you can always create a detailed document that describes the contents of each element of the program.
Even if the content of the target program is changed, it is possible to create a detailed document that reflects the change of the program. Therefore, no matter who creates it, you can always create documents of a certain quality or higher,
Therefore, for example, it is possible to easily search for a program component and reuse a program source and efficiently edit the program.
【図1】本発明のプログラムドキュメント作成装置の概
略的な構成を示すブロック図である。FIG. 1 is a block diagram showing a schematic configuration of a program document creation device of the present invention.
【図2】文書データ生成装置の構成を示すブロック図で
ある。FIG. 2 is a block diagram showing a configuration of a document data generation device.
【図3】比較合成装置の構成を示すブロック図である。FIG. 3 is a block diagram showing a configuration of a comparison / synthesis device.
【図4】プログラムファイル記憶装置から入力するプロ
グラムの例を示す図である。FIG. 4 is a diagram showing an example of a program input from a program file storage device.
【図5】プログラムの解析結果の例を示す図である。FIG. 5 is a diagram showing an example of analysis results of a program.
【図6】文書データのテンプレートの例を示す図であ
る。FIG. 6 is a diagram showing an example of a template of document data.
【図7】文書データの例を示す図である。FIG. 7 is a diagram showing an example of document data.
【図8】文書データの解析結果の例を示す図である。FIG. 8 is a diagram showing an example of an analysis result of document data.
【図9】プログラムの解析結果と文書データの解析結果
との例を示す図である。FIG. 9 is a diagram showing an example of an analysis result of a program and an analysis result of document data.
【図10】プログラムの要素と文書データの要素との合
成結果の例を示す図である。FIG. 10 is a diagram showing an example of a synthesis result of an element of a program and an element of document data.
【図11】構造化ドキュメントの例を示す図である。FIG. 11 is a diagram showing an example of a structured document.
【図12】従来のプログラム編集装置の処理を概略的に
示す動作説明図である。FIG. 12 is an operation explanatory view schematically showing the processing of a conventional program editing device.
【符号の説明】 1 プログラムドキュメント作成装置 2 文書データ生成装置 3 文書データファイル記憶装置 4 比較合成装置 5 構造化ドキュメントファイル記憶装置 6 プログラムファイル記憶装置 7 端末装置 8 印刷装置 11 入力部 12、23 プログラム解析部 13 テンプレート生成部 14 文書データ生成部 15 出力部 21、22 入力部 24 文書データ解析部 25 比較部 26 合成部 27 出力部[Explanation of Codes] 1 Program Document Creation Device 2 Document Data Generation Device 3 Document Data File Storage Device 4 Comparative Synthesis Device 5 Structured Document File Storage Device 6 Program File Storage Device 7 Terminal Device 8 Printing Device 11 Input Unit 12, 23 Program Analysis unit 13 Template generation unit 14 Document data generation unit 15 Output unit 21, 22 Input unit 24 Document data analysis unit 25 Comparison unit 26 Synthesis unit 27 Output unit
Claims (2)
グ言語の文法に従って構文解析し、上記プログラムを種
々の要素に分解するプログラム解析手段と、 上記プログラム解析手段により分解されたプログラムの
要素毎に、テンプレート形式で文書を記述することによ
って、上記プログラムの内容を表す文書データを生成す
る文書データ生成手段と、 上記文書データをその文法規則に従って解析し、上記文
書データを種々の要素に分解する文書データ解析手段
と、 上記プログラム解析手段により分解されたプログラムの
要素と、上記文書データ解析手段により分解された文書
データの要素とを比較し、上記プログラムの要素に対応
する文書データの要素が存在するか否かを確認する比較
手段と、 上記比較手段による比較の結果、上記プログラムの要素
に対して上記文書データの要素が不足していないと判断
されたときに、両要素間で一致が検出された要素を合成
してプログラムドキュメントを生成する合成手段とを設
けたことを特徴とするプログラムドキュメント作成装
置。1. A program analysis means for parsing an input program according to the grammar of the programming language and decomposing the program into various elements, and a template format for each element of the program decomposed by the program analysis means. Document data generating means for generating document data representing the contents of the program by describing a document, and document data analyzing means for analyzing the document data according to its grammatical rules and decomposing the document data into various elements. , Comparing the elements of the program decomposed by the program analysis means with the elements of the document data decomposed by the document data analysis means to determine whether or not the element of the document data corresponding to the element of the program exists. The comparison means to confirm and the result of the comparison by the comparison means, When it is determined that the elements of the document data are not insufficient with respect to the elements of the system, a synthesizing means for synthesizing the elements for which a match is detected between the two elements and generating a program document is provided. Characterized program document creation device.
作成装置において、上記比較手段による比較の結果、上
記プログラムの要素に対して上記文書データの要素が不
足していると判断されたときは、エラーを発生するよう
にしたことを特徴とするプログラムドキュメント作成装
置。2. The program document creating apparatus according to claim 1, wherein when it is determined that the elements of the document data are insufficient with respect to the elements of the program as a result of the comparison by the comparing means, an error is generated. A program document creating device characterized by being generated.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP29726193A JPH07129381A (en) | 1993-11-02 | 1993-11-02 | Program document creation device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP29726193A JPH07129381A (en) | 1993-11-02 | 1993-11-02 | Program document creation device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH07129381A true JPH07129381A (en) | 1995-05-19 |
Family
ID=17844238
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP29726193A Withdrawn JPH07129381A (en) | 1993-11-02 | 1993-11-02 | Program document creation device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH07129381A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006137126A1 (en) * | 2005-06-21 | 2006-12-28 | Renesas Technology Corp. | Template program managing server, template program managing system, and template program managing network |
| WO2017199443A1 (en) | 2016-05-20 | 2017-11-23 | 三菱電機株式会社 | Template generating device, template generating program, and template generating method |
-
1993
- 1993-11-02 JP JP29726193A patent/JPH07129381A/en not_active Withdrawn
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006137126A1 (en) * | 2005-06-21 | 2006-12-28 | Renesas Technology Corp. | Template program managing server, template program managing system, and template program managing network |
| WO2017199443A1 (en) | 2016-05-20 | 2017-11-23 | 三菱電機株式会社 | Template generating device, template generating program, and template generating method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6473892B1 (en) | Data driven, dynamic language document assembly system | |
| US6757889B1 (en) | Source program checking device and program and method for same | |
| KR100745530B1 (en) | A computer usable recording medium recording a pop-up window generating program and a computer-implemented method for generating a pop-up window. | |
| JP2009205190A (en) | Automatic software configuration device | |
| US20040237036A1 (en) | Methods and systems for generating supporting files for commands | |
| JPH0869380A (en) | Source program check device | |
| US20050010548A1 (en) | Automatic file generating apparatus, method, program and record medium | |
| JPH0916382A (en) | Program development supporting system | |
| EP1744255A1 (en) | Document processing device and document processing method | |
| EP1768034A1 (en) | Document processing device and document processing method | |
| JP3337763B2 (en) | Drawing description generator | |
| JP2007079906A (en) | Source code generator | |
| JP4103791B2 (en) | Program generation system and method | |
| CN116070716B (en) | Model verification realization method and device and server | |
| JP3357563B2 (en) | Operation log data management device | |
| JPH05257665A (en) | HCP chart / source program interlocking editing device | |
| JP3080891B2 (en) | Form processing device | |
| JP2005043931A (en) | Program automatic generation system and program automatic generation method | |
| JP2007058750A (en) | Data specification description document and verification data generation device | |
| Jung | Design for Procedure Editor to integrate procedure administration tasks in nuclear power plants | |
| CN121413565A (en) | Systems and methods for converting PDF files into editable design templates | |
| JPH0540656A (en) | Automatic generation method of table for parsing trace | |
| JPH0588865A (en) | Software design supporting device | |
| JPH05143257A (en) | Form design method | |
| JPH0883279A (en) | Electronic document generator |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20010130 |