属性付き字句系列に基づくソースコード書き換え支援環境

書誌事項

タイトル別名
  • ゾクセイ ツキ ジク ケイレツ ニ モトズク ソースコード カキカエ シエン カンキョウ
  • A Source Code Rewriting System based on Attributed Token Sequence

この論文をさがす

抄録

ソースコードの編集作業において,複数箇所に点在する定型的な記述を修正する作業を自動化するために,属性付き字句系列に基づくソースコード書き換え支援環境TEBAを提案する.TEBAは,ソースコードの断片を用いて記述したパターン記述に従ってソースコードを書き換えるパターン変換系と,その変換系を実現するうえで重要な基盤となる構文解析系を提供する.ソースコードの断片の構文解析は一般的に困難であるので,ソースコードを字句系列に変換したあと,段階的に構文に関する情報を字句の属性に加えていく.パターン変換系は,パターン変換記述とソースコードの双方を属性付き字句系列に変換したうえで,字句系列の書き換えとして実現する.また,実装したTEBAによって書き換えができることを事例を用いて示し,その評価を示す.

For automatic replacement of code fragments in a fixed form, we propose “TEBA”: a source code rewriting system based on attributed token sequence. TEBA consists of two subsystems. First one is a pattern-based transformation subsystem which rewrites source code according to a pattern specified as a pair of code fragments. The other one is a parser subsystem which becomes a basis for syntactic analysis of the source code. For parsing source codes, TEBA converts a source code to an attribute token sequence to which the parser subsystem gradually adds syntactic information. After converting a pattern and a target code into token sequences, the transformation subsystem rewrites the token sequence of the target code according to the token sequence of the pattern. We also show an implementation and evaluation of TEBA with examples.

収録刊行物

関連プロジェクト

もっと見る

詳細情報 詳細情報について

問題の指摘

ページトップへ