Parsing Expression Grammar and Packrat Parsing – A Review

Author(s):  
Nikhil Mangrulkar S ◽  
◽  
Kavita Singh R ◽  
Mukesh Raghuwanshi ◽  
Shashidhar R ◽  
...  

Bryan Ford presented Parsing Expression Grammars (PEGs) as an alternative to specify rules for programming language, along with a Packrat parser, based on an idea of memoization. The idea proposed by B. Ford guarantees parsing of grammar written using PEGs in linear time in spite of backtracking. The primary aim of the paper is to highlight the details of PEGs followed by various challenges existing for a better understanding of the readers. From the entire overview presented, it has been observed that PEGs address the issue of undesired ambiguity in grammar for computer-oriented programming language, by not allowing any ambiguity in rules itself at the first place. However, the guarantee of linear time execution comes with a cost of large heap consumption, making it infeasible to implement for large inputs. Optimizing the resources required for memoization, may allow us to utilize the benefits offered by PEGs.

1991 ◽  
Vol 57 (3-4) ◽  
pp. 221-236 ◽  
Author(s):  
Masahiko Sekine ◽  
Hiroshi Nakanishi ◽  
Masao Ukita ◽  
Sadaaki Murakami

2021 ◽  
pp. 445-455
Author(s):  
João Alberto Fabro ◽  
Leonardo Araujo Santos ◽  
Matheus Diniz de Freitas ◽  
Adriano Francisco Ronszcka ◽  
Jean Marcelo Simão

Sign in / Sign up

Export Citation Format

Share Document