Abstract
We discuss generalisations of bottom up parsing, emphasising the relative costs for real programming languages. Our goal is to provide a roadmap of the available approaches in terms of their space and time performance for programming language applications, focusing mainly on GLR style algorithms. It is well known that the original Tomita GLR algorithm fails to terminate on hidden left recursion: here we analyse two approaches to correct GLR parsing (i) the modification due to Farshi that is incorporated into Visser’s work and (ii) our own right-nullable GLR (RNGLR) algorithm, showing that Farshi’s approach can be expensive. We also present results from our new Binary RNGLR algorithm which is asymptotically the fastest parser in this family and show that the recently reported reduction incorporated parsers can require automata that are too large to be practical on current machines.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Parr, T.J.: Language translation using PCCTS and C++. Automata Publishing Company (1996)
Eggert, P.: (2003), http://compilers.iecc.com/comparch/article/03-01-042
Durbin, R., Eddy, S., Krogh, A., Mitchison, G.: Biological Sequence Analysis. Cambridge University Press, Cambridge (1998)
van den Brand, M., Heering, J., Klint, P., Olivier, P.: Compiling language definitions: the ASF+SDF compiler. ACM Transactions on Programming Languages and Systems 24, 334–368 (2002)
Johnstone, A., Scott, E.: Generalised recursive descent parsing and follow determinism. In: Koskimies, K. (ed.) CC 1998. LNCS, vol. 1383, pp. 16–30. Springer, Heidelberg (1998)
Nozohoor-Farshi, R.: GLR parsing for ε-grammars. In: Tomita, M. (ed.) Generalized LR parsing, pp. 60–75. Kluwer Academic Publishers, Netherlands (1991)
Rekers, J.G.: Parser generation for interactive environments. PhD thesis, Universty of Amsterdam (1992)
Visser, E.: Syntax definition for language prototyping. PhD thesis, Universty of Amsterdam (1997)
Scott, E., Johnstone, A.: Reducing non-determinism in reduction modified GLR parsers. To appear in Acta Informatica (2004)
Johnstone, A., Scott, E.: Generalised reduction modified LR parsing for domain specific language prototyping. In: Proc. 35th Annual Hawaii International Conference On System Sciences (HICSS 2002). IEEE Computer Society, New Jersey (2002)
Scott, E., Johnstone, A., Economopoulos, G.: BRN-table based GLR parsers. Technical Report TR-03-06, Royal Holloway, University of London, Computer Science Department (2003)
Aycock, J., Horspool, N.: Faster generalised LR parsing. In: Jähnichen, S. (ed.) CC 1999. LNCS, vol. 1575, pp. 32–46. Springer, Heidelberg (1999)
Johnstone, A., Scott, E.: Generalised regular parsers. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 232–246. Springer, Heidelberg (2003)
Dodd, C., Maslov, V.: (2002), http://www.siber.com/btyacc
Tomita, M.: Efficient parsing for natural language. Kluwer Academic Publishers, Boston (1986)
Johnson, M.: The computational complexity of GLR parsing. In: Tomita, M. (ed.) Generalized LR parsing, pp. 35–42. Kluwer Academic Publishers, Netherlands (1991)
Graham, S.L., Harrison, M.A.: Parsing of general context-free languages. Advances in Computing 14, 77–185 (1976)
Lang, B.: Deterministic techniques for efficient non-deterministic parsers. In: Loeckx, J. (ed.) ICALP 1974. LNCS, vol. 14, pp. 255–269. Springer, Heidelberg (1974)
Aycock, J., Horspool, R.N., Janousek, J., Melichar, B.: Even faster generalised LR parsing. Acta Informatica 37, 633–651 (2001)
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: principles techniques and tools. Addison-Wesley, Reading (1986)
Scott, E., Johnstone, A.: Table based parsers with reduced stack activity. Technical Report TR-02-08, Royal Holloway, University of London, Computer Science Department (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Johnstone, A., Scott, E., Economopoulos, G. (2004). Generalised Parsing: Some Costs. In: Duesterwald, E. (eds) Compiler Construction. CC 2004. Lecture Notes in Computer Science, vol 2985. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24723-4_7
Download citation
DOI: https://doi.org/10.1007/978-3-540-24723-4_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21297-3
Online ISBN: 978-3-540-24723-4
eBook Packages: Springer Book Archive