Sciweavers

PASTE
2010
ACM

Packrat parsers can handle practical grammars in mostly constant space

14 years 2 months ago
Packrat parsers can handle practical grammars in mostly constant space
Packrat parsing is a powerful parsing algorithm presented by Ford in 2002. Packrat parsers can handle complicated grammars and recursive structures in lexical elements more easily than the traditional LL(k) or LR(1) parsing algorithms. However, packrat parsers require O(n) space for memoization, where n is the length of the input. This space inefficiency makes packrat parsers impractical in some applications. In our earlier work, we had proposed a packrat parser generator that accepts grammars extended with cut operators, which enable the generated parsers to reduce the amount of storage required. Experiments showed that parsers generated from cut-inserted grammars can parse Java programs and subset XML files in bounded space. In this study, we propose methods to automatically insert cut operators into some practical grammars without changing the accepted languages. Our experimental evaluations indicated that using our methods, packrat parsers can handle some practical grammars includ...
Kota Mizushima, Atusi Maeda, Yoshinori Yamaguchi
Added 14 Oct 2010
Updated 14 Oct 2010
Type Conference
Year 2010
Where PASTE
Authors Kota Mizushima, Atusi Maeda, Yoshinori Yamaguchi
Comments (0)