REWRITING PROGRAM AND METHOD FOR REWRITING
To perform processing that does not affect instructions to rewrite each other even when there are a plurality of instructions to rewrite when a source code after an abstract syntax tree is analyzed is rewritten.SOLUTION: An information processor 1 analyzes an abstract syntax tree converted from a so...
Gespeichert in:
Hauptverfasser: | , |
---|---|
Format: | Patent |
Sprache: | eng ; jpn |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | To perform processing that does not affect instructions to rewrite each other even when there are a plurality of instructions to rewrite when a source code after an abstract syntax tree is analyzed is rewritten.SOLUTION: An information processor 1 analyzes an abstract syntax tree converted from a source code 21 and acquires a plurality of instructions to rewrite on a writing target letter string. The information processor 1 divides the writing target letter string of the source code 21 into partial letter strings with an instruction and partial letter strings without an instruction for a plurality of instructions to rewrite. The information processor 1 also combines a rewriting partial letter string obtained by rewriting a partial letter string with an instruction on the basis of an instruction to rewrite and a partial letter string without an instruction.SELECTED DRAWING: Figure 2
【課題】抽象構文木解析後のソースコードの書き換えで、複数の書き換え指示があった場合であっても、互いの書き換え指示に影響しないように処理する。【解決手段】情報処理装置1は、ソースコード21から変換された抽象構文木を解析して、書き換え対象の文字列に対する複数の書き換え指示を取得する。情報処理装置1は、ソースコード21の書き換え対象の文字列を、複数の書き換え指示の、指示の有る部分文字列と、指示の無い部分文字列とに分ける。そして、情報処理装置1は、指示の有る部分文字列を書き換え指示に基づき書き換えた書き換え部分文字列と、指示の無い部分文字列とを結合する。【選択図】図2 |
---|