Syntax Error Search Using Parser Combinators
Autor: | Mikhail Kuznetsov, Georgii Firsov |
---|---|
Rok vydání: | 2021 |
Předmět: |
Source code
Parsing Programming language Computer science media_common.quotation_subject YAML computer.file_format computer.software_genre JSON Intelligent code completion TheoryofComputation_MATHEMATICALLOGICANDFORMALLANGUAGES Parser combinator Syntax error computer Time complexity media_common computer.programming_language |
Zdroj: | 2021 IEEE Conference of Russian Young Researchers in Electrical and Electronic Engineering (ElConRus). |
DOI: | 10.1109/elconrus51938.2021.9396311 |
Popis: | 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. |
Databáze: | OpenAIRE |
Externí odkaz: |