Stack Based Implementation of Ordered Choice in Packrat Parsing
Journal: International Journal of Computer Science and Mobile Computing - IJCSMC (Vol.2, No. 11)Publication Date: 2013-11-30
Authors : Manish M. Goswami M.M. Raghuwanshi Latesh Malik;
Page : 303-309
Keywords : Parsing; PEG; Packrat; CFG;
Abstract
Packrat Parsing is a variant of recursive decent parsing technique with memoization by saving intermediate parsing result as they are computed so that result will not be reevaluated. It is extremely useful as it allows the use of unlimited look ahead without compromising on the power and flexibility of backtracking. However, Packrat parsers need storage which is in the order of constant multiple of input size for memoization. This makes packrat parsers not suitable for parsing input streams which appears to be in simple format but have large amount of data. In this paper instead of translating productions into procedure calls with memoization, an attempt is made to eliminate the calls by using stack without using memoization for implementation of ordered choice operator in Parsing expression Grammar (PEG). The experimental results show the possibility of using this stack based algorithm to eliminate the need of storage for memoization with a guarantee of linear parse time.
Other Latest Articles
- IMPROVED CMA: A BEAMFORMING ALGORITHMS FOR WIRELESS SYSTEM USING SMART ANTENNA
- Wireless Sensor Network Using Flood Monitoring
- A Surveillance Robot with Climbing Capabilities for Home Security?
- An Agent Oriented Markov Model Framework for Service Composition
- AN ONTOLOGY-BASED SERVICE DISCOVERY FRAMEWORK FOR AN ENTERPRISE
Last modified: 2013-11-30 16:32:22