JPH05120226A - Command parameter substitution system - Google Patents
Command parameter substitution systemInfo
- Publication number
- JPH05120226A JPH05120226A JP28347191A JP28347191A JPH05120226A JP H05120226 A JPH05120226 A JP H05120226A JP 28347191 A JP28347191 A JP 28347191A JP 28347191 A JP28347191 A JP 28347191A JP H05120226 A JPH05120226 A JP H05120226A
- Authority
- JP
- Japan
- Prior art keywords
- parameter
- command
- character string
- symbol
- substitution
- 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
Links
- 238000006467 substitution reaction Methods 0.000 title abstract description 35
- 238000000034 method Methods 0.000 claims description 25
- 238000010586 diagram Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 1
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、コマンド解析機能に関
し、特に電子計算機上で動作するプログラムにその動作
指示を与えるコマンド文字列の一部をパラメータに置換
するコマンドパラメータ置換方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a command analysis function, and more particularly to a command parameter substitution system for substituting a part of a command character string for giving an operation instruction to a program operating on a computer with a parameter.
【0002】[0002]
【従来の技術】従来のコマンド解析機能について図面を
参照して説明する。2. Description of the Related Art A conventional command analysis function will be described with reference to the drawings.
【0003】図8は従来例のコマンド解析機能のブロッ
ク図である。FIG. 8 is a block diagram of a conventional command analysis function.
【0004】図8において、従来、電子計算機上で動作
するコマンドの解析処理は、プログラム3から制御を渡
されたコマンド解析機能b2bが入力装置5から入力さ
れたコマンド文字列を単純に命令部と複数のパラメータ
に分割してコマンドバッファ4に格納し、コマンドバッ
ファ4上でコマンド文字列の構文および正当性の検査を
行い、これをプログラム3が認識することによって行わ
れている。Referring to FIG. 8, in the conventional command analysis process operating on an electronic computer, the command analysis function b2b, which is passed control from the program 3, simply converts the command character string input from the input device 5 into an instruction section. It is divided into a plurality of parameters and stored in the command buffer 4, the syntax and correctness of the command character string are checked on the command buffer 4, and the program 3 recognizes this.
【0005】[0005]
【発明が解決しようとする課題】上述した従来のコマン
ド解析機能では、入力されたコマンド文字列をコマンド
解析機能b2bが命令部と複数のパラメータに分割し、
何の編集も行わず、そのままコマンドバッファ4へ格納
している。このため、コマンド文字列を入力しようとす
る利用者は、コマンド文字列が長文かつ複雑なパラメー
タで構成されていても、そのまま入力装置から打鍵する
必要があり、コマンド文字列の入力ミスを犯しやすいと
いう欠点がある。In the above-mentioned conventional command analysis function, the command analysis function b2b divides the input command character string into a command part and a plurality of parameters,
It is stored in the command buffer 4 as it is without any editing. Therefore, a user who wants to input a command character string is required to input a key from the input device as it is, even if the command character string is composed of long sentences and complicated parameters, and it is easy to make a mistake in inputting the command character string. There is a drawback.
【0006】本発明の目的は、あらかじめパラメータ対
応ファイル13に置換の指示を与える簡単な記号とパラ
メータを対応させ格納する置換パラメータ格納手段11
と、簡単な記号をパラメータ対応ファイル13を参照し
てパラメータに置換するパラメータ置換手段12とを有
し、利用者に、その一部が記号で記述されたコマンド文
字列を入力させ、あらかじめ用意された記号に対応する
パラメータによってコマンド文字列中の記号を置換した
後、プログラムに渡すことにより、上記の欠点を解消
し、利用者が複雑かつ長大なコマンドを入力するときに
発生するコマンド文字列の誤入力を減少させることがで
きるコマンドパラメータ置換方式を提供することにあ
る。An object of the present invention is to substitute parameter storage means 11 for storing a simple symbol giving a substitution instruction in advance in the parameter correspondence file 13 in association with a parameter.
And a parameter substitution means 12 for substituting a simple symbol with a parameter by referring to the parameter correspondence file 13, and prompting the user to input a command character string, a part of which is described by a symbol, and prepared in advance. After replacing the symbol in the command character string with the parameter corresponding to the symbol, and passing it to the program, the above drawbacks are solved and the command string generated when the user inputs a complicated and long command. An object of the present invention is to provide a command parameter substitution method capable of reducing erroneous input.
【0007】[0007]
【課題を解決するための手段】本発明のコマンドパラメ
ータ置換方式は、電子計算機上で動作するプログラムに
実行動作の指示を与えるために、入力装置から投入され
るコマンド文字列の構文検査を行う機能を有する電子計
算機システムのコマンド解析機能において、コマンド文
字列の一部を構成するパラメータとこのパラメータに対
応する記号とをパラメータ対応ファイルに格納する置換
パラメータ格納手段と、コマンド解析機能に接続して用
いられ、コマンド文字列中に記述された記号をキーとし
てパラメータ対応ファイルを検索し、該当する記号に対
応するパラメータによりコマンド文字列中の記号を置換
するパラメータ置換手段とを有している。The command parameter substitution method of the present invention has a function of performing a syntax check of a command character string input from an input device in order to give an instruction of execution operation to a program operating on a computer. In a command analysis function of an electronic computer system having, a replacement parameter storage means for storing a parameter forming a part of a command character string and a symbol corresponding to the parameter in a parameter correspondence file, and used by connecting to the command analysis function. And a parameter substituting means for retrieving the parameter correspondence file by using the symbol described in the command character string as a key and substituting the symbol in the command character string with the parameter corresponding to the corresponding symbol.
【0008】[0008]
【実施例】次に、本発明の実施例について図面を参照し
て説明する。Embodiments of the present invention will now be described with reference to the drawings.
【0009】図1は本発明の一実施例のコマンドパラメ
ータ置換方式を使用したコマンド解析機能のブロック
図、図2は本実施のコマンドパラメータ置換方式のパラ
メータ対応ファイル13の例を示す図、図3は本実施例
のパラメータ対応ファイル13に格納されている置換指
示レコードの構成例を示す図、図4は本実施例の置換指
示レコードの具体的な例を示す図、図5は本実施のコマ
ンドパラメータ置換方式のコマンドバッファ4の構成例
を示す図、図6は本実施例のコマンドパラメータ置換方
式1のうち置換パラメータ格納手段11の動作を示すフ
ローチャート、図7は本実施例のコマンドパラメータ置
換方式1のうちパラメータ置換手段12の動作を示すフ
ローチャートである。FIG. 1 is a block diagram of a command analysis function using a command parameter substitution method according to an embodiment of the present invention, FIG. 2 is a diagram showing an example of a parameter correspondence file 13 of the command parameter substitution method of the present embodiment, and FIG. Is a diagram showing a configuration example of a replacement instruction record stored in the parameter correspondence file 13 of the present embodiment, FIG. 4 is a diagram showing a specific example of the replacement instruction record of the present embodiment, and FIG. 5 is a command of the present embodiment. FIG. 6 is a diagram showing a configuration example of the command buffer 4 of the parameter substitution method, FIG. 6 is a flowchart showing the operation of the substitution parameter storage means 11 in the command parameter substitution method 1 of the present embodiment, and FIG. 7 is a command parameter substitution method of the present embodiment. 3 is a flowchart showing the operation of the parameter replacement means 12 of 1.
【0010】図1において、本実施例のコマンドパラメ
ータ置換方式を使用したコマンド解析機能は、コマンド
パラメータ置換方式1と、コマンド解析機能a2aと、
プログラム3と、コマンドバッファ4と、入力装置5,
6とから構成され、コマンドパラメータ置換方式1は、
予め入力装置6を利用して取得したパラメータとこのパ
ラメータを記号化した置換指示記号をパラメータ対応フ
ァイル13に格納する置換パラメータ格納手段11と、
コマンド解析機能a2aに接続して用いられ入力装置5
によりコマンド解析機能a2aを介してコマンドバッフ
ァ4に登録されたコマンド文字列内の置換指示記号をパ
ラメータに変換するパラメータ置換手段12とを有して
いる。In FIG. 1, the command analysis function using the command parameter replacement method of the present embodiment includes a command parameter replacement method 1, a command analysis function a2a, and
Program 3, command buffer 4, input device 5,
6 and the command parameter substitution method 1 is
A substitution parameter storage means 11 for storing in the parameter correspondence file 13 a parameter obtained in advance using the input device 6 and a substitution instruction symbol obtained by symbolizing this parameter;
Input device 5 used by connecting to command analysis function a2a
According to the command analysis function a2a, the parameter substitution means 12 is provided for converting the substitution instruction symbol in the command character string registered in the command buffer 4 into a parameter.
【0011】パラメータ置換手段12は、プログラム3
から制御を渡されたコマンド解析機能a2aが入力装置
5より入力されたコマンド文字列をコマンドバッファ4
に格納した後、コマンドバッファ4に格納されたコマン
ド文字列中に置換指示記号が含まれていたならこの置換
指示記号をキーとしてパラメータ対応ファイル13を検
索する。置換指示記号がパラメータ対応ファイル13中
に格納されていたならば、置換指示記号に対応するパラ
メータで、コマンドバッファ4内に格納されているコマ
ンド文字列中の置換指示記号を置換する。また、パラメ
ータ対応ファイル13に置換指示記号が格納されていな
かった場合には、コマンドバッファ4のパラメータはそ
のままである。そして、プログラム3はコマンドバッフ
ァ4内のコマンド文字列を参照して命令を実行する。The parameter replacing means 12 is the program 3
The command analysis function a2a, to which control is passed from the command buffer 4 for the command character string input from the input device 5,
If the replacement instruction symbol is included in the command character string stored in the command buffer 4 after the storage of the parameter, the parameter correspondence file 13 is searched using this substitution instruction symbol as a key. If the substitution instruction symbol is stored in the parameter correspondence file 13, the substitution instruction symbol in the command character string stored in the command buffer 4 is replaced with the parameter corresponding to the substitution instruction symbol. Further, when the replacement instruction symbol is not stored in the parameter correspondence file 13, the parameters of the command buffer 4 remain unchanged. Then, the program 3 refers to the command character string in the command buffer 4 and executes the instruction.
【0012】ここで、図2と図3を参照してパラメータ
対応ファイル13を簡単に説明する。The parameter correspondence file 13 will be briefly described with reference to FIGS. 2 and 3.
【0013】図2、図3において、パラメータ対応ファ
イル13には、置換指示記号とこの置換指示記号に対応
するパラメータとを図3の構成例で示されるように組み
合わせ、これを1レコードとして複数レコードが格納さ
れている。このレコードは、置換指示レコードと呼ば
れ、置換パラメータ格納手段11によって格納される。2 and 3, in the parameter correspondence file 13, a substitution instruction symbol and a parameter corresponding to this substitution instruction symbol are combined as shown in the configuration example of FIG. Is stored. This record is called a replacement instruction record and is stored by the replacement parameter storage means 11.
【0014】次に、図4を参照して置換指示レコードの
具体的な例を簡単に説明する。Next, a specific example of the replacement instruction record will be briefly described with reference to FIG.
【0015】図4において、置換指示レコード中の“%
A”は置換指示記号であり、頭に“%”をつけた英数記
号で表される。また、“XYZ”は“%A”に対応する
パラメータである。In FIG. 4, "%" in the replacement instruction record
“A” is a substitution instruction symbol, which is represented by an alphanumeric symbol with “%” at the beginning, and “XYZ” is a parameter corresponding to “% A”.
【0016】次に、図5を参照してコマンドバッファ4
の例を簡単に説明する。Next, referring to FIG. 5, the command buffer 4
The example will be briefly described.
【0017】図5において、コマンドバッファ4には、
入力されたコマンド文字列が命令部と複数のパラメータ
に分割され、格納されている。In FIG. 5, the command buffer 4 includes:
The input command character string is divided into an instruction part and a plurality of parameters and stored.
【0018】次に、図6を参照して本実施例のコマンド
パラメータ置換方式1のうち置換パラメータ格納手段1
1の動作の例を説明する。Next, referring to FIG. 6, the substitution parameter storage means 1 in the command parameter substitution method 1 of this embodiment
An example of operation 1 will be described.
【0019】図6において、置換パラメータ格納手段1
1が起動されると、最初にパラメータ対応ファイル13
をオープンする(ステップ21)。次に入力装置6より
置換指示記号とこの置換指示記号に対応させるパラメー
タを入力する(ステップ22)。ここで入力された置換
指示記号とパラメータの2重登録などの簡単なチェック
を行い(ステップ23)、矛盾が無ければ(ステップ2
4,No)、図3に示す置換指示レコードを作成し(ス
テップ25)、パラメータ対応ファイル13へ格納する
(ステップ26)。また、矛盾があったならば(ステッ
プ24,Yes)、エラーメッセージを出力し(ステッ
プ27)、パラメータ対応ファイル13へは格納しな
い。以後、これらの処理を繰り返し(ステップ28,N
o)、格納が終わったならば(ステップ28,Ye
s)、パラメータ対応ファイル13をクローズし(ステ
ップ29)、置換パラメータ格納手段11を終了する。In FIG. 6, replacement parameter storage means 1
When 1 is started, the parameter correspondence file 13 is first
Is opened (step 21). Next, the substitution instruction symbol and the parameter corresponding to this substitution instruction symbol are input from the input device 6 (step 22). A simple check such as double registration of the replacement instruction symbol and the parameter input here is performed (step 23), and if there is no contradiction (step 2)
4, No), the replacement instruction record shown in FIG. 3 is created (step 25) and stored in the parameter correspondence file 13 (step 26). If there is a contradiction (step 24, Yes), an error message is output (step 27) and is not stored in the parameter correspondence file 13. After that, these processes are repeated (step 28, N
o) If the storage is completed (step 28, Ye)
s), the parameter correspondence file 13 is closed (step 29), and the replacement parameter storage means 11 is terminated.
【0020】次に、図7を参照して本実施例のコマンド
パラメータ置換方式1のパラメータ置換手段12の動作
の例を説明する。Next, an example of the operation of the parameter replacing means 12 of the command parameter replacing method 1 of this embodiment will be described with reference to FIG.
【0021】図7において、コマンド解析機能a2a
が、入力装置5より入力されたコマンド文字列をコマン
ドバッファ4に格納した後、パラメータ置換手段12が
起動されると、最初にパラメータ対応ファイル13をオ
ープンする(ステップ31)。次にコマンドバッファ4
のパラメータを1パラメータ毎に読み(ステップ3
2)、以下の処理に渡し、コマンドバッファ4のパラメ
ータが無くなるまで以下の処理を繰り返す(ステップ3
3,No)。In FIG. 7, the command analysis function a2a
However, after the command character string input from the input device 5 is stored in the command buffer 4 and the parameter replacing means 12 is activated, the parameter corresponding file 13 is first opened (step 31). Next command buffer 4
Parameter of each parameter is read (step 3
2) The process is passed to the following process, and the following process is repeated until there are no parameters in the command buffer 4 (step 3).
3, No).
【0022】この処理により読み込まれたパラメータが
置換指示記号であったなら(ステップ34,Yes)、
パラメータ対応ファイルの置換指示レコードを読み(ス
テップ35)、コマンドバファ4の置換指示記号と一致
したならば(ステップ36,Noでステップ37,Ye
s)、コマンドバッファ4の置換指示記号をパラメータ
と置換し(ステップ38)、一致しなければ(ステップ
36,Noでステップ37,No)、一致するまで又は
置換指示レコードが無くなるまで(ステップ36,Ye
s)パラメータ対応ファイルを読み(ステップ35)、
この処理を繰り返す。コマンドバッファ4の置換指示記
号と一致する置換指示レコードの置換指示記号がパラメ
ータ対応ファイル13に存在しなかった場合は、コマン
ドバッファ4のパラメータはそのままである。そして、
コマンドバッファ4のパラメータが無くなったならば
(ステップ33,Yes)、パラメータ対応ファイル1
3をクローズし(ステップ39)、パラメータ置換手段
12を抜け、コマンド解析機能a2aへ制御を戻す。If the parameter read by this processing is the substitution instruction symbol (step 34, Yes),
The replacement instruction record of the parameter corresponding file is read (step 35), and if the replacement instruction symbol of the command buffer 4 matches (step 36, No, step 37, Ye).
s), the replacement instruction symbol of the command buffer 4 is replaced with the parameter (step 38), and if they do not match (step 36, No, step 37, No), until they match or until there is no replacement instruction record (step 36, Ye
s) Read the parameter corresponding file (step 35),
This process is repeated. If the replacement instruction symbol of the replacement instruction record that matches the replacement instruction symbol of the command buffer 4 does not exist in the parameter correspondence file 13, the parameter of the command buffer 4 remains unchanged. And
If there are no more parameters in the command buffer 4 (step 33, Yes), the parameter correspondence file 1
3 is closed (step 39), the parameter replacing means 12 is exited, and control is returned to the command analysis function a2a.
【0023】[0023]
【発明の効果】以上説明したように、本発明のコマンド
パラメータ置換方式は、利用者に、その一部が記号で記
述されたコマンド文字列を入力させ、あらかじめ用意さ
れた記号に対応するパラメータによってコマンド文字列
中の記号を置換した後、プログラムに渡すことにより、
利用者が複雑かつ長大なコマンドを入力するときに発生
するコマンド文字列の誤入力を減少させることができる
という効果がある。As described above, the command parameter substitution method of the present invention allows the user to input a command character string, a part of which is described in symbols, and uses a parameter corresponding to a symbol prepared in advance. After replacing the symbols in the command string and passing it to the program,
There is an effect that it is possible to reduce erroneous input of a command character string that occurs when a user inputs a complicated and long command.
【図1】本発明の一実施例のコマンドパラメータ置換方
式を使用したコマンド解析機能のブロック図である。FIG. 1 is a block diagram of a command analysis function using a command parameter substitution method according to an embodiment of the present invention.
【図2】本実施のコマンドパラメータ置換方式のパラメ
ータ対応ファイル13の例を示す図である。FIG. 2 is a diagram showing an example of a parameter correspondence file 13 of a command parameter substitution method of this embodiment.
【図3】本実施例のパラメータ対応ファイル13に格納
されている置換指示レコードの構成例を示す図である。FIG. 3 is a diagram showing a configuration example of a replacement instruction record stored in a parameter correspondence file 13 of this embodiment.
【図4】本実施例の置換指示レコードの具体的な例を示
す図である。FIG. 4 is a diagram showing a specific example of a replacement instruction record of this embodiment.
【図5】本実施のコマンドパラメータ置換方式のコマン
ドバッファ4の構成例を示す図である。FIG. 5 is a diagram showing a configuration example of a command buffer 4 of a command parameter substitution system according to the present embodiment.
【図6】本実施例のコマンドパラメータ置換方式1のう
ち置換パラメータ格納手段11の動作を示すフローチャ
ートである。FIG. 6 is a flowchart showing the operation of the replacement parameter storage means 11 in the command parameter replacement method 1 of this embodiment.
【図7】本実施例のコマンドパラメータ置換方式1のう
ちパラメータ置換手段12の動作を示すフローチャート
である。FIG. 7 is a flowchart showing the operation of the parameter replacing means 12 in the command parameter replacing method 1 of this embodiment.
【図8】従来例のコマンド解析機能のブロック図であ
る。FIG. 8 is a block diagram of a command analysis function of a conventional example.
1 コマンドパラメータ置換方式 2a コマンド解析機能a 2b コマンド解析機能b 3 プログラム 4 コマンドバッファ 5 入力装置 6 入力装置 11 置換パラメータ格納手段 12 パラメータ置換手段 13 パラメータ対応ファイル 1 Command Parameter Replacement Method 2a Command Analysis Function a 2b Command Analysis Function b 3 Program 4 Command Buffer 5 Input Device 6 Input Device 11 Replacement Parameter Storage Means 12 Parameter Replacement Means 13 Parameter Corresponding File
Claims (1)
行動作の指示を与えるために、入力装置から投入される
コマンド文字列の構文検査を行う機能を有する電子計算
機システムのコマンド解析機能において、 前記コマンド文字列の一部を構成するパラメータとこの
パラメータに対応する記号とをパラメータ対応ファイル
に格納する置換パラメータ格納手段と、 前記コマンド解析機能に接続して用いられ、前記コマン
ド文字列中に記述された記号をキーとして前記パラメー
タ対応ファイルを検索し、該当する記号に対応するパラ
メータにより前記コマンド文字列中の記号を置換するパ
ラメータ置換手段とを有することを特徴とするコマンド
パラメータ置換方式。1. A command analysis function of an electronic computer system, which has a function of performing a syntax check of a command character string input from an input device in order to give an instruction of an execution operation to a program operating on an electronic computer, Replacement parameter storage means for storing a parameter forming a part of a character string and a symbol corresponding to this parameter in a parameter correspondence file, and used by connecting to the command analysis function and described in the command character string. A command parameter replacing method, comprising: a parameter replacing unit that searches the parameter correspondence file using a symbol as a key and replaces the symbol in the command character string with a parameter corresponding to the corresponding symbol.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP28347191A JPH05120226A (en) | 1991-10-30 | 1991-10-30 | Command parameter substitution system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP28347191A JPH05120226A (en) | 1991-10-30 | 1991-10-30 | Command parameter substitution system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH05120226A true JPH05120226A (en) | 1993-05-18 |
Family
ID=17665981
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP28347191A Pending JPH05120226A (en) | 1991-10-30 | 1991-10-30 | Command parameter substitution system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH05120226A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001236234A (en) * | 2000-02-21 | 2001-08-31 | Hiroshi Izumi | Computer and computer-readable recording medium |
-
1991
- 1991-10-30 JP JP28347191A patent/JPH05120226A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001236234A (en) * | 2000-02-21 | 2001-08-31 | Hiroshi Izumi | Computer and computer-readable recording medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2009521026A (en) | Method and system for editing text with search and replace functions that leverage derivation of search and replace inputs | |
| JPS6047606B2 (en) | program input device | |
| JP2004185508A (en) | Program analysis device and program | |
| JP2020115246A (en) | Generation device, software robot system, generation method and generation program | |
| JPH05120226A (en) | Command parameter substitution system | |
| JPH0728827A (en) | Drawing description generation device | |
| JP3087699B2 (en) | Standard information simple input system and standard information simple input method | |
| JPH11154093A (en) | Program Compiler and Recording Medium Recording Compiler Program | |
| JPH04248624A (en) | Program conversion processor | |
| JPH06103023A (en) | Japanese code conversion processing system | |
| JP2001125793A (en) | Compiler system, compile method and recording medium | |
| JP3190377B2 (en) | Function name converter | |
| JPH0455938A (en) | Automatic generation system for program specifications | |
| JPH0573336A (en) | Ampers automatic generation processor | |
| JPH05282138A (en) | Documenter document generation method | |
| JPH02199534A (en) | Flow chart forming processor | |
| JP2008015879A (en) | Method, program and system for supporting description of specification including natural sentence | |
| JPH05204699A (en) | Identifier searching system at debugging | |
| JPH04178864A (en) | Dynamic setting system for command syntax | |
| JPH0816382A (en) | Erroneously corrected line retrieving device | |
| JPH05120227A (en) | Auxiliary message dynamic setting system for command syntax analysis result | |
| JPH0546373A (en) | Flow chart generation processor | |
| JPH03186933A (en) | Symbol processing system for language processing system | |
| JPH04195529A (en) | Comment sentence adding system | |
| JP2002091966A (en) | Machine translation device, computer-readable recording medium recording machine translation program, and computer program |