JPH0573330A - Syntax analysis processing system - Google Patents
Syntax analysis processing systemInfo
- Publication number
- JPH0573330A JPH0573330A JP15073991A JP15073991A JPH0573330A JP H0573330 A JPH0573330 A JP H0573330A JP 15073991 A JP15073991 A JP 15073991A JP 15073991 A JP15073991 A JP 15073991A JP H0573330 A JPH0573330 A JP H0573330A
- Authority
- JP
- Japan
- Prior art keywords
- syntax
- text
- source
- output
- analysis
- 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
- 238000004458 analytical method Methods 0.000 title claims abstract description 42
- 238000000034 method Methods 0.000 claims abstract description 6
- 230000004048 modification Effects 0.000 claims description 5
- 238000012986 modification Methods 0.000 claims description 4
- 238000003672 processing method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- RKWPMPQERYDCTB-UHFFFAOYSA-N ethyl n-[4-[benzyl(2-phenylethyl)amino]-2-(4-nitrophenyl)-1h-imidazo[4,5-c]pyridin-6-yl]carbamate Chemical compound N=1C(NC(=O)OCC)=CC=2NC(C=3C=CC(=CC=3)[N+]([O-])=O)=NC=2C=1N(CC=1C=CC=CC=1)CCC1=CC=CC=C1 RKWPMPQERYDCTB-UHFFFAOYSA-N 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Devices For Executing Special Programs (AREA)
- Stored Programmes (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は構文解析処理方式に関
し、特にコンピュータのエディタおよびコンパイラに必
要な構文解析を行うための構文解析処理方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a syntax analysis processing method, and more particularly to a syntax analysis processing method for performing syntax analysis necessary for an editor and a compiler of a computer.
【0002】[0002]
【従来の技術】従来の構文解析処理方式は、エディタで
字句解析および構文チェックを行い、構文チェック済み
のソースプログラムのコンパイル時に、再度コンパイラ
で字句解析および構文解析を行っていた。2. Description of the Related Art In the conventional syntax analysis processing method, a lexical analysis and a syntax check are performed by an editor, and the lexical analysis and the syntax analysis are performed again by the compiler when the source program whose syntax has been checked is compiled.
【0003】[0003]
【発明が解決しようとする課題】しかし、上述した従来
の構文解析処理方式は、エディタで字句解析および構文
チェックを行い、構文チェック済みのソースプログラム
のコンパイル時に、再度コンパイラで字句解析および構
文解析を行うという無駄があり、ソースプログラムの修
正からコンパイルの終了までに多くの時間がかかるとい
う欠点を有している。However, in the conventional parsing processing method described above, the lexical analysis and the syntax check are performed by the editor, and the lexical analysis and the syntax analysis are performed again by the compiler when the source program whose syntax has been checked is compiled. There is a waste of doing it, and it has a drawback that it takes a lot of time from the modification of the source program to the end of the compilation.
【0004】[0004]
【課題を解決するための手段】本発明の構文解析処理方
式は、ソースプログラムの修正を行うソースエディット
手段と、前記ソースプログラムの修正後のソーステキス
トの構文を解析してチェックする構文チェック手段と、
構文チェックの過程でコンパイラの構文解析の出力結果
と同様の構文テキストを生成出力する構文テキスト出力
手段と、前記構文テキストが出力されていることを示す
構文テキスト出力情報をソースライブラリ内に設定する
構文テキスト出力情報設定手段とをエディタに含むとと
もに、次のコンパイラにより、ソース入力手段でソース
プログラムを入力し、前記エディタで設定された前記構
文テキスト出力情報を判定して、前記構文テキストが出
力されていないならば、字句解析手段で字句解析をし
て、構文解析手段で構文解析を実行し、前記構文テキス
トが出力済みであれば、構文テキスト入力手段で前記エ
ディタが生成して出力した前記構文テキストを入力し、
コンパイル手段でコンパイルすることにより構成されて
いる。The syntax analysis processing method of the present invention comprises a source edit means for modifying a source program and a syntax check means for analyzing and checking the syntax of the modified source text of the source program. ,
A syntax text output means for generating and outputting the same syntax text as the output result of the syntax analysis of the compiler in the syntax check process, and a syntax for setting the syntax text output information indicating that the syntax text is output in the source library. A text output information setting means is included in the editor, and a source program is input by the source input means by the following compiler, the syntax text output information set by the editor is judged, and the syntax text is output. If not, the lexical analysis means performs lexical analysis, the syntactic analysis means executes syntactic analysis, and if the syntactic text has been output, the syntactic text output means generates and outputs the syntactic text. Enter
It is configured by compiling by a compiling means.
【0005】[0005]
【実施例】次に、本発明の実施例について図面を参照し
て説明する。Embodiments of the present invention will now be described with reference to the drawings.
【0006】図1は本発明の構文解析処理方式の一実施
例を示すブロック図である。図1に示すように、エディ
タ1は、ソースエディット手段2と、構文チェック手段
3と、構文テキスト出力手段4と、構文テキスト出力情
報設定手段5とを含み、ソースライブラリ6内のソース
プログラムを修正して、字句解析および構文チェックを
行い、構文チェック後にコンパイラ8で使用する構文テ
キストを構文テキストファイル7に生成して出力する。FIG. 1 is a block diagram showing an embodiment of the syntax analysis processing system of the present invention. As shown in FIG. 1, the editor 1 includes a source edit means 2, a syntax check means 3, a syntax text output means 4 and a syntax text output information setting means 5, and corrects a source program in a source library 6. Then, the lexical analysis and the syntax check are performed, and after the syntax check, the syntax text used by the compiler 8 is generated and output in the syntax text file 7.
【0007】また、コンパイラ8は、ソース入力手段9
と、構文テキスト出力有無判定10と、構文テキスト入
力手段11と、字句解析手段12と、構文解析手段13
と、コンパイル手段15とを含み、コンパイルの対象と
なるソースプログラムが、既にエディタ1で構文テキス
トを生成して出力している場合に、コンパイラ8の字句
解析および構文解析処理を行わずに、エディタ1で作成
された構文テキストファイル7を使用してコンパイルを
行う。Further, the compiler 8 has a source input means 9
, Syntax text output presence / absence determination 10, syntax text input means 11, lexical analysis means 12, and syntax analysis means 13
And the compile means 15, and the source program to be compiled has already generated and output the syntax text in the editor 1, the lexical analysis and syntax analysis processing of the compiler 8 is not performed. Compile using the syntax text file 7 created in 1.
【0008】まず、エディタ1は、エディタ開始指示に
よりソースエディット手段2を呼ぶ。ソースエディット
手段2は、ソースライブラリ6より修正するソースプロ
グラムのソーステキストを読み込み、利用者によるソー
スプログラムの追加,変更,削除などのソースプログラ
ムの修正処理を行い、その処理の終了後に構文チェッッ
ク手段3を呼ぶ。構文チェック手段3は、ソースライブ
ラリ6内のソーステキストに対してコンパイラ8と同様
の字句解析および構文チェックを行うと共に、その過程
で構文テキスト出力手段4を呼ぶ。構文テキスト出力手
段4は、コンパイラ8における構文解析処理の入力とな
る構文テキストを生成し、構文テキストファイル7に出
力する。以降、ソースライブラリ6内のソースプログラ
ム6内のソースプログラムが終了するまで構文チェック
手段3および構文テキスト出力手段4の処理を繰り返
し、その終了後に構文テキスト出力情報設定手段5を呼
ぶ。構文テキスト出力情報設定手段5は、ソースライブ
ラリ6内の対象のソースプログラムのメンバ(サブファ
イル)情報に構文テキストを生成して出力したことを示
す構文テキスト出力情報を設定する。First, the editor 1 calls the source edit means 2 according to an editor start instruction. The source edit means 2 reads the source text of the source program to be modified from the source library 6 and performs the source program modification processing such as addition, modification and deletion of the source program by the user, and after the completion of the processing, the syntax check means 3 Call. The syntax check unit 3 performs the same lexical analysis and syntax check as the compiler 8 on the source text in the source library 6, and calls the syntax text output unit 4 in the process. The syntax text output means 4 generates syntax text which is an input of the syntax analysis processing in the compiler 8 and outputs it to the syntax text file 7. After that, the processes of the syntax check unit 3 and the syntax text output unit 4 are repeated until the source program in the source program 6 in the source library 6 is completed, and after that, the syntax text output information setting unit 5 is called. The syntax text output information setting means 5 sets the syntax text output information indicating that the syntax text is generated and output to the member (subfile) information of the target source program in the source library 6.
【0009】次に、コンパイラ8は、コンパイル開始指
示によりソース入力手段9を呼ぶ。ソース入力手段9
は、ソースライブラリ6から該当するソースプログラム
とメンバ(サブファイル)情報とを読み込む。そして、
構文テキスト出力有無判定10により、読み込まれたソ
ースプログラムのメンバ(サブファイル)情報内の構文
テキスト出力情報を判定し、該ソースプログラムがエデ
ィタ1により構文テキストが出力されているならば、構
文テキスト入力手段11を呼ぶ。構文テキスト入力手段
11は、エディタ1により作成された構文テキストファ
イル7内の該ソースプログラムの構文テキストを検索
し、構文テキスト格納領域14に出力し、次のコンパイ
ル手段15を呼ぶ。Next, the compiler 8 calls the source input means 9 in accordance with a compilation start instruction. Source input means 9
Reads the corresponding source program and member (subfile) information from the source library 6. And
The syntax text output presence / absence judgment 10 judges the syntax text output information in the read member (subfile) information of the source program, and if the source program outputs the syntax text, the syntax text input. The means 11 is called. The syntax text input means 11 retrieves the syntax text of the source program in the syntax text file 7 created by the editor 1, outputs it to the syntax text storage area 14, and calls the next compilation means 15.
【0010】なお、構文テキスト出力有無判定10によ
り、読み込まれたソースプログラムのメンバ(サブファ
イル)情報内の構文テキスト出力情報の判定結果が、構
文テキストの出力がなしならば、従来のコンパイル処理
である字句解析手段12並びに構文解析手段13により
構文テキストを生成し、構文テキスト格納領域14に出
力し、次のコンパイル手段15を呼ぶ。If the result of the determination of the syntax text output information in the member (subfile) information of the read source program by the syntax text output presence / absence determination 10 is that the syntax text is not output, the conventional compile processing is performed. The lexical analysis means 12 and the syntax analysis means 13 generate syntax text, output it to the syntax text storage area 14, and call the next compilation means 15.
【0011】[0011]
【発明の効果】以上説明したように、本発明の構文解析
処理方式は、ソースプログラムのエディット時に字句解
析および構文チェックを行い、次にコンパイル時に再度
字句解析および構文解析を行うのではなく、エディット
時の構文チェックで構文テキストを出力し、次のコンパ
イル時にエディタで作成した構文テキストを使用するた
めに、再度の字句解析および構文解析を行う必要がな
く、エディタによるソースプログラムの修正からコンパ
イルの終了までの時間を短縮することができるという効
果を有している。As described above, the syntax analysis processing method of the present invention does not perform lexical analysis and syntax check at the time of editing a source program, and then performs lexical analysis and syntax analysis again at the time of compilation, rather than editing. Output the syntax text at the time of the syntax check and use the syntax text created by the editor at the next compilation, so that it is not necessary to perform the lexical analysis and the parsing again, and the editor ends the compilation from the modification of the source program. It has the effect of shortening the time until.
【図1】本発明の構文解析処理方式の一実施例を示すブ
ロック図である。FIG. 1 is a block diagram showing an embodiment of a syntax analysis processing system of the present invention.
1 エディタ 2 ソースエディット手段 3 構文チェック手段 4 構文テキスト出力手段 5 構文テキスト出力情報設定手段 6 ソースライブラリ 7 構文テキストファイル 8 コンパイラ 9 ソース入力手段 10 構文テキスト出力有無判定 11 構文テキスト入力手段 12 字句解析手段 13 構文解析手段 14 構文テキスト格納領域 15 コンパイル手段 1 editor 2 source edit means 3 syntax check means 4 syntax text output means 5 syntax text output information setting means 6 source library 7 syntax text file 8 compiler 9 source input means 10 syntax text output presence / absence 11 syntax text input means 12 lexical analysis means 13 syntax analysis means 14 syntax text storage area 15 compilation means
Claims (1)
ディット手段と、前記ソースプログラムの修正後のソー
ステキストの構文を解析してチェックする構文チェック
手段と、構文チェックの過程でコンパイラの構文解析の
出力結果と同様の構文テキストを生成出力する構文テキ
スト出力手段と、前記構文テキストが出力されているこ
とを示す構文テキスト出力情報をソースライブラリ内に
設定する構文テキスト出力情報設定手段とをエディタに
含むとともに、次のコンパイラにより、ソース入力手段
でソースプログラムを入力し、前記エディタで設定され
た前記構文テキスト出力情報を判定して、前記構文テキ
ストが出力されていないならば、字句解析手段で字句解
析をして、構文解析手段で構文解析を実行し、前記構文
テキストが出力済みであれば、構文テキスト入力手段で
前記エディタが生成して出力した前記構文テキストを入
力し、コンパイル手段でコンパイルすることを特徴とす
る構文解析処理方式。1. A source edit means for modifying a source program, a syntax check means for analyzing and checking the syntax of the source text after modification of the source program, and an output result of the syntax analysis of a compiler in the process of syntax check. And a syntax text output means for generating and outputting the same syntax text as the above, and a syntax text output information setting means for setting the syntax text output information indicating that the syntax text is output in the source library, With the following compiler, the source program is input by the source input means, the syntax text output information set by the editor is determined, and if the syntax text is not output, the lexical analysis means performs lexical analysis. Then, the syntactic analysis means executes syntactic analysis, and the syntactic text is output. In this case, the syntax text processing means is characterized in that the syntax text input means inputs the syntax text generated and output by the editor and the compiling means compiles the text.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15073991A JPH0573330A (en) | 1991-06-24 | 1991-06-24 | Syntax analysis processing system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15073991A JPH0573330A (en) | 1991-06-24 | 1991-06-24 | Syntax analysis processing system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0573330A true JPH0573330A (en) | 1993-03-26 |
Family
ID=15503360
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP15073991A Pending JPH0573330A (en) | 1991-06-24 | 1991-06-24 | Syntax analysis processing system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0573330A (en) |
-
1991
- 1991-06-24 JP JP15073991A patent/JPH0573330A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5606697A (en) | Compiler system for language processing program | |
| JP2811990B2 (en) | Program processing device and program processing method | |
| JPH05257709A (en) | Parallelism discriminating method and parallelism supporting method using the same | |
| JP3196675B2 (en) | Language processing method | |
| JPH0573330A (en) | Syntax analysis processing system | |
| JPH09218789A (en) | Separate compilation method | |
| JPH05197561A (en) | Compilation system | |
| JP3903514B2 (en) | Optimized compiler for undefined variable detection | |
| JP2956591B2 (en) | Method and apparatus for parallelizing a loop having a conditional jump out of the loop | |
| JP2001125793A (en) | Compiler system, compile method and recording medium | |
| JPH0358232A (en) | Preprocessor calling system | |
| JPH0749788A (en) | Compile processing system | |
| JP2000242504A (en) | Compiler device | |
| JP2000353112A (en) | Method and system for debugging intermediate language level | |
| JPS63298451A (en) | Purpose program generation method for debugging | |
| JPH06290052A (en) | Recompiling system | |
| JPH03144830A (en) | Parallel processing system | |
| JP3018783B2 (en) | Compilation method | |
| JPH1083311A (en) | Simulator | |
| JPH05341982A (en) | Program development support device | |
| JPH05324344A (en) | Argument processing optimization method at the time of function call | |
| JPH0126091B2 (en) | ||
| JPH06314221A (en) | Compile method | |
| JPH01128136A (en) | Compiling process system | |
| JPH04273532A (en) | Validity/invalidity setting system for in-source program selective line |