JPH0214326A - Language translating system - Google Patents

Language translating system

Info

Publication number
JPH0214326A
JPH0214326A JP63165711A JP16571188A JPH0214326A JP H0214326 A JPH0214326 A JP H0214326A JP 63165711 A JP63165711 A JP 63165711A JP 16571188 A JP16571188 A JP 16571188A JP H0214326 A JPH0214326 A JP H0214326A
Authority
JP
Japan
Prior art keywords
program
storage area
source program
storing area
source
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
JP63165711A
Other languages
Japanese (ja)
Inventor
Osamu Omoto
大本 修
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 JP63165711A priority Critical patent/JPH0214326A/en
Publication of JPH0214326A publication Critical patent/JPH0214326A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To eliminate the hierarchizing process of a source program list in a designated writing form by hierarchizing the source program according to the level of processing on the basis of hierarchy information, which are generated in a translating process, when the source program is translated to an object program. CONSTITUTION:The first translation unit of the first source program is inputted to a storing area 325 of a main storage 3. A translating part 322 executes word analysis and structure analysis concerning the first source program in the storing area 325. Then, an intermediate language program, to which the hierarchy information are added, is set to a storing area 326. After that,the translation to the object program is continued on the basis of the intermediate language program in the storing area 326 and the translated object program is set to a storing area 327. After translation by the translating part 322, an output part 323 outputs the object program in the storing area 327 to a storing area 42 and on the basis of the hierarchy information of the intermediate language program in the storing area 326, the first source program in the storing area 325 is hierarchized according to the level of the processing. Then, characters are caused to go down according to the order of the hierarchy.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理システムで用いられる、構造化プログ
ラミング可能な自由記述形式の高水準言語で記述された
原始プログラムを翻訳する言語プロセッサを有する言語
翻訳システムに関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a language that is used in an information processing system and has a language processor that translates a source program written in a high-level language in a structured and programmable free description format. Regarding translation systems.

[従来の技術] 従来1.この種の言語翻訳システムは、自由記述形式の
第1の原始プログラムを目的プログラムに翻訳する際、
第1の原始プログラムの翻訳単位毎に処理のレベルを示
す階層情報を付与し、付与した階層情報を基に第1の原
始プログラムを処理のレベルに従って階層化し、階層の
順に従って字下げした規定記述形式の第2の原始プログ
ラムに変換し、変換した第2の原始プログラムのプログ
ラムリストをコンソールまたはラインプリンタ等に、翻
訳した目的プログラムのプログラムリストとともに出力
してはいるが、第2の原始プログラムに基づく必要な処
理の終了後は、第2の原始プログラムを記憶装置に保持
してはいなかった。
[Conventional technology] Conventional 1. This type of language translation system, when translating a first source program in free description format into a target program,
A prescribed description in which hierarchical information indicating the level of processing is assigned to each translation unit of the first source program, and based on the assigned hierarchical information, the first source program is hierarchical according to the level of processing, and indented according to the order of the hierarchy. format, and output the program list of the converted second source program to a console or line printer, etc. together with the program list of the translated target program. After the necessary processing based on the original program is completed, the second source program is not retained in the storage device.

(発明が解決しようとする課題] 上述した従来の言語翻訳システムは、翻訳時に変換した
規定記述形式の原始プログラムリストをコンソールまた
はラインプリンタ等(別の出力装置)に出力処理してい
るだけで、出力処理終了後は、変換済の原始プログラム
を記憶装置に保持していなかったため、処理のレベルが
示されている、すなわち見やすくわかりやすい階層化さ
れた規定記述形式の原始プログラムリストを出力する場
合は、目的プログラムが必要でないときでもそのつと翻
訳を行なわなければならず、階層化のための余分な工数
が必要となるという欠点があり、さらに、階層化された
規定記述形式の原始プログラムリストが出力されても、
情報処理システムの記憶装置に保持されている原始プロ
グラムは自由記述形式で記述されているので、原始プロ
グラムの修正を行う作業者は自分で両者の対応をつけな
がら情報処理システムの記憶装置に保持されている原始
プログラムの修正を行なわなければならず、対応のため
の余分な工数が必要となるという欠点もある。
(Problem to be Solved by the Invention) The conventional language translation system described above only outputs and processes the source program list in the prescribed description format converted at the time of translation to a console or line printer (separate output device). After output processing is completed, the converted source program is not retained in the storage device, so if you want to output a source program list in an easy-to-read and easy-to-understand layered standard description format that shows the processing level, This method has the disadvantage that translation must be performed for each target program even when it is not necessary, and extra man-hours are required for layering.Furthermore, a source program list in a layered specified description format is output. Even though
The source program stored in the storage device of the information processing system is written in a free-description format, so the operator who modifies the source program has to make the correspondence between the two while updating the program stored in the storage device of the information processing system. Another drawback is that the original source program must be modified, which requires additional man-hours.

[課題を解決するための手段] 本発明の言語翻訳システムは、 構造化プログラミング可能な自由記述形式の高水準言語
で記述された第1の原始プログラムを保持している第1
の記憶領域と、目的プログラムが保持されるための第2
の記憶領域と、第1の原始プログラムが変換された第2
の原始プログラムが保持されるための第3の記憶領域と
を有する記憶装置と、 第1の原始プログラムを、入力する入力部と、入力部が
入力した第1の原始プログラムを目的プログラムに翻訳
する際、第1の原始プログラムの翻訳単位毎に処理のレ
ベルを示す階層情報を付与し、付与した階層情報を基に
第1の原始プログラムを、目的プログラムに翻訳する翻
訳部と、翻訳部が付与した階層情報を基に第1の原始プ
ログラムを処理のレベルに従って階層化し、階層の順に
従って字下げした規定記述形式の第2の原始プログラム
に変換し、変換した第2の原始プログラムと翻訳部が翻
訳した目的プログラムとをそれぞれ出力する出力部とを
有する言語プロセッサと、第1の原始プログラムを第1
の記憶領域から言語プロセッサの入力部に、目的プログ
ラムを言語プロセッサの出力部から第2の記憶領域に、
第2の原始プログラムを言語プロセッサの出力部から第
3の記憶領域にそれぞれ与えた後、第1の記憶領域を削
除し、第3の記憶領域に付与されている記憶領域名を第
1の記憶領域に付与されていた記憶領域名に変更する実
行手段とを有する。
[Means for Solving the Problems] The language translation system of the present invention includes a first source program that holds a first source program written in a high-level language in a free description format that allows structured programming.
storage area and a second storage area for holding the target program.
and a second source program into which the first source program has been converted.
a storage device having a third storage area for holding a source program; an input section for inputting the first source program; and a storage device for translating the first source program input by the input section into a target program. At this time, hierarchical information indicating the level of processing is assigned to each translation unit of the first source program, and a translation unit that translates the first source program into a target program based on the assigned hierarchical information; The first source program is hierarchized according to the processing level based on the hierarchical information obtained, and converted into a second source program in a prescribed description format indented according to the order of the hierarchies, and the converted second source program and the translation section are a language processor having an output section that outputs the translated target program, and a first source program that outputs the translated target program;
from the storage area of the language processor to the input section of the language processor, the target program from the output section of the language processor to the second storage area,
After giving the second source program from the output unit of the language processor to the third storage area, the first storage area is deleted, and the storage area name assigned to the third storage area is transferred to the first storage area. and execution means for changing the storage area name given to the area.

[作用] 自由記述形式の第1の原始プログラムを目的プログラム
に翻訳する際、翻訳過程で生成する階層情報を基に、第
1の原始プログラムを処理のレベルに従って階層化し、
階層の順に従って字下げした規定記述形式の第2の原始
プログラムに変換し、変換した第2の原始プログラムを
保持するので、少なくとも1回翻訳すれば、それ以降は
規定記述形式の原始プログラムリストを出力する際の階
層化のための余分な工数が不要となり、また、出力され
た原始プログラムリストの内容と保持されている第2の
原始プログラムは、それぞれの記述形式が一致するため
、両者対応のための余分な工数も不要となる。
[Operation] When translating a first source program in a free description format into a target program, the first source program is hierarchized according to the processing level based on the hierarchical information generated in the translation process,
It is converted into a second source program in the prescribed description format that is indented according to the order of the hierarchy, and the converted second source program is retained, so if it is translated at least once, from then on, the source program list in the prescribed description format can be saved. There is no need for extra man-hours for layering when outputting, and since the contents of the output source program list and the retained second source program match in their respective description formats, it is possible to make both compatible. This eliminates the need for extra man-hours.

〔実施例〕〔Example〕

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

第1図は本発明の言語翻訳システムの一実施例を実現し
ている情報処理システムを示すブロック図、第2図(a
)は第1図の情報処理システム1により変換される前の
自由記述形式の原始プログラム例を示す説明図、第2図
(b)は第2図(a)の原始プログラムを変換した後の
規定記述形式の原始プログラムを示す説明図である。
FIG. 1 is a block diagram showing an information processing system that implements an embodiment of the language translation system of the present invention, and FIG.
) is an explanatory diagram showing an example of a free-format source program before being converted by the information processing system 1 in FIG. 1, and FIG. 2(b) is an explanatory diagram showing an example of the source program in FIG. FIG. 2 is an explanatory diagram showing a source program in written format.

この情報処理システム1は、中央処理装置2と、主記憶
装置3と、外部記憶装置4とを備えている。主記憶装置
3は、オペレーティングシステム31と、入力部321
と翻訳部322と出力部323と記憶域325.326
.327とを含む言語プロセッサ32とを有している。
This information processing system 1 includes a central processing unit 2, a main storage device 3, and an external storage device 4. The main storage device 3 includes an operating system 31 and an input unit 321.
and translation section 322, output section 323, and storage area 325.326
.. 327, and a language processor 32 including 327.

記憶域325には構造化プログラミング可能な高水準言
語で記述された自由記述形式の原始プログラム(以降第
1の原始プログラムと記す)が、記憶域326には翻訳
部322が記憶域325の第1の原始プログラムについ
て字句解析および構文解析を行ない、階層情報を付加し
た中間言語プログラムが、記憶域327には言語プロセ
ッサ32による目的プログラム(翻訳部プログラム)が
それぞれ翻訳単位毎にセットされる。外部記憶装置4に
は第1の原始プログラムが保持されている記憶領域41
と、言語プロセッサ32による目的プログラムが保持さ
れるための記憶領域42と、翻訳過程で生成される、第
1の原始プログラムと同じ言語で記述される規定記述形
式の原始プログラム(以降第2の原始プログラムと記す
)が保持されるための記憶領域43とが確保されている
The storage area 325 contains a free-format source program (hereinafter referred to as the first source program) written in a high-level language that allows structured programming, and the translation unit 322 stores the first source program in the storage area 325. An intermediate language program in which hierarchical information is added by performing lexical analysis and syntactic analysis on the source program is set in the storage area 327, and a target program (translation unit program) by the language processor 32 is set for each translation unit. The external storage device 4 has a storage area 41 in which the first source program is held.
, a storage area 42 for holding the target program by the language processor 32, and a source program in a prescribed description format written in the same language as the first source program (hereinafter referred to as the second source program) generated in the translation process. A storage area 43 is secured to hold a program (referred to as a program).

次に、本実施例の動作を説明する。Next, the operation of this embodiment will be explained.

まず、主記憶装置3のオペレーティングシステム31の
制御により言語プロセッサ32が中央処理装置2で実行
されると、入力部321が外部記憶装置4の記憶領域4
1の、第2図(a)に示す第1の原始プログラムの、最
初の翻訳単位を主記憶装置3の記憶域325に入力する
。翻訳部322は記憶域325の第1の原始プログラム
について字句解析および構文解析を行ない、階層情報を
付加した中間言語プログラムを記憶域326にセットし
た後、記憶域326の中間言語プログラムに基づき目的
プログラムへの翻訳を継続し、翻訳した目的プログラム
を記憶域327にセットする。翻訳部322による翻訳
の後、出力部323は、記憶域327の目的プログラム
を記憶領域42に出力するとともに、記憶域326の中
間言語プログラムの階層情報を基に、記憶域325の第
1の原始プログラムを処理のレベルに従って階層化し、
階層の順に従って字下げした、第2図(b)に示す第2
の原始プログラムに変換し、変換した第2の原始プログ
ラムを記憶領域43に出力する。言語プロセッサ32は
上記翻訳処理を記憶領域41の第1の原始プログラムの
最終翻訳単位まで繰返す。
First, when the language processor 32 is executed by the central processing unit 2 under the control of the operating system 31 of the main storage device 3, the input section 321
1, the first translation unit of the first source program shown in FIG. 2(a) is input into the storage area 325 of the main storage device 3. The translation unit 322 performs lexical and syntactic analysis on the first source program in the storage area 325, sets the intermediate language program with hierarchical information added in the storage area 326, and then converts the target program based on the intermediate language program in the storage area 326. The translated target program is set in the storage area 327. After the translation by the translation unit 322, the output unit 323 outputs the target program in the storage area 327 to the storage area 42, and also outputs the first source program in the storage area 325 based on the hierarchical information of the intermediate language program in the storage area 326. Hierarchize the program according to the level of processing,
The second part shown in Figure 2(b), indented according to the order of the hierarchy.
The converted second source program is output to the storage area 43. The language processor 32 repeats the above translation process up to the final translation unit of the first source program in the storage area 41.

すべての翻訳処理を完了すると言語プロセッサ32は記
憶領域41を削除して、記憶領域43のの記憶領域名を
記憶領域41に付与されていた記憶領域名に変更するこ
とにより、第2の原始プログラムを次回の翻訳時に入力
する原始プログラムとして扱えるようにする。
When all the translation processing is completed, the language processor 32 deletes the storage area 41 and changes the storage area name of the storage area 43 to the storage area name assigned to the storage area 41, thereby reproducing the second source program. can be treated as a source program to be input during the next translation.

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

以上説明したように本発明は、自由記述形式の第1の原
始プログラムを目的プログラムに翻訳する際、翻訳過程
で生成する階層情報を基に、第1の原始プログラムを処
理のレベルに従って階層化し、階層の順に従って字下げ
した規定記述形式の第2の原始プログラムに変換し、変
換した第2の原始プログラムを保持することにより、少
なくとも1回翻訳すれば、それ以降は規定記述形式の原
始プログラムリストを出力する際の階層化のための余分
な工数が不要となり、見やすくわかりやすい原始プログ
ラムリストを容易に生成できる効果があり、また、出力
された原始プログラムリストの内容と保持されている第
2の原始プログラムは、それぞれの記述形式が一致する
ため、両者対応のための余分な工数も不要となる効果も
ある。
As explained above, the present invention, when translating a first source program in a free description format into a target program, hierarchizes the first source program according to the processing level based on layer information generated in the translation process, By converting to a second source program in the prescribed description format that is indented according to the order of the hierarchy, and retaining the converted second source program, if it is translated at least once, from then on, the source program list in the prescribed description format will be created. This eliminates the need for extra man-hours for layering when outputting a source program list, which has the effect of easily generating a source program list that is easy to see and understand. Since the programs are written in the same format, there is no need for extra man-hours to handle both programs.

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

第1図は本発明の言語翻訳システムの一実施例を実現し
ている情報処理システムを示すブロック図、第2図(a
)は第1図の情報処理システム1により変換される前の
自由記述形式の原始ブロダラム例を示す説明図、第2図
(b)は第2図(a)の原始プログラムを変換した後の
規定記述形式の原始プログラムを示す説明図である。 1・・・情報処理装置、 2・・・中央処理装置、 3・・・主記憶装置、 4・・・外部記憶装置、 31・・・オペレーティングシステム、32・・・言語
プロセッサ、 41.42.43・・・記憶領域、 321・・・入力部、 322・・・翻訳部、 323・・・出力部、 325.326.327・・・記憶域。
FIG. 1 is a block diagram showing an information processing system that implements an embodiment of the language translation system of the present invention, and FIG.
) is an explanatory diagram showing an example of a free description format source program before being converted by the information processing system 1 in FIG. 1, and FIG. 2(b) is an explanatory diagram showing an example of the source program in FIG. FIG. 2 is an explanatory diagram showing a source program in written format. 1... Information processing device, 2... Central processing unit, 3... Main storage device, 4... External storage device, 31... Operating system, 32... Language processor, 41.42. 43... Storage area, 321... Input section, 322... Translation section, 323... Output section, 325.326.327... Storage area.

Claims (1)

【特許請求の範囲】 1、構造化プログラミング可能な自由記述形式の高水準
言語で記述された第1の原始プログラムを保持している
第1の記憶領域と、目的プログラムが保持されるための
第2の記憶領域と、第1の原始プログラムが変換された
第2の原始プログラムが保持されるための第3の記憶領
域とを有する記憶装置と、 第1の原始プログラムを入力する入力部と、入力部が入
力した第1の原始プログラムを目的プログラムに翻訳す
る際、第1の原始プログラムの翻訳単位毎に処理のレベ
ルを示す階層情報を付与し、付与した階層情報を基に第
1の原始プログラムを、目的プログラムに翻訳する翻訳
部と、翻訳部が付与した階層情報を基に第1の原始プロ
グラムを処理のレベルに従って階層化し、階層の順に従
って字下げした規定記述形式の第2の原始プログラムに
変換し、変換した第2の原始プログラムと翻訳部が翻訳
した目的プログラムとをそれぞれ出力する出力部とを有
する言語プロセッサと、第1の原始プログラムを第1の
記憶領域から言語プロセッサの入力部に、目的プログラ
ムを言語プロセッサの出力部から第2の記憶領域に、第
2の原始プログラムを言語プロセッサの出力部から第3
の記憶領域にそれぞれ与えた後、第1の記憶領域を削除
し、第3の記憶領域に付与されている記憶領域名を第1
の記憶領域に付与されていた記憶領域名に変更する実行
手段とを有する言語翻訳システム。
[Claims] 1. A first storage area that holds a first source program written in a high-level language in a free description format that allows structured programmability, and a first storage area that holds a target program. a storage device having a second storage area and a third storage area for holding a second source program into which the first source program is converted; When translating the first source program input by the input unit into the target program, hierarchical information indicating the level of processing is assigned to each translation unit of the first source program, and based on the assigned hierarchical information, the first source program is translated into the target program. A translation unit that translates the program into a target program; and a second source program that is in a prescribed description format and is hierarchized according to the processing level based on the hierarchy information given by the translation unit, and indented according to the order of the hierarchy. a language processor that converts the first source program into a program and outputs the converted second source program and the target program translated by the translator, respectively; and inputs the first source program from the first storage area to the language processor. The target program is transferred from the output section of the language processor to the second storage area, and the second source program is transferred from the output section of the language processor to the third storage area.
After assigning the storage area name to each storage area, delete the first storage area, and change the storage area name given to the third storage area to the first storage area.
and execution means for changing the storage area name given to the storage area.
JP63165711A 1988-07-01 1988-07-01 Language translating system Pending JPH0214326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63165711A JPH0214326A (en) 1988-07-01 1988-07-01 Language translating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63165711A JPH0214326A (en) 1988-07-01 1988-07-01 Language translating system

Publications (1)

Publication Number Publication Date
JPH0214326A true JPH0214326A (en) 1990-01-18

Family

ID=15817606

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63165711A Pending JPH0214326A (en) 1988-07-01 1988-07-01 Language translating system

Country Status (1)

Country Link
JP (1) JPH0214326A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7437088B2 (en) 2004-10-19 2008-10-14 Canon Kabushiki Kaisha Image forming apparatus including first and second cleaning members with applied voltages based on recording material type

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7437088B2 (en) 2004-10-19 2008-10-14 Canon Kabushiki Kaisha Image forming apparatus including first and second cleaning members with applied voltages based on recording material type

Similar Documents

Publication Publication Date Title
US4853873A (en) Knowledge information processing system and method thereof
JPH0640302B2 (en) Schematic / source program automatic generation method
JP2644728B2 (en) Data dictionary directory system
JPH0214326A (en) Language translating system
EP0056886A1 (en) Data processing system with an interactive display
US20030188292A1 (en) System and method for configuration using an object tree formed of hierarchically graduatable objects
JPH0744365A (en) Software unification development system and software converting method between different type of case tools
JP2009157534A (en) Programming support system, its programmable controller support device, and programmable indicator support device
JPH0844518A (en) Input operation unifying method for plural application software
Matthews et al. Synthesising structure from at specifications
JP2590083B2 (en) Source program translation processing method
JPH06231181A (en) Distributed database control system
JPH01109430A (en) Programming method for computer processing
JPH01230132A (en) Generator
JPH01302413A (en) Constituting defining information preparing system
JPH1031513A (en) User interface system for monitor control system
JPH05334325A (en) Document preparing system of data processor
JPH0350672A (en) Interactive type text editor
Ishijima et al. A Small Engineering Workbench On A Personal Computer
JPH08278979A (en) Method and device for data base structure conversion
KR960008587A (en) Method and apparatus for generating continuous process control algorithm using functional block diagram
JPH03123939A (en) Computer system where multiple languages coexist
Angier Production of Customized Software Systems
JPH05257659A (en) Generation device for source program
JPH05165617A (en) System for unifying software design book with program source