TY - GEN
T1 - A text-based syntax completion method using LR parsing
AU - Sasano, Isao
AU - Choi, Kwanghoon
N1 - Funding Information:
We would like to thank the anonymous reviewers of PEPM 2021 for their many helpful comments. This work was partially supported by JSPS KAKENHI under Grant Number 20K11752 and by NRF of Korea funded by the MoE (No. 2019R1I1A3A01058608).
Publisher Copyright:
© 2021 ACM.
PY - 2021/1/18
Y1 - 2021/1/18
N2 - 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.
AB - 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.
KW - LR parsing
KW - integrated development environments
KW - parser generator
KW - reduction
KW - sentential forms
KW - syntax completion
UR - http://www.scopus.com/inward/record.url?scp=85099728508&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85099728508&partnerID=8YFLogxK
U2 - 10.1145/3441296.3441395
DO - 10.1145/3441296.3441395
M3 - Conference contribution
AN - SCOPUS:85099728508
T3 - PEPM 2021 - Proceedings of the 2021 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, Co-located with POPL 2021
SP - 32
EP - 43
BT - PEPM 2021 - Proceedings of the 2021 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, Co-located with POPL 2021
PB - Association for Computing Machinery, Inc
T2 - 2021 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2021, co-located with the Annual Symposium on Principles of Programming Languages, POPL 2021
Y2 - 18 January 2021 through 19 January 2021
ER -