Abstract
Packrat parsing is a type of recursive decent parsing with guaranteed liner time parsing. For this,memoization technique is implemented in which all parsing results are memorized to avoid repetitive scanningof inputs in case of backtracking. The issue with this technique is large heap consumption for memoization whichout weigh the benefits. In many situations the developers need to make a tough decision of not implementingpackrat parsing despite the possibility of exponential time parsing. In this paper we present our developedtechnique to avoid such a tough choice. The heap consumption is upper bounded since memorized results arestored in buffer, capacity of which is decided at runtime depending on memory available in the machine. Thisdynamic buffer allocation is implemented by us in Mouse parser. This implementation achieves stableperformance against a variety of inputs with backtracking activities while utilizing appropriate size of memoryfor heap.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.