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 条
  • [21] Parser Combinators for Context-Free Path Querying
    Verbitskaia, Ekaterina
    Kirillov, Ilya
    Nozkin, Ilya
    Grigorev, Semyon
    [J]. PROCEEDINGS OF THE 9TH ACM SIGPLAN INTERNATIONAL SYMPOSIUM ON SCALA (SCALA '18), 2018, : 13 - 23
  • [22] Parser combinators for parsing semi-structured texts
    Iwama, Futoshi
    Nakamura, Taiga
    Takeuchi, Hironori
    [J]. Computer Software, 2012, 29 (04) : 258 - 277
  • [23] Parser Combinators: a Practical Application for Generating Parsers for NMR Data
    Fenwick, Matthew
    Weatherby, Gerard
    Ellis, Heidi J. C.
    Gryk, Michael R.
    [J]. PROCEEDINGS OF THE 2013 10TH INTERNATIONAL CONFERENCE ON INFORMATION TECHNOLOGY: NEW GENERATIONS, 2013, : 241 - 246
  • [24] Implementation of a Training Parser Using Explicit Abstract Syntax Tree
    Penev, Ivaylo
    Karova, Milena
    [J]. COMPUTER SYSTEMS AND TECHNOLOGIES, 2019, : 299 - 303
  • [25] Query Generation for Answering Complex Questions in Russian Using a Syntax Parser
    Evseev, D. A.
    [J]. SCIENTIFIC AND TECHNICAL INFORMATION PROCESSING, 2022, 49 (05) : 310 - 316
  • [26] Quick Parser Development Using Modified Compilers and Generated Syntax Rules
    Maeda, Kazuaki
    [J]. PROCEEDINGS OF THE 15TH AMERICAN CONFERENCE ON APPLIED MATHEMATICS AND PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON COMPUTATIONAL AND INFORMATION SCIENCES 2009, VOLS I AND II, 2009, : 410 - +
  • [27] Explicitly Recursive Grammar Combinators A Better Model for Shallow Parser DSLs
    Devriese, Dominique
    Piessens, Frank
    [J]. PRACTICAL ASPECTS OF DECLARATIVE LANGUAGES, 2011, 6539 : 84 - 98
  • [28] Query Generation for Answering Complex Questions in Russian Using a Syntax Parser
    D. A. Evseev
    [J]. Scientific and Technical Information Processing, 2022, 49 : 310 - 316
  • [29] Nom, a byte oriented, streaming, zero copy, parser combinators library in Rust
    Couprie, Geoffoy
    [J]. 2015 IEEE SECURITY AND PRIVACY WORKSHOPS (SPW), 2015, : 142 - 148
  • [30] SYNTAX-DIRECTED PARSER FOR RECALCITRANT GRAMMARS
    ABRAHAMS, PW
    [J]. INTERNATIONAL JOURNAL OF COMPUTER MATHEMATICS, 1972, 3 (2-3) : 105 - 115