• Search Research Projects
  • Search Researchers
  • How to Use
  1. Back to project page

2023 Fiscal Year Final Research Report

Text-based code completion using syntax analysis

Research Project

  • PDF
Project/Area Number 20K11752
Research Category

Grant-in-Aid for Scientific Research (C)

Allocation TypeMulti-year Fund
Section一般
Review Section Basic Section 60050:Software-related
Research InstitutionShibaura Institute of Technology

Principal Investigator

Sasano Isao  芝浦工業大学, 工学部, 教授 (10362021)

Project Period (FY) 2020-04-01 – 2024-03-31
Keywordsコード補完 / 構文補完 / LR構文解析 / 文形式 / 簡約 / 統合開発環境
Outline of Final Research Achievements

In this research project, we proposed and implemented a new method for code completion during programming using a text editor. This method utilizes the internal state of an LR parser, parsing the code from the beginning to the cursor position. Based on the sequence of symbols and states on the parser's stack at the moment, it calculates potential syntax candidates that can follow the cursor position and presents them to the programmer. The implementation was done for Emacs, with the completion candidate calculation implemented in Haskell and the interface in Emacs Lisp. It has been confirmed to work with languages such as Haskell and C. Additionally, the source code of the implemented code completion system has been made available on a web page.

Free Research Field

プログラミング言語

Academic Significance and Societal Importance of the Research Achievements

Visual Studio等の開発環境において構文補完機能が使われ始めているが、通常、仕様が明示されていない。本研究課題は、構文解析を用いて、カーソル位置までに構文エラーがない場合に、カーソル位置以降の構文の候補を提示する方式を考案したものである。学術的には1980年代にSynthesizer GeneratorやMENTOR等、構造エディタの研究が行われ、近年では、構造エディタでの編集の正しさを論じた研究もある。しかし構造エディタはプログラマが自由にプログラムテキストを編集するのを妨げる。本研究は、自由なプログラム編集を妨げることなく構文補完を行うための方式を提案したものである。

URL: 

Published: 2025-01-30  

Information User Guide FAQ News Terms of Use Attribution of KAKENHI

Powered by NII kakenhi