Syntax Error Search Using Parser Combinators

被引:0
|
作者
Kuznetsov, Mikhail [1 ]
Firsov, Georgii [1 ]
机构
[1] Natl Res Nucl Univ MEPhI, Moscow Engn Phys Inst, Moscow, Russia
关键词
programming languages; syntax analysis; parser combinators; parser generators; error searching;
D O I
10.1109/ElConRus51938.2021.9396311
中图分类号
TM [电工技术]; TN [电子技术、通信技术];
学科分类号
0808 ; 0809 ;
摘要
Parser combinators is a popular approach to parsing sequences generated by context-free grammars, which can be specialized data formats (e.g. JSON, YAML), markup languages like XML or HTML. At the same time, this approach is rarely used for parsing programming languages. The purpose of this paper is to study the application of parser combinators for programming languages processing, and more precisely for searching of syntax errors. The method that had been developed during this research was compared with an algorithm of syntax analysis of programming languages using parser-generators. Parser combinator takes less time on average to find a syntax error in the source code. Its average time complexity is linear with respect to the length of the input sequence, while the parser generator has an average quadratic complexity. Moreover, a parser combinator requires less memory than a parser generator. These results can be used for building intelligent code completion tools for fast syntax error detection.
引用
收藏
页码:490 / 493
页数:4
相关论文
共 50 条
  • [31] Token-by-token syntax-directed editing (using an LR parser)
    Stone, RG
    Kadoda, GF
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 1996, 26 (11): : 1247 - 1260
  • [32] Syntax error
    Robinson, Philip
    [J]. NEW SCIENTIST, 2013, 219 (2924) : 28 - 28
  • [33] ?SYNTAX ERROR
    Piringer, Joerg
    [J]. LITERATUR UND KRITIK, 2023, (579): : 30 - 32
  • [34] ANALYZING ENGLISH SYNTAX WITH A PATTERN-LEARNING PARSER
    MCCONLOGUE, K
    SIMMONS, RF
    [J]. COMMUNICATIONS OF THE ACM, 1965, 8 (11) : 687 - +
  • [35] Contraint-based combinators for local search
    van Hentenryck, P
    Michel, L
    Liu, LY
    [J]. CONSTRAINTS, 2005, 10 (04) : 363 - 384
  • [36] Contraint-Based Combinators for Local Search
    Pascal Van Hentenryck
    Laurent Michel
    Liyuan Liu
    [J]. Constraints, 2005, 10 : 363 - 384
  • [37] Constraint-based combinators for local search
    Van Hentenryck, P
    Michel, L
    Liu, LY
    [J]. PRINCIPLES AND PRACTICE OF CONSTRAINT PROGRAMMING - CP 2004, PROCEEDINGS, 2004, 3258 : 47 - 61
  • [38] COD::CIF::Parser: an error-correcting CIF parser for the Perl language
    Merkys, Andrius
    Vaitkus, Antanas
    Butkus, Justas
    Okulic-Kazarinas, Mykolas
    Kairys, Visvaldas
    Grazulis, Saulius
    [J]. JOURNAL OF APPLIED CRYSTALLOGRAPHY, 2016, 49 : 292 - 301
  • [39] A PARSER FOR ONLINE SEARCH SYSTEM EVALUATION
    TREMAIN, R
    COOPER, MD
    [J]. INFORMATION PROCESSING & MANAGEMENT, 1983, 19 (02) : 65 - 75
  • [40] Parser-based analysis of syntax-lexis interactions
    Lehmann, Hans Martin
    Schneider, Gerold
    [J]. CORPORA: PRAGMATICS AND DISCOURSE, 2009, (68): : 477 - 502