JPH04165425A - Method and device for extracting nesting relation in symbol string - Google Patents

Method and device for extracting nesting relation in symbol string

Info

Publication number
JPH04165425A
JPH04165425A JP2291518A JP29151890A JPH04165425A JP H04165425 A JPH04165425 A JP H04165425A JP 2291518 A JP2291518 A JP 2291518A JP 29151890 A JP29151890 A JP 29151890A JP H04165425 A JPH04165425 A JP H04165425A
Authority
JP
Japan
Prior art keywords
nesting
order
depth
symbol string
storage unit
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
JP2291518A
Other languages
Japanese (ja)
Inventor
Mitsuteru Yukishimo
雪下 充輝
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2291518A priority Critical patent/JPH04165425A/en
Publication of JPH04165425A publication Critical patent/JPH04165425A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To easily extract nesting relation information on the depth of nesting, the appearance order of the nesting, branch condition order, etc., from symbol string in nesting structure by processing the symbol strings sequentially. CONSTITUTION:Input symbol strings in line units which are stored in a symbol storage part 2 are sent to a key word extraction part 3, which extracts a key word defining the attribute of the nesting. A nesting state detection part 4 detects a symbol string indicating the start or end of the nesting and updates the nesting depth D stored in a nesting depth storage part 6 and the appearance order and condition branch order of the nesting at the depth D which are stored in a nesting order depth storage part 7. A nesting relation output part 8 adds the appearance order and conditional branch order of the nesting at the nesting depth D to each of the input symbol strings in line units and outputs them. Consequently, not only depth information on the nesting, but also information on mutual order relation information between nesting parts can be extracted and outputted.

Description

【発明の詳細な説明】 r産業上の利用分野〕 本発明は、C言語やLISP言語等のプログラム言語に
添って書かれた記号列の中から入れ子関係を抽出する方
法及びその装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method and apparatus for extracting nested relationships from a symbol string written in a programming language such as C language or LISP language.

[従来の技術] C言語やLISP言語等のプログラム言語に添って書か
れた記号列をプログラムと呼ぶこととする。プログラム
内での繰り返し指示文によって指定される実行行群、条
件判定文での条件ごとに実行される実行群等の行の塊を
入れ子によって囲まれた領域とすると、入れ子の深さや
相互関係を理解することは、プログラムの流れを理解す
る際に非常に有用である。
[Prior Art] A symbol string written in a programming language such as C language or LISP language is called a program. If a block of lines, such as a group of lines to be executed specified by a repeat directive in a program or a group of lines to be executed for each condition in a conditional judgment statement, is an area surrounded by nesting, the depth of nesting and mutual relationships can be controlled. Understanding this is very useful in understanding the flow of a program.

従来、プログラムの構造を把握する方法としては、単に
入れ子の深さだけを表示する方法、あるいはHCPチャ
ート、PADなど図形情報を用いて繰り返し、条件分岐
等に特定の記号を割り当て、図によってプログラムの流
れを表示する方法がある。
Conventionally, methods for understanding the structure of a program include simply displaying the nesting depth, or repeatedly using graphical information such as HCP charts and PAD, and assigning specific symbols to conditional branches, etc. There is a way to display the flow.

[発明が解決しようとする課題〕 入れ子の深さだけを表示する方法の例をLISPの場合
で示すと、′(′が入れ子の開始記号であり、′)”が
入れ子の終了であるから、”(”が出現することに、入
れ子の深さを+1し、″)′。
[Problem to be Solved by the Invention] An example of a method for displaying only the depth of nesting is shown in the case of LISP. Since '(' is the start symbol of nesting, and ')'' is the end of nesting, When ``('' appears, add 1 to the nesting depth and ``)'.

が出現するごとに入れ子の深さを−1することにより容
易に入れ子の深さが表示できる。しかしながら、表示さ
れる情報が入れ子の深さだけであることから、各行の相
互関係までは表示されず、少し複雑な入れ子関係になる
とプログラム全体の流れを理解することは困難となる。
The nesting depth can be easily displayed by subtracting the nesting depth by 1 each time . However, since the only information displayed is the depth of nesting, the interrelationships between lines are not displayed, and if the nesting relationships become somewhat complex, it becomes difficult to understand the flow of the entire program.

一方、図によってプログラムの流れを表示する方法の場
合は、プログラムの詳細を全て図で書き表すため、入れ
子の深さだけを表示する場合のようにプログラムの持つ
構造を失うことはない。しかしながら、全てが図で表さ
れることにより、記述された1枚当たりの情報量が減少
してしまい、大局的にプログラムの流れが読み取れない
欠点がある。
On the other hand, in the case of the method of displaying the flow of a program using diagrams, all the details of the program are written in diagrams, so the structure of the program is not lost, unlike when only the nesting depth is displayed. However, since everything is represented in diagrams, the amount of information written per sheet decreases, and there is a drawback that the flow of the program cannot be understood from a broader perspective.

本発明の目的は、記号列の中から、予め指示された入れ
子を開始/終了する記号を基に、記号列の任意の位置に
おける入れ子関係を抽出し、入れ子の深さと他の入れ子
との順序関係を簡便に表現する方法とその装置を提供す
ることにある。
An object of the present invention is to extract the nesting relationship at any position in a symbol string based on symbols that start and end nesting designated in advance, and to determine the depth of nesting and the order with other nests. The object of the present invention is to provide a method and device for easily expressing relationships.

[課題を解決するための手段] 上記目的を達成するために、請求項(1)では、記号列
の中から、入れ子の属性を定義するキーワードと入れ子
を開始/終了する記号列をもとにして、任意の位置にお
ける入れ子の関係を抽出する方法において、記号列の任
意の位置における入れ子の深さDを抽出する第1の処理
と、入れ子の属性を定義するキーワードを抽出し、前記
入れ子の深さDにおける出現順序に、 S oを数え上
げる第2の処理と、該深さDにおける入れ子内での条件
分岐の順番CSDを数え上げる第3の処理とを少なくと
も備え、任意の記号位置における入れ子の状態を抽出す
るようにしたことを特徴とする請求項(2)では、記号
列の中から、入れ子の属性を定義するキワードと入れ子
を開始/終了する記号列をもとにして、任意の位置にお
ける入れ子の関係を抽出する装置において、外部から記
号列を入力する入力部と、前記入力部から入力された記
号列を、任意の長さを行として、行単位に記憶する入力
記号列記憶部と、キーワードを記憶するキーワード記憶
部と、入れ子の深さDを記憶する入れ子深さ記憶部と、
前記入れ子の深さDにおけるキーワードの出現順序KS
、と入れ子内での条件分岐の順番CSDを記憶する入れ
子順序記憶部と、前記入力記号列記憶部に記憶された入
力記号列の中からキーワードを抽出し、該キーワードを
前記キーワード記憶部に記憶するキーワード抽出部と、
前記入力記号列から入れ子の開始/終了を示す記号列を
検出し、前記入れ子深さ記憶部と入れ子順序記憶部の内
容をもとに、入れ子の深さD、該深さDにおけるキーワ
ードの出現順序K S oと該入れ子内の条件分岐の順
番C8oを求めて、それぞれ前記入れ子深さ記憶部と入
れる順序記憶部に再記憶する入れ子状態検出部と、前記
入力記号列記憶部に記憶された行単位の記号列に対して
、前記入れ子深さ記憶部に記憶された入れ子の深さDと
、前記入れ子順序記憶部に記憶された出現順序KSDと
条件分岐の順番CSDを付加して出力する該入れ子関係
出力部と、からなることを特徴とする。
[Means for Solving the Problem] In order to achieve the above object, in claim (1), a keyword that defines a nested attribute and a symbol string that starts/ends nesting are selected from symbol strings. In the method of extracting the nesting relationship at an arbitrary position, the first process is to extract the nesting depth D at an arbitrary position of a symbol string, and the keyword defining the nesting attribute is extracted, The appearance order at the depth D includes at least a second process of counting S o and a third process of counting the order CSD of conditional branches within the nest at the depth D, In claim (2), the state is extracted from a symbol string at an arbitrary position based on a keyword that defines a nested attribute and a symbol string that starts/ends nesting. A device for extracting a nested relationship in , an input section for inputting a symbol string from the outside, and an input symbol string storage section for storing the symbol string input from the input section on a line-by-line basis with an arbitrary length as a line. , a keyword storage unit that stores keywords, and a nesting depth storage unit that stores nesting depth D.
Appearance order KS of keywords at the nesting depth D
, a nested order storage unit that stores the order CSD of conditional branches within the nest; and a keyword is extracted from the input symbol string stored in the input symbol string storage unit, and the keyword is stored in the keyword storage unit. a keyword extraction unit to
A symbol string indicating the start/end of nesting is detected from the input symbol string, and based on the contents of the nesting depth storage section and the nesting order storage section, the nesting depth D and the appearance of the keyword at the depth D are detected. a nested state detection unit that calculates the order KS o and the order C8o of conditional branches within the nest and stores them in the nesting depth storage unit and the insertion order storage unit respectively; The nesting depth D stored in the nesting depth storage unit, the appearance order KSD and the conditional branch order CSD stored in the nesting order storage unit are added to the symbol string in row units and output. and the nested relationship output section.

[作 用] 本発明では、特定の記号を行区切り記号Crとして、C
r間の記号列を1行とした場合、1行の行数がLn (
1≦Ln)でm行の行から構成されたプログラムにおい
て、条件判定文人れ子を開始する記号列群NSi  (
1≦1)と入れ子を終了させる記号列群NEj  (1
≦j)を基に入れ子の深さ情報だけでなく、入れ子間の
相互順序関係情報を抽出、出力する。なお、基本的には
、行区切り記号Crが無くても、任意の記号列の長さで
処理を行うことが可能であるので、行という概念は必須
ではない。
[Function] In the present invention, a specific symbol is used as a line delimiter Cr, and C
If the symbol string between r is one line, the number of lines in one line is Ln (
In a program composed of m lines with 1≦Ln), a group of symbol strings NSi (
1≦1) and the symbol string group NEj (1
≦j), not only nesting depth information but also mutual order relationship information between nests is extracted and output. Note that basically, even without the line delimiter Cr, it is possible to perform processing with any symbol string length, so the concept of a line is not essential.

[実施例〕 以下、本発明の一実施例について図面により説明する。[Example〕 An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明方法の一実施例の処理手順を示したもの
である。第1図において、′深さ”は変数名であり、′
出現順序[深さ]“は出現順序という名称を持つ行列変
数の“深さ″番目の値を示している。ここで使用する変
数名は任意のものであるから、変数名が替わったとして
も、本質は変わらない。また、ここでは説明を容易にす
るため、行単位で処理する場合を示すが、任意の記号列
の長さで処理を行うことが可能であるので、行という概
念は必須ではない。
FIG. 1 shows the processing procedure of an embodiment of the method of the present invention. In Figure 1, 'depth' is a variable name, '
The "order of appearance [depth]" indicates the "depth"-th value of the matrix variable with the name "order of appearance".The variable name used here is arbitrary, so even if the variable name is changed, , the essence remains the same.Furthermore, to make the explanation easier, we will show the case where processing is performed line by line, but since it is possible to process with any symbol string length, the concept of line is essential. isn't it.

(1)最初に入れ子の“深さ”を○、出現順序[1コを
0にする(ステップ101)。
(1) First, set the nesting "depth" to ○ and the appearance order [1] to 0 (step 101).

(ii)  1行を読み込み(ステップ102)、読込
み終了かチエツクして(ステップ103)、終了ならば
処理を終わる。
(ii) Read one line (step 102), check whether the reading is completed (step 103), and if it is completed, the process ends.

(iii )読込み終了でなければ、1行の中にキーワ
ードが存在するかチエツクしくステップ104)、存在
した場合には、該キーワードを記憶する(ステップ10
5)。
(iii) If the reading is not completed, check whether the keyword exists in one line (step 104), and if it exists, store the keyword (step 10).
5).

(iv)入れ子の開始かどうかチエツクする(ステップ
106)。開始時の場合は、″深さ”を1つ増加させ(
ステップ107)、出現順序[深さコを1つ増加させ(
ステップ108)、条件順序[深さ]を1にして(ステ
ップ]09)、出現順序[深さ+1〕を0にする(ステ
ップ110)。その後、(jl)に戻る。
(iv) Check whether nesting has started (step 106). At the start, increase "depth" by 1 (
step 107), the appearance order [depth is increased by one (
Step 108), condition order [depth] is set to 1 (step] 09), and appearance order [depth + 1] is set to 0 (step 110). After that, return to (jl).

(V)入れ子の開始でない場合には、条件節の開始かチ
エツクしくステップ1.11)、開始時には、条件順序
[深さコを1増加させ(ステップ112)、 (ii)
に戻る。
(V) If it is not the start of a nest, check whether it is the start of a conditional clause (step 1.11); at the start, increase the conditional order [depth by 1 (step 112); (ii)
Return to

(vi)条件節の開始でない場合、入れ子の終了かどう
かチエツクする(ステップ113)。そして、入れ子の
終了時の場合は、′深さ″を1つ減少させ(ステップ1
14)、(11)に戻る。
(vi) If it is not the start of a conditional clause, check whether it is the end of nesting (step 113). Then, at the end of nesting, decrease the ``depth'' by 1 (step 1
14), return to (11).

次に、第2図を用いて、具体例を説明する。キーワード
を、”if(・・・)”、”for(・・・)″とする
。′(”がキーワードの直後に単独で出現した場合、入
れ子の開始とする。
Next, a specific example will be explained using FIG. 2. The keywords are "if (...)" and "for (...)". If ``('' appears alone immediately after a keyword, it is considered the start of nesting.

”)パが単独で出現した場合、入れ子の終了とする。“
)else <”を条件節の開始とする。入れ子の中か
ら、他の入れ子の中に制御を移す処理は認めないものと
する。
”) If Pa appears alone, it is the end of nesting.“
)else <" is the start of a conditional clause. Processing that transfers control from one nest to another is not allowed.

前処理として、パ深さ′と出現順序変数の第一項(出現
順序[1コ)をOにする。
As preprocessing, the depth ′ and the first term of the appearance order variable (appearance order [1 item)] are set to O.

(1)第−行においてキーワード″″if(・・・)″
を検出し、key [1]にキーワード゛’if″を記
憶する。
(1) Keyword ""if(...)" in the -th line
is detected, and the keyword ''if' is stored in key [1].

(11)第二性において、′(パを検出し、入れ子の開
始時の処理として、″深さ”の内容Oに1を加えて1と
して記憶し、出現順序[1]の内容Oに1を加えて1と
して記憶し、条件順序[1]に1を記憶させ、出現順序
[2]にOを記憶する。
(11) In the second nature, ' is added and stored as 1, 1 is stored in the condition order [1], and O is stored in the appearance order [2].

(iij)第三行において、”)effise(”を検
出し、条件部処理として、条件順序[+、 Eの内容1
に1を加えて2として記憶する。
(iii) In the third line, ")effise(" is detected, and as condition part processing, condition order [+, content 1 of E
Add 1 to and store it as 2.

(1v)第四行において、キーワード“if(・・・)
″を検出し、key [2]にキーワード″1f″を記
憶し、“(″を検出し、入れ子の開始時の処理として、
′深さ”の内容を1に1を加えて2として記憶し、出現
順序[2コの内容0に1を加えて1として記憶し、条件
順序[2]に1を記憶させ、出現順序[3コに0を記憶
する。
(1v) In the fourth line, the keyword “if (...)
” is detected, the keyword “1f” is stored in key [2], “(” is detected, and as a process at the start of nesting,
Add 1 to the content of ``depth'' and store it as 2, add 1 to the content of 2 and store it as 1, store the content of 2 as 1, store 1 in the condition order [2], and change the appearance order [ Store 0 in 3.

以下、第1図に示した処理手順に添って、処理を進めて
いく。
Hereinafter, the processing will proceed according to the processing procedure shown in FIG.

第2図の場合の処理結果例を第3図に示す。この例では
、情報量を減少させるために、出現順序[深さ] 、k
ey [深さ]、条件順序[深さ]を、深さごとにベア
にして、左からプログラムに付加する形で出力している
。プログラムの1行に対して、その1行の行の出現順序
等が併記されて出力されることが本質であ:ハ該出現順
序等の表現法は問題ではない。
An example of the processing result in the case of FIG. 2 is shown in FIG. In this example, to reduce the amount of information, the order of appearance [depth], k
ey [depth] and condition order [depth] are output as bare values for each depth and added to the program from the left. The essential point is that each line of the program is output along with the order in which that line appears; c. The method of expressing the order of appearance, etc. does not matter.

第4図は本発明装置の一実施例のブロック図を示したも
のである。
FIG. 4 shows a block diagram of an embodiment of the apparatus of the present invention.

入力部1から入力された記号列は、信号線llを介して
1行ごとに入力記号列記憶部2に送られて記憶される。
The symbol string inputted from the input section 1 is sent to the input symbol string storage section 2 row by row via the signal line ll and is stored therein.

記号記憶部2に記憶された行単位の入力記号列は、信号
線12を介してキーワード抽出部3へ送られる。キーワ
ード抽出部3は、入れ子の属性を定義するキーワードを
抽出し、キーワードを信号a14を介してキーワード記
憶部5へ送り、同時に記号列を信号線I3を介して入れ
子状態検出部4に送る。入れ子深さ記憶部6は、処理途
中の入れ子深さDを記憶しており、同様に、入れ子順序
記憶部7は、該深さにおける出現順位に、 S Dと条
件分岐順序C8l、を格納している。
The input symbol string stored in the symbol storage section 2 in units of rows is sent to the keyword extraction section 3 via the signal line 12. The keyword extraction unit 3 extracts a keyword that defines a nested attribute, sends the keyword to the keyword storage unit 5 via the signal a14, and simultaneously sends a symbol string to the nested state detection unit 4 via the signal line I3. The nesting depth storage unit 6 stores the nesting depth D in the middle of processing, and similarly, the nesting order storage unit 7 stores S D and the conditional branch order C8l in the order of appearance at the depth. ing.

入れ子状態検出部4では、入れ子の開始/終了を示す記
号列を検出し、入れ子深さ記憶部6より信号線】5を介
して入れ子深さDを得、また、入れ子順序深さ記憶部7
より信号線16を介して該深さDにおける入れ子の出現
順位KSDと条件分岐順序CSDを得た後、深さDを更
新して信号線15を介して入れ子深さ記憶部6に送(ハ
出現順位KS11.と条件分岐順序CSDを更新して信
号線16を介して入れ子順序記憶部7に送る。入れ子開
係出力部8は、信号線20な介して入力記号列を、信号
線]7を介してキーワードを、信号線18を介して入れ
子深さ情報を、信号線19を介して入れ子の順序関係を
得て、行単位の入力記号列ごとに、入れ子深さDにおけ
る入れ子の出現順位KSDと条件分岐順序C3ll+を
付加して出力する。
The nesting state detection section 4 detects a symbol string indicating the start/end of nesting, obtains the nesting depth D from the nesting depth storage section 6 via the signal line ]5, and also obtains the nesting depth D from the nesting depth storage section 6 through the signal line ]5.
After obtaining the nest appearance order KSD and conditional branch order CSD at the depth D via the signal line 16, the depth D is updated and sent to the nest depth storage unit 6 via the signal line 15 (H The appearance order KS11. and the conditional branching order CSD are updated and sent to the nested order storage unit 7 via the signal line 16.The nested opening output unit 8 receives the input symbol string via the signal line 20 and sends it to the nested order storage unit 7 via the signal line 20. The keyword is obtained via the signal line 18, the nesting depth information is obtained via the signal line 18, and the nesting order relationship is obtained via the signal line 19. KSD and conditional branch order C3ll+ are added and output.

以上の処理を、入力部1から入力される記号列が無くな
るまで繰り返す。
The above process is repeated until there are no more symbol strings input from the input unit 1.

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

以上の説明したように、本発明によれば、記号列を逐次
的に処理することにより、入れ子構造を持つ記号列から
簡便に入れ子の深さ、入れ子の出現順位、条件分岐順序
等の入れ子関係情報を抽出することが可能となる。
As explained above, according to the present invention, by sequentially processing symbol strings, nesting relationships such as nesting depth, nesting appearance order, conditional branching order, etc. can be easily obtained from symbol strings having a nested structure. It becomes possible to extract information.

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

第1図は本発明方法の入れ子関係を抽出する手順例を示
す図、第2図は本発明による入れ子関係抽出処理の具体
例を示す図、第3図は第2図の入れ子関係抽出処理によ
り得られる出力例を示す図、第4図は本発明装置の一実
施例のブロック図である。 1・・キーワード、  2・・・入力記号列記憶部、3
・・・キーワード抽出部、 4・・・入れ子状態検出部、 5・・・キーワード記憶部、 6・・・入れ子深さ記憶部、 7・・・入れ子順序記憶部、 8・・入れ子関係出力部。 第2図 1i            i干 ()111(・・
・ 1121仁1se(・・・ 1i21i1      ’If (’)仁・・1iZ
 IiZ        1 elfe (−。 ljZ          J tit 2i1     ’+’r () (−−+i
z 2iz        l P−+se (、、、
、−1122i21’+f        if ()
(、−?i22iZ IiZ        ) el
se (、、、、。 ?i22’+2         3 1iz           ) 7i23i+              ’I士 (
)(・・・・1iZ 3i2       1 els
e i 、、、、。 2t1             子or  (”l 
 (、、、。 2イI  Tit               if
  ()   (中2fl IiZ        ’
J elSe (−、−ピ現り序 第4ry:f
FIG. 1 is a diagram showing an example of a procedure for extracting a nested relationship according to the method of the present invention, FIG. 2 is a diagram showing a specific example of the nested relationship extraction process according to the present invention, and FIG. FIG. 4, which is a diagram showing an example of the output obtained, is a block diagram of an embodiment of the apparatus of the present invention. 1... Keyword, 2... Input symbol string storage section, 3
...Keyword extractor, 4...Nested state detector, 5...Keyword memory, 6...Nesting depth memory, 7...Nested order memory, 8...Nested relationship output unit . Figure 2 1i i dried ()111(...
・ 1121 jin 1se (... 1i21i1 'If (') jin... 1iZ
IiZ 1 elfe (-. ljZ J tit 2i1 '+'r () (--+i
z 2iz l P-+se (,,,
, -1122i21'+f if ()
(,-?i22iZ IiZ) el
se (,,,,. ?i22'+2 3 1iz) 7i23i+ 'I し (
) (...1iZ 3i2 1 els
e i,,,,. 2t1 child or (”l
(,,,. 2 I Tit if
() (middle school 2fl IiZ'
J elSe (-, -pi appearance order 4th ry: f

Claims (2)

【特許請求の範囲】[Claims] (1)記号列の中から、入れ子の属性を定義するキーワ
ードと入れ子を開始/終了する記号列をもとにして、任
意の位置における入れ子の関係を抽出する方法において
、 記号列の任意の位置における入れ子の深さDを抽出する
第1の処理と、入れ子の属性を定義するキーワードを抽
出し、前記入れ子の深さDにおける出現順序KS_Dを
数え上げる第2の処理と、該深さDにおける入れ子内で
の条件分岐の順番CS_Dを数え上げる第3の処理とを
少なくとも備え、 任意の記号位置における入れ子の状態を抽出するように
したことを特徴とする記号列中の入れ子関係抽出方法。
(1) A method for extracting a nesting relationship at an arbitrary position from a symbol string based on a keyword that defines a nested attribute and a symbol string that starts/ends nesting, a first process of extracting the nesting depth D in the nesting depth D; a second process of extracting a keyword defining the nested attribute and counting the appearance order KS_D at the nesting depth D; A nested relationship extraction method in a symbol string, characterized in that the nested state at an arbitrary symbol position is extracted, the method comprising at least a third process of enumerating the order CS_D of conditional branches within the symbol string.
(2)記号列の中から、入れ子の属性を定義するキワー
ドと入れ子を開始/終了する記号列をもとにして、任意
の位置における入れ子の関係を抽出する装置において、 外部から記号列を入力する入力部と、 前記入力部から入力された記号列を、任意の長さを行と
して、行単位に記憶する入力記号列記憶部と、 キーワードを記憶するキーワード記憶部と、入れ子の深
さDを記憶する入れ子深さ記憶部と、 前記入れ子の深さDにおけるキーワードの出現順序KS
_Dと入れ子内での条件分岐の順番CS_Dを記憶する
入れ子順序記憶部と、 前記入力記号列記憶部に記憶された入力記号列の中から
キーワードを抽出し、該キーワードを前記キーワード記
憶部に記憶するキーワード抽出部と、 前記入力記号列から入れ子の開始/終了を示す記号列を
検出し、前記入れ子深さ記憶部と入れ子順序記憶部の内
容をもとに、入れ子の深さD、該深さDにおけるキーワ
ードの出現順序KS_Dと該入れ子内の条件分岐の順番
CS_Dを求めて、それぞれ前記入れ子深さ記憶部と入
れ子順序記憶部に再記憶する入れ子状態検出部と、前記
入力記号列記憶部に記憶された行単位の記号列に対して
、前記入れ子深さ記憶部に記憶された入れ子の深さDと
、前記入れ子順序記憶部に記憶された出現順序KS_D
と条件分岐の順番CS_Dを付加して出力する入れ子関
係出力部と、 からなることを特徴とする入れ子関係抽出装置。
(2) A symbol string is input from the outside in a device that extracts nesting relationships at arbitrary positions from symbol strings based on keywords that define nested attributes and symbol strings that start and end nesting. an input symbol string storage section that stores the symbol string input from the input section line by line with an arbitrary length; a keyword storage section that stores keywords; and a nesting depth D. a nesting depth storage unit that stores the keyword appearance order KS at the nesting depth D;
a nested order storage unit that stores __D and the conditional branch order CS_D within the nest; a keyword is extracted from the input symbol string stored in the input symbol string storage unit, and the keyword is stored in the keyword storage unit; a keyword extraction unit that detects a symbol string indicating the start/end of nesting from the input symbol string, and calculates the nesting depth D and the depth based on the contents of the nesting depth storage unit and the nesting order storage unit; a nested state detection unit that calculates the appearance order KS_D of keywords in the number D and the order CS_D of conditional branches in the nest, and stores them again in the nesting depth storage unit and the nesting order storage unit, respectively; and the input symbol string storage unit The nesting depth D stored in the nesting depth storage unit and the appearance order KS_D stored in the nesting order storage unit for the row-by-line symbol string stored in
and a nested relationship output unit that adds and outputs a conditional branch order CS_D.
JP2291518A 1990-10-29 1990-10-29 Method and device for extracting nesting relation in symbol string Pending JPH04165425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2291518A JPH04165425A (en) 1990-10-29 1990-10-29 Method and device for extracting nesting relation in symbol string

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2291518A JPH04165425A (en) 1990-10-29 1990-10-29 Method and device for extracting nesting relation in symbol string

Publications (1)

Publication Number Publication Date
JPH04165425A true JPH04165425A (en) 1992-06-11

Family

ID=17769934

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2291518A Pending JPH04165425A (en) 1990-10-29 1990-10-29 Method and device for extracting nesting relation in symbol string

Country Status (1)

Country Link
JP (1) JPH04165425A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002207003A (en) * 2001-01-10 2002-07-26 Kansai Paint Co Ltd Method for estimating deterioration of exterior material of building
US7721178B2 (en) 2006-06-01 2010-05-18 International Business Machines Corporation Systems, methods, and computer program products for providing a two-bit symbol bus error correcting code
JP2013025716A (en) * 2011-07-25 2013-02-04 Shinichi Ishida Device and program for supporting structure analysis of module
JP2013257639A (en) * 2012-06-11 2013-12-26 Ntt Data Corp Method and system of difference extraction of source code using syntax analysis
JP6008456B2 (en) * 2013-08-01 2016-10-19 石田 伸一 Apparatus and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002207003A (en) * 2001-01-10 2002-07-26 Kansai Paint Co Ltd Method for estimating deterioration of exterior material of building
US7721178B2 (en) 2006-06-01 2010-05-18 International Business Machines Corporation Systems, methods, and computer program products for providing a two-bit symbol bus error correcting code
JP2013025716A (en) * 2011-07-25 2013-02-04 Shinichi Ishida Device and program for supporting structure analysis of module
US9128807B2 (en) 2011-07-25 2015-09-08 Shinichi Ishida Module structural analysis supporting device and program
JP2013257639A (en) * 2012-06-11 2013-12-26 Ntt Data Corp Method and system of difference extraction of source code using syntax analysis
JP6008456B2 (en) * 2013-08-01 2016-10-19 石田 伸一 Apparatus and program

Similar Documents

Publication Publication Date Title
CN105283868B (en) For the method for probability resolution, component, medium and system
CN107239733A (en) Continuous hand-written character recognizing method and system
US5400436A (en) Information retrieval system
Christophe et al. Neural map style transfer exploration with GANs
CN111860484B (en) Region labeling method, device, equipment and storage medium
Meeks D3. js in Action: Data visualization with JavaScript
CN109542776A (en) Page comparison method, device and equipment
CN112883736A (en) Medical entity relationship extraction method and device
CN115344805A (en) Material auditing method, computing equipment and storage medium
CN107274425A (en) A kind of color image segmentation method and device based on Pulse Coupled Neural Network
JPH04165425A (en) Method and device for extracting nesting relation in symbol string
JP2969153B2 (en) Record search method
CN113158970A (en) Action identification method and system based on fast and slow dual-flow graph convolutional neural network
CN117593083A (en) Commodity image generation method, commodity image generation device, electronic equipment and storage medium
CN112365944A (en) Tree-shaped data node processing system, method, electronic equipment and storage medium
CN111728302A (en) Garment design method and device
EP0318984B1 (en) Interrogating device
CN106528764A (en) Retrieval method and device for question type retrieval word
WO2003081456A1 (en) An incremental process, system, and computer useable medium for extracting logical implications from relational data based on generators and faces of closed sets
TWI766478B (en) Target data feature extraction method and device
CN108197107A (en) Data processing method
JPS6219940A (en) High-speed processing system for inference
JPH11219365A (en) Image retrieving device
CN114139729B (en) Machine learning model training method and device, and text recognition method and device
CN114820879B (en) Method for constructing game drawing board by thinking guide picture, electronic equipment and storage medium