JPH01291329A - High speed compile processing system - Google Patents

High speed compile processing system

Info

Publication number
JPH01291329A
JPH01291329A JP12044188A JP12044188A JPH01291329A JP H01291329 A JPH01291329 A JP H01291329A JP 12044188 A JP12044188 A JP 12044188A JP 12044188 A JP12044188 A JP 12044188A JP H01291329 A JPH01291329 A JP H01291329A
Authority
JP
Japan
Prior art keywords
sentence
identifier
processing
compiler
statement
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
JP12044188A
Other languages
Japanese (ja)
Inventor
Yoichi Sato
洋一 佐藤
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 JP12044188A priority Critical patent/JPH01291329A/en
Publication of JPH01291329A publication Critical patent/JPH01291329A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To omit the determination processing for a kind of a sentence and to execute the compile processing at high speed by designating a classification of the sentence onto a source text and recognizing it by a compiler. CONSTITUTION:A source text is generated, while designating a sentence identifier for showing a kind of a sentence at every sentence to a fixed column which is determined at every compiler. A sentence identifier read-in part 1 in a sentence structure analyzing part 11 of the compiler reads in its sentence identifier, decides whether this sentence identifier coincides with that which is registered or not by a sentence identifier deciding part 2, and when they do not coincide, the second token generating part B6 and an existing system sentence processing part 7 are started and a classification determination processing of the sentence which is being processed at present is executed. Also, when the sentence identifier has coincided with that which is registered, a token generating part A3 and a designated sentence processing part 4 are started, and in an intermediate text output part 9, an intermediate text is generated, and outputted to an intermediate text file 14. In such a way, a determination processing for a kind of a sentence form becomes unnecessary, and the processing can be executed at a high speed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、電子計算機システムで実行される言語プロセ
ッサに関し、特にPL/Iなどのように予約語をもたな
いプログラミング言語の言語プロセッサC以下、コンパ
イラと略す)の処理の高速化に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a language processor executed in an electronic computer system, and particularly to language processors C and below for programming languages that do not have reserved words, such as PL/I. , compiler) processing speed.

〔従来の技術〕[Conventional technology]

従来、この種の予約語のないプログラミング言語のコン
パイル処理方式では、ソーステキスト上の各文毎の最初
のトークンの種別によ92文の種類の予測をし、入力し
たソーステキストが予測した文の文型に合っているか否
かチエツクしていた。
Conventionally, in the compilation processing method of this kind of programming language without reserved words, 92 types of sentences are predicted based on the type of the first token of each sentence in the source text, and the input source text is used to predict the type of the predicted sentence. I was checking to see if it matched the sentence pattern.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながら、上述した従来の予約語をもたないプログ
ラミング言語のコンパイル処理方式では1文毎に予測し
た文型に、入力したソーステキスト上の文型が合ってい
ない場合には、別の文型を予測し、入力したソーステキ
スト上の文の初めから新たに予測した文の文型に合って
いるが否かを検索し直す。
However, in the above-mentioned conventional compilation processing method of a programming language that does not have reserved words, if the sentence pattern on the input source text does not match the sentence pattern predicted for each sentence, a different sentence pattern is predicted, A search is performed again to determine whether the sentence pattern of the newly predicted sentence matches the sentence pattern from the beginning of the sentence on the input source text.

このように、予測した文型に合っていない場合には1次
々に別の文を予測して検索し直すためにコンパイル速度
が遅くなるという欠点があった。
In this way, if the predicted sentence pattern does not match, another sentence is predicted one after another and the search is re-searched, which has the disadvantage of slowing down the compilation speed.

そこで9本発明の技術的課題は、上記欠点に鑑み9文型
の種類の決定処理を不要とすることによ)、コンパイル
処理速度を高速化することができる高速コンパイル処理
方式を提供することである。
In view of the above-mentioned drawbacks, the technical object of the present invention is to provide a high-speed compilation processing method that can speed up the compilation processing (by eliminating the need for determining the type of sentence type). .

〔問題点を解決するだめの手段〕[Failure to solve the problem]

本発明によれば、利用者の文種類指定による予約語なし
コンパイラの高速コンパイル処理方式であって、PL/
Iなどのように予約語をもたないプログラミング言語の
言語プロセッサを構成する構文解析部において、ソース
テキスト上の各文を入力するときに、コンパイラ毎に決
められている固定カラムから予め定められた(オl]用
者指定等)文の種類を示す文識別子を入力する文識別子
読み込み部と2文識別子読み込み部で入力した文識別子
が登録済みの文識別子か否か判定する文識別子判定部と
9文識別子が登録済みの文識別子であるときに。
According to the present invention, there is provided a high-speed compilation processing method for a compiler without reserved words based on the user's statement type specification,
When inputting each sentence in the source text, the syntax analysis unit that makes up the language processor for programming languages that do not have reserved words, such as I, uses predetermined columns from fixed columns determined for each compiler. (User specification, etc.) A sentence identifier reading section that inputs a sentence identifier indicating the type of sentence; and a sentence identifier determining section that determines whether the sentence identifier input in the sentence identifier reading section is a registered sentence identifier. 9 When the sentence identifier is a registered sentence identifier.

ソーステキストを読み込みコンパイラの処理単位である
トークンを作成するトークン作成部と2文識別子で指定
された文の構文解析処理をする指定文処理部とを有して
いることを特徴とする高速コンパイル処理速度が得られ
る。
A high-speed compilation process characterized by having a token creation unit that reads source text and creates tokens that are processing units of the compiler, and a specified statement processing unit that performs syntactic analysis of a statement specified by a two-sentence identifier. You get speed.

〔実施例〕〔Example〕

次に2本発明の実施例について図面を参照して説明する
Next, two embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の構成を表わす図である。第2図は第1
図の既存方式文処理中で文の種別を決定する処理の流れ
図である。第3図は第1図の指示文処理の詳細図である
FIG. 1 is a diagram showing the configuration of the present invention. Figure 2 is the first
3 is a flowchart of a process for determining a sentence type in the existing method sentence processing shown in FIG. FIG. 3 is a detailed diagram of the directive processing shown in FIG. 1.

第1図を参照すると2本発明の一実施例に係わる利用者
の文種類指定による予約語なしコンパイラの高速コンパ
イル処理方式は、まず、コンパイラ毎に決められている
固定カラムに利用者が文毎に文の種類を示す文識別子を
指定しながらソーステキストを作成する。コンパイラ毎 中の文識別子読み込み部1は、この固定カラムから利用
者が指定した文識別子を読み込み2文識別子判定部2で
、この文識別子が登録されているものと一致するか否か
を判定する。
Referring to FIG. 1, the high-speed compilation processing method of the compiler without reserved words based on the user's statement type specification according to an embodiment of the present invention is as follows. Create the source text while specifying the sentence identifier that indicates the type of sentence. The statement identifier reading unit 1 in each compiler reads the statement identifier specified by the user from this fixed column, and the statement identifier determining unit 2 determines whether this statement identifier matches a registered one. .

一致しない場合には、この対応する文には文識別子は指
定されなかったものとして、第2トークン作成部B6を
起動し、既存方式文処理部7を起動して、第2図に詳細
に説明した流れ図に従って。
If they do not match, it is assumed that no sentence identifier has been specified for this corresponding sentence, and the second token creation unit B6 is activated, the existing method sentence processing unit 7 is activated, and the process is explained in detail in FIG. Follow the flow chart.

現在処理中の文の種別決定処理を行なう。すなわち、ソ
ーステキストを読み込みトークン化したトークンが留め
置かれているか否かを21で判定する。有る場合にはト
ークンを入力順に順次処理し。
Performs processing to determine the type of sentence currently being processed. That is, it is determined in step 21 whether or not a token obtained by reading the source text and tokenizing it is retained. If there are, process the tokens sequentially in the input order.

今予測している文と文型が一致するか判定する。Determine whether the sentence pattern matches the currently predicted sentence.

文型が一致し2文の種類が決定したときは現在処理して
いた文型と決定28の処理を行ない、第1図の中間テキ
スト出力部9を実行し、中間テキストを作成する。文型
が現在予測している文と一致しないときは2次の文の文
型決定処理29を行ない新しい文型を新たに予測し、第
2図の初めから処理を再開する。トークン化したトーク
ンが無い場合にはトークンの読み込み25を行ないソー
ステキストヲトークン化し、22,23.24で述べた
と同様の処理を行なって文型の決定処理を行なう。
When the sentence patterns match and the types of the two sentences are determined, the currently processed sentence pattern and determination process 28 are performed, and the intermediate text output section 9 of FIG. 1 is executed to create an intermediate text. If the sentence pattern does not match the currently predicted sentence, a second sentence pattern determination process 29 is performed to newly predict a new sentence pattern, and the process restarts from the beginning of FIG. If there is no tokenized token, the token is read 25 to tokenize the source text, and the same processing as described in 22, 23, and 24 is performed to determine the sentence pattern.

一方2文識別子判定部2で利用者指定の文識別子が登録
されているものと一致した場合にはトークン作成部A3
および指示文処理4を起動し、ソーステキストの構文形
式が利用者指定の文の文型と一致するか否かを第3図の
31で判定する。−致しない場合は構文形式にエラーが
あるものとしてエラー出力部32でエラーを出力する。
On the other hand, if the user-specified sentence identifier matches the registered one in the two-sentence identifier determination unit 2, the token creation unit A3
Then, the instruction sentence processing 4 is activated, and it is determined at 31 in FIG. 3 whether the syntactic form of the source text matches the sentence type of the sentence specified by the user. - If they do not match, it is assumed that there is an error in the syntax format, and the error output section 32 outputs an error.

エラーの検出が行なわれることなく一文処理が終了した
場合には、中間テキスト出力部9で中間テキストを作成
し、中間テキストファイル14へ出力する。
If one sentence processing is completed without any error being detected, an intermediate text is created by the intermediate text output unit 9 and output to the intermediate text file 14.

順次、上述の処理を繰返し、入力ソーステキストが無く
なれば制御を意味解析部12へ移行する。
The above-described process is sequentially repeated, and when there is no more input source text, control is transferred to the semantic analysis section 12.

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

以上詳細に説明したように2本発明によれば。 According to two aspects of the present invention, as described in detail above.

利用者に文の種別をソーステキスト上に指定させ。Let the user specify the type of sentence on the source text.

コンパイラがこれを認識することにより、コンパイラが
行なうべき文の種類の決定処理を省くことが可能になり
、コンパイル処理の高速化ができる効果がある。文の種
別を指定するカラムはコンパイル時オプションで指定す
ることもできる。
When the compiler recognizes this, it becomes possible to omit the process of determining the type of statement to be performed by the compiler, which has the effect of speeding up the compilation process. The column that specifies the statement type can also be specified as a compile-time option.

尚、この機能を使用したくない場合には文識別子を指定
するカラムを空白等にしておけば、既存のコンパイラと
同じくコンパイラが文の種別を決定する処理を行なうこ
ともできる。
Note that if you do not want to use this function, you can leave the column for specifying the statement identifier blank, etc., and the compiler can perform the process of determining the statement type in the same way as existing compilers.

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

第1図は本発明の一実施例に係わる利用者の文種類指定
による予約語なしコンパイラの高速コンノ4イル処理方
式の全体構成図、第2図は第1図中の既存方式文処理部
の詳細な流れ図、第3図は第1図の指示文処理部の詳細
図である。 1・・・文識別子読み込み部、2・・・文識別子判定部
。 3・・・トークン作成部A、4・・・指示文処理部、5
・・・−文処理終了判定部A、6・・・トークン作成部
B。 7・・・既存方式文処理部、8・・・−文処理終了判定
部B、9・・・中間テキスト出力部、10・・・ソース
テキスト終了判定部、11・・・構文解析部、12・・
・意味解析部、13・・・ソーステキストファイル、1
4・・・中間テキストファイル。
FIG. 1 is an overall configuration diagram of a high-speed con-file processing method of a compiler without reserved words based on the user's statement type specification according to an embodiment of the present invention, and FIG. A detailed flowchart, FIG. 3, is a detailed diagram of the instruction text processing section of FIG. 1... Sentence identifier reading section, 2... Sentence identifier determining section. 3... Token creation section A, 4... Directive sentence processing section, 5
. . . - Sentence processing end determination unit A, 6 . . . Token creation unit B. 7... Existing method sentence processing unit, 8...-Sentence processing end determination unit B, 9... Intermediate text output unit, 10... Source text end determination unit, 11... Syntax analysis unit, 12・・・
・Semantic analysis section, 13... Source text file, 1
4...Intermediate text file.

Claims (1)

【特許請求の範囲】[Claims] 1、ソーステキスト上の各文を入力するときに、コンパ
イラ毎に決められている固定カラムから予め定められた
文の種類を示す文識別子を入力する文識別子読み込み部
と、文識別子読み込み部で入力した文識別子が登録済み
の文識別子か否かを判定する文識別子判定部と、文識別
子が登録済みの文識別子であるときに、ソーステキスト
を読み込み、コンパイラの処理単位であるトークンを作
成するトークン作成部と、文識別子で指定された文の構
文解析処理をする指定文処理部とを含むことを特徴とす
るコンパイラの高速コンパイル処理方式。
1. When inputting each sentence on the source text, there is a sentence identifier reading section that inputs a sentence identifier indicating a predetermined type of sentence from a fixed column determined for each compiler, and a sentence identifier reading section. A statement identifier determination unit that determines whether a given statement identifier is a registered statement identifier; and a token that reads the source text and creates a token, which is a processing unit of the compiler, when the statement identifier is a registered statement identifier. A high-speed compilation processing method for a compiler, characterized by including a creation section and a specified statement processing section that performs syntactic analysis of a statement specified by a statement identifier.
JP12044188A 1988-05-19 1988-05-19 High speed compile processing system Pending JPH01291329A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12044188A JPH01291329A (en) 1988-05-19 1988-05-19 High speed compile processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12044188A JPH01291329A (en) 1988-05-19 1988-05-19 High speed compile processing system

Publications (1)

Publication Number Publication Date
JPH01291329A true JPH01291329A (en) 1989-11-22

Family

ID=14786283

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12044188A Pending JPH01291329A (en) 1988-05-19 1988-05-19 High speed compile processing system

Country Status (1)

Country Link
JP (1) JPH01291329A (en)

Similar Documents

Publication Publication Date Title
JPH01291329A (en) High speed compile processing system
JPH07121379A (en) Plural languages mixing compiler
WO1997007452A1 (en) Programmable compiler
JP2585790B2 (en) Compile processing method for multiple code systems
JPS6074039A (en) Recognition processing system of compiler language
JPH06242958A (en) Compilation system
JPH03248264A (en) Japanese-language sentence elaborating device
JPH0752391B2 (en) Translation method of source program including multiple database descriptions
JPS58114247A (en) Automatic precision extending system
Aristar Unification and the computational analysis of Arabic
JPH04107738A (en) Optimum allocation system for literal
JPH03144830A (en) Parallel processing system
JPH0340033A (en) Recognizing/processing system for code system of call origin
JPH0425969A (en) Compiling system which is made into definition arrangement vector under if sentence
JPH01298464A (en) Japanese language dictionary access system
JPH04364537A (en) Method, device, and compiler for optimizing program for parallel process
JPH01211120A (en) Syntax analyzing processing method
JPH05216683A (en) Filing procedure automatic generation method of non-language dependency
JPH0239331A (en) Debug sentence producing device
JPH11353166A (en) System and method for comment addition
JPS6315335A (en) Expanding system for end user language for data base to natural language
JPH0244427A (en) Program translation and conversion system
JPH0950429A (en) Pointer vectorization system in compiler
JPS62297973A (en) Editing device for soft specification using meaning of input data
JPH05233314A (en) System for compilation processing and vocabulary dictionary processing in program execution