Elkhound is an implementation of the Generalized LR (GLR) parsing algorithm [Tomita86, Rekers92] that allows the user to associate arbitrary C++ code with reduction actions, while retaining full control of sharing and disambiguation. Elkhound specifications are similar to those of YACC for LALR(1) grammar fragments, exposing the details of the GLR reduction process only where the grammar requires it. Further, the algorithm itself can switch on a token-by-token basis between GLR and simple LR, achieving very good performance for unambiguous portions of the input. The resulting system is familiar to even casual users of tools like YACC or Bison, but powerful enough to elegantly handle the dark corners of real-world languages.
Cited By
- Parr T, Harwell S and Fisher K (2014). Adaptive LL(*) parsing, ACM SIGPLAN Notices, 49:10, (579-598), Online publication date: 31-Dec-2015.
- Parr T, Harwell S and Fisher K Adaptive LL(*) parsing Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications, (579-598)
- Atkey R The Semantics of Parsing with Semantic Actions Proceedings of the 2012 27th Annual IEEE/ACM Symposium on Logic in Computer Science, (75-84)
- Jim T, Mandelbaum Y and Walker D (2010). Semantics and algorithms for data-dependent grammars, ACM SIGPLAN Notices, 45:1, (417-430), Online publication date: 2-Jan-2010.
- Jim T, Mandelbaum Y and Walker D Semantics and algorithms for data-dependent grammars Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (417-430)
- Telea A and Voinea L An interactive reverse engineering environment for large-scale C++ code Proceedings of the 4th ACM symposium on Software visualization, (67-76)
- Winter V and Beranek J Program transformation using HATS 1.84 Proceedings of the 2005 international conference on Generative and Transformational Techniques in Software Engineering, (378-396)
Index Terms
- Elkhound: A Fast, Practical GLR Parser Generator
Recommendations
An efficient LR parser generator for tree-adjoining grammars
New developments in parsing technologyIn this chapter we discuss practical LR-like parser generator models for Tree Adjoining Grammars (TAGs) and propose a new algorithm. The algorithm has been implemented and applied to two large coverage TAGs for English: the XTAG English grammar, and a ...
LR Automatic Parser Generator and LR(1) Parser
LR is an LR(1) parser generation system. It is written entirely in portable ANS1 standard Fortran 66 and has been successfully operated on a number of computers. LR uses a powerful algorithm of Pager's to generate a space efficient parser for any LR(1) ...
Evaluating GLR parsing algorithms
The fourth workshop on language descriptions, tools, and applications (LDTA'04)We describe the behaviour of three variants of GLR parsing: (i) Farshi's original Correction to Tomita's non-general algorithm; (ii) the Right Nulled GLR algorithm which provides a more efficient generalisation of Tomita and (iii) the Binary Right ...