JPH11126159A - Device and method for automatically generating c language body structure member allocation block diagram, and recording medium recording automatic generation program - Google Patents

Device and method for automatically generating c language body structure member allocation block diagram, and recording medium recording automatic generation program

Info

Publication number
JPH11126159A
JPH11126159A JP29137197A JP29137197A JPH11126159A JP H11126159 A JPH11126159 A JP H11126159A JP 29137197 A JP29137197 A JP 29137197A JP 29137197 A JP29137197 A JP 29137197A JP H11126159 A JPH11126159 A JP H11126159A
Authority
JP
Japan
Prior art keywords
size
automatic generation
configuration diagram
attribute
offset
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
JP29137197A
Other languages
Japanese (ja)
Inventor
Masahiro Ueno
政宏 上野
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 Communication Systems Ltd
Original Assignee
NEC Communication Systems 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 NEC Communication Systems Ltd filed Critical NEC Communication Systems Ltd
Priority to JP29137197A priority Critical patent/JPH11126159A/en
Publication of JPH11126159A publication Critical patent/JPH11126159A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To automatically generate the member allocation block diagram of a body structure from a source file. SOLUTION: The automatic generation is performed by a processing 102 for reading the member name and attribute of the body structure from a source file 101, a processing 105 for specifying the size of a member from the read attribute of the member, a processing 106 for finding the offset of the member in the body structure from the size of the member and finding the size of the body structure from the size of the member in the body structure, and a processing 110 for preparing the member allocation block diagram 110 of the body structure from the name, size and offset value of the member of the body structure.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、ソフトウェア開
発における製造後のソースファイルから、C言語の構造
体のメンバ割り付け構成図を自動生成する自動生成装
置、自動生成方法および自動生成プログラムを記録した
記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an automatic generating apparatus, an automatic generating method, and a recording apparatus for automatically generating a member allocation configuration diagram of a C-language structure from a manufactured source file in software development. Regarding the medium.

【0002】[0002]

【従来の技術】定義用ファイルに構造体名称と各メンバ
のデータ型と変数名を記憶させておくと、構造体の定義
書式にのっとり、必要なコマンドや記号が付加されて、
自動的に構造体を定義したソースファイルが作成される
技術の一例が、特開平6−161772号公報に記載さ
れている。このようなソフトウェアの自動生成技術は、
勿論、ソフトウェア開発の効率化に貢献するものである
が、ソフトウェア開発においては、作成したソフトウェ
アを管理することも極めて重要な課題である。従来、こ
の種のソフトウェア管理は、ソフトウェアの仕様を表す
ドキュメントを作成し保存しておくという方法により一
般的に行われてきた。そして、C言語によるものについ
ては、ソフトウェア開発者が、手作業でソースファイル
から構造体割り付け構成図を作成するという方法を採っ
ていた。
2. Description of the Related Art When a structure name, a data type of each member and a variable name are stored in a definition file, necessary commands and symbols are added according to the structure definition format.
An example of a technique for automatically creating a source file in which a structure is defined is described in JP-A-6-161772. The automatic generation technology of such software,
Of course, this contributes to the efficiency of software development, but in software development, managing the created software is also a very important issue. Conventionally, this kind of software management has been generally performed by a method of creating and storing a document representing software specifications. In the case of the C language, a software developer manually creates a structure allocation configuration diagram from a source file.

【0003】[0003]

【発明が解決しようとする課題】ところで、ソースファ
イル中の構造体定義から構造体のメンバ割り付け構成図
を手作業で作成するのは、大変な労力と時間が必要とな
る。何故ならば、構造体のメンバ割り付け構成図の作成
は、C言語の構造体の概念や定義の仕様、コンパイラの
知識を必要とし、また、この作成作業において必要とさ
れるメンバのサイズ計算、オフセット計算は構造体が大
規模になるほど複雑になるからである。また、ソースフ
ァイル中でtypedef定義された属性を変更した場
合、そのtypedef名を使用している構造体のメン
バを洗い出し、すべての構造体のメンバ割り付け構成図
を変更する大変な労力と時間が必要となる。何故なら
ば、typedef定義は、開発者が任意に定義できる
属性であり、その属性のサイズを変更した場合、構造体
のメンバ割り付けが変更になり、その影響箇所を調べな
ければならないからである。
By the way, it takes a great deal of labor and time to manually create a structure assignment diagram of a structure from a structure definition in a source file. This is because the creation of a structure assignment diagram of a structure requires knowledge of the concept and definition of the structure of the C language and the knowledge of the compiler, and also calculates the size of members and offsets required in the creation work. This is because the calculation becomes more complicated as the structure becomes larger. In addition, when the attribute defined as typedef in the source file is changed, the members of the structure using the typedef name are identified, and a great deal of labor and time are required to change the member allocation configuration diagram of all structures. Becomes The reason is that the typedef definition is an attribute that can be arbitrarily defined by the developer, and if the size of the attribute is changed, the member assignment of the structure is changed, and the affected area must be examined.

【0004】この発明は、以上説明した事情に鑑みてな
されたものであり、従来は人手で作成していた構造体の
メンバ割り付け構成図をソースファイルから自動的に生
成することができる自動生成装置、自動生成方法および
自動生成方法を記録した記録媒体を提供することを目的
としている。
The present invention has been made in view of the above-described circumstances, and has an automatic generation apparatus which can automatically generate a member assignment configuration diagram of a structure from a source file, which has been conventionally manually created. It is an object of the present invention to provide an automatic generation method and a recording medium on which the automatic generation method is recorded.

【0005】[0005]

【課題を解決するための手段】この発明は、ソースファ
イルから構造体のメンバ名、属性を読み出す手段(図1
における符号102)と、読み出したメンバの属性から
メンバのサイズの特定する手段(図1における符号10
5)と、メンバのサイズから構造体内のメンバのオフセ
ットを求めるとともに構造体を構成するメンバから構造
体のサイズを求める手段(図1における符号105)
と、構造体のメンバの名称、サイズ、オフセット値より
構造体のメンバ割り付け構成図(図1における符号11
0)を作成する手段(図1における符号109)とを具
備することを特徴としている。
According to the present invention, there is provided means for reading a member name and an attribute of a structure from a source file (FIG. 1).
And a means for specifying the size of the member from the read attribute of the member (reference numeral 10 in FIG. 1).
5) means for obtaining the offset of the member in the structure from the size of the member and obtaining the size of the structure from the members constituting the structure (reference numeral 105 in FIG. 1)
And the structure member assignment configuration diagram based on the names, sizes, and offset values of the structure members (reference numeral 11 in FIG. 1).
(0) in FIG. 1 (109 in FIG. 1).

【0006】[0006]

【発明の実施の形態】以下、図面を参照し、本発明の実
施の形態について説明する。図1はこの発明の一実施形
態である構造体のメンバ割り付け構成図の自動生成を行
うプログラムの機能構成を示すブロック図である。この
自動生成プログラムは、ソースファイル101から構造
体のメンバの名称・属性を読み出し、構造体メンバ表1
11とサイズ変換表112に設定するメンバ情報取得処
理102と、ソースファイル101からtypedef
定義のtypedef名・属性を読み出し、サイズ変換
表112に設定するtypedef情報取得処理103
と、サイズ変換表112に設定したtypedef情報
の属性のサイズを特定し、サイズ変換表112に設定す
るtypedefサイズ算出処理104と、構造体メン
バ表111のメンバのサイズを特定し、構造体メンバ表
111に設定するメンバサイズ算出処理105と、構造
体メンバ表111のメンバのサイズよりメンバの構造体
内のオフセット値を求め構造体メンバ表111に設定
し、構造体のサイズを求めサイズ変換表112に設定す
るオフセット計算処理106と、構造体メンバ表の内容
を構造体のメンバ割り付け情報ファイル108に出力す
る構造体メンバ割り付け情報ファイル作成処理107
と、構造体のメンバ割り付け情報ファイル108の内容
より構造体のメンバ割り付け構成図110を作成する構
造体メンバ割り付け構成図作成処理109とにより構成
されている。これらの各処理の内容についてさらに詳述
すると次の通りである。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a functional configuration of a program for automatically generating a structural member assignment configuration diagram according to an embodiment of the present invention. This automatic generation program reads the names and attributes of the members of the structure from the source file 101, and reads the structure member table 1
11 and member information acquisition processing 102 to be set in the size conversion table 112, and typedef from the source file 101.
Typedef information acquisition processing 103 for reading the typedef name / attribute of the definition and setting it in the size conversion table 112
And the size of the attribute of the typedef information set in the size conversion table 112, the typedef size calculation processing 104 to be set in the size conversion table 112, the size of the members of the structure member table 111 are specified, and the structure member table The member size calculation processing 105 to be set in the member 111 and the offset value in the member structure from the member size in the structure member table 111 are obtained and set in the structure member table 111, and the size of the structure is obtained and the size conversion table 112 is obtained. Offset calculation processing 106 to be set, and structure member allocation information file creation processing 107 for outputting the contents of the structure member table to the structure member allocation information file 108
And a structure member assignment configuration diagram creation process 109 for creating a structure member assignment configuration diagram 110 from the contents of the structure member assignment information file 108. The details of each of these processes are as follows.

【0007】まず、メンバ情報取得処理102では、ソ
ースファイル101から構造体定義開始の文字列“st
ruct”を検索し、構造体定義終了の文字列“}”を
検索するまでの間、メンバ定義のメンバ名、属性を抽出
し、図2に例示する構造体メンバ表111のタグ名20
1・メンバ名202・サイズ204にそれぞれ設定す
る。さらに、構造体の属性(struct タグ名)
を、図3に例示するサイズ変換表112の属性301に
設定する。
First, in a member information acquisition process 102, a character string "st
Until the search for “ruct” is performed and the character string “@” at the end of the structure definition is searched, the member names and attributes of the member definitions are extracted and the tag names 20 of the structure member table 111 illustrated in FIG.
1. Member name 202 and size 204 are set respectively. In addition, structure attributes (struct tag name)
Is set in the attribute 301 of the size conversion table 112 illustrated in FIG.

【0008】typedef情報取得処理103では、
ソースファイル101から、typedef構造体定義
開始文字列“typedef”を検索し、typede
f定義終了の文字列“;”までの間を取り出し、typ
edef名、属性を抽出し、サイズ変換表112(図3
参照)の属性301・typedef名にそれぞれ設定
する。
In the typedef information acquisition process 103,
The typedef structure definition start character string "typedef" is searched from the source file 101, and the typedef
Extract up to the character string ";" at the end of f definition and type
The edef name and attributes are extracted, and the size conversion table 112 (FIG. 3)
(See Reference) attribute 301 and typedef name.

【0009】typedefサイズ算出処理104で
は、サイズ変換表112にtypedef名の設定があ
る項目について属性301に該当するものをサイズ変換
表112からサイズ303が設定されており同じ属性の
ものを検索する。該当したサイズ303と割付サイズ3
04を検索元のサイズ303と割付サイズ304に設定
する。ただし、属性がポインタの場合は、サイズを
「4」とする。また、属性が配列の場合、配列の大きさ
をサイズに乗算したものをサイズとし、サイズ303に
設定する(以上、図3参照)。
[0009] In the typedef size calculation processing 104, for an item having a typedef name set in the size conversion table 112, a search is performed for an item corresponding to the attribute 301, for which the size 303 is set from the size conversion table 112 and which has the same attribute. Applicable size 303 and allocation size 3
04 is set as the search source size 303 and the allocation size 304. However, if the attribute is a pointer, the size is “4”. When the attribute is an array, a value obtained by multiplying the size of the array by the size is set as the size 303 (see FIG. 3).

【0010】メンバサイズ算出処理105では、構造体
メンバ表(図2参照)のメンバにおいてサイズ204が
未設定のものについてサイズを求める。サイズは、サイ
ズ変換表112(図3参照)からサイズ303が設定さ
れてあり同じ属性のものを検索する。該当したサイズ3
03と割付サイズ304を検索元のサイズ204と20
5に設定する。メンバがビットフィールドの場合は、ビ
ット長をビット206に設定する。但し、属性がポイン
タの場合は、サイズを「4」とする。また、属性が配列
の場合、配列の大きさをサイズに乗算したものをサイズ
とし、サイズ303に設定する。
In the member size calculation processing 105, the size of a member of the structure member table (see FIG. 2) for which the size 204 has not been set is obtained. The size is searched for from the size conversion table 112 (see FIG. 3) having the same size 303 as the size 303 is set. Applicable size 3
03 and allocation size 304 are used as search source sizes 204 and 20
Set to 5. If the member is a bit field, the bit length is set to bit 206. However, if the attribute is a pointer, the size is “4”. When the attribute is an array, a size obtained by multiplying the size of the array by the size is set as the size 303.

【0011】オフセット計算処理106では、構造体メ
ンバ表111(図2参照)のメンバのサイズが設定され
ているところまでを計算対象とする。オフセットの計算
は、メンバのサイズ204と割付サイズから求める。具
体的には次の通りである。
In the offset calculation processing 106, calculation is performed up to the point where the member size of the structure member table 111 (see FIG. 2) is set. The offset is calculated from the member size 204 and the allocated size. Specifically, it is as follows.

【0012】計算対象メンバの割付サイズ205が
「1」の場合は、前のメンバのオフセット208に前の
メンバのサイズを加算した値を計算対象メンバのオフセ
ットとし、オフセット208に設定する。
When the allocation size 205 of the member to be calculated is “1”, the value obtained by adding the size of the previous member to the offset 208 of the previous member is set as the offset of the member to be calculated, and is set as the offset 208.

【0013】計算対象メンバの割付サイズ205が
「2」の場合は、前のメンバのオフセット208に前の
メンバのサイズを加算した値が「2」で割り切れる場
合、その値を計算対象メンバのオフセットとし、オフセ
ット208に設定する。割り切れない場合、その値に
「1」を加算した値を計算対象メンバのオフセットと
し、オフセット208に設定する。
When the allocation size 205 of the member to be calculated is “2”, if the value obtained by adding the size of the previous member to the offset 208 of the previous member is divisible by “2”, the value is calculated as the offset of the member to be calculated. And set the offset 208. If it is not divisible, a value obtained by adding “1” to the value is set as the offset of the member to be calculated, and is set as the offset 208.

【0014】計算対象メンバの割付サイズ205が
「4」の場合は、、前のメンバのオフセット208に前
のメンバのサイズを加算した値が「4」で割り切れる場
合、その値を計算対象メンバのオフセットとし、オフセ
ット208に設定する。割り切れない場合、その値に
「4」で割り切れる最少の値を加算した値を計算対象メ
ンバのオフセットとし、オフセット208に設定する。
If the allocation size 205 of the member to be calculated is "4", and if the value obtained by adding the size of the previous member to the offset 208 of the previous member is divisible by "4", the value is calculated as the value of the member to be calculated. The offset is set as the offset 208. If the value is not divisible, the value obtained by adding the minimum value divisible by “4” to the value is set as the offset of the member to be calculated, and is set as the offset 208.

【0015】全てのメンバのオフセット208を設定し
た構造体の場合、最終メンバのオフセット208に最終
メンバのサイズ204を加算した値を構造体のサイズと
する。
In the case of a structure in which offsets 208 of all members are set, a value obtained by adding the size 204 of the last member to the offset 208 of the last member is defined as the size of the structure.

【0016】割付サイズ205が「4」のものを1つで
も含む場合、構造体サイズに4で割り切れる最少の値を
加算した値を構造体のサイズとし、サイズ変換表112
のサイズ303に設定し、割付サイズ304に「4」を
設定する。
If the allocation size 205 includes at least one of “4”, the structure size is obtained by adding the minimum value divisible by 4 to the structure size, and the size conversion table 112
And the allocation size 304 is set to “4”.

【0017】それ以外で、割付サイズ205が「2」の
ものを1つでも含む場合、構造体サイズに「2」で割り
切れる最少の値を加算した値を構造体のサイズとし、サ
イズ変換表112のサイズ303に設定し、割付サイズ
305に「2」を設定する。
Otherwise, if the allocation size 205 includes at least one of “2”, the structure size is obtained by adding the minimum value divisible by “2” to the structure size, and the size conversion table 112 is used. And the allocation size 305 is set to “2”.

【0018】それ以外は、構造体サイズをそのままサイ
ズ変換表112のサイズ303に設定し、割付サイズ3
05に「1」を設定する。
Otherwise, the structure size is set as it is in the size 303 of the size conversion table 112, and the allocation size 3
05 is set to “1”.

【0019】次に、構造体メンバ割り付け情報ファイル
作成処理107では、構造体メンバ表111の設定内容
を構造体メンバ割り付け情報ファイル108に出力す
る。図4はこの構造体メンバ割り付け情報ファイル10
8の内容を例示するものである。
Next, in the structure member assignment information file creation processing 107, the contents set in the structure member table 111 are output to the structure member assignment information file 108. FIG. 4 shows the structure member allocation information file 10.
8 illustrates the contents of FIG.

【0020】構造体メンバ割り付け構成図作成処理10
9では、構造体メンバ割り付け情報ファイル108を読
み込み、その内容にしたがって構造体メンバ割り付け構
成図110を作成する。以下、この構造体メンバ割り付
け構成図作成処理を図4および図5を参照しつつ説明す
る。
Structure member allocation configuration diagram creation processing 10
In step 9, the structure member allocation information file 108 is read, and a structure member allocation configuration diagram 110 is created according to the contents. Hereinafter, the structure member assignment configuration diagram creation processing will be described with reference to FIGS. 4 and 5.

【0021】図4において構造体メンバ割り付け情報フ
ァイル108の1カラム目が“|”の場合、その行は構
造体のタグ名が定義されているとみなし、構造体メンバ
割り付け構成図(図5)ではstructタグ名501
とバイトの区切り502を表示する。
In FIG. 4, when the first column of the structure member allocation information file 108 is "|", it is assumed that the line defines the tag name of the structure, and the structure member allocation configuration diagram (FIG. 5) Then, the structure tag name 501
And a byte separator 502 are displayed.

【0022】構造体メンバ割り付け情報ファイル108
(図4)の1カラム目が、“|”以外の場合、その行は
メンバの割り付けを定義されているとみなし、メンバの
表示503を行う(図5)。オフセットの値が、「4」
で割り切れる場合は、ワード数の表示504を行う(図
5)。
Structure member allocation information file 108
If the first column of (FIG. 4) is other than "|", it is regarded that the line is defined for the member assignment, and the display 503 of the member is performed (FIG. 5). The offset value is "4"
If it is divisible by, a display 504 of the number of words is performed (FIG. 5).

【0023】サイズの値に相当する枠を表示し、その中
にメンバ名を表示する。メンバ名がその枠内に表示でき
ない場合、参照を表す“n)”(符号506参照)を表
示し、構造体のメンバ割り付け構成図の最後にメンバ名
507を表示する。
A frame corresponding to the size value is displayed, and a member name is displayed therein. If the member name cannot be displayed in the frame, "n)" (refer to reference numeral 506) indicating the reference is displayed, and the member name 507 is displayed at the end of the structure allocation diagram.

【0024】ビットオフセットの値が設定されている場
合、枠の大きさをビット単位に求める。1ビットの枠の
大きさは1バイトの枠の大きさの1/8とする。
When the value of the bit offset is set, the size of the frame is obtained in bit units. The size of a 1-bit frame is 1 / of the size of a 1-byte frame.

【0025】次に図6に示すソースファイルを入力し、
図7に示す構造体メンバ表と、図8に示すサイズ変換表
と、図9に示す構造体のメンバ割り付け構成図とを作成
し、図10に示す構造体のメンバ割り付け構成図を作成
する場合を動作について説明する。
Next, input the source file shown in FIG.
When the structure member table shown in FIG. 7, the size conversion table shown in FIG. 8, and the member assignment configuration diagram of the structure shown in FIG. 9 are created, and the member assignment configuration diagram of the structure shown in FIG. 10 is created. The operation will be described.

【0026】まず、図6に示すソースファイルは、タグ
名TAGAとタグ名TAGBとtypedef名ABC
とtypedef名XXXを持つ。
First, the source file shown in FIG. 6 has a tag name TAGA, a tag name TAGB, a typedef name ABC
And typedef name XXX.

【0027】メンバ情報取得処理102により、構造体
メンバ表(図7)のタグ名、メンバ名、属性の項目を設
定し、サイズ変換表(図8)の属性の項目を設定する。
次にtypedef情報取得処理103により、サイズ
変換表(図8)の属性、typedef名の項目を設定
する。
The member information acquisition process 102 sets the tag name, member name, and attribute items of the structure member table (FIG. 7), and sets the attribute items of the size conversion table (FIG. 8).
Next, in the typedef information acquisition processing 103, the attributes of the size conversion table (FIG. 8) and the items of the typedef name are set.

【0028】typedefサイズ算出処理104によ
り、typedef名ABCのサイズを求める。typ
edef名XXXは、タグ名TAGAのサイズがこの段
階で算出されていないため設定しない。
The size of the typedef name ABC is obtained by the typedef size calculation processing 104. type
The edef name XXX is not set because the size of the tag name TAGA has not been calculated at this stage.

【0029】メンバサイズ算出処理105により、構造
体メンバ表(図7)のサイズ、割付サイズ、ビット長の
項目を設定する。
In the member size calculation processing 105, items of size, allocation size, and bit length of the structure member table (FIG. 7) are set.

【0030】オフセット計算処理106により、構造体
メンバ表(図7)のビットオフセット、オフセットの項
目を設定し、構造体のサイズを算出し、サイズ変換表
(図8)の属性がstructTAGAとstruct
TAGBのサイズと割付サイズの項目を設定する。
The offset calculation processing 106 sets the bit offset and offset items of the structure member table (FIG. 7), calculates the size of the structure, and sets the attributes of the size conversion table (FIG. 8) as “structTAG” and “struct”.
Set the items of TAGB size and allocation size.

【0031】構造体メンバ割り付け情報ファイル作成処
理107により、構造体メンバ割り付け情報ファイル
(図9)を作成する。構造体メンバ割り付け情報構成図
作成処理109により、構造体メンバ割り付け構成図
(図10)を作成する。
The structure member assignment information file creation process 107 creates a structure member assignment information file (FIG. 9). The structure member assignment configuration diagram (FIG. 10) is created by the structure member assignment information configuration diagram creation process 109.

【0032】なお、上記実施形態では、本発明をソフト
ウェアとして実施する場合の例を示したが、本発明の実
施形態はこれに限定されるものではなく、本実施形態の
全処理を実行する1個の自動生成装置として本発明を実
施してもよい。また、以上説明した本実施形態に係る自
動生成プログラムを記録媒体に記録して頒布し、各ユー
ザがこれをパーソナルコンピュータ等により読み出して
実行するような実施形態も可能である。
In the above embodiment, an example in which the present invention is implemented as software has been described. However, the embodiment of the present invention is not limited to this, and all the processes of the present embodiment are executed. The present invention may be implemented as a single automatic generation device. Further, an embodiment is also possible in which the above-described automatic generation program according to the present embodiment is recorded on a recording medium and distributed, and each user reads out and executes the program using a personal computer or the like.

【0033】[0033]

【発明の効果】以上説明したように、この発明によれ
ば、ソースファイルを入力するだけでそのファイルに定
義されている構造体の構造体メンバ割り付け構成図が自
動的に生成されるため、C言語のプログラム開発におけ
るドキュメント作成に要する負担が軽減されるという効
果がある。
As described above, according to the present invention, only by inputting a source file, a structure member allocation diagram of a structure defined in the file is automatically generated. This has the effect of reducing the load required for document creation in language program development.

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

【図1】 この発明の一実施形態であるC言語構造体メ
ンバ割り付け構成図の自動生成装置、自動生成方法およ
び自動生成プログラムのブロック構成図である。
FIG. 1 is a block diagram of an automatic generation device, an automatic generation method, and an automatic generation program of a C language structure member allocation configuration diagram according to an embodiment of the present invention.

【図2】 同実施形態において取扱う構造体メンバ表を
例示する図である。
FIG. 2 is a diagram exemplifying a structure member table handled in the embodiment;

【図3】 同実施形態において取扱うサイズ変換表を例
示する図である。
FIG. 3 is a diagram exemplifying a size conversion table handled in the embodiment.

【図4】 同実施形態において作成する構造体メンバ割
り付け情報ファイルを例示する図である。
FIG. 4 is a diagram exemplifying a structure member allocation information file created in the embodiment;

【図5】 同実施形態において作成する構造体メンバ割
り付け構成図を例示する図である。
FIG. 5 is a diagram exemplifying a structure member allocation configuration diagram created in the embodiment;

【図6】 同実施形態の動作例において取扱うソースフ
ァイルを示す図である。
FIG. 6 is a diagram showing a source file handled in an operation example of the embodiment.

【図7】 同実施形態の動作例において取扱う構造体メ
ンバ表を示す図である。
FIG. 7 is a diagram showing a structure member table handled in an operation example of the embodiment.

【図8】 同実施形態の動作例において取扱うサイズ変
換表を示す図である。
FIG. 8 is a diagram showing a size conversion table handled in an operation example of the embodiment.

【図9】 同実施形態の動作例において取扱う構造体メ
ンバ割り付け情報ファイルを示す図である。
FIG. 9 is a diagram showing a structure member allocation information file handled in an operation example of the embodiment.

【図10】 同実施形態の動作例において出力される構
造体メンバ割り付け構成図を示す図である。
FIG. 10 is a diagram showing a structure member allocation configuration diagram output in an operation example of the embodiment.

【符号の説明】[Explanation of symbols]

101 ソースファイル 111 構造体メンバ表 112 サイズ変換表 102 メンバ情報取得処理 103 typedef情報取得処理 104 typedefサイズ算出処理 105 メンバサイズ算出処理 106 オフセット計算処理 108 構造体メンバ割り付け情報ファイル 107 構造体メンバ割り付け情報ファイル作成
処理 109 構造体メンバ割り付け構成図作成処理 110 構造体メンバ割り付け構成図
101 Source File 111 Structure Member Table 112 Size Conversion Table 102 Member Information Acquisition Processing 103 Typedef Information Acquisition Processing 104 Typedef Size Calculation Processing 105 Member Size Calculation Processing 106 Offset Calculation Processing 108 Structure Member Allocation Information File 107 Structure Member Allocation Information File Creation process 109 Structure member assignment configuration diagram Creation process 110 Structure member assignment configuration diagram

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 C言語の構造体定義を含むソースファイ
ルから構造体メンバ割り付け構成図を自動生成する自動
生成装置であって、 前記ソースファイルから構造体のメンバ名、属性を読み
出す手段と、 前記メンバ情報取得手段により読み出したメンバの属性
からメンバのサイズを特定する手段と、 前記メンバのサイズから構造体内のメンバのオフセット
を求める手段と、 構造体を構成するメンバから構造体のサイズを求める手
段と、 構造体のメンバの名称、サイズ、オフセットより構造体
のメンバ割り付け構成図を作成する手段とを具備するこ
とを特徴とするC言語構造体メンバ割り付け構成図の自
動生成装置。
1. An automatic generation device for automatically generating a structure member allocation configuration diagram from a source file including a structure definition in C language, comprising: means for reading a member name and an attribute of a structure from the source file; Means for specifying the size of the member from the attribute of the member read by the member information obtaining means; means for obtaining the offset of the member in the structure from the size of the member; means for obtaining the size of the structure from the members constituting the structure And a means for creating a structure member allocation configuration diagram based on the names, sizes, and offsets of the structure member names, and a C language structure member allocation configuration diagram automatic generation apparatus.
【請求項2】 C言語の構造体定義を含むソースファイ
ルから構造体メンバ割り付け構成図を自動生成する自動
生成方法であって、 前記ソースファイルから構造体のメンバ名、属性を読み
出す処理と、 前記メンバ情報取得手段により読み出したメンバの属性
からメンバのサイズを特定する処理と、 前記メンバのサイズから構造体内のメンバのオフセット
を求める処理と、 構造体を構成するメンバから構造体のサイズを求める処
理と、 構造体のメンバの名称、サイズ、オフセットより構造体
のメンバ割り付け構成図を作成する処理とを具備するこ
とを特徴とするC言語構造体メンバ割り付け構成図の自
動生成方法。
2. An automatic generation method for automatically generating a structure member assignment configuration diagram from a source file including a C language structure definition, comprising: a process of reading a member name and an attribute of a structure from the source file; A process of specifying the size of the member from the attribute of the member read by the member information obtaining means; a process of obtaining the offset of the member in the structure from the size of the member; and a process of obtaining the size of the structure from the members constituting the structure And a process for creating a structure assignment diagram of the structure from the names, sizes, and offsets of the members of the structure.
【請求項3】 C言語の構造体定義を含むソースファイ
ルから構造体メンバ割り付け構成図を自動生成する自動
生成プログラムを記録した記録媒体であって、 前記自動生成プログラムが、 前記ソースファイルから構造体のメンバ名、属性を読み
出す処理と、 前記メンバ情報取得手段により読み出したメンバの属性
からメンバのサイズを特定する処理と、 前記メンバのサイズから構造体内のメンバのオフセット
を求める処理と、 構造体を構成するメンバから構造体のサイズを求める処
理と、 構造体のメンバの名称、サイズ、オフセットより構造体
のメンバ割り付け構成図を作成する処理とを具備するこ
とを特徴とするC言語構造体メンバ割り付け構成図の自
動生成プログラムを記録した記録媒体。
3. A recording medium recording an automatic generation program for automatically generating a structure member assignment configuration diagram from a source file including a structure definition of a C language, wherein the automatic generation program includes a structure from the source file. A process of reading the member name and attribute of the member, a process of specifying the size of the member from the attribute of the member read by the member information acquisition unit, a process of obtaining the offset of the member in the structure from the size of the member, C language structure member assignment, characterized by comprising a process of obtaining the size of a structure from constituent members and a process of creating a structure member assignment configuration diagram from the names, sizes, and offsets of the members of the structure. A recording medium on which an automatic generation program of a configuration diagram is recorded.
JP29137197A 1997-10-23 1997-10-23 Device and method for automatically generating c language body structure member allocation block diagram, and recording medium recording automatic generation program Pending JPH11126159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29137197A JPH11126159A (en) 1997-10-23 1997-10-23 Device and method for automatically generating c language body structure member allocation block diagram, and recording medium recording automatic generation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29137197A JPH11126159A (en) 1997-10-23 1997-10-23 Device and method for automatically generating c language body structure member allocation block diagram, and recording medium recording automatic generation program

Publications (1)

Publication Number Publication Date
JPH11126159A true JPH11126159A (en) 1999-05-11

Family

ID=17768061

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29137197A Pending JPH11126159A (en) 1997-10-23 1997-10-23 Device and method for automatically generating c language body structure member allocation block diagram, and recording medium recording automatic generation program

Country Status (1)

Country Link
JP (1) JPH11126159A (en)

Similar Documents

Publication Publication Date Title
US20060080361A1 (en) Document information processing apparatus, document information processing method, and document information processing program
JP2004094487A (en) Support system for preparing document
JPH11126159A (en) Device and method for automatically generating c language body structure member allocation block diagram, and recording medium recording automatic generation program
US20050010548A1 (en) Automatic file generating apparatus, method, program and record medium
JP2004326626A (en) Structured document file management system and structured document file management method
JP2004038297A (en) Program format conversion apparatus and conversion program
JP2004362343A (en) Source code conversion apparatus, source code conversion method, and program
JP2011154608A (en) Form input/output apparatus
CN112463141A (en) BPMN-based micro-service workflow deployment method
JP4828318B2 (en) Multiple form integrated printing method, system and program
JP2010157165A (en) Information processor, information processing method, and program
JP2007164700A (en) Data conversion design unit, data conversion system, method therefor, and program therefor
JP2006011549A (en) Structured document conversion device and program
JP2007164708A (en) Conversion data generator, data conversion system, method therefor, and program therefor
JP2004021347A (en) Electronic document retrieval system and electronic document retrieval method
JPH06242933A (en) Program document maintenance device
JP2003177923A (en) Reserved word converting method for porting support system
JP2007156761A (en) Design information generation device, program development system, design information generation method, program development method, and program
JP2005267531A (en) Structure converting device for structured document, and program for the same
JPH01286020A (en) Program retrieving system
CN111190872A (en) Inheritable extensible data processing method and application thereof to analysis log
JP2669070B2 (en) Screen definition device
JP2008217774A (en) Information processor, its control method, program and storage medium
JP2002351660A (en) System, method, program for linking software component and computer readable recording medium having program recorded thereon
JP2003308207A (en) Program specifications preparation system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20000404