JPH0269832A - Definition operator processing method in expression processing - Google Patents

Definition operator processing method in expression processing

Info

Publication number
JPH0269832A
JPH0269832A JP22211988A JP22211988A JPH0269832A JP H0269832 A JPH0269832 A JP H0269832A JP 22211988 A JP22211988 A JP 22211988A JP 22211988 A JP22211988 A JP 22211988A JP H0269832 A JPH0269832 A JP H0269832A
Authority
JP
Japan
Prior art keywords
operator
definition
processing
expression
definition operator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP22211988A
Other languages
Japanese (ja)
Inventor
Kazunari Nagashima
長島 千成
Ryuichi Umekawa
竜一 梅川
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP22211988A priority Critical patent/JPH0269832A/en
Publication of JPH0269832A publication Critical patent/JPH0269832A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To easily program a processing characteristic to a user by previously generating a function auxiliary program in which the definition operator characteristic to the user is defined and the processing is mentioned, and outputting the function auxiliary program concerned as an expression processing result when the spelling of the definition operator appears in the processing of the expression. CONSTITUTION:The function auxiliary program 4, in which the definition operator is defined and the processing executed by the definition operator is mentioned, is previously generated. An expression analysis part 12 analyzes an inputted expression language, fetches the spelling of the definition operator, and a definition operator discrimination part 13 detects the function auxiliary program 4 corresponding to the spelling of the fetched definition operator and outputs it as the result of the expression processing. When the expression including the definition operator appears in the expression processing, the processing by the definition operator is developed and the processing characteristic to the user can be programmed by retrieving and detecting the function auxiliary program 4 corresponding to the spelling of the definition operator and storing it in relation to a procedure quotation list.

Description

【発明の詳細な説明】 〔概要〕 式に現れた定義演算子の式処理を行う定義′/?i算子
処連子処理方式、 ユーザ固有の定義演算子を定義および処理を記述した関
数副プログラムを予め作成しておき、式処理で定義演算
子の織りが現れた場合に該当する関数副プログラムを式
処理結果としで出力し、ユーザが定義した定義演算子に
よる処理を可能にすることを目的とし、 定義演算子の定義およびこの定義演算子によって実行す
る処理を予め記述した関数副プログラムと、この関数副
プログラムによって定義された定義演算子の綴りおよび
この関数副プログラムに対応づけるための指票を予め登
録した演算子副局簿とを備え、入力された式言から取り
出した定義演算子の綴りに対応する該当演算子副局簿を
見つけ出し、この見つけ出した演算子副局簿の指票に対
応する」二記関数副プログラムを定義演算子の式処理結
果として出力するように構成する。
[Detailed Description of the Invention] [Summary] Definition '/? that performs expression processing of definition operators appearing in expressions. i Operator processing concatenated processing method, a function subprogram that defines and processes a user-specific definition operator is created in advance, and when a weaving of definition operators appears in expression processing, a corresponding function subprogram is created. A function subprogram in which the definition of a definition operator and the processing to be executed by this definition operator are written in advance, with the purpose of outputting the result of expression processing and enabling processing using a definition operator defined by the user. It is equipped with an operator sub-register in which the spelling of the definition operator defined by this function subprogram and an index for associating it with this function subprogram are registered in advance, and the definition operator extracted from the input expression is provided. The system is configured to find a corresponding operator sub-register corresponding to the spelling, and output a binary function sub-program corresponding to the index of the found operator sub-register as the expression processing result of the defined operator.

〔産業上の利用分野〕[Industrial application field]

本発明は、式に現れた定義演算子の式処理を行う定義演
算子処理方式に関するものである。
The present invention relates to a definition operator processing method for processing a definition operator appearing in an expression.

〔従来の技術と発明が解決しようとする課題〕従来のコ
ンパイラ(例えばFORTRAN77ご1ンパイラなど
)は、ユーザ自身が使用したい特別な処理を行う式を、
定義した演算子(定義演算子)という形で実現していな
かった。このため、ユーザが頻繁にある式を用いて処理
を行おうする場合、使い勝手の悪いしかも正確性などの
面で問題があった。
[Prior art and problems to be solved by the invention] Conventional compilers (for example, FORTRAN 77 compilers, etc.) do not allow expressions that perform special processing that the user wants to use.
It was not realized in the form of a defined operator (definition operator). For this reason, when a user frequently attempts to perform processing using a certain formula, there are problems in terms of not only ease of use but also accuracy.

本発明は、ユーザ固有の定義演算子を定義および処理を
記述した関数副プログラムを予め作成しておき、式処理
で定義演算子の啜りが現れた場合に該当する関数副プロ
グラムを式処理結果として出力し、ユーザが定義した定
義演算子による処理を可能にすることを目的としている
In the present invention, a function subprogram that defines and processes a user-specific definition operator is created in advance, and when a slurry of the definition operator appears in expression processing, the corresponding function subprogram is used as the expression processing result. The purpose is to output and allow processing using defined operators defined by the user.

〔課題を解決する手段〕 第1図を参照して課題を解決する手段を説明する。[Means to solve problems] Means for solving the problem will be explained with reference to FIG.

第1図において、関数副プログラム4は、定義演算子を
定義および処理を予め記述したものである。
In FIG. 1, a function subprogram 4 is a program in which definition operators are defined and processing is described in advance.

式解析部12は、入力された式言を解析して定義演算子
の綴りなどを取り出すものである。
The expression analysis unit 12 analyzes the input expression and extracts the spellings of definition operators and the like.

定義演算子判別部13は、式解析部12によって解析さ
れて取り出された定義演算子の綴りに対応する関数副プ
ログラム4を見つけ出すなどするものである。
The definition operator determination unit 13 finds the function subprogram 4 corresponding to the spelling of the definition operator analyzed and extracted by the expression analysis unit 12.

〔作用〕[Effect]

本発明は、第1図に示すように、定義演算子の定義およ
びこの定義演算子によって実行する処理を予め記述した
関数副プログラム4を作成しておき、式解析部12が入
力された式言を解析して定義演算子の啜りなどを取り出
し、定義演算子判別部13がこの取り出した定義演算子
の啜りに対応する関数副プログラム4を見つけ出し、式
処理結果として出力(例えば手続き引用簿に関連づけて
格納)するようにしている。
As shown in FIG. 1, in the present invention, a function sub-program 4 is created in which a definition of a definition operator and a process to be executed by this definition operator are described in advance, and an expression analysis unit 12 The definition operator discriminator 13 finds the function subprogram 4 corresponding to the extracted definition operator's slurp, and outputs it as an expression processing result (for example, associates it with a procedure citation list). (stored).

従って、式処理で定義演算子を含む式が現れた場合に、
定義演算子の綴りに対応する関数副プログラム4を検索
して見つけ出し、手続き引用簿に関連づけて格納などす
ることにより、定義演算による処理を展開することが可
能となる。
Therefore, when an expression containing a definition operator appears during expression processing,
By searching and finding the function subprogram 4 that corresponds to the spelling of the definition operator, and storing it in association with the procedure citation list, it becomes possible to develop processing using the definition operation.

〔実施例〕〔Example〕

次に、第1図から第3図を用いて本発明の1実施例の構
成および動作を順次詳細に説明する。
Next, the configuration and operation of one embodiment of the present invention will be explained in detail using FIGS. 1 to 3.

第1図において、演算子周溝1は、演算で使用する定義
演算子を含む全ての演算子をコードの形で登録したもの
である。
In FIG. 1, an operator circumferential groove 1 is a register in which all operators including defined operators used in calculations are registered in the form of codes.

演算子副局簿2は、定義演算子の綴り(例えば“、TE
IGl、” )および単位y13への指票などを格納す
るものである。この演算子副局簿2は、同じ演算子コー
ドのものを図示のように複数連鎖させてもよい。
The operator sub-register 2 contains the spelling of the defined operator (for example, ", TE
IGl, ") and the index for the unit y13. In this operator sub-book 2, a plurality of operators having the same operator code may be chained together as shown in the figure.

単位i’ii3は、関数副プログラム4の基点悄輻を格
納したものである。
The unit i'ii3 stores the base point convergence of the function subprogram 4.

関数副プログラム4は、■に示す定義演算子の啜り“、
TEIGl、”およびこの定義演算子によって実行する
処理などを記述したものである。
Function subprogram 4 is the definition operator shown in ■.
TEIGl,'' and the processing executed by this definition operator.

入力5は、図示外の構文解析部によって式(例えば“^
、TE[G1.B”)を解析した式言である。
Input 5 is converted into an expression (for example, “^
, TE[G1. This is a formula that is an analysis of B”).

定義演算子綴り棚6は、式言から取り出した綴りを格納
した綴り’;116 1をポイントするポインタ(PO
INTER)を格納するものである。
The definition operator spelling shelf 6 is a pointer (PO
INTER).

区切り棚7は、式言から取り出した定義演算子のコード
などを格納するものである。
The partition shelf 7 is for storing definition operator codes extracted from expressions.

文節部8は、式言から取り出した文節部(例えば文節(
A、B)など)を格納するものである。
The bunsetsu part 8 is a bunsetsu part (for example, a bunsetsu (
A, B), etc.).

定義処理部11は、定義演算子を定義および定義演算子
によって実行する処理を予め関数副プログラムとして記
述などする定義処理を行うためのものである。
The definition processing unit 11 is for performing definition processing such as defining a definition operator and writing the processing to be executed by the definition operator in advance as a function subprogram.

次に、第1図構成の動作を順次説明する。Next, the operation of the configuration shown in FIG. 1 will be sequentially explained.

第1に、定義処理部11が定義演算子およびこの定義演
算子による処理を定義する関数副プログラム4を作成す
る手順を説明する。
First, a procedure in which the definition processing unit 11 creates a definition operator and a function subprogram 4 that defines a process by this definition operator will be explained.

(1−1)定義演算子“、TETGl、”を図中■に示
すように定義する。
(1-1) Definition The operator ", TETGl," is defined as shown in ■ in the figure.

(1−2)式の変数A、変数Bの型を図中■に示すよう
に定義する。
(1-2) Define the types of variables A and B in the equation as shown in ■ in the figure.

(1−3)式の変数A、変数Bによる処理を図中■に示
ずように定義する。これは、CHAR型のBの長さを求
めて、INT型のAと加算する処理を定義している。
The processing using variables A and B in equation (1-3) is defined as shown in ■ in the figure. This defines the process of finding the length of B of CHAR type and adding it to A of INT type.

以上の手順によって、ユーザ固有の定義演算子“、TE
IGl、”およびこの定義演算子による処理を定義した
こととなる。
By the above steps, the user-specific definition operator ", TE
IGl,” and the processing by this definition operator is defined.

第2に、定義処理部11が定義演算子を記憶しておく簿
を作成する手順を説明する。
Second, a procedure for the definition processing unit 11 to create a book in which definition operators are stored will be explained.

(2−1)定義演算子の綴り“、TEIGl、”を演算
子副局簿2中に■に示すように登録する。
(2-1) Register the spelling of the definition operator ", TEIGl," in the operator sub-register 2 as shown in ■.

(2−2)実行する単位13へのポインタを演算子副局
簿2中の■に示すように登録する。この際、併せて単位
71w3から関数副プログラム4を図示のようにポイン
トすると共に、演算子周溝1の該当定義演算子のコード
の位置からこの演算子副局簿2の先頭を図示のようにポ
イントする。尚、演算子周溝1の定義演算子の同一コー
ドから複数の定義演算子の綴りが図示“、TEIGl、
”  “、TEIGl2.”のように複数ある場合には
、演算子副局′;12から連鎖(ポインタ)によって連
結する。また、同じ織りで違う定義がある場合には、第
2図に示すように、要素並び周溝を連鎖させ、そこから
それぞれの単位連を指票させる。
(2-2) Register the pointer to the unit 13 to be executed as shown in ■ in the operator substation list 2. At this time, at the same time, point the function subprogram 4 from the unit 71w3 as shown in the figure, and point the beginning of this operator substation list 2 from the code position of the corresponding definition operator of the operator circumferential groove 1 as shown in the figure. point. In addition, the spelling of multiple definition operators from the same code of the definition operator of operator circumferential groove 1 is ", TEIGl,
” “,TEIGl2. ”, they are connected by a chain (pointer) from the operator substation ′; Chain the grooves and index each unit chain from there.

第3に、式解析部12が入力された式言について、棚(
スタック)を使用して式を解析する手順を説明する。
Thirdly, the expression analysis unit 12 analyzes the input expression expression with a shelf (
Explain the steps for parsing an expression using (Stack).

(3−1)入力5の先頭の式言から取り出した文節部“
A”を文節部8に■に示すように格納する。
(3-1) Clause section extracted from the first expression of input 5 “
A'' is stored in the phrase section 8 as shown in ■.

(3−2)入力5の先頭の式言から取り出した区切り記
号部“、TEIG[、”のコードを区切り棚7に■に示
すように格納すると共に、この区切り記号部“。
(3-2) The code of the delimiter part ", TEIG[," extracted from the first expression of input 5 is stored in the partition shelf 7 as shown in ■, and this delimiter part ".

TEIGl、”の織りを綴り簿6−1に格納し、これを
ポイントするポインタを■に示すように定義演算子綴り
棚6に格納する。
The weaving of ``TEIGl,'' is stored in the spelling book 6-1, and the pointer pointing to this is stored in the definition operator spelling shelf 6 as shown in ■.

(3−3)入力5の第2番目の式言から取り出した文節
部“B”を文節部8に■に示すように格納する。
(3-3) The phrase part "B" extracted from the second expression of input 5 is stored in the phrase part 8 as shown in ■.

以上の手順によって、式言の解析が実行され、各欄に図
示のような情報が格納されることとなる。
According to the above procedure, the expression language is analyzed, and information as shown in the figure is stored in each column.

第4に、定義演算子判別部13が弐解析の一環として定
義演算子が現れたときの判別について説明する。
Fourth, the determination made by the definition operator determination unit 13 when a definition operator appears as part of the second analysis will be described.

(4−1) (3−3)の続きとして式言の第2番目の
区切り記号部のコードと、現在の区切り棚7に格納され
ている区切り記号部のコードとを比較する。
(4-1) As a continuation of (3-3), the code of the second delimiter part of the expression is compared with the code of the delimiter part currently stored in the delimiter shelf 7.

比較の結果、定義演算子のコードの方が優先順位が高い
ので、以下のものを取り出す。
As a result of the comparison, the definition operator code has a higher priority, so the following is extracted.

区切りコード 文節部8の文節(A、B) 綴り16−1の織り“、TEIGl、”(4−2)この
取り出した区切りコードと、同じコードを持つものを演
算子局7fIJ1から検索して見つける。
Delimiter code Clause section 8 (A, B) Spelling 16-1: Weaving ", TEIGl," (4-2) Search and find a phrase with the same code as this extracted delimiter code from operator station 7fIJ1. .

(4−3) (4−2)で見つけた演算子周溝1の定義
演算子から指票される演算子副局簿2の啜りあるいは更
に連鎖されている他の演算子副局簿2の啜りと、(4−
1)で取り出した定義演算子織り“、TEIGI”とを
順次比較し、一致する演算子副局簿2を見つける。ここ
では、■の綴りが一致するので、これが見つけた演算子
副局7IJ2となる。
(4-3) The definition of the operator peripheral groove 1 found in (4-2). Sip, (4-
The definition operator ``, TEIGI'' extracted in step 1) is sequentially compared to find the matching operator substation list 2. Here, since the spelling of ■ matches, this becomes the found operator substation 7IJ2.

(4−4) (4−3)で見つけた演算子副局簿2から
指票される単位連3の先の関数副プログラム4の型宣言
と、(4〜1)で取り出した文節(A、B)の型、およ
び形状が一致するか否かを検査する。
(4-4) The type declaration of the function subprogram 4 ahead of the unit set 3 indicated from the operator substation register 2 found in (4-3), and the clause (A , B) and whether they match.

(4−5) (4−4)の検査で一致した場合には、定
義演算と判定し、関数を表す第3図に示す手続き引用周
溝を作成する。
(4-5) If there is a match in the test in (4-4), it is determined that it is a definition operation, and a procedure quotation groove shown in FIG. 3 representing a function is created.

(4−6) (4−4)の検査で一致しなかった場合に
は、同じ織りで他の定義がされている第2図に示す要素
および周溝の連鎖を順次辿り同様に検索する。
(4-6) If there is no match in the test in (4-4), the chains of elements and circumferential grooves shown in FIG. 2 that have the same weave and other definitions are sequentially traced and similarly searched.

以上の手順によって、定義演算子の区切りコード、文節
、および綴りが一致した関数副プログラム4を検索して
見つけ出したこととなる。
Through the above procedure, the function subprogram 4 that matches the delimiter code, clause, and spelling of the definition operator is searched and found.

第5に、第4で定義演算と判定した関数副プログラム4
などについて、第3図手続き引用周溝に図示にように格
納する。手続き引用周溝は、関数を解決する情報を格納
した簿である。この手続き引用周溝の指票から単位溝を
介してポイントされる関数副プログラムは、(4−5)
で定義演算と判定した関数副プログラム4である。
Fifth, the function subprogram 4 determined to be a definition operation in the fourth step.
etc., are stored in the procedure reference groove in Figure 3 as shown. A procedure citation is a book that stores information for solving functions. The function subprogram pointed to from the index of the circumference groove via this procedure is (4-5)
This is function subprogram 4 that was determined to be a definition operation.

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

第1図は本発明の1実施例構成および動作説明図、第2
図は同し綴りの定義演算子がある場合の説明図、第3図
は手続き引用周溝例を示す。 図中、2は演算子副局簿、4は関数副プログラム、5は
入力(式言)、6は定義演算子綴り棚、6−1は綴り棚
、7は区切り棚、8は文節棚、11は定義処理部、12
は式解析部、13は定義演算子判別部を表す。 〔発明の効果〕 以上説明したように、本発明によれば、ユーザ固をの定
義演算子を定義および処理を記述した関数副プログラム
を予め作成しておき、式処理で定義演算子の綴りが現れ
た場合に該当する関数副プログラムなどを式処理結果と
して出力(手続き引用周溝に格納)する構成を採用して
いるため、ユーザが定義した定義演算子による処理を展
開することができる。これにより、ユーザ固有の処理を
容易にプログラミングすることが可能となる。
FIG. 1 is an explanatory diagram of the configuration and operation of one embodiment of the present invention, and FIG.
The figure is an explanatory diagram when there are definition operators with the same spelling, and FIG. 3 shows an example of a procedure citation circumferential groove. In the figure, 2 is an operator sub-station list, 4 is a function sub-program, 5 is an input (formula word), 6 is a definition operator spelling shelf, 6-1 is a spelling shelf, 7 is a dividing shelf, 8 is a phrase shelf, 11 is a definition processing section, 12
13 represents an expression analysis unit, and 13 represents a definition operator determination unit. [Effects of the Invention] As explained above, according to the present invention, a function subprogram in which a user-specific definition operator is defined and processing is written is created in advance, and the spelling of the definition operator can be changed in expression processing. Since it is configured to output (store in the procedure reference groove) the corresponding function subprogram etc. as a result of formula processing when it appears, it is possible to develop processing using definition operators defined by the user. This allows user-specific processing to be easily programmed.

Claims (1)

【特許請求の範囲】 式に現れた定義演算子の式処理を行う定義演算子処理方
式において、 定義演算子の定義およびこの定義演算子によって実行す
る処理を予め記述した関数副プログラム(4)と、 この関数副プログラム(4)によって定義された定義演
算子の綴りおよびこの関数副プログラム(4)に対応づ
けるための指票を予め登録した演算子副局簿(2)とを
備え、 入力された式言から取り出した定義演算子の綴りに対応
する該当演算子副局簿(2)を見つけ出し、この見つけ
出した演算子副局簿(2)の指票に対応する上記関数副
プログラム(4)を定義演算子の式処理結果として出力
するように構成したことを特徴とする式処理における定
義演算子処理方式。
[Claims] A definition operator processing method for processing a definition operator appearing in an expression includes: a function subprogram (4) in which a definition of a definition operator and a process to be executed by this definition operator are described in advance; , an operator sub-register (2) in which the spelling of the definition operator defined by this function sub-program (4) and an index for associating it with this function sub-program (4) are registered in advance; Find the corresponding operator sub-book (2) that corresponds to the spelling of the definition operator extracted from the expression, and create the function sub-program (4) corresponding to the index of the found operator sub-book (2). A definition operator processing method in expression processing, characterized in that it is configured to output as an expression processing result of a definition operator.
JP22211988A 1988-09-05 1988-09-05 Definition operator processing method in expression processing Pending JPH0269832A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22211988A JPH0269832A (en) 1988-09-05 1988-09-05 Definition operator processing method in expression processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22211988A JPH0269832A (en) 1988-09-05 1988-09-05 Definition operator processing method in expression processing

Publications (1)

Publication Number Publication Date
JPH0269832A true JPH0269832A (en) 1990-03-08

Family

ID=16777456

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22211988A Pending JPH0269832A (en) 1988-09-05 1988-09-05 Definition operator processing method in expression processing

Country Status (1)

Country Link
JP (1) JPH0269832A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5010624A (en) * 1988-12-09 1991-04-30 Hans Stahlecker Spinning machine having several spinning points

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5010624A (en) * 1988-12-09 1991-04-30 Hans Stahlecker Spinning machine having several spinning points

Similar Documents

Publication Publication Date Title
Reddy et al. Transforming dependency structures to logical forms for semantic parsing
US6219831B1 (en) Device and method for converting computer programming languages
JPH0261763A (en) Mechanical translation equipment
JPH0269832A (en) Definition operator processing method in expression processing
Hastings Design and implementation of a speech recognition database query system
JPH02129756A (en) Word collating device
Nirenburg et al. HUHU: the hebrew university hebrew understander
Saxena et al. Compiler Design
JP3007356B2 (en) Compiling device
JPH0320866A (en) Text-based search method
JPH034366A (en) Data base inquiry processing system
JP3311775B2 (en) Pointer vectorization method
JPH06168271A (en) Data base retrieval system utilizing dictionary by item
JPH02208775A (en) Machine translation system
JPH02178845A (en) Precompiling system for data base operation language
JPH036622A (en) Compile list output device
JPS6386071A (en) Translation system for natural language
Stognii et al. A symbolic manipulation language for hypertext systems
JPS62282329A (en) Information processor
Novikov File mapping Rule-based DBMS and Natural Language Processing
JPH0752391B2 (en) Translation method of source program including multiple database descriptions
JPH0490051A (en) Natural language automatic translator
Perwaiz An extensible system for the automatic translation of a class of programming languages
Gracida et al. NPS-PASCAL: a partial implementation of PASCAL for a microprocessor-based computer system.
JPH04149636A (en) Cross-reference processing system