JPH02199539A - Command identification system - Google Patents
Command identification systemInfo
- Publication number
- JPH02199539A JPH02199539A JP2026589A JP2026589A JPH02199539A JP H02199539 A JPH02199539 A JP H02199539A JP 2026589 A JP2026589 A JP 2026589A JP 2026589 A JP2026589 A JP 2026589A JP H02199539 A JPH02199539 A JP H02199539A
- Authority
- JP
- Japan
- Prior art keywords
- command
- specifier
- processing
- commands
- correspondence table
- 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
Landscapes
- Devices For Executing Special Programs (AREA)
Abstract
Description
【発明の詳細な説明】
〔概要〕
インタプリタでコマンドを識別するコマンド識別方式に
関し、
インタプリタにおいて、コマンド名とコマンド特定子と
の対応表を設け、コマンド名を一旦コマント特定子に変
換した後、該当するコマンド処理を実行し、コマンド名
の変更、追加などを容易に可能にすることを目的とし、
入力文を解析する解析処理と、この解析処理によって解
析されるコマンドがいずれのコマンド特定子に対応する
かを予め登録する対応表と、この対応表を参照して、上
記解析処理によって解析されたコマンドをコマンド特定
子に変換する変換処理とを備え、この変換処理によって
変換したコマンド特定子に対応するコマンド処理を実行
するように構成する。[Detailed Description of the Invention] [Summary] Regarding a command identification method for identifying commands in an interpreter, a correspondence table between command names and command specifiers is provided in the interpreter, and after the command name is once converted to a command specifier, the corresponding The purpose is to easily execute command processing to change or add command names, etc., and to analyze input sentences and to identify which command specifier corresponds to the command parsed by this analysis processing. a correspondence table for registering in advance whether the Configure it to perform command processing.
本発明は、インタプリタでコマンドを識別するコマンド
識別方式に関するものである。The present invention relates to a command identification method for identifying commands in an interpreter.
〔従来の技術と発明が解決しようとする課題〕従来、イ
ンタプリタ(シェル)において、組み込みコマンドは、
第2図に示すように、論理の一部として組み込まれてい
る。このため、インタプリタが組み込みコマンドを認識
する場合、−意のコマンド名として認識しており、当該
組み込みコマンド名の変更、追加を行い難いという問題
があった。[Prior art and problems to be solved by the invention] Conventionally, in an interpreter (shell), built-in commands are
As shown in FIG. 2, it is incorporated as part of the logic. For this reason, when the interpreter recognizes a built-in command, it recognizes it as a command name with - meaning, and there is a problem in that it is difficult to change or add the built-in command name.
第2図構成の動作を簡単に説明する。The operation of the configuration shown in FIG. 2 will be briefly explained.
第2図において、プロシジャ21の入力されたインタプ
リタ22を構成する解析処理23は、プロシジャ21の
文字を解析して図示のように“CASE”をコマンド列
、” A B C”を式、“’WHEN”を選択枝とし
て認識し、CASEコマンド処理を実行する。この実行
に対応して、実行処理(CASEコマンド処理)24が
、式”ABC”と、選択枝に指定されている値を比較し
、一致する場合、次に記述されているコマンド゛’CO
MMAND1”)のプログラムを起動して実行させる。In FIG. 2, an analysis process 23 constituting an interpreter 22 into which a procedure 21 is input analyzes the characters of the procedure 21 and converts "CASE" into a command string, "A B C" into an expression, and "'WHEN'' is recognized as an option and executes CASE command processing. Corresponding to this execution, the execution process (CASE command process) 24 compares the expression "ABC" with the value specified in the selection branch, and if they match, the next written command "'CO" is executed.
MMAND1”) program and run it.
本発明は、インタプリタにおいて、コマンド名とコマン
ド特定子との対応表を設け、コマンド名を一旦コマント
特定子に変換した後、該当するコマンド処理を実行し、
コマンド名の変更、追加などを容易に可能にすることを
目的としている。The present invention provides an interpreter with a correspondence table between command names and command specifiers, converts the command name into a command specifier, and then executes the corresponding command processing.
The purpose is to make it easy to change and add command names.
第1図を参照して課題を解決する手段を説明する。 Means for solving the problem will be explained with reference to FIG.
第1図において、解析処理3は、入力文(プロシジャ1
など)からコマンドなどを解析するものである。In FIG. 1, analysis processing 3 consists of the input sentence (procedure
etc.) to analyze commands, etc.
対応表4は、コマンドに対応するコマンド特定子を予め
登録した表である。The correspondence table 4 is a table in which command specifiers corresponding to commands are registered in advance.
変換処理5は、対応表4を参照して、コマンドをコマン
ド特定子に変換するものである。Conversion processing 5 refers to correspondence table 4 and converts a command into a command specifier.
実行処理6は、コマンド特定子に対応する処理を実行さ
せるものである。Execution processing 6 is for executing processing corresponding to the command specifier.
本発明は、第1図に示すように、解析処理3が入力文か
らコマンドなどを解析し、変換処理5が対応表4を参照
してこの解析したコマンドに対応するコマンド特定子に
変換し、実行処理6がこのコマンド特定子に対応する処
理を実行させるようにしている。In the present invention, as shown in FIG. 1, an analysis process 3 analyzes a command etc. from an input sentence, a conversion process 5 converts it into a command specifier corresponding to the analyzed command by referring to a correspondence table 4, The execution process 6 causes the process corresponding to this command specifier to be executed.
従って、対応表4に予めコマンドとコマンド特定子とを
対応づけて登録し、これを参照して一旦コマント特定子
に変換した後に処理を実行させることにより、コマンド
の追加/変更(例えば英語のコマンド名に日本語のコマ
ンド名を追加、あるいは変更など)を行う場合、対応表
4に登録するのみでよく、容易に行うことが可能となる
。Therefore, by registering the correspondence between commands and command specifiers in the correspondence table 4 in advance, and executing the process after converting them into command specifiers by referring to this, it is possible to add/change commands (for example, to add/change commands to English commands). If you want to add or change a Japanese command name to a command name, you only need to register it in the correspondence table 4, and you can easily do it.
次に、第1図を用いて本発明の1実施例の構成および動
作を順次詳細に説明する。Next, the configuration and operation of one embodiment of the present invention will be sequentially explained in detail using FIG.
第1図において、プロシジャ1は、図示のように記述さ
れたプログラムである。In FIG. 1, procedure 1 is a program written as shown.
インタプリタ(シェル)2は、実行時に、プロシジャ1
を入力とし、該当するコマンドプログラム7を起動して
処理を実行させるものであって、解析処理3、対応表4
、変換処理5、実行処理6などから構成されている。Interpreter (shell) 2 executes procedure 1 at runtime.
is input and starts the corresponding command program 7 to execute the process, analysis process 3, correspondence table 4
, a conversion process 5, an execution process 6, etc.
解析処理3ば、入力されたプロシジャ1の文字・記号列
を解析して、コマンド列(例えば’CASE”)、式(
例えば”ABC”)、選択枝(例えば“WHEN”)な
どを解析して認識するものである。Analysis process 3 analyzes the input character/symbol string of procedure 1 and converts it into a command string (e.g. 'CASE'), expression (
For example, "ABC"), options (for example, "WHEN"), etc. are analyzed and recognized.
対応表4は、コマンドに対応するコマンド特定子を予め
登録した表であって、例えば同一の処理を実行する旨を
表す英語の”CASB”および日本語の゛多岐選択”に
ついて同一のコマンド特定子” 0001 ”を予め登
録するようにしたものである。この対応表4を用いて、
プロシジャ1から解析されたコマンドを一旦、コマンド
特定子に変換し、このコマンド特定子に対応するコマン
ドプログラム7を起動するようにしている。従って、英
語、日本語のコマンド名、更に別名などについて同一の
コマンド特定子を割り当てて同一の処理を実行させるこ
とが可能となり、コマンドの追加、変更などを極めて容
易に行うことが可能となる。Correspondence table 4 is a table in which command specifiers corresponding to commands are registered in advance. For example, the same command specifiers are used for "CASB" in English and "multi-choice" in Japanese, which indicate the execution of the same process. "0001" is registered in advance.Using this correspondence table 4,
The command parsed from the procedure 1 is once converted into a command specifier, and the command program 7 corresponding to this command specifier is activated. Therefore, it is possible to allocate the same command specifier to English and Japanese command names, aliases, and the like to execute the same process, making it possible to add or change commands extremely easily.
変換処理5は、解析処理3によって解析されたコマンド
について、対応表4を参照してコマンド特定子に変換す
るものである。The conversion process 5 converts the command analyzed by the analysis process 3 into a command specifier by referring to the correspondence table 4.
実行処理6は、変換処理5によって変換されたコマンド
特定子に対応するコマンドプログラムを起動し、処理を
実行させるものである。Execution processing 6 starts a command program corresponding to the command specifier converted by conversion processing 5 and causes the command program to execute processing.
次に、第1図構成の動作を詳細に説明する。Next, the operation of the configuration shown in FIG. 1 will be explained in detail.
第1図において、(1)端末、あるいはファイルからプ
ロシジャ1をインタプリタ2に入力する。In FIG. 1, (1) Procedure 1 is input to interpreter 2 from a terminal or a file.
(2)解析処理3ば、入力されたプロシジャ1をコマン
ド列” CA S E ” 、式” A B C″、選
択枝“WHEN”などと解析する。(2) Analysis process In the third step, the input procedure 1 is analyzed as a command string "CASE", an expression "A B C", a selection option "WHEN", etc.
(3)変換処理5は、解析処理3によって解析されたコ
マンド列“CA S E ”を、対応表4を参照してコ
マンド特定子” OOO2”に変換する。(3) Conversion process 5 converts the command string “CA S E ” analyzed by analysis process 3 into command specifier “OOO2” with reference to correspondence table 4.
(4)実行処理6は、変換されたコマンド特定子′“0
002”に対応して、式” A B C”と、選択枝に
指定されている値を比較し、一致する場合、次に記述さ
れているコマンド名に対応するコマンドプログラムを起
動して実行させる。(4) Execution process 6 executes the converted command specifier '"0
002", compares the expression "A B C" with the value specified in the selection branch, and if they match, launches and executes the command program corresponding to the command name written next. .
以上の手順において、プロシジャ1中に記述したコマン
ド“”CASE”の日本語の“多岐選択”を新たにコマ
ンドとして設けた場合、対応表4中に当該゛多岐選択”
に対応づけてコマンド特定子“0002”を登録すると
いう簡単な操作によって、“多岐選択”について処理を
実行させることが可能となる。In the above procedure, if the Japanese word "manifold selection" of the command ""CASE" written in procedure 1 is set as a new command, the corresponding "manifold selection" will be included in the correspondence table 4.
By a simple operation of registering the command specifier "0002" in association with the command specifier "0002", it is possible to execute the process for "manifold selection".
以上説明したように、本発明によれば、対応表4に予め
コマンドとコマンド特定子とを対応づけて登録し、これ
を参照して一旦コマント特定子に変換した後に処理を実
行させる構成を採用しているため、コマンドの追加/変
更(例えば英語のコマンド名に日本語のコマンド名を追
加、あるいは変更など)を容易に行うことができる。As explained above, according to the present invention, a configuration is adopted in which commands and command specifiers are registered in correspondence table 4 in advance, and the process is executed after the commands are referred to and converted into command specifiers. Therefore, commands can be easily added/changed (for example, adding or changing Japanese command names to English command names).
第1図は本発明の1実施例構成図、第2図は従来技術の
説明図を示す。
図中、1はプロシジャ、2はインタプリタ(シェル)、
3は解析処理、4は対応表、5は変換処理、6ば実行処
理、7ばコマンドプログラムを表す。FIG. 1 shows the configuration of one embodiment of the present invention, and FIG. 2 shows an explanatory diagram of the prior art. In the figure, 1 is the procedure, 2 is the interpreter (shell),
3 represents an analysis process, 4 represents a correspondence table, 5 represents a conversion process, 6 represents an execution process, and 7 represents a command program.
Claims (1)
おいて、 入力文を解析する解析処理(3)と、 この解析処理(3)によって解析されるコマンドがいず
れのコマンド特定子に対応するかを予め登録する対応表
(4)と、 この対応表(4)を参照して、上記解析処理(3)によ
って解析されたコマンドをコマンド特定子に変換する変
換処理(5)とを備え、 この変換処理(5)によって変換したコマンド特定子に
対応するコマンド処理を実行するように構成したことを
特徴とするコマンド識別方式。[Claims] In a command identification method for identifying commands using an interpreter, there is an analysis process (3) that analyzes an input sentence, and which command specifier the command analyzed by this analysis process (3) corresponds to. A conversion process (5) that refers to the correspondence table (4) and converts the command analyzed by the above analysis process (3) into a command specifier. A command identification method characterized by being configured to execute command processing corresponding to a command specifier converted by conversion processing (5).
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2026589A JPH02199539A (en) | 1989-01-30 | 1989-01-30 | Command identification system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2026589A JPH02199539A (en) | 1989-01-30 | 1989-01-30 | Command identification system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH02199539A true JPH02199539A (en) | 1990-08-07 |
Family
ID=12022368
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2026589A Pending JPH02199539A (en) | 1989-01-30 | 1989-01-30 | Command identification system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH02199539A (en) |
-
1989
- 1989-01-30 JP JP2026589A patent/JPH02199539A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2004213677A (en) | Method of executing task by computer system with gui | |
| CN109522005A (en) | Cross-platform GRAPHICAL PROGRAMMING method | |
| JPH10301790A (en) | Assemble processing system | |
| JPH0760363B2 (en) | Method for automatically creating user-defined commands | |
| JPS62216040A (en) | Precompiler and compiler calling control system | |
| Aziz et al. | Development of Virtual Assistant using OpenAI Assistant for Immigration Services | |
| CN116185415A (en) | A method and device for converting a JSP page to a Thymeleaf page | |
| JPH02287824A (en) | Production system for control sentence | |
| JPS6266371A (en) | Text separation type learning system | |
| CN120386576A (en) | A method for calling AI agents for security operations | |
| JPH01194053A (en) | Processing system for command procedure | |
| CN118939266A (en) | Smart card script definition and parsing execution method, device and equipment | |
| JPH03119422A (en) | Interprogram connection system | |
| JPH03121531A (en) | Job control language processing system | |
| JPH0430239A (en) | Command option designation processing system | |
| Freeman | Essential JavaScript Primer | |
| JPH0223428A (en) | Translation type executing system for command type end user language | |
| JPS63316135A (en) | Program developing device | |
| JPH021027A (en) | Compiling system for compressed source program | |
| JPH0340033A (en) | Recognizing/processing system for code system of call origin | |
| JPH034336A (en) | Program debug processor | |
| JPH06110731A (en) | Software test support device | |
| JPH0423102A (en) | Programming device for programmable controller | |
| JPH04229343A (en) | Memory contents display system in interactive debugger | |
| JPH04209029A (en) | Parallel process program translation processor |