Faster, Practical GLL Parsing
Presented at the International Conference on Compiler Construction, London, UK
Generalized LL (GLL) parsing is an extension of recursive-descent (RD) parsing that supports all context-free grammars in cubic time and space. GLL parsers have the direct relationship with the grammar that RD parsers have, and therefore, compared to GLR, are easier to understand, debug, and extend. This makes GLL parsing attractive for parsing programming languages. In this paper we propose a more efficient Graph-Structured Stack (GSS) for GLL parsing that leads to significant performance improvement. We also discuss a number of optimizations that further improve the performance of GLL. Finally, for practical scannerless parsing of programming languages, we show how common lexical disambiguation filters can be integrated in GLL parsing. Our new formulation of GLL parsing is implemented as part of the Iguana parsing framework. We evaluate the effectiveness of our approach using a highly-ambiguous grammar and grammars of real programming languages. Our results, compared to the original GLL, show a speedup factor of 10 on the highly-ambiguous grammar, and a speedup factor of 1.5, 1.7, and 5.2 on the grammars of Java, C#, and OCaml, respectively.
|THEME||Software (theme 1)|
|Series||Lecture Notes in Computer Science|
|Conference||International Conference on Compiler Construction|
Afroozeh, A, & Izmaylova, A. (2015). Faster, Practical GLL Parsing. In Lecture Notes in Computer Science. Springer. doi:10.1007/978-3-662-46663-6_5