Proceedings Article10.1109/ELCONRUS51938.2021.9396311
Syntax Error Search Using Parser Combinators
Mikhail Kuznetsov,Georgii Firsov +1 more
- 26 Jan 2021
2
TL;DR: In this paper, the authors compared a parser combinator with a parser generator and found that the parser generator takes less time on average to find a syntax error in the source code.
read more
Abstract: 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.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Exploring Different Methods of Scanners and Parsers
M Asmitha,Niharika Panda +1 more
- 16 May 2024
TL;DR: This study focus on how any model of scanners work based on given input, and how a token is treated in Bottom up and Top down like left recursion, left factoring, augmentation, parse tree, DFA etc.
3
A Survey of Semantic Parsing Techniques
TL;DR: This study surveys semantic parsing techniques, analyzing challenges, trends, and applications, and classifying methods according to scenarios, highlighting advances, limitations, and future directions for logical reasoning, evaluation, and natural language processing innovation.
References
•Book
Compilers: Principles, Techniques, and Tools
Alfred V. Aho,Ravi Sethi,Jeffrey D. Ullman +2 more
- 01 Jan 1986
TL;DR: This book discusses the design of a Code Generator, the role of the Lexical Analyzer, and other topics related to code generation and optimization.
9.7K
Optimizing Parser Combinators
Jan Kurs,Jan Vraný,Mohammad Ghafari,Mircea Lungu,Oscar Nierstrasz +4 more
- 23 Aug 2016
TL;DR: This work presents a more traditional approach to optimization --- a compiler --- applied to the domain of parser combinators, and presents an equivalent high-performance top-down parser generated by this compiler.
5
The Third Homomorphism Theorem
TL;DR: The Third Homomorphism Theorem is formalize and prove, and it is used to improve an O ( n 2 ) sorting algorithm to O (n log n ).
Parsec: direct style monadic parser combinators for the real world
Daan Leijen,Erik Meijer +1 more
- 01 Jan 2001
TL;DR: The Parsec parser combinator library described in this paper, utilizes a novel implementation technique for space and time e±cient parser combinators that in case of a parse error, report both the position of the error as well as all grammar productions that would have been legal at that point in the input.
Yacc : Yet Another Compiler Compiler
S. C. Johnson,Murray Hill +1 more
- 01 Jan 1978
TL;DR: Yacc provides a general tool for describing the input to a computer program, together with code to be invoked as each such structure is recognized, and turns such a specification into a subroutine that handles the input process.
Related Papers (5)
Jan Kurs,Jan Vraný,Mohammad Ghafari,Mircea Lungu,Oscar Nierstrasz +4 more
- 23 Aug 2016
Doaitse Swierstra,Atze Dijkstra +1 more
- 01 Jun 2001