Optimization of * operator in Parsing Expression Grammar

Manish M. Goswami, Mukesh M. Raghuwanshi, Latesh Malik · 2015

Packrat Parsing uses recursive decent parsing technique with memorization so that result will not be recomputed. The main advantage is that it allows the use of unlimited look ahead without constraints on the power and flexibility of backtracking. However, this is achieved at the cost of huge memory size. In this paper an idea to eliminate the procedure calls representing production of grammar by using stack is used for optimizing* operator in PEG to reduce no. of Push and pop operations typically encountered in backtracking top down parser. Experimental results indeed show an improved performance over straightforward implemented recursive descent parser, Mouse tool.

Read the paper · More papers on PaperTik