A Survey of Packrat Parser
Vishwakarma, Amit, Manish M. Goswami, Priyanka Gonnade · Zenodo (CERN European Organization for Nuclear Research) · 2015
Two recent developments in the field of formal languages are Parsing Expression Grammar (PEG) and packrat parsing. The PEG formalism is similar to BNF, but defines syntax in terms of recognizing strings, rather than constructing them. It is, in fact, precise specification of a backtracking recursive-descent parser. Packrat parsing is a general method to handle backtracking in recursive descent parsers. It ensures linear working time, at a huge memory cost. This paper begins with discussion of PEG and packrat parsing introduced by Bryan Ford Followed by various approaches over improvement of packrat parsing to reduce the memory requirement. This paper also describes the approaches to handle the left-recursion problem for PEG. The described Approaches handle the direct and indirect left-recursion problem for PEG. The paper concludes with the application of packrat parsing and throws a light on future scope in packrat parsing.