JPS62274428A - Syntax lead type input guide method - Google Patents

Syntax lead type input guide method

Info

Publication number
JPS62274428A
JPS62274428A JP11735086A JP11735086A JPS62274428A JP S62274428 A JPS62274428 A JP S62274428A JP 11735086 A JP11735086 A JP 11735086A JP 11735086 A JP11735086 A JP 11735086A JP S62274428 A JPS62274428 A JP S62274428A
Authority
JP
Japan
Prior art keywords
syntax
symbol
menu
grammar
input
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
JP11735086A
Other languages
Japanese (ja)
Inventor
Atsushi Tanaka
厚 田中
Yoshinori Kishimoto
岸本 芳典
Takeshi Nakadokoro
中所 武司
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP11735086A priority Critical patent/JPS62274428A/en
Publication of JPS62274428A publication Critical patent/JPS62274428A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the terminal-side interface while testing the convenience for use of a user-side terminal equipment by performing conversations between a computer and the user in the menu system for syntax generation. CONSTITUTION:A given grammar is defined as G(P,S,VN,VT), and a non-terminal symbol VN is divided into an explicit non-terminal symbol VEN and an implicit non-terminal symbol VIN. The explicit non-terminal symbol VEN can be expressed in a guide menu but the implicit non-terminal symbol VIN cannot be expressed there. The non-terminal symbol VN is VENUVIN where VENVIN is phi, and the part of a product set is empty, and the grammar G becomes G(P,S,VENUVIN,Vr), but the implicit non-terminal symbol VIN is not expressed. The number of stages of symbol in a grammar G'(P,S,VEN,Vr) is smaller than that in the grammar G(P,S,VENUVIN,Vr). Consequently, the number of guide steps is reduced if the grammar G is guided by the grammar G'.

Description

【発明の詳細な説明】 3、発明の詳細な説明 −〔発明の利用分野〕 本発明は、計算機の使用者が計算機を機能させるために
形式言語を入力するに際し、その入力が正しく行なわれ
るように誘導するための構文主導型入力誘導方法に関す
る。
[Detailed Description of the Invention] 3. Detailed Description of the Invention - [Field of Application of the Invention] The present invention provides a method for ensuring that when a computer user inputs a formal language to make the computer function, the input is performed correctly. This paper relates to a syntax-driven input guidance method for guiding users.

〔従来の技術〕[Conventional technology]

従来、計算機と計算機使用者との対話を誘導する方法と
して、例えば特開昭57−29156号公報に示される
ように、ソースプログラムの入力を誘導する場合、プロ
グラムの構文中で変更を要しない固定部分は自動的に表
示装置に表示し、他の選択可能な可能構文要素部分のみ
をオペレータに入力させることにより上記ソースプログ
ラムを完成させる装置があった。
Conventionally, as a method of inducing interaction between a computer and a computer user, for example, as shown in Japanese Patent Laid-Open No. 57-29156, when inducing input of a source program, a fixed structure that does not require changes in the syntax of the program is used. There have been devices that complete the source program by automatically displaying the portions on a display device and requiring the operator to input only other selectable syntax element portions.

〔解決しようとする問題点〕[Problem to be solved]

上記従来の技術によると、プログラムの入力はプログラ
ム構文中の可変部分を列記したメニューの誘導に従えば
容易に実行できる。しかし、その装置では形式言語の構
文規則レベルを利用した構文要素メニューの作成方法に
ついて言及していなかった。また、この種は誘導のため
に要するプログラム入力行程数が多く、メニュー選択の
手間が煩わしいという問題点があった。
According to the above-mentioned conventional technology, a program can be input easily by following the guidance of a menu listing variable parts in the program syntax. However, that device did not mention how to create a syntax element menu using the syntax rule level of a formal language. Additionally, this type of system requires a large number of program input steps for guidance, and has the problem that menu selection is troublesome.

本発明は叙述事情に鑑み、形式言語の構文要素列と、そ
れらの関係を用いて段階的の定義した構文規則を利用す
ることに着目した。そして、最初の構文規則から順に対
応する入力可能な構文要素の一覧を表示し、その中から
オペレータが入力したい構文要素の選択を促す。このこ
とによって。
In view of the descriptive situation, the present invention focuses on the use of syntactic rules defined in stages using syntactic element sequences of formal languages and their relationships. Then, a list of inputtable syntax elements corresponding to the first syntax rule is displayed in order, and the operator is prompted to select the syntax element he or she wants to input from the list. By this.

不要な誘導工程を可能な限り削除省略し、必要最小限で
使用者と計算機とが対話形式により正しい入力が誘導確
保できる構文主導型の入力誘導方法の提供を目的とする
To provide a syntax-driven input guidance method that can eliminate and omit unnecessary guidance steps as much as possible and ensure correct input guidance in an interactive manner between a user and a computer to the minimum necessary extent.

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

したがって、本発明に係る構文主導型の入力誘導方法は
、端末機器から入力データを受は取り、このデータに基
づいて入力データの表示整理を行い、正しい入力データ
をオペレータから誘導確保する計算機システムにおいて
、次の点を特徴とする。
Therefore, the syntax-driven input guidance method according to the present invention is applicable to a computer system that receives input data from a terminal device, organizes the display of the input data based on this data, and ensures that correct input data is guided from the operator. , is characterized by the following points.

(1)構文要素列と、これらの関係を利用して定義した
構文規則とを予め用意する工程、上記構文規則の内容を
形成する上記構文要素を入力可能な段階に従ってオペレ
ータに表示し、その選択を促す工程、オペレータが選択
した構文要素に応じて次の入力段階の構文規則を表示し
、これに対応する入力可能な次段階の構文要素をオペレ
ータに表示した選択を促す工程を経て、漸次に計算機用
形式言語を完成入力させるようにした。
(1) A process of preparing in advance a syntax element string and a syntax rule defined using these relationships, displaying the syntax elements forming the content of the syntax rule to the operator according to the input possible stages, and selecting the syntax element. step, displaying the syntax rules for the next input step according to the syntactic element selected by the operator, and displaying the corresponding syntactic elements for the next step that can be inputted to the operator, and then gradually The formal language for computers can now be input completely.

(2)上記構文要素のうち、非終端記号に包括される要
素にその特性に応じて暗示非経端記号と暗示非終端記号
とに分類区別する工程、常に暗示非経端記号を省略した
縮退、文法構文規則で表示するため、暗示非終端記号に
該当する構文要素を省略した構文要素を構文規則に対応
した選択可能な構文要素メニューとする工程からなり、
段階的に次段階の縮退文法構文規則乃至構文規則を誘導
するようにして、入力データ誘導の際の誘導段数を削減
した。
(2) Among the above syntactic elements, the process of classifying and distinguishing elements included in non-terminal symbols into implicit non-terminal symbols and implicit non-terminal symbols according to their characteristics, degeneracy and grammar that always omit implicit non-terminal symbols In order to display the syntactic rules, the syntactic elements that omit the syntactic elements corresponding to the implied non-terminal symbols are made into a selectable syntactic element menu corresponding to the syntactic rules,
By inducing the next stage degenerate grammar syntax rules or syntax rules step by step, the number of induction stages during input data guidance is reduced.

〔作用〕[Effect]

各工程で実行される内容と作用について、以下便宜的に
記号を用いて述べる。
The contents and actions performed in each step will be described below using symbols for convenience.

この種の形式表記法にはB N F (B ackus
 NaurF or+I+)があるので、こ−れによる
。ここで、左辺の内容を表わす場合、左辺は右辺ですと
いう記号として、矢印→を使用するが、計算器への入力
用端末機器に用いるキー(Key)ボードでは通常矢印
→が無いので、−記号と〉記号を組み合せ、−〉を矢印
→の代用にしている。
This kind of formal notation is B N F (B ackus
Since there is NaurFor+I+), it depends on this. Here, when expressing the contents of the left side, an arrow → is used to indicate that the left side is the right side, but since the key board used for terminal equipment for input to calculators usually does not have an arrow →, the - symbol It combines the and > symbols, and uses -> as a substitute for the arrow →.

左辺は構文規則で、構文規則は構文要素の並びを規定し
ている。構文要素は右辺に表わす。
The left side is the syntax rules, which specify the order of syntactic elements. Syntactic elements are represented on the right side.

先ず、入力用端末機器を操作するオペレータとその入力
データに反応する計算機との対話的交流の手順を記述す
る方法として、以下に述べる文法の形式的定義の方法を
用いる。
First, the method of formal definition of grammar described below is used as a method of describing the procedure of interactive exchange between an operator operating an input terminal device and a computer that responds to the input data.

アルファベットは空φでない有限集合とし、その要素を
記号と呼ぶ。このアルファベットの夫々に属する記号の
任意側の列を記号列と呼ぶ。
The alphabet is a finite set that is not empty φ, and its elements are called symbols. An arbitrary string of symbols belonging to each alphabet is called a symbol string.

構文の規則を記述したものを生成規則と呼び、U−> 
X               ・・・(1)と記述
する。ここで、Uは記号、Xは記号列であり、Uを生成
規則の左辺、Xを右辺と呼ぶ。また、この生成に則は「
記号Uは記号列Xから成る」と読む。
A description of syntactic rules is called a production rule, and U->
X...described as (1). Here, U is a symbol and X is a symbol string, and U is called the left side of the production rule and X is called the right side. Also, the rule for this generation is “
The symbol U consists of the symbol string X."

生成規則の集合をP、生成規則の左辺に現れる記号を非
終端記号VN、右辺にだけ現れる記号列中の記号を終端
記号vTと呼ぶと、これら叙述した各記号の関係から、
文法Gは、次のような形式で定義される。
If we call the set of production rules P, the symbol that appears on the left side of the production rule the nonterminal symbol VN, and the symbol in the symbol string that appears only on the right side the terminal symbol vT, then from the relationship between these described symbols,
Grammar G is defined in the following format.

すなわち、記号Sを出発記号とし、その非終端記号との
関係が56Vsとすれば、 G= (P、S、Vll、VT)       ・= 
(2)となる。
That is, if the symbol S is the starting symbol and its relationship with the non-terminal symbol is 56Vs, then G= (P, S, Vll, VT) ・=
(2) becomes.

ここで、終端記号VTと言うのは乗算、加算等の記号×
、十の如く、最終的な記号であり、非終端記号VNは終
端記号7丁の内容を分解した部分的な観念を抽象化した
記号である。
Here, the terminal symbol VT is a symbol for multiplication, addition, etc. ×
, 10, etc., are final symbols, and the non-terminal symbol VN is a symbol that abstracts a partial idea obtained by decomposing the contents of the 7 terminal symbols.

したがって、記号Vで表わす構文規則は終端記号7丁と
非終端記号VNとの和集合であり、V=V N U V
Tである。■の閉包はv申と記述することにする。
Therefore, the syntax rule represented by the symbol V is the union of seven terminal symbols and the non-terminal symbol VN, and V=V N U V
It is T. The closure of ■ will be written as v.

以下、 文法G’;tG (P、S、VN、Vt)と記
述する。
Hereinafter, it will be written as the grammar G';tG (P, S, VN, Vt).

例えば、入力誘導状態は次のように記述できる。For example, the input induced state can be written as follows.

記号Zの内容が記号列X、A、Yで、記号YはYEV傘
ならば、 Z−>X−AY (X、YtEV*)     ・・ 
(3)この状態で記号Aについて誘導するための誘導メ
ニュー(A)は。
If the content of symbol Z is a symbol string X, A, Y, and symbol Y is a YEV umbrella, then Z->X-AY (X, YtEV*)...
(3) What is the guidance menu (A) to guide you regarding symbol A in this state?

メニ:L、−(A)=  (alA−>a、AεVNI
 a E V傘)・・・(4) と定義できる。
Meni: L, -(A) = (alA->a, AεVNI
a E V umbrella)...(4) It can be defined as.

このようにして、文法Gの構文規則に必要なZの構文要
素X、A、Yを誘導するためのメニューが予め用意され
、入出力用バッファメモリ等に格納されている。そして
、オペレータはメニュー(A)で示された左辺の要素か
ら任意に一つを選択して入力誘導状態を一つ先に進める
。この繰り返しにより、オペレータの入力を誘導する方
法を、構文主導型入力誘導方法と称する。
In this way, a menu for inducing syntactic elements X, A, and Y of Z necessary for the syntactic rules of grammar G is prepared in advance and stored in an input/output buffer memory or the like. Then, the operator arbitrarily selects one of the elements on the left side shown in menu (A) to advance the input guidance state one step forward. A method of guiding the operator's input by repeating this process is called a syntax-driven input guidance method.

以上述べた構文主導型入力誘導方法では1文法から単純
に誘導メニューを作成する。そのため、これだけでは、
生成規則の段数が多くなるにつれて誘導段数も増加する
傾向がある。
In the syntax-driven input guidance method described above, a guidance menu is simply created from one grammar. Therefore, this alone
As the number of stages of production rules increases, the number of induction stages also tends to increase.

そこで、更に次に示す方法を導入する。Therefore, we will further introduce the following method.

与えられた文法をG (P + S @ VNI VT
)とする。
Let the given grammar be G (P + S @ VNI VT
).

非終端記号VNを明示非終端記号VEN及び暗示非終端
記号VINとに分ける。
The nonterminal symbol VN is divided into an explicit nonterminal symbol VEN and an implicit nonterminal symbol VIN.

明示非終端記号VENは誘導メニュー中に表出してもよ
く、他方の暗示非終端記号VINは誘導メニュー中には
表出させない。
The explicit nonterminal VEN may appear in the guided menu, while the other implicit nonterminal VIN does not appear in the guided menu.

非終端記号Vsは。The non-terminal symbol Vs is.

Vs=VEsUVrsである。Vs=VEsUVrs.

但し、V EN nV I’N =φで積集合の部分は
空である。
However, since V EN nV I'N =φ, the intersection set part is empty.

シタがッテ、文法GはG (P、 S、 V2*LJV
rN+VT)である、しかし、暗示非終端記号VINは
上述したように表出しない、このVINが表出しない形
゛の文法を縮退文法G′と呼び、G′(P + S I
VI:N。
Shitagatte, grammar G is G (P, S, V2*LJV
rN + VT), but the implicit nonterminal symbol VIN is not expressed as described above. A grammar in which VIN is not expressed is called a degenerate grammar G', and G'(P + S I
VI:N.

V T )となる。VT).

文法G ’ (P、 S、 VENt Vt)は文法G
 (P。
Grammar G' (P, S, VENt Vt) is grammar G
(P.

S 、 VENLJ VIN、 Vt)ニ比べ記号の段
数が減少している。このことは生成規則の段数が減少□
していることになるから、文法Gの誘導を文法G′を用
いて行えば、誘導ステップ数を減少させ得る。
S, VENLJ VIN, Vt) The number of symbol stages has been reduced. This means that the number of stages of the production rule decreases □
Therefore, if the grammar G is derived using the grammar G', the number of guidance steps can be reduced.

ただし、非終端記号VNのうち、生成規則の左辺の記号
が直接右辺でも参照できる再帰的定義がなされる記号に
ついては、生成規則から消去できない0文法に誤りを生
じさせるからである。そのため、直接的再帰使用をして
いる非終端記号VNは、暗示非終端記号VINに分けら
れない。つまり、暗示非終端記号Vtsを明示非終端記
号VENに置換できないからである。したがって、この
場合には全部を縮退文法G′の形で誘導し終えることは
できない。
However, among the non-terminal symbols VN, symbols that are recursively defined so that the symbol on the left side of the production rule can also be directly referenced on the right side cause an error in the zero grammar that cannot be deleted from the production rule. Therefore, a nonterminal symbol VN with direct recursive use cannot be separated into an implicit nonterminal symbol VIN. In other words, the implicit non-terminal symbol Vts cannot be replaced with the explicit non-terminal symbol VEN. Therefore, in this case, it is not possible to derive all the degenerate grammars in the form of the reduced grammar G'.

〔発明の実施例〕[Embodiments of the invention]

以下、図によって本発明の詳細な説明する。 Hereinafter, the present invention will be explained in detail with reference to the drawings.

構文主導型入力誘導方法の一実施例を第1図に示す。図
中のAは計算機で、その内部の18は対象とする言語の
構文を定義した生成規則データ、2aは構文主導型入力
誘導を制御する制御部である。Bは入力用端末機器で、
その3bはCRTディスプレイ(Cathode Ra
y Tube Display)、4bはCRTディス
プレイ3b中に表示される入力可能な構文要素の一覧(
構文メニュー)の例、5bは操作用のキーボードである
An example of a syntax-driven input guidance method is shown in FIG. A in the figure is a computer, 18 inside the computer is production rule data that defines the syntax of the target language, and 2a is a control unit that controls syntax-driven input guidance. B is an input terminal device,
3b is a CRT display (Cathode Ra
y Tube Display), 4b is a list of inputtable syntax elements displayed on the CRT display 3b (
5b is a keyboard for operation.

例えば、現在入力すべき項目が〈文〉であるとき、構文
主導型入力誘導制御部2aが生成規則データ1aを参照
し、このときに入力可能な項目として〈選択文〉、く繰
返文〉、〈連接文〉があることを検出表示する。そして
、端末機器BのCRTディスプレイ3b中に構文メニュ
ーとしてこれらを表示する。ユーザは選択したい項目を
キーボード5bを使用してそのファンクションキーなど
で選択入力する。
For example, when the current item to be input is <sentence>, the syntax-driven input guidance control unit 2a refers to the production rule data 1a, and the items that can be input at this time are <selected sentence> and repeated sentence>. , detects and displays the presence of a <conjunctive sentence>. Then, these are displayed on the CRT display 3b of the terminal device B as a syntax menu. The user selects and inputs the desired item using the keyboard 5b using its function keys.

構文主導型入力誘導方法において、入力誘導状態を一つ
先に進める方法には、デプスファースト(Depth 
−First) 、ワイズファースト(Width −
First)などの段階的なアルゴリズムがある。
In the syntax-driven input guidance method, depth first (Depth
-First), Width-
There are step-by-step algorithms such as First).

第2図にデジスフアース1−型のアルゴリズムによる構
文主導型入力誘導方法の手続を、フローチャートで示す
6 図示の工Pi 1では、最初の入力誘4状態を作り出す
ため、便宜上 s’−>s なル生成規則を文法G (P y S + Vsv V
t) ニ追加し、その生成規則から構文主導型の入力誘
導を始めるように初期設定を行う。
Figure 2 shows a flowchart of the syntax-driven input guiding method procedure using the Digisphere 1-type algorithm. The production rule is expressed as a grammar G (P y S + Vsv V
t) d) and perform initial settings to start syntax-driven input guidance from the production rule.

続いて、工程2では工程1の規則を受は取り、構文主導
型の入力誘導を行って終る。
Next, in step 2, the rules of step 1 are followed, and syntax-driven input guidance is performed.

上記工程2の入力誘導はメニュ一方式によって行うので
、メニューの作成と選択が計算機とオペレータとの間で
なされる。これを次の工程3以下に示す。
Since the input guidance in step 2 is performed using a one-way menu, menu creation and selection are performed between the computer and the operator. This is shown in the next step 3 and below.

工程3では生成規則S’−>Sを追加した文法Gを受は
取り1文法Gが有する構文規則の構文要素数を設定する
。例えば、生成規則の左辺の記号X(非終端記号)に対
する右辺の記号Y(構文要素)数を変数Nに設定する。
In step 3, the grammar G to which the production rule S'->S has been added is taken and the number of syntactic elements of the syntactic rules that one grammar G has is set. For example, the number of symbols Y (syntax elements) on the right side for the symbol X (nonterminal symbol) on the left side of the production rule is set to variable N.

これを形式的に表記すれば、X−>Ytt Yz+・・
・YNのようになる。
If we write this formally, X->Ytt Yz+...
・Become like Y/N.

工程4では、工程3で展開した構文要素をメニュー形式
で表示し、これを選択する各段階的工程を順次に処理す
るため、その選択処理回数を記憶する変数を割り当てる
。この変数をiとし、それには1を設定するので、i 
(−1である。
In step 4, the syntax elements expanded in step 3 are displayed in a menu format, and in order to sequentially process each step-by-step process of selecting the syntax elements, a variable is assigned to store the number of selection processes. Let this variable be i and set it to 1, so i
(It is -1.

工程5は、生成規則の右辺の記号Yが非終端記号VNが
終端記号VTかの判定を行い、非終端記号VNならば次
の工程6以降へ、終端記号VTならば、これ以上の構分
要素は持たないので、工程9へ渡す。
In step 5, the symbol Y on the right side of the production rule determines whether the non-terminal symbol VN is a terminal symbol VT. If it is a non-terminal symbol VN, proceed to the next step 6 or later, and if it is a terminal symbol VT, no further constituent elements Since I don't have it, I pass it on to step 9.

工程6以降から工程8迄は後に説明する。The steps from step 6 onwards to step 8 will be explained later.

工程9は、右辺の記号Yの変数Nの誘導処理が全て終了
したか否かを判定する工程であり、終了条件(i≦N)
を満していれば、誘導処理の手続(工程6以降から工程
8迄)を終了し、次の文法G待ちになる。満たしていな
ければ、工程10にて繰り返し回数を+1し、工程5へ
制御を移し、次の記号YNの誘導に移る。
Step 9 is a step of determining whether all the derivation processing of the variable N of the symbol Y on the right side has been completed, and the termination condition (i≦N) is
If the condition is satisfied, the guidance processing procedure (from step 6 onwards to step 8) is completed and the process waits for the next grammar G. If not, the number of repetitions is incremented by 1 in step 10, control is transferred to step 5, and the next symbol YN is guided.

工程6は、左辺の記号X(非終端記号)に対する右辺の
記号(構文要素)のうち、非終端記号Vsの構文要素(
誘導メニュー)、すなわち、X−> Y s + Y 
xH・・・Y、・・・YNにおける誘導メニューとして
、例えばYl を作成し、その誘導メニューの項目数は
変数Mに設定する。
Step 6 is the syntax element (of the non-terminal symbol Vs) among the symbols (syntax elements) on the right side for the symbol X (non-terminal symbol) on the left side.
guided menu), i.e., X−>Y s + Y
For example, Yl is created as a guide menu for xH...Y,...YN, and the number of items in the guide menu is set to variable M.

形としては、Mく一メニュー(Y、)になる。The shape is Mkuichi menu (Y,).

工程7は、工程6で作成した誘導メニューの項目から選
択された構文要素を入力誘導状態の生成規則の右辺に代
入する。
In step 7, the syntax element selected from the guidance menu item created in step 6 is assigned to the right side of the production rule of the input guidance state.

工程8は、選択決定されたメニューを持つ構文要素Y、
を再帰的に呼び出し、更にその構文要素Zs、 Zx、
・・・ZMの生成規則 Y I−ンZ 1 *  22+  ”’  Z nに
ついて構分主導型入力誘導を行う。
Step 8 is the syntax element Y having the selected menu;
recursively calls its syntax elements Zs, Zx,
...Construction-driven input guidance is performed for the production rule YI-nZ1*22+''Zn of ZM.

以上の如くして構文規則に則る構文要素が誘導され1段
階的に正しい構文規則を有する計算機用の入力プログラ
ムが形成され、かつ同時に入力される。
As described above, syntax elements conforming to the syntax rules are induced, and an input program for a computer having correct syntax rules is formed step by step, and inputted at the same time.

第3図、第4図に記号を用いて具体的に誘導される様子
を示す。そのために、例として文法G(P、S、VN、
VT)は以下のような内容だとする。
FIGS. 3 and 4 show specific guidance using symbols. For this purpose, as an example, the grammar G(P, S, VN,
VT) has the following contents.

先ず生成規則の集合Pは、 P= (S−>E、E−>E+T、E−>T、T−>T
IF。
First, the set P of production rules is P= (S->E, E->E+T, E->T, T->T
IF.

T−>F、F−)(E)、F−>i) 非終端記号VN= (S、E、T、F)終端記号V T
 = (+ y拳、(1)、i)誘導される内容は非終
端記号VNであり、生成規則の右辺の記号(構文要素)
は次の如くである。
T->F, F-) (E), F->i) Non-terminal symbol VN= (S, E, T, F) Terminal symbol V T
= (+ y fist, (1), i) The induced content is a non-terminal symbol VN, and the symbol on the right side of the production rule (syntax element)
is as follows.

すなわち、誘導されるメニューは、各非終端記号S、E
、T、Fに対して、生成規則の集合Pからメニュー(S
)= (E) メニュー(E)= (E+T、T) メニュー(T)= (T拳F、F) メニュー(F)= ((E)、i) となる。
That is, the induced menu is
, T, F, select a menu (S
) = (E) Menu (E) = (E + T, T) Menu (T) = (T fist F, F) Menu (F) = ((E), i).

この例を第2図で説明したデプスファースト型のアルゴ
リズムによる構文主導型入力誘導方法に従ってその入力
誘導状態と、誘導メニューと、オペレータが誘導メニュ
ー中から選択した項目とを誘導段階(状態番号順)別に
表にしたのが第3図で、その理解を助けるために誘導過
程を本形式で第4図に示す。
In this example, in accordance with the syntax-driven input guidance method using the depth-first algorithm described in FIG. A separate table is shown in Fig. 3, and the induction process is shown in this format in Fig. 4 to aid understanding.

最初に、状態番号1では、記号Sが記号列Eからなるこ
とを示したので、その記号列Eの誘導メニューが表示さ
れる。叙述した通り、メニュー(E)はE+T、Tなの
で、オペレータがそのうちの(E−>E+T)を選択し
たとすると、次に状態番号2へ移る。
First, in state number 1, it is shown that the symbol S consists of the symbol string E, so the guidance menu for the symbol string E is displayed. As described above, the menu (E) is E+T, T, so if the operator selects (E->E+T), the next step is to move to state number 2.

状態番号2以下では、オペレータがE+Tを選択したの
で、記号Eと記号Tについて誘導しなければならない。
In state numbers 2 and below, since the operator has selected E+T, the symbols E and T must be guided.

この例では次に先ずEについての誘導メニューE+T、
Tを示し、オペレータが今度はTを選択したので、状態
番号3に移り、メニュー(T)のT*F、Fを示す。
In this example, first, the induction menu E+T for E,
Since the operator has selected T this time, the state moves to state number 3 and shows T*F, F of the menu (T).

オペレータがT*Fを選んでいるので、状態番号4以下
ではメニュー(F)についても誘導することとなる。以
下、同様にして順次に誘導し、最終的には状態番号11
で全部終端記号のiに達している。終端記号はそれ以上
の誘導の必要性がない記号なので、状態番号11以降の
誘導は行なわれない。
Since the operator has selected T*F, menu (F) will also be guided in state numbers 4 and below. Thereafter, the guidance is performed sequentially in the same manner, and finally state number 11 is reached.
and all reach the terminal symbol i. Since the terminal symbol is a symbol that requires no further guidance, no guidance is performed after state number 11.

こうして文法Gを前提とする入力誘導の結果は、第3図
の選択したメニューに従って式(i)*i+iであるこ
とが示される。
In this way, the result of the input guidance assuming the grammar G is shown to be the formula (i)*i+i according to the selected menu in FIG.

次に、縮退した文法を用いた構文主導型入力誘導につい
て例を用いて説明する。説明を簡単にするため、先の例
で使用した文法G (P、S、VN。
Next, syntax-driven input guidance using a degenerate grammar will be explained using an example. To simplify the explanation, the grammar G (P, S, VN) used in the previous example.

Vt)を利用する。Vt).

非終端記号VNを明示非終端記号VENと暗示非終端記
号Vrnとに分ける。
The nonterminal symbol VN is divided into an explicit nonterminal symbol VEN and an implicit nonterminal symbol Vrn.

VEN=  (S *  E t  T)VIN=(F
) トスルト、文法G ’ (P ’ 、 S 、 VEN
、 VT)は次のようになる。
VEN=(S*EtT)VIN=(F
) Tosult, Grammar G'(P', S, VEN
, VT) is as follows.

P ’= (S−>E、E−>E+T、E−>T、T−
>T傘(E)  、  T−>Tli  t  T−>
(E)  #  T−)i) 前述したように、記号Vrsは記号vENに置き換えら
れるので、縮退文法G′の生成蔑則は記号Fの箇所がそ
の生成規則の右辺(E)、iだからである。
P'= (S->E, E->E+T, E->T, T-
>T umbrella (E), T->Tli t T->
(E) # T-)i) As mentioned above, the symbol Vrs is replaced by the symbol vEN, so the production rule for the degenerate grammar G' is because the symbol F is on the right side (E), i of the production rule. be.

したがって、誘導メニューは、各非終端記号VENに対
して、 メニュー(S)= (E) メニュー(E)= (E+T、T) メニュー(T)= (T*(E)、T傘i、(E)、i
)となる。メニュー(T)についてメニューの数が増え
てはいるが、これはそのうちの一つをオペレータが選択
すればよいだけなので操作は一度で済む、そして、非終
端記号Fがないぶんだけ誘導の段数が減り、オペレータ
のメニュー選択操作回数はその減った段数骨だけ減少す
る。これを第5図に示す。この図も第3図で説明した誘
導例と同様の手法なので、読み方も同じである。
Therefore, the derived menu is for each non-terminal symbol VEN: Menu(S) = (E) Menu(E) = (E+T,T) Menu(T) = (T*(E), T umbrella i, (E ), i
). Regarding the menu (T), although the number of menus has increased, the operator only has to select one of them, so the operation only needs to be done once, and since the non-terminal symbol F is missing, the number of guidance steps is reduced. , the number of menu selection operations performed by the operator is reduced by the reduced number of stages. This is shown in FIG. This diagram also uses the same method as the guidance example explained in FIG. 3, so it can be read in the same way.

状態番号1では、誘導メニューとしてメニュー(E)が
表示される。オペレータがそのうちの(E−))E+T
を選択したとすると状態番号2へ移る。
In state number 1, menu (E) is displayed as a guiding menu. The operator is one of them (E-))E+T
If you select , you will move to state number 2.

状態番号2では、誘導メニューとしてメニュー(E)が
表示される。オペレータがそのうちのTの選択をしたと
すれば、状態番号3へ移る。
In state number 2, menu (E) is displayed as a guiding menu. If the operator selects T among them, the process moves to state number 3.

状態番号3から状態番号6迄も同様にして順次に進捗す
るが、状態番号7では、さらに誘導すべき生成規則が存
在しないので、入力誘導を終了する。
Progress is made sequentially in the same manner from state number 3 to state number 6, but in state number 7, since there is no generation rule to be further guided, input guidance is ended.

結果的に、前と同じく式(i)拳i+iが得られている
As a result, the formula (i) fist i+i is obtained as before.

このように、文法Gの縮退文法G′を用いた構文主導型
入力誘導を使用すれば1文法Gを使用した場合に比べ、
誘導段数を削減させることができる。
In this way, if we use syntax-driven input guidance using the degenerate grammar G' of grammar G, compared to using one grammar G,
The number of guiding stages can be reduced.

以上、縮退文法G′の入力誘導の手続迄説明したが、こ
の縮退文法G′の入力誘導方法の手続に特有な各非終端
記号に対する誘導メニュー(構文要素)の作成方法につ
いて第6図を用いて説明する。
Above, we have explained the input guidance procedure for the degenerate grammar G', but we will explain how to create a guidance menu (syntax element) for each non-terminal symbol, which is specific to the input guidance method procedure for the degenerate grammar G', using Figure 6. explain.

ここで、説明する工程は、与えられた文法G′中の非終
端記号VNに暗示非終端記号VINがあってもよい。
Here, the process described may include an implicit non-terminal symbol VIN in the non-terminal symbol VN in a given grammar G'.

この上記の工程は、大きく分けて二つの工程から成り立
つ、その一つの一般形メニューの作成であり、他の一つ
は遺言形メニューの作成である。
The above process is roughly divided into two steps, one of which is the creation of a general menu, and the other is the creation of a will-form menu.

工程11では、与えられた非終端記号が例えばXだとす
れば、非終端記号Xから一般形メニューと呼ぶ誘導メニ
ューを作成する。一般形メニューとは、メニュー(X)
の要素に現れつる暗示非終端記号Yに対してメニュー(
Y)を適用し、その結果をメニュー(X)中の暗示非終
端記号Yと置換することを繰り返し、最終的に暗示非終
端記号を消去した誘導メニューのことを言う。これをG
−メニュー(X)と呼ぶことにする。
In step 11, if the given non-terminal symbol is, for example, X, a guided menu called a general form menu is created from the non-terminal symbol X. What is a general menu? Menu (X)
Menu (
This refers to a guided menu in which the implied non-terminal symbol Y) is applied repeatedly and the result is replaced with the implied non-terminal symbol Y in the menu (X), and the implied non-terminal symbol is finally deleted. G this
-Let's call it menu (X).

工程11での一般形メニューの誘導を具体的に次に示す
The guidance of the general menu in step 11 will be specifically described below.

便宜上、記号Aと記号Bの連接をAAB、選択をAVB
で表現する。また9文法G′の生成規則の集合を P ’ = (S−)ABC。
For convenience, the concatenation of symbol A and symbol B is AAB, and the selection is AVB.
Expressed as Furthermore, the set of production rules for the nine grammars G' is P' = (S-)ABC.

A−>X。A->X.

A−>Y 。A->Y.

A−> Z )で、 VEs== (s、B、C,X、Y、Z)V r pt
 = (A ) とすると、誘導メニューのうちの一般形メニュー(S)
については、 Gメニ−L−(S) =((XVYl、/Z) 八BA
C)となる。
A->Z), VEs== (s, B, C, X, Y, Z)V r pt
= (A), the general form menu (S) of the guided menus
For, G many-L-(S) = ((XVYl, /Z) 8BA
C).

次の工程12では、工程11で得られた一般形メニュー
から遺言形メニューを作成する。遺言形メニューとは、
一般形メニューを PzVPzVPs−VPN の形式に展開したもので、非終端記号Xについてならば
S−メニュー(X)と呼ぶ。
In the next step 12, a will form menu is created from the general form menu obtained in step 11. What is the will-form menu?
It is an expansion of the general menu into the format PzVPzVPs-VPN, and if it is a non-terminal symbol X, it is called an S-menu (X).

この変数には、次に示す論理式の分配法則を繰り返し適
用する。すなわち、次のようになる。
The distributive law of the following logical formula is repeatedly applied to this variable. In other words, it becomes as follows.

AA (BVC)= (AAB)V (AAC)これに
より得られた遺言形メニューの、各Piに対して、連接
△記号を省いたものを、最終的な誘導メニューとする。
AA (BVC) = (AAB) V (AAC) The will-form menu obtained by this, with the concatenated △ symbol omitted for each Pi, becomes the final guidance menu.

先の例では1遺言形メニューは、次のようになる。In the previous example, the 1 will form menu would be as follows.

lニュー(S)= ((XABAC)V(TAB八〇へ
V (ZΔBAC)) 従って、最終的な誘導メニューは、 メニュー(S)= (XBC,YBC,ZBC)どなる
lNew(S) = ((XABAC)V(TAB80V(ZΔBAC)) Therefore, the final guided menu is Menu(S) = (XBC, YBC, ZBC).

上述一般形メニューの作成工程11と遺言形メニューの
作成工程12とを以下に詳述する。
The above-mentioned general form menu creation process 11 and testament form menu creation process 12 will be described in detail below.

工程13から工程24は、−膜形メニューG−メニュー
(X)の作成手続工程を示す。
Steps 13 to 24 show the procedure steps for creating -membrane menu G-menu (X).

工813では、記号Xを左辺にもつ生成規則の右辺を変
数GMMに代入する。
In step 813, the right side of the production rule having the symbol X on the left side is assigned to the variable GMM.

工程14では、記号Xを左辺にもつ生成規則の数を、変
数G−M Nに代入する。
In step 14, the number of production rules having the symbol X on the left side is assigned to the variable GMN.

工程15は工程16から工程23の繰り返し処理の初期
設定で、繰り返し数の設定カウンタiの内容を1に設定
する。
Step 15 is the initial setting of the repetition process of steps 16 to 23, and the content of the repetition number setting counter i is set to 1.

工程16は、上記カウンタiに示されるi番目の生成規
則の、右辺の記号数を変数Nに代入する。
In step 16, the number of symbols on the right side of the i-th production rule indicated by the counter i is assigned to a variable N.

工程17は、工程18から工程21迄の繰り返し処理の
初期設定で、繰り返し数のカウンタjを1に設定する。
Step 17 is the initial setting of the repetition process from step 18 to step 21, and a repetition number counter j is set to 1.

工程18は、カウンタiのi番目生成規則に対応するカ
ウンタjのj番目記号が暗示非終端記号であれば、次の
工程19以降に制御を移し、その他すなわち明示非終端
記号、または終端記号であれば、工程23へ制御を移す
In step 18, if the j-th symbol of counter j corresponding to the i-th production rule of counter i is an implicit non-terminal symbol, control is transferred to the next step 19 and subsequent steps, and if it is an explicit non-terminal symbol or a terminal symbol, , control is transferred to step 23.

工程19では、i番目生成規則のj番目記号の誘導メニ
ュー(構文要素列)を作成する。
In step 19, a guidance menu (syntax element string) for the j-th symbol of the i-th production rule is created.

工程20では、工程19で作成された誘導メニューを、
i番目生成規則のj番目記号と置換する。
In step 20, the guidance menu created in step 19 is
Replace with the j-th symbol of the i-th production rule.

工程21では、繰り返し回数jが変数Nより大であれば
工程23に制御を移し、等しいか小であれば工程22へ
制御を移す。
In step 21, if the number of repetitions j is greater than the variable N, control is transferred to step 23, and if it is equal to or smaller than variable N, control is transferred to step 22.

工程22でカウンタjの値を+1にして制御を工程18
へ戻す。
In step 22, the value of counter j is increased to +1 and the control is carried out in step 18.
Return to.

工程23では、繰り返し回数iが変数GMNより大であ
れびこの手続を終了し、等しいか小であれば、工程24
へ制御を移す。
In step 23, if the number of iterations i is greater than the variable GMN, this procedure is terminated, and if it is equal or smaller, step 24 is executed.
Transfer control to

工程24でカウンタiの値を+1にして制御を工程16
へ戻す。
In step 24, the value of counter i is +1 and the control is in step 16.
Return to.

第7図の工程25から工程28は、遺言形メニューS−
メニュー(X)の作成手続きを示す。
Steps 25 to 28 in FIG. 7 are the will form menu S-
The procedure for creating menu (X) is shown.

工程25は、入力されたGメニュー(X)を変数GMM
に代入する。
Step 25 converts the input G menu (X) into a variable GMM
Assign to .

工程26は変数GMMの各生成規則を分配可能なものが
あるか調べ、あれば工程27へ、なければ工程28へ制
御を移す。
In step 26, it is checked whether each generation rule of the variable GMM can be distributed, and if there is one, control is transferred to step 27; if not, control is transferred to step 28.

工程27では、分配法則を適用し、結果を変数GMMに
代入する。
In step 27, the distributive law is applied and the result is assigned to the variable GMM.

工程28では、変数G M Mを変数SMMに代入し、
終了する。
In step 28, the variable G M M is assigned to the variable SMM,
finish.

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

以上述べたように1本発明に係る構文主導型入力誘導方
法によれば、計算機とその使用者と対話が構文作成時の
メニュ一方式で行えるので、使用者側端末機器の使い勝
手を実験しながら端末器側インターフェースを向上させ
ることができる。
As described above, according to the syntax-driven input guidance method according to the present invention, the interaction between the computer and its user can be carried out through the menu at the time of syntax creation, so while experimenting with the usability of the user's terminal equipment, The terminal side interface can be improved.

また、初心の計算機使用者でも計算機システムからの誘
導によって入力したい項目を選択していけば、簡単に正
確な形式言語の構文規則を得た入力操作が行える。
Furthermore, even novice computer users can easily perform input operations based on the correct syntax rules of a formal language by selecting the items they wish to input based on guidance from the computer system.

さらに、縮退文法による構文規則を利用したので、誘導
段数を省略削減して熟練した使用者にも余計な頻ねしさ
を感じさせることなく、誘導メニューの選択を行わせる
ことができる結果、入力操作時間が短縮される。
Furthermore, since the syntax rules based on degenerate grammars are used, the number of guidance stages can be omitted and even experienced users can select guidance menus without feeling unnecessary.As a result, the input operation Time is reduced.

熟練者になるほど、誘導メニューの項目、すなわち、一
段当りの誘導メニュー(構文要素)数が多くても選択は
容易なので、縮退文法による誘導方法は極めて有効であ
る。
The more skilled the user becomes, the easier it is to select items on the guidance menu, even if the number of guidance menus (syntax elements) per row is large, so the guidance method using degenerate grammar is extremely effective.

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

図は何れも本発明の構文主導型入力誘導方法の実施例に
関する、第1図は構文主導型入力誘導方法の一実施例を
示す説明図、第2図はその手順を説明するためのフロー
チャー1−図、第3図は第2図に示す手順に従って説明
の便宜上の記号を用いて例示した入力誘導例の図表で、
第4図は第3図の理解を助ける木彫式の説明図、第5図
は第3図の例において誘導段数を削減するための誘導例
の図表である。第6図は第5図に示した誘導例の手順を
説明するためのフローチャート図で、第7図は第6図に
示すフローチャー1−に関連した工程の詳細を示すフロ
ーチャート図である。 A・・・計算機、B・・・入力用端末機器、G・・・文
法、G′・・・縮退文法、P・・・生成規則の集合(構
文要素列) 、 VEN・・・明示非終端記号、VTN
・・・暗示非終端記号、VN・・・非終端記号、VT・
・・終端記号、VNLJVt・・・構文規則。 代理人 弁理士 小川層JJ1.− 百  1  図 第 3 図 史上・−I 力′ 5清1甲いた入力I秀+4ブリ(1
)冨 4 図
The figures relate to an embodiment of the syntax-driven input guidance method of the present invention. FIG. 1 is an explanatory diagram showing an example of the syntax-driven input guidance method, and FIG. 2 is a flowchart for explaining the procedure. Figures 1- and 3 are diagrams of input guidance examples illustrated using symbols for convenience of explanation according to the procedure shown in Figure 2.
FIG. 4 is an explanatory diagram of a wooden carving type to help understand FIG. 3, and FIG. 5 is a diagram of an example of guidance for reducing the number of guidance stages in the example of FIG. 3. FIG. 6 is a flowchart for explaining the procedure of the guidance example shown in FIG. 5, and FIG. 7 is a flowchart showing details of steps related to flowchart 1- shown in FIG. A: Computer, B: Input terminal device, G: Grammar, G': Degenerate grammar, P: Set of production rules (syntax element sequence), VEN: Explicit nonterminal symbol ,VTN
...implied non-terminal symbol, VN... non-terminal symbol, VT.
...terminal symbol, VNLJVt...syntax rules. Agent Patent Attorney Ogawa Layer JJ1. - 100 1 Figure 3 History・-I force' 5 Qi 1 A input I Hide + 4 Buri
)Tomi 4 Figure

Claims (1)

【特許請求の範囲】 1、構文要素列と、これらの関係を利用して定義した構
文規則とを予め用意する工程、上記構文規則の内容を形
成する上記構文要素を入力可能な段階に従つてオペレー
タに表示し、その選択を促す工程、オペレータが選択し
た構文要素に応じて次の入力段階の構文規則を表示し、
これに対応する入力可能な次段階の構文要素をオペレー
タに表示して、選択を促す工程を経て、漸次に計算機用
形式言語を完成入力させることを特徴とする計算機の入
力用端末機器の構文主導型入力誘導方法。 2、構文要素のうち、非終端記号に包括される要素を明
示非終端記号と暗示非終端記号とに分類する工程、常に
暗示非終端記号を省略した縮退文法構文規則で表示する
ため、暗示非終端記号に該当する構文要素を省略した構
文要素を構文規則に対応した選択可能な構文要素メニュ
ーとする工程から成り、段階的に次段階の縮退文法構文
規則乃至構文規則を誘導するようにして、入力データ誘
導の際の該導段数を削減したことを特徴とする特許請求
の範囲第1項記載の構文主導型入力誘導方法。
[Claims] 1. A step of preparing in advance a syntax element string and a syntax rule defined using the relationship between them, and a step of being able to input the syntax elements forming the content of the syntax rule. Displaying syntax rules for the next input stage according to the syntax element selected by the operator;
A syntax-driven computer input terminal device characterized by displaying the next-stage syntactic elements that can be inputted to the operator and prompting the operator to make a selection, and then gradually completing and inputting the computer formal language. Type input guidance method. 2. Among the syntactic elements, the process of classifying elements included in nonterminal symbols into explicit nonterminal symbols and implicit nonterminal symbols, because they are always represented by the degenerate grammar syntax rules that omit implicit nonterminal symbols, they fall under implicit nonterminal symbols. It consists of the process of making syntactic elements from which syntactic elements are omitted into a selectable syntactic element menu that corresponds to the syntactic rules, and the next stage degenerate grammar syntactic rules or syntactic rules are guided step by step when input data is guided. 2. The syntax-driven input guidance method according to claim 1, wherein the number of guidance stages is reduced.
JP11735086A 1986-05-23 1986-05-23 Syntax lead type input guide method Pending JPS62274428A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11735086A JPS62274428A (en) 1986-05-23 1986-05-23 Syntax lead type input guide method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11735086A JPS62274428A (en) 1986-05-23 1986-05-23 Syntax lead type input guide method

Publications (1)

Publication Number Publication Date
JPS62274428A true JPS62274428A (en) 1987-11-28

Family

ID=14709515

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11735086A Pending JPS62274428A (en) 1986-05-23 1986-05-23 Syntax lead type input guide method

Country Status (1)

Country Link
JP (1) JPS62274428A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0224716A (en) * 1988-07-14 1990-01-26 Matsushita Electric Ind Co Ltd Interactive program preparation supporting system
US6207924B1 (en) 1997-05-30 2001-03-27 Centre National De La Recherche Scientifique Inductive plasma torch with a reagent injector

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0224716A (en) * 1988-07-14 1990-01-26 Matsushita Electric Ind Co Ltd Interactive program preparation supporting system
US6207924B1 (en) 1997-05-30 2001-03-27 Centre National De La Recherche Scientifique Inductive plasma torch with a reagent injector

Similar Documents

Publication Publication Date Title
US4914704A (en) Text editor for speech input
US5890122A (en) Voice-controlled computer simulateously displaying application menu and list of available commands
US4831654A (en) Apparatus for making and editing dictionary entries in a text to speech conversion system
JP4313422B2 (en) Method and apparatus for presenting alternatives for selection using adaptive learning
US5864808A (en) Erroneous input processing method and apparatus in information processing system using composite input
EP1091303B1 (en) Method and system for providing alternatives for text derived from stochastic input sources
JPH04349505A (en) Hardware configuration of programmable logic control device used on first programmable logic control device to beused on second programmable logic control device and corresponding control program converting method
US6542090B1 (en) Character input apparatus and method, and a recording medium
JPH11161464A (en) Japanese sentence preparing device
JPH076158A (en) Method and apparatus for solving of term of sequence of numbers
JPS60263256A (en) Computer provided with skill degree function
JPS62274428A (en) Syntax lead type input guide method
JP2002221989A (en) Method and apparatus for text input
JP3483230B2 (en) Utterance information creation device
JP2001067169A (en) Information terminal equipment and method for continuously inputting characters
JPH07152550A (en) Method for preparing object-oriented system
US20210043213A1 (en) Voice recognition apparatus, voice recognition method, and program
JP2001014304A (en) Document creating device, conversion processing method, and recording medium where conversion processing program is recorded
JP3142159B2 (en) Prosody symbol generator
JPH04286000A (en) Input method for voice control information
JP2940394B2 (en) Source program modification device
JP2755585B2 (en) Question processing system
JP3051747B2 (en) Machine translation method and machine translation system
JPH06119314A (en) Document preparing device
JPH047620A (en) Word processor