JPH04336669A - Intermediated code generation system for text - Google Patents

Intermediated code generation system for text

Info

Publication number
JPH04336669A
JPH04336669A JP3107770A JP10777091A JPH04336669A JP H04336669 A JPH04336669 A JP H04336669A JP 3107770 A JP3107770 A JP 3107770A JP 10777091 A JP10777091 A JP 10777091A JP H04336669 A JPH04336669 A JP H04336669A
Authority
JP
Japan
Prior art keywords
intermediate code
source
original text
original
text
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
JP3107770A
Other languages
Japanese (ja)
Inventor
Satoshi Hara
聡 原
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 Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP3107770A priority Critical patent/JPH04336669A/en
Publication of JPH04336669A publication Critical patent/JPH04336669A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten preparation time for intermediate code files using the vocabulary analysis of a translation system by performing the vocabulary analysis while inputting a text source and eliminating a processing generating the intermediate code. CONSTITUTION:A text source 3 once processed by a vocabulary analysis part 2 of a translation system 1 remains as a text intermediate code file 7 and the remaining intermediate code is used directly without performing the vocabulary analysis of the text source when the translation system 1 is started again and the copy of the same text is instructed or when commands of the copy of the same text are repeated.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は翻訳システムに関し、特
にソースプログラムに原文を複写するときの中間コード
生成方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a translation system, and more particularly to an intermediate code generation method when copying an original text into a source program.

【0002】0002

【従来の技術】翻訳システムの語彙解析部では、中間コ
ードを作成する過程に於いて原文の複写を要求された時
、その原文のソースを入力し逐次原文ソースに対して語
彙解析を行って中間コードを生成する処理になっている
[Prior Art] When a lexical analysis unit of a translation system is requested to copy an original text in the process of creating an intermediate code, the source of the original text is input, and the lexical analysis unit of a translation system sequentially performs lexical analysis on the original text source to create an intermediate code. The process is to generate code.

【0003】0003

【発明が解決しようとする課題】上述した従来の語彙解
析部の原文ソースに対応した中間コード生成処理では、
生成された中間コード領域の中間コードを一時的なもの
として廃棄していたため、同じソースプログラム内にす
でに処理された原文の複写を要求された場合、また別の
翻訳システムが起動され既に原文ソースに対する中間コ
ード生成処理がなされたことがある場合でも、逐次原文
ソースに対して語彙解析を行って中間コードを生成する
ため、中間コード生成処理に時間がかかるといった欠点
がある。
[Problems to be Solved by the Invention] In the intermediate code generation process corresponding to the original text source of the conventional lexical analysis unit described above,
Since the intermediate code in the generated intermediate code area was discarded as temporary, if a request is made to copy the already processed original text in the same source program, another translation system will be started and it will copy the original text that has already been processed. Even if intermediate code generation processing has been performed before, intermediate code generation processing is time-consuming because the intermediate code is generated by sequentially performing lexical analysis on the original text source.

【0004】0004

【課題を解決するための手段】本発明の原文の中間コー
ド生成方式は、ソースプログラム中に他の原文を複写す
ることのできる翻訳システムにおいて、原文ソースごと
に語彙解析を行って得た原文の中間コードを登録した語
彙解析済みの原文中間コードファイルを有し、ソースプ
ログラムを入力し複写の指示があった時に呼び出され、
原文ソースの格納されているファイルから原文名をキー
として検索し原文ソースの世代情報を取得する原文ソー
ス世代情報取得手段と、原文ソースの世代情報と原文名
をキーとし前記語彙解析済みの原文中間コードファイル
を検索する原文中間レコードファイル検索手段と、前記
原文中間レコードファイル検索手段により語彙解析済み
の原文中間コードファイルが発見された場合に原文ソー
スに対応する語彙解析済みの原文中間コードを前記語彙
解析済みの原文中間コードファイルから中間コード領域
に入力する原文中間コードファイル入力手段と、前記原
文中間レコードファイル検索手段により語彙解析済みの
原文中間コードファイルが発見されない場合の原文ソー
スや、原文ソース以外のソースプログラムを語彙解析し
て中間コードに変換し中間コード領域に書き込む中間コ
ード生成手段と、前記原文中間コードファイル入力手段
または、前記中間コード生成手段によって設定された中
間コード領域の内容を、中間コードファイルに出力する
中間コード出力手段と、前記原文中間コードファイル検
索手段で発見されなかった場合にその原文に対する中間
コードを原文名と世代情報をキーとし前記語彙解析済み
の原文中間コードファイルに登録する原文中間コード登
録手段とで構成されることを特徴とする。
[Means for Solving the Problems] The original intermediate code generation method of the present invention is a translation system that can copy other original texts into a source program. It has a lexically analyzed original intermediate code file in which intermediate codes are registered, and is called when a source program is input and a copy instruction is received.
an original text source generation information acquisition means for searching a file in which the original text source is stored using the original text name as a key and obtaining generation information of the original text source; a source intermediate record file search means for searching a code file, and when a lexically analyzed source intermediate code file is found by the source intermediate record file search means, the lexically analyzed source intermediate code corresponding to the source source is searched for in the lexicon; An original text intermediate code file input means for inputting the analyzed original text intermediate code file into the intermediate code area, and an original text source when the lexically analyzed original text intermediate code file is not found by the original text intermediate record file search means, or a source other than the original text source. intermediate code generating means for lexically analyzing the source program of the source program and converting it into intermediate code and writing it into the intermediate code area; Intermediate code output means to output to a code file, and if the intermediate code for the original text is not found by the original text intermediate code file search means, the intermediate code for the original text is registered in the lexically analyzed original text intermediate code file using the original text name and generation information as keys. and an original text intermediate code registration means.

【0005】[0005]

【実施例】次に本発明について図面を参照して説明する
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be explained with reference to the drawings.

【0006】図1は、本発明の一実施例である、原文中
間コード高速生成方式の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a high-speed source intermediate code generation method, which is an embodiment of the present invention.

【0007】翻訳システム1は、語彙解析部2でソース
プログラム6を入力する。入力されたソースプログラム
6内に原文を複写する指示があった場合、原文ソース世
代情報取得手段8を起動する。指示がない場合語彙解析
部2は、中間コード生成手段4を起動し入力したソース
プログラム6を語彙解析して中間コードを生成し、中間
コード領域12に設定する。
[0007] In the translation system 1, a source program 6 is inputted to a vocabulary analysis section 2. When there is an instruction to copy the original text in the input source program 6, the original text source generation information acquisition means 8 is activated. If there is no instruction, the vocabulary analysis section 2 activates the intermediate code generation means 4, lexically analyzes the input source program 6, generates intermediate codes, and sets them in the intermediate code area 12.

【0008】原文ソース世代情報取得手段8は、ソース
プログラム6中の複写指示文中の原文名15により原文
のソースの登録ファイル16から、対応する原文ソース
を探し、その原文ソースの世代14を取得する。
The original text source generation information acquisition means 8 searches for the corresponding original text source from the original text source registration file 16 based on the original text name 15 in the copy instruction statement in the source program 6, and obtains the generation 14 of the original text source. .

【0009】次に原文中間コードファイル検索手段9を
起動する。原文中間コードファイル検索手段9は、原文
ソース世代情報取得手段8により得られた世代14と原
文名13をキーとして、原文の語彙解析済み中間コード
ファイル10から対応する原文の中間コードを検索する
Next, the original intermediate code file search means 9 is activated. The original text intermediate code file search means 9 uses the generation 14 and the original text name 13 obtained by the original text source generation information acquisition means 8 as keys to search for the corresponding original text intermediate code from the original text lexically analyzed intermediate code file 10.

【0010】原文の語彙解析済みの中間コードファイル
10が発見された場合、原文中間コードファイル入力手
段17を起動する。原文中間コードファイル入力手段1
7は、原文の語彙解析済み中間コードファイル10より
、語彙解析済みの中間コードを入力し中間コード領域1
2へ複写する。
[0010] When the intermediate code file 10 of the original text whose vocabulary has been analyzed is found, the original text intermediate code file input means 17 is activated. Original intermediate code file input means 1
7 inputs the lexically analyzed intermediate code from the lexically analyzed intermediate code file 10 of the original text, and enters the intermediate code area 1.
Copy to 2.

【0011】原文の語彙解析済みの中間コードファイル
10が発見されなかった場合、語彙解析部2は、原文ソ
ース3を入力し中間コード生成手段4を起動する。中間
コード生成手段4は、入力した原文ソース3を語彙解析
し、中間コードを生成して中間コード領域12に設定す
る。原文中間コード登録手段11は、原文中間コードフ
ァイル検索手段9により対応するファイルが発見されな
かった時中間コード生成手段4より起動され、原文に対
応する中間コードを世代と原文名をキーとして中間コー
ド領域12から語彙解析済みの中間コードファイル10
に登録する。
If the intermediate code file 10 whose original text has been lexically analyzed is not found, the lexical analysis unit 2 inputs the original text source 3 and activates the intermediate code generation means 4. The intermediate code generating means 4 lexically analyzes the input original text source 3, generates an intermediate code, and sets it in the intermediate code area 12. The original text intermediate code registration means 11 is activated by the intermediate code generation means 4 when the corresponding file is not found by the original text intermediate code file search means 9, and generates an intermediate code corresponding to the original text using the generation and the original text name as keys. Intermediate code file 10 that has been lexically analyzed from area 12
Register.

【0012】次に語彙解析部2は、中間コード出力手段
5を起動して、原文中間コードファイル入力手段17、
または、中間コード生成手段4によって設定された中間
コード領域12の中間コードを中間コードファイル7に
出力する。
Next, the vocabulary analysis unit 2 activates the intermediate code output means 5 and inputs the original intermediate code file input means 17,
Alternatively, the intermediate code in the intermediate code area 12 set by the intermediate code generation means 4 is output to the intermediate code file 7.

【0013】[0013]

【発明の効果】以上説明したように本発明は、一度翻訳
システムの語彙解析部で処理された原文ソースは、原文
中間コードファイルとして残り、次に翻訳システムが起
動され同じ原文の複写を指示された場合、また同じ原文
の複写の指示が複数回あった場合、原文ソースの語意解
析を行わず直接残されている中間コードを使用するので
、原文ソースを入力して語彙解析して中間コードを生成
する処理を削除でき、翻訳システムの語意解析による中
間コードファイルの作成時間を短縮する効果がある。
[Effects of the Invention] As explained above, in the present invention, the original text source once processed by the lexical analysis section of the translation system remains as an original text intermediate code file, and when the translation system is started next and is instructed to copy the same original text. If the same original text is instructed to be copied multiple times, the intermediate code that remains is directly used without semantic analysis of the original text source. The generation process can be deleted, which has the effect of shortening the time required to create intermediate code files based on semantic analysis of the translation system.

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

【図1】本発明を実施する翻訳システムの語彙解析部の
ブロック図である。
FIG. 1 is a block diagram of a vocabulary analysis section of a translation system implementing the present invention.

【符号の説明】[Explanation of symbols]

1    翻訳システム 2    語彙解析部 3    原文ソース 4    中間コード生成手段 5    中間コード出力手段 6    ソースプログラム 7    語彙解析部の出力する中間コードファイル8
    原文ソース世代情報取得手段9    原文中
間コードファイル検索手段10    原文の語彙解析
済み中間コードファイル11    原文中間コード登
録手段 12    中間コード領域
1 Translation system 2 Vocabulary analysis section 3 Original text source 4 Intermediate code generation means 5 Intermediate code output means 6 Source program 7 Intermediate code file 8 output by the vocabulary analysis section
Original text source generation information acquisition means 9 Original text intermediate code file search means 10 Original text lexically analyzed intermediate code file 11 Original text intermediate code registration means 12 Intermediate code area

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  ソースプログラム中に他の原文を複写
することのできる翻訳システムにおいて、原文ソースご
とに語彙解析を行って得た原文の中間コードを登録した
語彙解析済みの原文中間コードファイルを有し、ソース
プログラムを入力し複写の指示があった時に呼び出され
、原文ソースの格納されているファイルから原文名をキ
ーとして検索し原文ソースの世代情報を取得する原文ソ
ース世代情報取得手段と、原文ソースの世代情報と原文
名をキーとし前記語彙解析済みの原文中間コードファイ
ルを検索する原文中間レコードファイル検索手段と、前
記原文中間レコードファイル検索手段により語彙解析済
みの原文中間コードファイルが発見された場合に原文ソ
ースに対応する語彙解析済みの原文中間コードを前記語
彙解析済みの原文中間コードファイルから中間コード領
域に入力する原文中間コードファイル入力手段と、前記
原文中間レコードファイル検索手段により語彙解析済み
の原文中間コードファイルが発見されない場合の原文ソ
ースや、原文ソース以外のソースプログラムを語彙解析
して中間コードに変換し中間コード領域に書き込む中間
コード生成手段と、前記原文中間コードファイル入力手
段または、前記中間コード生成手段によって設定された
中間コード領域の内容を、中間コードファイルに出力す
る中間コード出力手段と、前記原文中間コードファイル
検索手段で発見されなかった場合にその原文に対する中
間コードを原文名と世代情報をキーとし前記語彙解析済
みの原文中間コードファイルに登録する原文中間コード
登録手段とで構成されることを特徴とする原文の中間コ
ード生成方式。
Claim 1: A translation system that can copy other original texts into a source program, which has a lexically analyzed original text intermediate code file in which the intermediate code of the original text obtained by performing lexical analysis for each original text source is registered. and an original source generation information acquisition means that is called when a source program is input and a copy instruction is received, and retrieves generation information of the original source by searching a file in which the original source is stored using the source name as a key; A source intermediate record file search means searches for the lexically analyzed original intermediate code file using source generation information and the original name as keys, and the lexically analyzed original intermediate code file is discovered by the original intermediate record file search means. a source text intermediate code file input means for inputting a lexically analyzed original text intermediate code corresponding to the original text source into the intermediate code area from the lexically analyzed original text intermediate code file, and a lexically analyzed source text intermediate record file search means intermediate code generation means for lexically analyzing the original text source when the original text intermediate code file is not found or a source program other than the original text source and converting it into intermediate code and writing it in the intermediate code area; and the original text intermediate code file input means; an intermediate code output means for outputting the contents of the intermediate code area set by the intermediate code generation means to an intermediate code file; and an intermediate code for the original text if it is not found by the original intermediate code file search means. and an original text intermediate code registration means for registering generation information as a key in the lexically analyzed original text intermediate code file.
JP3107770A 1991-05-14 1991-05-14 Intermediated code generation system for text Pending JPH04336669A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3107770A JPH04336669A (en) 1991-05-14 1991-05-14 Intermediated code generation system for text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3107770A JPH04336669A (en) 1991-05-14 1991-05-14 Intermediated code generation system for text

Publications (1)

Publication Number Publication Date
JPH04336669A true JPH04336669A (en) 1992-11-24

Family

ID=14467574

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3107770A Pending JPH04336669A (en) 1991-05-14 1991-05-14 Intermediated code generation system for text

Country Status (1)

Country Link
JP (1) JPH04336669A (en)

Similar Documents

Publication Publication Date Title
JP3345763B2 (en) Natural language translator
JPH04336669A (en) Intermediated code generation system for text
JP2581381B2 (en) Natural language interface method
JPH07121379A (en) Plural languages mixing compiler
JPH0320866A (en) Text base retrieval system
JP2917786B2 (en) Natural language interface method
JP2742059B2 (en) Dictionary editor for translation
JP6573839B2 (en) Sentence generating apparatus, method, and program
JP2726543B2 (en) Translation method
JP2935928B2 (en) Natural language translator
JPH04153878A (en) Pre-editing assisting processor of machine translation device
JPH0421167A (en) Machine translation device
JPH04257064A (en) Summary information extracting device
JPH05324711A (en) Automatic translating method for natural language
JPH0540783A (en) Natural language analysis device
JPH0752391B2 (en) Translation method of source program including multiple database descriptions
JPH04273534A (en) Precompile system
JPH032924A (en) Programming editing system
JPH05216922A (en) Dictionary editing device
JPS62282329A (en) Information processor
JPH04318671A (en) Machine translation system
JPH03116272A (en) Mechanical translation system containing sentence pattern dictionary
JPH01181158A (en) Translation back-up device
JPH05290033A (en) Japanese language input device
JPH086950A (en) Machine translation apparatus with keyword translation function