Comparative Analysis of LR Parsers in Designing of Compilers
Milind Shah, Nidhi Chitroda, Safeya Dharmajwala, Avani R. Vasant · 2022 International Conference on Augmented Intelligence and Sustainable Systems (ICAISS) · 2022
Compiler development has been one of the leading computer research subjects. This field of study aims to understand the link between computer systems and computer languages. Compilers are used to translate code from a high-level programming language into machine code. This process consists of essentially six phases. Analysis of syntax is the second step of compilation. As input to a syntax analyzer, lexical analyzer-generated tokens are used. Syntax analyzers do parsing. Parsing is used to derive a string from a given grammar via the process of derivation. There are essentially two parsing algorithms, called top-down and bottom-up parsing. The four forms of bottom-up parsing LR (Left-To-Right) parsing strategies include Simple LR (SLR), Canonical LR (CLR), Look Ahead LR (LALR), and LR (1). In addition, LR Parsers are mostly used to parse a variety of context-free grammar. This approach is referred to as LR (k) parsing, where L stands for left-to-right input scanning, R stands for creating a reverse right-most derivation, and k is the number of look-ahead input symbols utilized to make parsing decisions. A bottom-up parser helps to reduce the number of top-level grammatical products by working from the leaves up. LR parsers are the most effective deterministic parsers in reality. This research aims to describe the compiler, its purpose, and LR parser algorithms, with the comparison to determine which LR parsing algorithms are efficient among all other LR parsers.