A text-based syntax completion method using LR parsing

Isao Sasano, Kwanghoon Choi

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

This paper presents a text-based syntax completion method using an LR parser. We propose formal definitions of candidate text to be completed based on the sentential forms, and we design algorithms for computing candidates through reductions in the LR parsing. This is in contrast to the existing methods that have not clearly stated what candidates they intend to produce. This is also different from a transformation approach using an LR parser, which transforms the grammar of the programming language, a burdensome task at this moment. The advantage of our method is that LR parsers can be adopted without modification, and a syntax completion system can be built using them, without incurring efforts. We implemented the algorithms as an Emacs server to demonstrate the feasibility of their application.

Original languageEnglish
Title of host publicationPEPM 2021 - Proceedings of the 2021 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, Co-located with POPL 2021
PublisherAssociation for Computing Machinery, Inc
Pages32-43
Number of pages12
ISBN (Electronic)9781450383059
DOIs
Publication statusPublished - 2021 Jan 18
Event2021 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2021, co-located with the Annual Symposium on Principles of Programming Languages, POPL 2021 - Virtual, Online, Denmark
Duration: 2021 Jan 182021 Jan 19

Publication series

NamePEPM 2021 - Proceedings of the 2021 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, Co-located with POPL 2021

Conference

Conference2021 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2021, co-located with the Annual Symposium on Principles of Programming Languages, POPL 2021
CountryDenmark
CityVirtual, Online
Period21/1/1821/1/19

Keywords

  • integrated development environments
  • LR parsing
  • parser generator
  • reduction
  • sentential forms
  • syntax completion

ASJC Scopus subject areas

  • Computer Graphics and Computer-Aided Design
  • Computer Science Applications

Fingerprint Dive into the research topics of 'A text-based syntax completion method using LR parsing'. Together they form a unique fingerprint.

Cite this