JP2000047985A - Device and method for checking command parameter sentence structure and record medium recording command parameter sentence structure analytic program - Google Patents

Device and method for checking command parameter sentence structure and record medium recording command parameter sentence structure analytic program

Info

Publication number
JP2000047985A
JP2000047985A JP11150120A JP15012099A JP2000047985A JP 2000047985 A JP2000047985 A JP 2000047985A JP 11150120 A JP11150120 A JP 11150120A JP 15012099 A JP15012099 A JP 15012099A JP 2000047985 A JP2000047985 A JP 2000047985A
Authority
JP
Japan
Prior art keywords
parameter
string
command
bit
syntax
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.)
Granted
Application number
JP11150120A
Other languages
Japanese (ja)
Other versions
JP3454188B2 (en
Inventor
Miyuki Tanitsu
美由紀 谷津
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP15012099A priority Critical patent/JP3454188B2/en
Publication of JP2000047985A publication Critical patent/JP2000047985A/en
Application granted granted Critical
Publication of JP3454188B2 publication Critical patent/JP3454188B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To make efficiently performable the check processing of a command parameter with high quality without complicating the check processing of the command parameter even when the command parameter is added or corrected. SOLUTION: Concerning this checking method, a parameter extracting means 21 segments plural parameters with a space as a partition from a parameter stream designated to a command inputted to an input device 1 and stores them in an input parameter storage means 22 in the format of a bit stream turning on bits respectively corresponding to the plural parameters and it is checked whether all the bit streams coincident with the bit stream stored in the input parameter storage means 22 are stored in a combination storage means 24 for previously storing the combination pattern of parameters as bit streams or not. When the coincident bit stream is found out, it is judged that the sentence structure of the designated parameter is correct, it is reported to a command executing means 25 and the command is executed. When the coincident bit stream can not be found out, it is judged that the sentence structure of the designated parameter is wrong, and it is outputted to an output device 3.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、計算機に入力装置
から入力されたコマンドに指定された複数のパラメータ
の組合せが正しいか検査するコマンドパラメータ構文検
査装置、コマンドパラメータ構文検査方法およびコマン
ドパラメータ構文検査プログラムを記録した記録媒体に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a command parameter syntax checking apparatus, a command parameter syntax checking method, and a command parameter syntax checking method for checking whether a combination of a plurality of parameters specified in a command input from an input device to a computer is correct. The present invention relates to a recording medium on which a program is recorded.

【0002】[0002]

【従来の技術】従来のコマンド構文解析システムは、入
力コマンド文字列から空白を区切りとして文字列を抽出
するパラメータ抽出手段と、このパラメータ抽出手段に
より抽出されたパラメータが指定可能な状態にあるか否
かを検査するパラメータ検査手段とから構成されてい
た。
2. Description of the Related Art A conventional command parsing system includes a parameter extracting means for extracting a character string from an input command character string by separating a blank space, and whether or not the parameters extracted by the parameter extracting means are in a specifiable state. And a parameter inspecting means for inspecting whether or not the parameter is satisfied.

【0003】このパラメータ検査手段は、パラメータ1
つ1つに対して指定可能なパラメータであるか、パラメ
ータの組合せは正しいかという条件判断を繰り返す検査
を行っていた。
[0003] This parameter checking means uses a parameter 1
Inspections are repeatedly performed to determine whether each parameter is a parameter that can be specified or whether the combination of parameters is correct.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、この従
来のコマンド構文解析システムには、パラメータの組み
合わせを検査するためのプログラムロジックが複雑にな
ってしまい、該検査を効率良く行うことができないとい
う問題点がある。
However, the conventional command parsing system has a problem that the program logic for checking a combination of parameters is complicated, and the checking cannot be performed efficiently. There is.

【0005】また、パラメータの追加や修正があるたび
に、検査するためのプログラムロジックを改造しなけれ
ばならず、該プログラムロジックが一層複雑になる結果
として、バグが発生する確率が高くなってしまうという
問題点がある。
Further, every time a parameter is added or corrected, the program logic for inspection must be remodeled. As a result of the program logic becoming more complicated, the probability of occurrence of a bug increases. There is a problem.

【0006】本発明の目的は、コマンドパラメータの検
査処理を効率良く行うことができるようにすることにあ
る。
An object of the present invention is to enable a command parameter inspection process to be performed efficiently.

【0007】本発明の他の目的は、コマンドパラメータ
の追加や修正があっても、該コマンドパラメータの検査
処理を複雑にせずに、品質良く行うことができるように
することにある。
It is another object of the present invention to provide a high-quality command parameter inspection process without complicating the process even if a command parameter is added or modified.

【0008】[0008]

【課題を解決するための手段】本発明の第1のコマンド
パラメータ構文検査装置は、コマンドに指定されるパラ
メータ列に含まれる複数のパラメータのすべての組合せ
を予め記憶する組合せ記憶手段と、入力装置から入力さ
れたコマンドに指定されたパラメータ列に含まれる複数
のパラメータの組合せが前記組合せ記憶手段に記憶され
ているか判定することにより該パラメータ列の構文の正
当性を検査する組合せ検査手段とを備えたことを特徴と
する。
A first command parameter syntax checking apparatus according to the present invention comprises: a combination storage means for storing in advance all combinations of a plurality of parameters included in a parameter sequence specified in a command; and an input device. Combination checking means for checking whether or not a combination of a plurality of parameters included in a parameter string specified in a command input from is stored in the combination storage means, thereby checking the validity of the syntax of the parameter string. It is characterized by having.

【0009】本発明の第2のコマンドパラメータ構文検
査装置は、コマンドに指定されるパラメータ列に含まれ
る複数のパラメータのそれぞれを異なるビットに割り当
て、個々のパラメータが存在する場合に対応するビット
をオンにするビット列で前記パラメータ列を表現して予
め記憶する組合せ記憶手段と、入力装置から入力された
コマンドに指定されたパラメータ列を抽出し、該パラメ
ータ列を前記組合せ記憶手段に記憶されたビット列と同
様の形式のビット列に変換するパラメータ抽出手段と、
前記パラメータ抽出手段が変換したビット列が、前記組
合せ記憶手段に記憶されているか判定することにより該
パラメータ列の構文の正当性を検査する組合せ検査手段
とを備えたことを特徴とする。
A second command parameter syntax checking device according to the present invention assigns each of a plurality of parameters included in a parameter sequence specified in a command to different bits, and turns on a bit corresponding to each individual parameter. A combination storage unit that expresses the parameter sequence with a bit sequence to be stored in advance, and a parameter sequence specified in a command input from an input device, and extracts the parameter sequence from the bit sequence stored in the combination storage unit. Parameter extraction means for converting to a bit string of a similar format,
Combination checking means for checking whether the bit string converted by the parameter extracting means is stored in the combination storing means to check the validity of the syntax of the parameter string.

【0010】本発明の第3のコマンドパラメータ構文検
査装置は、コマンドに指定されるパラメータ列に含まれ
る複数のパラメータのそれぞれを表現し、パラメータ毎
に異なるビットがオンにされるビット列に、対応するパ
ラメータの指定が必須か省略可能かを示す属性情報を付
して記憶する組合せ記憶手段と、入力装置から入力され
たコマンドに指定されたパラメータ列を抽出し、抽出し
たパラメータ列を、該パラメータ列に含まれる複数のパ
ラメータのそれぞれを異なるビットに割り当て、個々の
パラメータが存在する場合に対応するビットをオンにす
るビット列に変換するパラメータ抽出手段と、前記組合
せ記憶手段に記憶されたビット列の内、パラメータの指
定が必須である旨を示す前記属性情報が付されたビット
列と、前記パラメータ抽出手段が抽出したパラメータ列
を変換したビット列とを比較することにより、当該パラ
メータ列の構文の正当性を検査する組合せ検査手段を備
えたことを特徴とする。
[0010] A third command parameter syntax checking apparatus of the present invention expresses each of a plurality of parameters included in a parameter string specified in a command, and corresponds to a bit string in which different bits are turned on for each parameter. A combination storage means for storing attribute information indicating whether the specification of a parameter is indispensable or omissible, and a parameter string specified in a command input from the input device, and extracting the extracted parameter string into the parameter string Assigning each of a plurality of parameters included in a different bit, parameter extraction means for converting to a bit string to turn on the corresponding bit when each parameter is present, among the bit strings stored in the combination storage means, A bit string to which the attribute information indicating that the specification of the parameter is indispensable; By comparing the bit string obtained by converting the parameter string data extracting means it has extracted, characterized by comprising a combination checking means for checking the validity of the syntax of the parameter sequence.

【0011】本発明の第4のコマンドパラメータ構文検
査装置は、第3のコマンドパラメータ構文検査装置にお
いて、前記組合せ記憶手段が、前記複数のビット列を階
層的に連結して記憶し、前記組合せ検査手段が、前記組
合せ記憶手段に階層的に連結して記憶された前記複数の
ビット列の内、パラメータの指定が必須である旨を示す
前記属性情報が付されたビット列を辿って、前記パラメ
ータ抽出手段が抽出したパラメータ列を変換したビット
列と順次比較することにより、当該パラメータ列の構文
の正当性を検査することを特徴とする。
In a fourth command parameter syntax checking apparatus according to the present invention, in the third command parameter syntax checking apparatus, the combination storage means stores the plurality of bit strings in a hierarchically connected manner, However, of the plurality of bit strings stored hierarchically connected to the combination storage means, the parameter extraction means traces a bit string to which the attribute information indicating that the designation of a parameter is essential is attached, The validity of the syntax of the parameter sequence is checked by sequentially comparing the extracted parameter sequence with the converted bit sequence.

【0012】本発明の第5のコマンドパラメータ構文検
査装置は、第1〜第4のいずれかのコマンドパラメータ
構文検査装置において、前記組合せ検査手段が、前記コ
マンドに指定されたパラメータ列の構文の正当性を確認
した場合にはコマンド実行手段に該コマンドを実行さ
せ、該パラメータ列の構文の正当性を確認できなかった
場合には該パラメータ列の構文が不正であった旨を出力
装置へ出力することを特徴とする。
A fifth command parameter syntax checking apparatus according to the present invention, in any one of the first to fourth command parameter syntax checking apparatuses, wherein the combination checking means checks whether the syntax of the parameter string specified in the command is correct. If the correctness of the syntax of the parameter string is not confirmed, the command execution means is caused to execute the command. It is characterized by the following.

【0013】本発明の第1のコマンドパラメータ構文検
査方法は、入力装置から入力されたコマンドに指定され
たパラメータ列に含まれる複数のパラメータの組合せ
が、コマンドに指定されるパラメータ列に含まれる複数
のパラメータのすべての組合せを予め記憶した組合せ記
憶手段に記憶されているか判定することにより該パラメ
ータ列の構文の正当性を検査する組合せ検査ステップを
含むことを特徴とする。
According to a first command parameter syntax checking method of the present invention, a plurality of combinations of parameters included in a parameter string specified in a command input from an input device are included in a parameter string specified in a command. A combination checking step of checking whether or not all combinations of the parameters are stored in combination storage means stored in advance to check the validity of the syntax of the parameter string.

【0014】本発明の第2のコマンドパラメータ構文検
査方法は、入力装置から入力されたコマンドに指定され
たパラメータ列を抽出し、該パラメータ列を、コマンド
に指定されるパラメータ列に含まれる複数のパラメータ
のそれぞれを異なるビットに割り当て、個々のパラメー
タが存在する場合に対応するビットをオンにするビット
列で前記パラメータ列を表現して予め記憶する組合せ記
憶手段に記憶されたビット列と同様の形式のビット列に
変換するパラメータ抽出ステップと、前記パラメータ抽
出ステップにおいて変換したビット列が、前記組合せ記
憶手段に記憶されているか判定することにより該パラメ
ータ列の構文の正当性を検査する組合せ検査ステップと
を含むことを特徴とする。
According to a second command parameter syntax checking method of the present invention, a parameter string specified in a command input from an input device is extracted, and the plurality of parameter strings included in the parameter string specified in the command are extracted. A bit string in the same format as the bit string stored in the combination storage means, in which each parameter is assigned to a different bit, and the parameter string is represented by a bit string that turns on a corresponding bit when an individual parameter is present and is stored in advance. And a combination checking step of checking whether the bit string converted in the parameter extracting step is stored in the combination storage means to check the correctness of the syntax of the parameter string. Features.

【0015】本発明の第3のコマンドパラメータ構文検
査方法は、入力装置から入力されたコマンドに指定され
たパラメータ列を抽出し、抽出したパラメータ列を、該
パラメータ列に含まれる複数のパラメータのそれぞれを
異なるビットに割り当て、個々のパラメータが存在する
場合に対応するビットをオンにするビット列に変換する
パラメータ抽出ステップと、コマンドに指定されるパラ
メータ列に含まれる複数のパラメータのそれぞれを表現
し、パラメータ毎に異なるビットがオンにされるビット
列に、対応するパラメータの指定が必須か省略可能かを
示す属性情報を付して記憶する組合せ記憶手段に記憶さ
れたビット列の内、パラメータの指定が必須である旨を
示す前記属性情報が付されたビット列と、前記パラメー
タ抽出ステップにおいて抽出したパラメータ列を変換し
たビット列とを比較することにより、当該パラメータ列
の構文の正当性を検査する組合せ検査ステップとを含む
ことを特徴とする。
According to a third command parameter syntax checking method of the present invention, a parameter sequence specified in a command input from an input device is extracted, and the extracted parameter sequence is extracted from each of a plurality of parameters included in the parameter sequence. Is assigned to different bits, and a parameter extraction step of converting a bit string that turns on a corresponding bit when an individual parameter is present, and expressing each of a plurality of parameters included in the parameter string specified in the command, A bit string in which a different bit is turned on for each bit is attached with attribute information indicating whether the specification of the corresponding parameter is mandatory or can be omitted. Of the bit strings stored in the combination storage means, the parameter designation is mandatory. A bit string to which the attribute information indicating that there is is attached; By comparing the bit string obtained by converting the parameter strings extracted you are, characterized in that it comprises a combination inspection step for inspecting the validity of the syntax of the parameter sequence.

【0016】本発明の第4のコマンドパラメータ構文検
査方法は、第3のコマンドパラメータ構文検査方法にお
いて、前記組合せ検査ステップが、前記組合せ記憶手段
に階層的に連結して記憶された前記複数のビット列の
内、パラメータの指定が必須である旨を示す前記属性情
報が付されたビット列を辿って、前記パラメータ抽出手
段が抽出したパラメータ列を変換したビット列と順次比
較することにより、当該パラメータ列の構文の正当性を
検査することを特徴とする。
According to a fourth command parameter syntax checking method of the present invention, in the third command parameter syntax checking method, the combination checking step is performed by the plurality of bit strings stored hierarchically connected to the combination storage means. By tracing the bit string to which the attribute information indicating that the parameter specification is essential is attached, and sequentially comparing the parameter string extracted by the parameter extracting means with the converted bit string, the syntax of the parameter string is obtained. It is characterized by checking the validity of

【0017】本発明の第5のコマンドパラメータ構文検
査方法は、第1〜第4のいずれかのコマンドパラメータ
構文検査方法において、前記組合せ検査ステップが、前
記コマンドに指定されたパラメータ列の構文の正当性を
確認した場合には当該コマンドを実行させ、該パラメー
タ列の構文の正当性を確認できなかった場合には該パラ
メータ列の構文が不正であった旨を出力装置へ出力する
ことを特徴とする。
In a fifth command parameter syntax checking method according to the present invention, in any one of the first to fourth command parameter syntax checking methods, the combination checking step may include checking a validity of a syntax of a parameter string specified in the command. If the correctness of the syntax of the parameter string is not confirmed, the command is output to the output device to the effect that the syntax of the parameter string is invalid. I do.

【0018】本発明の第1の記録媒体は、第1〜第5の
いずれかのコマンドパラメータ構文検査方法における各
ステップをコンピュータに実行させるプログラムを記録
したことを特徴とする。
A first recording medium according to the present invention is characterized by recording a program for causing a computer to execute each step in any one of the first to fifth command parameter syntax checking methods.

【0019】本発明の第1の記録媒体群は、第1の記録
媒体に記録されている前記プログラムを複数の部分に分
割して該複数の部分をそれぞれ複数の記録媒体に記録す
ることを特徴とする。
A first recording medium group according to the present invention is characterized in that the program recorded on the first recording medium is divided into a plurality of portions, and the plurality of portions are respectively recorded on a plurality of recording media. And

【0020】[0020]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0021】図1を参照すると、本発明の第1の実施の
形態は、プログラム制御により動作する計算機2と、こ
の計算機2に接続され、パラメータ列を含むコマンドを
入力するためのキーボード等の入力装置1と、ディスプ
レイ装置や印刷装置等の出力装置3とから構成されてい
る。
Referring to FIG. 1, according to a first embodiment of the present invention, a computer 2 which operates under program control, and an input such as a keyboard for inputting a command including a parameter string which is connected to the computer 2 It comprises a device 1 and an output device 3 such as a display device or a printing device.

【0022】なお、本実施の形態および後述する他の実
施の形態の変形例として、計算機2と磁気ディスク装置
や半導体メモリ等の記録媒体4とを信号線を介して接続
し、該計算機2が該記録媒体4から信号線を介してロー
ドしたプログラムにより、以下に示す処理を実行するよ
うにしてもよい。
As a modification of this embodiment and other embodiments described later, the computer 2 is connected to a recording medium 4 such as a magnetic disk device or a semiconductor memory via a signal line, and the computer 2 The following processing may be executed by a program loaded from the recording medium 4 via a signal line.

【0023】計算機2は、パラメータ抽出手段21と、
入力パラメータ記憶手段22と、組合せ検査手段23
と、組合せ記憶手段24と、コマンド実行手段25とを
含む。
The computer 2 comprises: a parameter extracting means 21;
Input parameter storage means 22 and combination inspection means 23
, A combination storage means 24, and a command execution means 25.

【0024】組合せ記憶手段24は、全てのパラメータ
の組合せパターンをビット列で予め記憶している。個々
のパラメータをビット列の各ビットに割り当て、対応す
るパラメータが指定されていることを示す場合にはビッ
トをON、指定されていない場合にはビットをOFFと
して全ての組合せパターンを記憶している。
The combination storage means 24 stores in advance a combination pattern of all parameters in a bit string. The individual parameters are assigned to each bit of the bit string, and if the corresponding parameter is designated, the bit is turned on, and if not, the bit is turned off, and all the combination patterns are stored.

【0025】パラメータ抽出手段21は、入力装置1に
入力されたコマンドに指定されたパラメータ列から空白
を区切りとして複数のパラメータを切り出し、入力パラ
メータ記憶手段22へ記憶する。
The parameter extracting means 21 cuts out a plurality of parameters from the parameter string specified in the command input to the input device 1 with a space as a delimiter, and stores them in the input parameter storing means 22.

【0026】入力パラメータ記憶手段22は、組合せ記
憶手段24と同様の形式をしている。パラメータ抽出手
段21で抽出された複数のパラメータのそれぞれに該当
するビットをONにしたビット列を記憶する。
The input parameter storage means 22 has the same format as the combination storage means 24. A bit string in which bits corresponding to each of the plurality of parameters extracted by the parameter extracting means 21 are turned on is stored.

【0027】構文検査手段23は、入力パラメータ記憶
手段22に記憶されたビット列と一致するビット列が組
合せ記憶手段24に記憶されているか否か検査する。一
致するビット列を発見した場合には、指定されたパラメ
ータの構文は正しいと判断し、コマンド実行手段25に
その旨を通知しコマンドを実行させる。また、一致する
ビット列を発見できなかった場合には指定されたパラメ
ータの構文が誤っていると判断し、出力装置3にその旨
を出力する。
The syntax checking means 23 checks whether a bit string that matches the bit string stored in the input parameter storage means 22 is stored in the combination storage means 24. If a matching bit string is found, it is determined that the syntax of the designated parameter is correct, and the command execution means 25 is notified of the fact and causes the command to be executed. If a matching bit string cannot be found, it is determined that the syntax of the specified parameter is incorrect, and that fact is output to the output device 3.

【0028】次に、図1〜図5を参照して本発明の第1
の実施の形態の全体の動作について詳細に説明する。
Next, a first embodiment of the present invention will be described with reference to FIGS.
The overall operation of the embodiment will be described in detail.

【0029】パラメータ抽出手段21は、入力装置1に
パラメータ列を含むコマンドが入力されると、まずそれ
らからコマンドを取り除きパラメータ列を生成し、該パ
ラメータ列から空白を区切りとして文字列を抽出する
(図2のステップA1)。次にパラメータ抽出手段21
は、その切り出した文字列がパラメータとして正しいか
どうかをパラメータ名および指定値を検査することによ
り判定する(ステップA2)。パラメータとして正しい
と判定した場合には、該文字列(パラメータ)を入力パ
ラメータ記憶手段22に記憶する。入力パラメータ記憶
手段22はビット列の形式をしているので、パラメータ
の記憶は、該パラメータに対応するビットをONにする
ことにより行う(ステップA3)。一方、ステップA2
においてパラメータとして正しくないと判定した場合に
は、その旨を示すメッセージを出力装置3に表示する
(ステップA8)。
When a command including a parameter string is input to the input device 1, the parameter extracting means 21 first removes the command from the command string, generates a parameter string, and extracts a character string from the parameter string by separating spaces ( Step A1 in FIG. 2). Next, the parameter extracting means 21
Determines whether the extracted character string is correct as a parameter by inspecting the parameter name and the designated value (step A2). If it is determined that the character string is correct, the character string (parameter) is stored in the input parameter storage unit 22. Since the input parameter storage means 22 is in the form of a bit string, the parameter is stored by turning on the bit corresponding to the parameter (step A3). On the other hand, step A2
If it is determined that the parameter is not correct, a message to that effect is displayed on the output device 3 (step A8).

【0030】パラメータ抽出手段21は、同様にして、
パラメータ列からすべてのパラメータを抽出し、入力パ
ラメータ記憶手段22に記憶する(ステップA4)。ス
テップA4において、すべてのパラメータの抽出が完了
すると、入力パラメータ抽出手段22は、抽出したパラ
メータに対応するビットがONに、それ以外のビットは
OFFの状態となる。
The parameter extracting means 21 similarly performs
All parameters are extracted from the parameter sequence and stored in the input parameter storage means 22 (step A4). In step A4, when all the parameters have been extracted, the input parameter extracting unit 22 turns on the bits corresponding to the extracted parameters and turns off the other bits.

【0031】次に、組合せ検査手段23は、組合せ記憶
手段24に予め記憶されている複数のビット列の中に、
入力パラメータ記憶手段22に記憶されたビット列と一
致するものがあるかどうか調べる(ステップA5および
A6)。一致するビット列があった場合には、指定され
たパラメータ列の構文は正しいと判断し(ステップA
7)、コマンド実行手段3へその旨を通知しコマンドを
実行させる。一方、一致するビット列がなかった場合に
は、指定されたパラメータ列の構文は誤っていると判断
し、その旨を示すメッセージを出力装置3に出力する
(ステップA8)。
Next, the combination checking means 23 includes a plurality of bit strings stored in the combination storage means 24 in advance.
It is checked whether there is a bit string that matches the bit string stored in the input parameter storage means 22 (steps A5 and A6). If there is a matching bit string, it is determined that the syntax of the designated parameter string is correct (step A).
7), and notifies the command execution means 3 to execute the command. On the other hand, if there is no matching bit string, it is determined that the syntax of the designated parameter string is incorrect, and a message indicating this is output to the output device 3 (step A8).

【0032】次に、具体例を用いて説明する。Next, a specific example will be described.

【0033】例えば、図3に示すような構文を持つコマ
ンドがあるとすると、組合せ記憶手段24には予め図4
に示すビット列が記憶される。
For example, if there is a command having a syntax as shown in FIG.
Are stored.

【0034】入力装置1から図3に示すコマンドが入力
されると、パラメータ抽出手段21は、それらからパラ
メータ列”A B D”を抽出し、さらに空白を区切り
として該パラメータ列からパラメータ”A”を切り出し
(ステップA1)、パラメータとして正しいことを確認
し、入力パラメータ記憶手段22の”A”に対応するビ
ットをONにする。(ステップA2およびA3)。同様
に、パラメータ列からパラメータ”B”と”D”を切り
出し、パラメータとして正しいことを確認し、入力パラ
メータ記憶手段22の対応するビットをONにする。パ
ラメータ列からすべてのパラメータの抽出が完了する
と、入力パラメータ記憶手段22は図5のようになる
(ステップA4)。
When the command shown in FIG. 3 is input from the input device 1, the parameter extracting means 21 extracts the parameter string "ABD" therefrom, and further separates the parameter "A" from the parameter string by separating spaces. (Step A1), confirm that the parameter is correct, and turn on the bit corresponding to "A" in the input parameter storage means 22. (Steps A2 and A3). Similarly, the parameters "B" and "D" are cut out from the parameter string, and the parameters are confirmed to be correct, and the corresponding bit of the input parameter storage means 22 is turned ON. When the extraction of all parameters from the parameter sequence is completed, the input parameter storage means 22 becomes as shown in FIG. 5 (step A4).

【0035】組合せ検査手段23は、入力パラメータ記
憶手段22に記憶した”A”、”B”、”D”のビット
がONになっているビット列と一致するビット列が組合
せ記憶手段24に記憶されているか検索する(ステップ
A5およびA6)。この場合、組合せ記憶手段24の中
には、”A”、”B”、”D”のビットがONになって
いるビット列が登録されているので、検索は成功する
(ステップA7)。
The combination checking means 23 stores a bit string that matches the bit string in which the “A”, “B”, and “D” bits stored in the input parameter storage means 22 are ON in the combination storage means 24. Search (steps A5 and A6). In this case, since the bit string in which the bits "A", "B", and "D" are ON is registered in the combination storage means 24, the search succeeds (step A7).

【0036】本発明の第1の実施の形態においては、予
め設定したパラメータ列に対応するビット列に、入力さ
れたパラメータ列に対応するビット列が一致するかを検
査するという極めて単純な処理により効率良くコマンド
パラメータ構文を検査することができるという効果を有
している。
In the first embodiment of the present invention, an extremely simple process of checking whether a bit sequence corresponding to an input parameter sequence matches a bit sequence corresponding to a preset parameter sequence is efficiently performed by an extremely simple process. This has the effect that the command parameter syntax can be checked.

【0037】また、パラメータが追加されたりコマンド
パラメータ構文が修正されても、改造すべき箇所は組合
せ記憶手段24に閉じ、パラメータ抽出手段21や組合
せ検査手段23の改造は不要なため、コマンドパラメー
タの検査処理を複雑にせずに、品質良く行うことができ
る効果を有している。
Even if a parameter is added or the command parameter syntax is modified, the part to be remodeled is closed in the combination storage means 24 and the parameter extraction means 21 and the combination inspection means 23 do not need to be remodeled. This has the effect that the inspection process can be performed with high quality without complicating the inspection process.

【0038】次に、本発明の第2の実施の形態について
図面を参照して詳細に説明する。
Next, a second embodiment of the present invention will be described in detail with reference to the drawings.

【0039】図6を参照すると、本発明の第2の実施の
形態は、計算機5が、図1に示された第1の実施の形態
の計算機2の組合せ検査手段23の代わりに組合せ検査
手段26、組合せ記憶手段24の代わりに組合せ記憶
手段27を備えて構成されている。
Referring to FIG. 6, according to a second embodiment of the present invention, the computer 5 is replaced with a combination checking means instead of the combination checking means 23 of the computer 2 of the first embodiment shown in FIG. 26, a combination storage means 27 is provided instead of the combination storage means 24.

【0040】組合せ記憶手段27は、各パラメータご
とにそのパラメータの属性(必須/省略可能)とパラメ
ータに対応するビットをONにしたビット列とともに記
憶されており、各ビット列間は構文を示すように連結さ
れている。図3の構文に対応する組合せ記憶手段27
を図8に示す。
The combination storage means 27 stores, for each parameter, an attribute of the parameter (indispensable / can be omitted) and a bit string in which a bit corresponding to the parameter is turned ON, and the bit strings are connected so as to indicate a syntax. Have been. Combination storage means 27 corresponding to the syntax of FIG.
Is shown in FIG.

【0041】組合せ検査手段26は、組合せ記憶手段
27の中に入力パラメータ記憶手段22に記憶されて
いるビット列と同じ構成となる連結ビット列があるか否
か検索する。
The combination checking means 26 searches the combination storage means 27 for a connected bit string having the same configuration as the bit string stored in the input parameter storage means 22.

【0042】次に、図6〜図10を参照して本発明の第
2の実施の形態の動作を図面を参照して詳細に説明す
る。
Next, the operation of the second embodiment of the present invention will be described in detail with reference to FIGS.

【0043】図7のステップA1−A4で示される本実
施の形態におけるパラメータ抽出手段21およびパラメ
ータ記憶手段22の動作は、図1に示された第1の実施
の形態の各手段21および22の動作と同一であるため
説明を省略する。第1の実施の形態では、組合せ記憶手
段24はパラメータの組合せを示したビット列を予め記
憶していたため、組合せ検査手段23は、入力パラメー
タ記憶手段22に記憶したビット列で組合せ記憶手段2
4を検索した。
The operation of the parameter extracting means 21 and the parameter storing means 22 in the present embodiment shown in steps A1-A4 in FIG. 7 is the same as that of the means 21 and 22 in the first embodiment shown in FIG. Since the operation is the same as the operation, the description is omitted. In the first embodiment, since the combination storage means 24 previously stores a bit string indicating a combination of parameters, the combination checking means 23 uses the bit string stored in the input parameter storage means 22 to store the combination storage means 2.
4 was searched.

【0044】本実施の形態の組合せ記憶手段27は、
ビット列を組み合わせてパラメータの構文を表現する構
成となっている。そのため、組合せ検査手段26は、
組合せ記憶手段27内の連結ビット列を順次検査す
る。
The combination storage means 27 of the present embodiment
It is configured to express the syntax of a parameter by combining bit strings. Therefore, the combination inspection means 26
The connected bit strings in the combination storage means 27 are sequentially inspected.

【0045】すべてのパラメータをビット化して入力パ
ラメータ記憶手段22に記憶したら、組合せ検査手段
26は、組合せ記憶手段27の最初のビット列でON
になっているビットが入力パラメータ記憶手段22でも
ONになっているか検査する。すなわち、組合せ記憶手
段27の最初のビット列と入力パラメータ記憶手段2
2のビットANDをとる(ステップB1)。組合せ検査
手段26は、ビットANDの結果が0でなかった場
合、すなわち対象となるパラメータが指定されていた場
合は、組合せ記憶手段27の次に連結されているビッ
ト列に対して同様の処理を行う(ステップB4)。一
方、ビットANDの結果が0の場合、すなわち対象とな
るパラメータが指定されていなかった場合は、そのパラ
メータの属性を調べる(ステップB3)。組合せ検査手
段26は、組合せ記憶手段27に記憶されているパ
ラメータの属性が”省略可能”であった場合は、そのパ
ラメータは省略されても良いパラメータであるため次に
連結されているビット列の検査を行う(ステップB
4)。逆に、組合せ記憶手段27に記憶されているパ
ラメータの属性が”必須”であった場合は、そのパラメ
ータは省略不可パラメータであるにもかかわらず指定さ
れていないため、指定されたパラメータ列の構文が誤っ
ていると判断し、その旨を示すメッセージを出力装置3
に出力する(ステップA8)。
When all the parameters are converted into bits and stored in the input parameter storage unit 22, the combination checking unit 26 turns on the first bit string of the combination storage unit 27.
It is checked whether or not the bit indicated by is turned on in the input parameter storage means 22 as well. That is, the first bit string of the combination storage means 27 and the input parameter storage means 2
The bit AND of 2 is taken (step B1). When the result of the bit AND is not 0, that is, when the target parameter is specified, the combination checking unit 26 performs the same processing on the bit string connected next to the combination storage unit 27. (Step B4). On the other hand, if the result of the bit AND is 0, that is, if the target parameter is not specified, the attribute of the parameter is checked (step B3). When the attribute of the parameter stored in the combination storage unit 27 is “can be omitted”, the combination checking unit 26 checks the bit string connected next because the parameter may be omitted. (Step B)
4). Conversely, if the attribute of the parameter stored in the combination storage means 27 is "essential", the parameter is not specified even though it is a parameter that cannot be omitted. Is determined to be incorrect, and a message to that effect is output to the output device 3.
(Step A8).

【0046】組合せ検査手段26は、組合せ記憶手段
27に記憶されているビット列に連結されているビッ
ト列がなくなった場合には、入力パラメータ記憶手段2
2にONと記憶されているビット列がすべてチェックさ
れたか検査する(ステップB6)。全てチェックされて
いた場合は、指定されたパラメータ列の構文が正しいと
判断し(ステップA7)、その旨をコマンド実行手段2
5へ通知してコマンドを実行させる。一方、チェックさ
れていないビット列が残っている場合は、指定されたパ
ラメータ列の構文が誤っていると判断し、その旨を示す
メッセージを出力装置3に出力する(ステップA8)。
When there is no longer any bit string connected to the bit string stored in the combination storage means 27, the combination inspection means 26
It is checked whether all the bit strings stored as ON in 2 have been checked (step B6). If all have been checked, it is determined that the syntax of the specified parameter string is correct (step A7), and the command execution means 2
5 to execute the command. On the other hand, if there is any unchecked bit string, it is determined that the syntax of the specified parameter string is incorrect, and a message indicating that is output to the output device 3 (step A8).

【0047】次に、具体例について説明する。Next, a specific example will be described.

【0048】例えば、図3に示すような構文を持つコマ
ンドがあるとすると、組合せ記憶手段26には予め図
8に示すビット列が記憶される。
For example, assuming that there is a command having a syntax as shown in FIG. 3, a bit string shown in FIG.

【0049】入力装置1から入力されたコマンドから切
り出したパラメータ列が”A B”であったとすると、
ステップA4が完了した時点では、入力パラメータ記憶
手段22には図9に示すビット列が記憶される。
If the parameter string cut out from the command input from the input device 1 is "AB",
When step A4 is completed, the bit string shown in FIG. 9 is stored in the input parameter storage unit 22.

【0050】組合せ検査手段26は、組合せ記憶手段
27の最初のビット列でONになっている”A”のビ
ットが入力パラメータ記憶手段22に記憶されているビ
ット列でもONになっているか検査する(ステップB
1)。組合せ検査手段26は、入力パラメータ記憶手
段22に記憶されているビット列の”A”のビットがO
Nになっていることを確認すると、組合せ記憶手段2
7内で次に連結されているビット列でONになってい
る”B”のビットが入力パラメータ記憶手段22に記憶
されているビット列でもONになっているか検査する
(ステップB4、B1)。組合せ検査手段26は、入
力パラメータ記憶手段22に記憶されているビット列
の”B”のビットがONになっていることを確認する
と、組合せ記憶手段27内で次に連結されているビッ
ト列でONになっている”D”のビットが入力パラメー
タ記憶手段22に記憶されているビット列でもONにな
っているか検査する(ステップB4、B1)。組合せ検
査手段26は、入力パラメータ記憶手段22に記憶さ
れているビット列の”D”のビットがONになっていな
いことを確認すると、パラメータ”D”の属性を確認す
る(ステップB3)。パラメータ”D”の属性は”省略
可能”であり、入力パラメータ記憶手段22に記憶され
ているビット列の”D”のビットはONになっていなく
ても良い。組合せ検査手段26は、組合せ記憶手段
27に”D”のビットがONのビット列に連結されてい
るビット列がないことを確認すると(ステップB5)、
入力パラメータ記憶手段22に記憶されているビット列
でONと記憶されているビット”A”と”B”とがすべ
てチェックされたか検査し(ステップB6)、チェック
完了しているため、指定されたパラメータ列の構文は正
しいと判断し(ステップA7)、その旨をコマンド実行
手段25へ通知してコマンドを実行させる。
The combination checking means 26 checks whether the "A" bit turned on in the first bit string of the combination storage means 27 is also turned on in the bit string stored in the input parameter storage means 22 (step). B
1). The combination checking unit 26 determines that the bit “A” of the bit string stored in the input parameter storage unit 22 is O
When it is confirmed that the number is N, the combination storage means 2
It is checked whether the bit "B" which is turned on in the bit string connected next in 7 is also turned on in the bit string stored in the input parameter storage means 22 (steps B4 and B1). When the combination checking unit 26 confirms that the bit “B” of the bit string stored in the input parameter storage unit 22 is ON, the combination inspection unit 26 turns ON the bit string connected next in the combination storage unit 27. It is checked whether the "D" bit is ON in the bit string stored in the input parameter storage means 22 (steps B4 and B1). When checking that the bit “D” of the bit string stored in the input parameter storage unit 22 is not ON, the combination checking unit 26 checks the attribute of the parameter “D” (step B3). The attribute of the parameter “D” is “can be omitted”, and the “D” bit of the bit string stored in the input parameter storage unit 22 does not have to be ON. When the combination checking unit 26 confirms that there is no bit string in which the bit of “D” is connected to the bit string of ON in the combination storage unit 27 (step B5),
It is checked whether all the bits "A" and "B" stored as ON in the bit string stored in the input parameter storage means 22 have been checked (step B6). It is determined that the syntax of the column is correct (step A7), and the fact is notified to the command execution means 25 to execute the command.

【0051】本発明の第2の実施の形態においては、組
合せ記憶手段27に記憶する各ビット列に対応するパ
ラメータの属性(必須/省略可能)を一緒に記憶し、連
結されているビット列を順次検査していくことによりパ
ラメータ列の構文検査を行う。このため、予めすべての
ビット列の組合せを記憶しておく第1の実施の形態より
も記憶容量を削減できるという新たな効果を有する。こ
の効果は、パラメータ追加時に顕著に現れる。図3に示
すコマンドに対して省略可能パラメータを1つ追加した
場合の組合せ記憶手段24、組合せ記憶手段27を図
10に示す。この場合、組合せ記憶手段24の記憶容量
はパラメータを追加する前の2倍になるが、組合せ記憶
手段27の場合は、パラメータ1つ分の容量増加です
む。
In the second embodiment of the present invention, the attribute (indispensable / omissible) of the parameter corresponding to each bit string stored in the combination storage means 27 is stored together, and the connected bit strings are sequentially inspected. By doing so, the syntax of the parameter string is checked. Therefore, there is a new effect that the storage capacity can be reduced as compared with the first embodiment in which all combinations of bit strings are stored in advance. This effect is prominent when parameters are added. FIG. 10 shows the combination storage means 24 and the combination storage means 27 when one omissible parameter is added to the command shown in FIG. In this case, the storage capacity of the combination storage means 24 is doubled before adding the parameter, but in the case of the combination storage means 27, the capacity is increased by one parameter.

【0052】次に、本発明の第3の実施の形態について
図面を参照して詳細に説明する。図11を参照すると、
本発明の第3の実施の形態は、計算機6が、図6に示さ
れた第2の実施の形態の計算機5の組合せ検査手段2
6の代わりに組合せ検査手段28、組合せ記憶手段
27の代わりに組合せ記憶手段29を備えて構成され
ている。
Next, a third embodiment of the present invention will be described in detail with reference to the drawings. Referring to FIG.
In the third embodiment of the present invention, the computer 6 is a combination checking unit 2 of the computer 5 of the second embodiment shown in FIG.
6 is provided with a combination inspection unit 28 instead of the combination storage unit 27 and a combination storage unit 29 instead of the combination storage unit 27.

【0053】組合せ記憶手段29は、複数のノードと
複数のシンタックスビット列テーブルから構成されてお
り、各ノードはシンタックスビット列テーブルへの連結
と、次の構文解析対象のパラメータを示すノードへの連
結と、構文の支流を示すノードへの連結と、ノードに連
結されているシンタックスビット列テーブルの属性(必
須/省略可能)が記憶されており、各ノード間は構文を
示すように連結されている。組合せ記憶手段29の例
を図13に示す。
The combination storage means 29 comprises a plurality of nodes and a plurality of syntax bit string tables. Each node is connected to the syntax bit string table and connected to a node indicating the next parameter to be parsed. And a link to a node indicating a branch of the syntax and an attribute (required / omissible) of a syntax bit string table linked to the node are stored, and each node is linked to indicate a syntax. . FIG. 13 shows an example of the combination storage means 29.

【0054】組合せ検査手段28は、組合せ記憶手段
29の中に入力パラメータ記憶手段22に記憶されて
いるビット列と同じ構成となる連結ビット列があるか否
か検索する。
The combination checking means 28 searches whether or not there is a connected bit string having the same configuration as the bit string stored in the input parameter storage means 22 in the combination storage means 29.

【0055】次に、図11〜図14を参照して本発明の
第3の実施の形態の動作を図面を参照して詳細に説明す
る。
Next, the operation of the third embodiment of the present invention will be described in detail with reference to FIGS.

【0056】図12のステップA1−A4で示される本
発明の第3の実施の形態におけるパラメータ抽出手段2
1およびパラメータ記憶手段22の動作は、図1に示さ
れた第1の実施の形態の各手段21および22の動作と
同一であるため説明を省略する。第2の実施の形態で
は、組合せ記憶手段27はビット列を組み合わせてパ
ラメータの構文を記憶していたため、組合せ検査手段
26は、組合せ記憶手段27内の連結ビット列を順次
検査した。
The parameter extracting means 2 according to the third embodiment of the present invention, shown by steps A1-A4 in FIG.
1 and the operation of the parameter storage means 22 are the same as those of the respective means 21 and 22 of the first embodiment shown in FIG. In the second embodiment, since the combination storage unit 27 stores the syntax of the parameter by combining the bit strings, the combination check unit 26 sequentially checks the connected bit strings in the combination storage unit 27.

【0057】本発明の第3の実施の形態の組合せ記憶手
段29は、複数のノードと複数のシンタックスビット
列テーブルによってパラメータの構文を表現する構成と
なっている。そのため、組合せ検査手段28は、組合
せ記憶手段29内のノードに連結されているシンタッ
クスビット列テーブルを順次検査する。
The combination storage means 29 according to the third embodiment of the present invention is configured to express the syntax of a parameter by a plurality of nodes and a plurality of syntax bit string tables. Therefore, the combination checking unit 28 sequentially checks the syntax bit string table connected to the node in the combination storage unit 29.

【0058】すべてのパラメータをビット化して入力パ
ラメータ記憶手段22に記憶したら、組合せ検査手段
28は、組合せ記憶手段29の最初のノードに連結さ
れているシンタックスビット列テーブルのビット列でO
Nになっているビットが入力パラメータ記憶手段22で
もONになっているか検査する。すなわち、組合せ記憶
手段29の最初のノードに連結されているシンタック
スビット列テーブルと入力パラメータ記憶手段22のビ
ットANDをとる(ステップC1)。組合せ検査手段
28は、ビットANDの結果が0でなかった場合、すな
わち対象となるパラメータが指定されていた場合は、組
合せ記憶手段29の次に連結されているノードに対し
て同様の処理を行う(ステップC4)。一方、ビットA
NDの結果が0の場合、すなわち対象となるパラメータ
が指定されていなかった場合は、そのパラメータの属性
を調べる(ステップC3)。組合せ検査手段28は、
組合せ記憶手段29に記憶されているパラメータの属
性が”省略可能”であった場合は、そのパラメータは省
略されても良いパラメータであるため次に連結されてい
るノードの検査を行う(ステップC4)。逆に、組合せ
記憶手段29に記憶されているパラメータの属性が”
必須”であった場合は、対象としているノードに支流ノ
ードへの連結があるか検査を行う(ステップC8)。
After all the parameters have been converted into bits and stored in the input parameter storage means 22, the combination checking means 28 uses the bit string of the syntax bit string table connected to the first node of the combination storage means 29 to generate O.
It is checked whether the bit set to N is also turned on in the input parameter storage means 22. That is, the syntax bit string table connected to the first node of the combination storage unit 29 and the bit AND of the input parameter storage unit 22 are obtained (step C1). When the result of the bit AND is not 0, that is, when the target parameter is specified, the combination checking unit 28 performs the same processing on the node connected next to the combination storage unit 29. (Step C4). On the other hand, bit A
If the result of the ND is 0, that is, if the target parameter is not specified, the attribute of the parameter is checked (step C3). The combination inspection means 28
If the attribute of the parameter stored in the combination storage means 29 is "can be omitted", the parameter is a parameter that may be omitted, and the next connected node is checked (step C4). . Conversely, the attribute of the parameter stored in the combination storage means 29 is "
If "required", it is checked whether the target node has a connection to the tributary node (step C8).

【0059】組合せ検査手段28は、組合せ記憶手段
29に記憶されている次の構文解析対象のパラメータ
を示すノードがなくなった場合には、入力パラメータ記
憶手段22にONと記憶されているビット列がすべてチ
ェックされたか検査する(ステップC6)。全てチェッ
クされていた場合は、指定されたパラメータ列の構文が
正しいと判断し(ステップA7)、その旨をコマンド実
行手段25へ通知してコマンドを実行させる。一方、チ
ェックされていないビット列が残っている場合は、今ま
で辿ってきたノードを戻り(ステップC7)、支流ノー
ドへの連結があるか検査する(ステップC8)。戻った
ノードに支流ノードへの連結があったら支流ノードに連
結されているシンタックスビット列テーブルの検査を行
う(ステップC1)。戻ったノードに支流ノードへの連
結がなかった場合、現在、対象としているノードが検査
を開始した最初のノードであるか検査する(ステップC
9)。対象としているノードが検査を開始した最初のノ
ードでない場合は、今まで辿ってきたノードを戻り(ス
テップC7)、再度支流ノードに体する検査を行う。検
査を開始した最初のノードである場合は、指定されたパ
ラメータ列の構文が誤っていると判断し、その旨を示す
メッセージを出力装置3に出力する(ステップA8)。
If there is no longer any node indicating the next parameter to be analyzed in the combination storage means 29 stored in the combination storage means 29, the combination checking means 28 checks all the bit strings stored in the input parameter storage means 22 as ON. It is checked whether it has been checked (step C6). If all are checked, it is determined that the syntax of the designated parameter string is correct (step A7), and the fact is notified to the command executing means 25 to execute the command. On the other hand, if any unchecked bit string remains, the node that has been traced is returned (step C7), and it is checked whether there is a connection to the tributary node (step C8). When the returned node is connected to the tributary node, the syntax bit string table connected to the tributary node is checked (step C1). If the returned node has no connection to the tributary node, it is checked whether the current target node is the first node that has started checking (step C).
9). If the target node is not the first node that has started the inspection, the node that has been traced so far is returned (step C7), and the inspection is performed again to make it a tributary node. If it is the first node that has started the check, it is determined that the syntax of the specified parameter string is incorrect, and a message indicating this is output to the output device 3 (step A8).

【0060】次に、具体例について説明する。Next, a specific example will be described.

【0061】例えば、図13に示すような構文と組合せ
記憶手段29を持つコマンドの場合を考える。
For example, consider the case of a command having a syntax and combination storage means 29 as shown in FIG.

【0062】入力装置1から入力されたコマンドから切
り出したパラメータ列が”A ED”であったとする
と、ステップA4が完了した時点では、入力パラメータ
記憶手段22には図14に示すビット列が記憶される。
Assuming that the parameter sequence cut out from the command input from the input device 1 is “AED”, the bit sequence shown in FIG. 14 is stored in the input parameter storage means 22 when step A4 is completed. .

【0063】組合せ検査手段28は、組合せ記憶手段
29の最初のノードに連結されているシンタックス
ビット列テーブルでONになっている”A”のビットが
入力パラメータ記憶手段22に記憶されているビット列
でもONになっているか検査する(ステップC1)。組
合せ検査手段28は、入力パラメータ記憶手段22に
記憶されているビット列の”A”のビットがONになっ
ていることを確認すると、組合せ記憶手段29内で次
に連結されているノードのシンタックスビット列テー
ブルでONになっている”B”のビットが入力パラメー
タ記憶手段22に記憶されているビット列でもONにな
っているか検査する。組合せ検査手段28は、入力パ
ラメータ記憶手段22に記憶されているビット列の”
B”のビットがONになっていないため、シンタックス
ビット列テーブルの次のビット列でONになっている”
C”のビットが入力パラメータ記憶手段22に記憶され
ているビット列でもONになっているか検査する(ステ
ップC4、C1)。組合せ検査手段28は、入力パラ
メータ記憶手段22に記憶されているビット列の”C”
のビットがONになっていないため、ノードの属性を確
認する(ステップC3)。ノードの属性は”必須”で
あるため、現在検査対象となっているノードに支流ノ
ードがあるか検査する(ステップC8)。ノードには
支流ノードへの連結があるため検査対象ノードを支流ノ
ードとして、ノードに連結されているシンタックスビ
ット列テーブルでONになっている”D”のビットが入
力パラメータ記憶手段22に記憶されているビット列で
もONになっているか検査する(ステップC1)。組合
せ検査手段28は、入力パラメータ記憶手段22に記
憶されているビット列の”D”のビットがONになって
いることを確認すると、組合せ記憶手段29内で次に
連結されているノードのシンタックスビット列テーブ
ルでONになっている”E”のビットが入力パラメータ
記憶手段22に記憶されているビット列でもONになっ
ているか検査する。組合せ検査手段28は、入力パラ
メータ記憶手段22に記憶されているビット列の”E”
のビットがONになっていることを確認し、組合せ記憶
手段29に次に連結されているノードがないことを確
認すると(ステップC5)、入力パラメータ記憶手段2
2に記憶されているビット列でONと記憶されているビ
ット”A”と”E”と”D”がすべてチェックされたか
検査する(ステップC6)。チェックがすべて完了して
いるため、指定されたパラメータ列の構文は正しいと判
断し(ステップA7)、その旨をコマンド実行手段25
へ通知してコマンドを実行させる。
The combination checking means 28 determines whether the "A" bit which is ON in the syntax bit string table connected to the first node of the combination storage means 29 is stored in the input parameter storage means 22. It is checked whether it is ON (step C1). When the combination checking unit 28 confirms that the bit “A” of the bit string stored in the input parameter storage unit 22 is ON, the syntax of the next connected node in the combination storage unit 29 is checked. It is checked whether the “B” bit that is ON in the bit string table is also ON in the bit string stored in the input parameter storage unit 22. The combination checking unit 28 checks the bit string stored in the input parameter storage unit 22 for “
Since the bit of B "is not turned on, it is turned on in the next bit string of the syntax bit string table."
It is checked whether the bit "C" is also ON in the bit string stored in the input parameter storage means 22 (steps C4 and C1). C "
Is not ON, the attribute of the node is checked (step C3). Since the attribute of the node is “essential”, it is checked whether or not the node currently being inspected has a tributary node (step C8). Since the node has a connection to the tributary node, the bit of “D” that is ON in the syntax bit string table connected to the node is stored in the input parameter storage unit 22 with the inspection target node as the tributary node. It is checked whether or not the bit string is ON (step C1). When the combination checking unit 28 confirms that the bit “D” of the bit string stored in the input parameter storage unit 22 is ON, the syntax of the next connected node in the combination storage unit 29 is checked. It is checked whether the “E” bit that is ON in the bit string table is also ON in the bit string stored in the input parameter storage unit 22. The combination checking means 28 outputs the bit string “E” stored in the input parameter storage means 22.
Is turned on, and when it is confirmed that there is no next connected node in the combination storage means 29 (step C5), the input parameter storage means 2
It is checked whether all the bits "A", "E" and "D" stored as ON in the bit string stored in 2 have been checked (step C6). Since all the checks have been completed, it is determined that the syntax of the specified parameter string is correct (step A7), and the command execution means 25
To execute the command.

【0064】本発明の第3の実施の形態においては、組
合せ記憶手段29へはあらかじめ、各シンタックスビ
ット列テーブルに対応するノードを設けて、ノードとシ
ンタックスビット列テーブルとの連結し、さらに各ノー
ド間を構文を示すように連結しておくことにより、ノー
ドに連結されているシンタックスビット列テーブルを順
次検査していくことによりパラメータ列の構文検査を行
う。シンタックスビット列テーブルにノードを設け、ノ
ードからシンタックスビット列テーブルへの連結を持つ
ため、部分的に同一の構文パラメータ構成がある場合に
はシンタックスビット列テーブルを1つ用意しておき、
各ノードからはこのシンタックステーブルへの連結を持
つだけでよく、記憶容量を削減できるという新たな効果
を有する。この効果は、構文が複雑になった場合に顕著
に現れる。
In the third embodiment of the present invention, a node corresponding to each syntax bit string table is provided in advance in the combination storage means 29, and the node is connected to the syntax bit string table. By connecting the spaces so as to indicate the syntax, the syntax check of the parameter string is performed by sequentially checking the syntax bit string table linked to the node. A node is provided in the syntax bit string table, and since there is a connection from the node to the syntax bit string table, if there is a partially identical syntax parameter configuration, one syntax bit string table is prepared.
It is only necessary for each node to have a connection to this syntax table, and there is a new effect that the storage capacity can be reduced. This effect is particularly noticeable when the syntax is complicated.

【0065】[0065]

【発明の効果】以上説明したように、本発明は、コマン
ドパラメータの検査処理を効率良く行うことができ、コ
マンドパラメータの追加や修正があっても、該コマンド
パラメータの検査処理を複雑にせずに、品質良く行うこ
とができる効果を有している。
As described above, according to the present invention, the inspection processing of the command parameters can be performed efficiently, and the inspection processing of the command parameters is not complicated even if the command parameters are added or corrected. Has the effect of being able to perform with good quality.

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

【図1】図1は、本発明の第1の実施の形態を示すブロ
ック図である。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】図2は、本発明の第1の実施の形態の動作を示
すフローチャートである。
FIG. 2 is a flowchart showing an operation of the first exemplary embodiment of the present invention.

【図3】図3は、本発明の第1の実施の形態におけるコ
マンド構文の例を示す図である。
FIG. 3 is a diagram illustrating an example of a command syntax according to the first embodiment of the present invention.

【図4】図4は、本発明の第1の実施の形態における組
み合わせ記憶手段24の構造の例を示す図である。
FIG. 4 is a diagram illustrating an example of a structure of a combination storage unit 24 according to the first embodiment of the present invention.

【図5】図5は、本発明の第1の実施の形態における組
合せ検査手段23の動作の例を示す図である。
FIG. 5 is a diagram illustrating an example of an operation of the combination inspection unit 23 according to the first embodiment of the present invention.

【図6】図6は、本発明の他の実施の形態を示すブロッ
ク図である。
FIG. 6 is a block diagram showing another embodiment of the present invention.

【図7】図7は、本発明の他の実施の形態の動作を示す
フローチャートである。
FIG. 7 is a flowchart showing an operation of another embodiment of the present invention.

【図8】図8は、本発明の他の実施の形態における組合
せ記憶手段27の構造の例を示す図である。
FIG. 8 is a diagram showing an example of a structure of a combination storage unit 27 according to another embodiment of the present invention.

【図9】図9は、本発明の他の実施の形態における組合
せ検査手段26の動作の例を示す図である。
FIG. 9 is a diagram showing an example of the operation of the combination inspection means 26 according to another embodiment of the present invention.

【図10】図10は、本発明の他の実施の形態の効果を
説明するための図である。
FIG. 10 is a diagram for explaining an effect of another embodiment of the present invention.

【図11】図11は、本発明の第3の実施の形態を示す
ブロック図である。
FIG. 11 is a block diagram showing a third embodiment of the present invention.

【図12】図12は、本発明の第3の実施の形態の動作
を示すフローチャートである。
FIG. 12 is a flowchart showing an operation of the third exemplary embodiment of the present invention.

【図13】図13は、本発明の第3の実施の形態におけ
る組合せ記憶手段29の構造の例を示す図である。
FIG. 13 is a diagram illustrating an example of a structure of a combination storage unit 29 according to the third embodiment of the present invention.

【図14】図14は、本発明の第3の実施の形態におけ
る組合せ検査手段28の動作の例を示す図である。
FIG. 14 is a diagram illustrating an example of an operation of a combination inspection unit according to the third embodiment of the present invention.

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

1 入力装置 2 計算機 3 出力装置 4 記録媒体 5 計算機 21 パラメータ抽出手段 22 入力パラメータ記憶手段 23 組合せ検査手段 24 組合せ記憶手段 25 コマンド実行手段 26 組合せ検査手段 27 組合せ記憶手段 28 組合せ検査手段 29 組合せ記憶手段 REFERENCE SIGNS LIST 1 input device 2 computer 3 output device 4 recording medium 5 computer 21 parameter extraction means 22 input parameter storage means 23 combination inspection means 24 combination storage means 25 command execution means 26 combination inspection means 27 combination storage means 28 combination inspection means 29 combination storage means

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 コマンドに指定されるパラメータ列に含
まれる複数のパラメータのすべての組合せを予め記憶す
る組合せ記憶手段と、 入力装置から入力されたコマンドに指定されたパラメー
タ列に含まれる複数のパラメータの組合せが前記組合せ
記憶手段に記憶されているか判定することにより該パラ
メータ列の構文の正当性を検査する組合せ検査手段とを
備えたことを特徴とするコマンドパラメータ構文検査装
置。
A combination storage means for storing in advance all combinations of a plurality of parameters included in a parameter string specified in a command, and a plurality of parameters included in a parameter string specified in a command input from an input device. And a combination checking means for checking whether the syntax of the parameter string is correct by judging whether the combination is stored in the combination storage means.
【請求項2】 コマンドに指定されるパラメータ列に含
まれる複数のパラメータのそれぞれを異なるビットに割
り当て、個々のパラメータが存在する場合に対応するビ
ットをオンにするビット列で前記パラメータ列を表現し
て予め記憶する組合せ記憶手段と、 入力装置から入力されたコマンドに指定されたパラメー
タ列を抽出し、該パラメータ列を前記組合せ記憶手段に
記憶されたビット列と同様の形式のビット列に変換する
パラメータ抽出手段と、 前記パラメータ抽出手段が変換したビット列が、前記組
合せ記憶手段に記憶されているか判定することにより該
パラメータ列の構文の正当性を検査する組合せ検査手段
とを備えたことを特徴とするコマンドパラメータ構文検
査装置。
2. A method according to claim 1, wherein each of a plurality of parameters included in a parameter string specified in the command is assigned to a different bit, and the parameter string is represented by a bit string that turns on a corresponding bit when an individual parameter exists. Combination storage means for storing in advance, and parameter extraction means for extracting a parameter string specified in a command input from the input device and converting the parameter string into a bit string having the same format as the bit string stored in the combination storage means And a combination checking means for checking whether the bit string converted by the parameter extracting means is stored in the combination storing means to check the validity of the syntax of the parameter string. Syntax checker.
【請求項3】 コマンドに指定されるパラメータ列に含
まれる複数のパラメータのそれぞれを表現し、パラメー
タ毎に異なるビットがオンにされるビット列に、対応す
るパラメータの指定が必須か省略可能かを示す属性情報
を付して記憶する組合せ記憶手段と、 入力装置から入力されたコマンドに指定されたパラメー
タ列を抽出し、抽出したパラメータ列を、該パラメータ
列に含まれる複数のパラメータのそれぞれを異なるビッ
トに割り当て、個々のパラメータが存在する場合に対応
するビットをオンにするビット列に変換するパラメータ
抽出手段と、 前記組合せ記憶手段に記憶されたビット列の内、パラメ
ータの指定が必須である旨を示す前記属性情報が付され
たビット列と、前記パラメータ抽出手段が抽出したパラ
メータ列を変換したビット列とを比較することにより、
当該パラメータ列の構文の正当性を検査する組合せ検査
手段を備えたことを特徴とするコマンドパラメータ構文
検査装置。
3. Expressing each of a plurality of parameters included in a parameter string specified in a command, and indicating in a bit string in which different bits are turned on for each parameter whether the specification of the corresponding parameter is mandatory or omissible. Combination storage means for storing attribute information attached thereto; extracting a parameter sequence specified in a command input from the input device; converting the extracted parameter sequence into a plurality of bits each including a plurality of parameters included in the parameter sequence; Parameter extracting means for converting a bit string to turn on a corresponding bit when an individual parameter is present, and indicating that the designation of a parameter is indispensable among the bit strings stored in the combination storing means. A bit string to which attribute information has been added and a bit string obtained by converting the parameter string extracted by the parameter extracting means. By comparing the preparative column,
A command parameter syntax checking device comprising combination checking means for checking the validity of the syntax of the parameter string.
【請求項4】 前記組合せ記憶手段は、前記複数のビッ
ト列を階層的に連結して記憶し、 前記組合せ検査手段は、前記組合せ記憶手段に階層的に
連結して記憶された前記複数のビット列の内、パラメー
タの指定が必須である旨を示す前記属性情報が付された
ビット列を辿って、前記パラメータ抽出手段が抽出した
パラメータ列を変換したビット列と順次比較することに
より、当該パラメータ列の構文の正当性を検査すること
を特徴とする請求項3記載のコマンドパラメータ構文検
査装置。
4. The combination storage means stores the plurality of bit strings in a hierarchical connection, and the combination inspection means stores the plurality of bit strings in a hierarchical connection in the combination storage means. By tracing a bit string to which the attribute information indicating that parameter designation is essential is added, and sequentially comparing the parameter string extracted by the parameter extracting means with the converted bit string, the syntax of the parameter string is 4. The command parameter syntax checking device according to claim 3, wherein the command parameter syntax checking device checks validity.
【請求項5】 前記組合せ検査手段は、前記コマンドに
指定されたパラメータ列の構文の正当性を確認した場合
にはコマンド実行手段に該コマンドを実行させ、該パラ
メータ列の構文の正当性を確認できなかった場合には該
パラメータ列の構文が不正であった旨を出力装置へ出力
することを特徴とする請求項1〜4のいずれかに記載の
コマンドパラメータ構文検査装置。
5. The combination checking means, when confirming the validity of the syntax of the parameter string specified in the command, causes the command execution means to execute the command, and confirms the validity of the syntax of the parameter string. 5. The command parameter syntax checking device according to claim 1, wherein, when the command string syntax cannot be obtained, the fact that the syntax of the parameter string is invalid is output to an output device.
【請求項6】 入力装置から入力されたコマンドに指定
されたパラメータ列に含まれる複数のパラメータの組合
せが、コマンドに指定されるパラメータ列に含まれる複
数のパラメータのすべての組合せを予め記憶した組合せ
記憶手段に記憶されているか判定することにより該パラ
メータ列の構文の正当性を検査する組合せ検査ステップ
を含むことを特徴とするコマンドパラメータ構文検査方
法。
6. A combination of a plurality of parameters included in a parameter sequence specified in a command input from an input device, wherein all combinations of a plurality of parameters included in a parameter sequence specified in a command are stored in advance. A command parameter syntax checking method, comprising: a combination checking step of checking whether or not the parameter string is correct by determining whether the parameter string is stored in a storage unit.
【請求項7】 入力装置から入力されたコマンドに指定
されたパラメータ列を抽出し、該パラメータ列を、コマ
ンドに指定されるパラメータ列に含まれる複数のパラメ
ータのそれぞれを異なるビットに割り当て、個々のパラ
メータが存在する場合に対応するビットをオンにするビ
ット列で前記パラメータ列を表現して予め記憶する組合
せ記憶手段に記憶されたビット列と同様の形式のビット
列に変換するパラメータ抽出ステップと、 前記パラメータ抽出ステップにおいて変換したビット列
が、前記組合せ記憶手段に記憶されているか判定するこ
とにより該パラメータ列の構文の正当性を検査する組合
せ検査ステップとを含むことを特徴とするコマンドパラ
メータ構文検査方法。
7. A parameter string specified in a command input from an input device is extracted, and the parameter string is assigned to each of a plurality of parameters included in the parameter string specified in the command, and each parameter is assigned to a different bit. A parameter extraction step of expressing the parameter string with a bit string that turns on a corresponding bit when a parameter is present and converting the parameter string into a bit string of the same format as a bit string stored in a combination storage unit that stores the parameter string in advance; A combination checking step of checking whether the bit string converted in step is stored in the combination storage means to check the validity of the syntax of the parameter string.
【請求項8】 入力装置から入力されたコマンドに指定
されたパラメータ列を抽出し、抽出したパラメータ列
を、該パラメータ列に含まれる複数のパラメータのそれ
ぞれを異なるビットに割り当て、個々のパラメータが存
在する場合に対応するビットをオンにするビット列に変
換するパラメータ抽出ステップと、 コマンドに指定されるパラメータ列に含まれる複数のパ
ラメータのそれぞれを表現し、パラメータ毎に異なるビ
ットがオンにされるビット列に、対応するパラメータの
指定が必須か省略可能かを示す属性情報を付して記憶す
る組合せ記憶手段に記憶されたビット列の内、パラメー
タの指定が必須である旨を示す前記属性情報が付された
ビット列と、前記パラメータ抽出ステップにおいて抽出
したパラメータ列を変換したビット列とを比較すること
により、当該パラメータ列の構文の正当性を検査する組
合せ検査ステップとを含むことを特徴とするコマンドパ
ラメータ構文検査方法。
8. A parameter sequence specified in a command input from an input device is extracted, and the extracted parameter sequence is assigned to different bits of a plurality of parameters included in the parameter sequence. A parameter extraction step of converting a corresponding bit into a bit string that turns on the corresponding bit, and expressing each of a plurality of parameters included in the parameter string specified in the command into a bit string in which different bits are turned on for each parameter. Of the bit strings stored in the combination storage means for storing the attribute information indicating whether the specification of the corresponding parameter is indispensable or omissible, the attribute information indicating that the specification of the parameter is indispensable is added. A bit string and a bit string obtained by converting the parameter string extracted in the parameter extracting step. By comparison, the command parameter syntax checking method characterized by including the combinations inspection step for inspecting the validity of the syntax of the parameter sequence.
【請求項9】 前記組合せ検査ステップは、前記組合せ
記憶手段に階層的に連結して記憶された前記複数のビッ
ト列の内、パラメータの指定が必須である旨を示す前記
属性情報が付されたビット列を辿って、前記パラメータ
抽出手段が抽出したパラメータ列を変換したビット列と
順次比較することにより、当該パラメータ列の構文の正
当性を検査することを特徴とする請求項8記載のコマン
ドパラメータ構文検査方法。
9. The combination checking step includes the step of, among the plurality of bit strings stored hierarchically connected to the combination storage means, a bit string to which the attribute information indicating that the designation of a parameter is indispensable is added. 9. The command parameter syntax checking method according to claim 8, wherein the validity of the syntax of the parameter string is checked by sequentially comparing the parameter string extracted by the parameter extracting means with the converted bit string. .
【請求項10】 前記組合せ検査ステップは、前記コマ
ンドに指定されたパラメータ列の構文の正当性を確認し
た場合には当該コマンドを実行させ、該パラメータ列の
構文の正当性を確認できなかった場合には該パラメータ
列の構文が不正であった旨を出力装置へ出力することを
特徴とする請求項6〜9のいずれかに記載のコマンドパ
ラメータ構文検査方法。
10. The combination checking step, wherein when the syntax of the parameter string specified in the command is confirmed, the command is executed, and when the syntax of the parameter string cannot be confirmed. 10. The command parameter syntax checking method according to claim 6, further comprising the step of outputting to the output device that the syntax of the parameter string is invalid.
【請求項11】 請求項6〜10のいずれか一項に記載
の各ステップをコンピュータに実行させるプログラムを
記録したことを特徴とする記録媒体。
11. A recording medium on which is recorded a program for causing a computer to execute each step according to claim 6. Description:
【請求項12】 請求項11の記録媒体に記録されてい
る前記プログラムを複数の部分に分割して該複数の部分
をそれぞれ複数の記録媒体に記録することを特徴とする
記録媒体群。
12. A recording medium group, wherein the program recorded on the recording medium according to claim 11 is divided into a plurality of portions, and the plurality of portions are respectively recorded on a plurality of recording media.
JP15012099A 1998-05-29 1999-05-28 Command parameter syntax checking device, command parameter syntax checking method, and recording medium storing command parameter syntax analysis program Expired - Fee Related JP3454188B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15012099A JP3454188B2 (en) 1998-05-29 1999-05-28 Command parameter syntax checking device, command parameter syntax checking method, and recording medium storing command parameter syntax analysis program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP10-188007 1998-05-29
JP18800798 1998-05-29
JP15012099A JP3454188B2 (en) 1998-05-29 1999-05-28 Command parameter syntax checking device, command parameter syntax checking method, and recording medium storing command parameter syntax analysis program

Publications (2)

Publication Number Publication Date
JP2000047985A true JP2000047985A (en) 2000-02-18
JP3454188B2 JP3454188B2 (en) 2003-10-06

Family

ID=26479818

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15012099A Expired - Fee Related JP3454188B2 (en) 1998-05-29 1999-05-28 Command parameter syntax checking device, command parameter syntax checking method, and recording medium storing command parameter syntax analysis program

Country Status (1)

Country Link
JP (1) JP3454188B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12020007B2 (en) 2022-09-15 2024-06-25 International Business Machines Corporation Auto-wrappering tools with guidance from exemplar commands

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12020007B2 (en) 2022-09-15 2024-06-25 International Business Machines Corporation Auto-wrappering tools with guidance from exemplar commands

Also Published As

Publication number Publication date
JP3454188B2 (en) 2003-10-06

Similar Documents

Publication Publication Date Title
JP3963394B2 (en) Device for reporting software fault information
JPH04271443A (en) Method and device for data base constitution
US20240256747A1 (en) Statement block encapsulation method and apparatus, electronic device, and storage medium
JP6459267B2 (en) Test case generation program, test case generation method, and test case generation apparatus
US7464363B2 (en) Verification support device, verification support method, and computer product
CN116360794A (en) Database language analysis method, device, computer equipment and storage medium
JP2000047985A (en) Device and method for checking command parameter sentence structure and record medium recording command parameter sentence structure analytic program
JP2008112363A (en) Document processor and document processing program
JP2016115287A (en) Test case generation program, test case generation method and test case generator
JP2004126866A (en) Description output suppression program analysis system and description output suppression program analysis method
JP2001014311A (en) Place name representing method, and method and device for place name character string recognition
JP4496006B2 (en) Failure candidate identification system and failure candidate identification method
JP4387324B2 (en) Property conversion device
JP3317904B2 (en) Abbreviated name extraction device, method and recording medium
JP2007199800A (en) Degradation prevention support program and degradation prevention support method
US20020143511A1 (en) Method and computer program product for system design support
JP5910410B2 (en) Schematic program test data generation apparatus and method, and program
JP4032894B2 (en) Morphological processing method and apparatus
JP2009258887A (en) Machine translation apparatus and machine translation program
JP2006031331A (en) Computer for executing program conversion, method for executing program conversion, and program
JP6267971B2 (en) Source code analysis support device, source code analysis support method
CN117724702A (en) Component configuration generation method, device, computing equipment and computer storage medium
JP2009086918A (en) Verification support device, method, and program
JP5396174B2 (en) Message comparison determination method, message comparison determination device, and message comparison determination program
JPH1021227A (en) Device and method for document structure conversion

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20030624

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070725

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080725

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090725

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100725

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110725

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees