Abstract
In this paper we present the fusion of generalized LR parsing and scannerless parsing. This combination supports syntax definitions in which all aspects (lexical and context-free) of the syntax of a language are defined explicitly in one formalism. Furthermore, there are no restrictions on the class of grammars, thus allowing a natural syntax tree structure. Ambiguities that arise through the use of unrestricted grammars are handled by explicit disambiguation constructs, instead of implicit defaults that are taken by traditional scanner and parser generators. Hence, a syntax definition becomes a full declarative description of a language. Scannerless generalized LR parsing is a viable technique that has been applied in various industrial and academic projects.
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
A. V. Aho, R. Sethi, and J. D. Ullman. Compilers. Principles, Techniques and Tools. Addison-Wesley, 1986.
J. Aycock and R. N. Horspool. Faster generalized LR parsing. In S. Jähnichen, editor, CC’99, volume 1575 of LNCS, pages 32–46. Springer-Verlag, 1999.
J. Aycock and R. N. Horspool. Schrödinger’s token. Software, Practice & Experience, 31:803–814, 2001.
M. G. J. van den Brand, A. van Deursen, J. Heering, H. A. de Jong, M. de Jonge, T. Kuipers, P. Klint, L. Moonen, P. A. Olivier, J. Scheerder, J. J. Vinju, E. Visser, and J. Visser. The ASF+SDF Meta-Environment: a Component-Based Language Development Environment. In R. Wilhelm, editor, CC’01, volume 2027 of LNCS, pages 365–370. Springer-Verlag, 2001.
M. G. J. van den Brand, H. A. de Jong, P. Klint, and P. A. Olivier. Efficient Annotated Terms. Software, Practice & Experience, 30(3):259–291, 2000.
J. R. Cordy, C. D. Halpern-Hamu, and E. Promislow. TXL: Ara pid prototyping system for programming language dialects. Computer Languages, 16(1):97–107, 1991.
M. de Jonge, E. Visser, and J. Visser. XT: A bundle of program transformation tools. In M. G. J. van den Brand and D. Parigot, editors, Workshop on Language Descriptions, Tools and Applications (LDTA’01), volume 44 of Electronic Notes in Theoretical Computer Science. Elsevier Science Publishers, 2001.
A. van Deursen, J. Heering, and P. Klint, editors. Language Prototyping, volume 5 of AMAST Series in Computing. World Scientific, 1996.
K.-G. Doh and P. D. Mosses. Composing programming languages by combining action-semantics modules. In M. G. J. van den Brand and D. Parigot, editors, Electronic Notes in Theoretical Computer Science, volume 44, 2001.
J. Heering, P. R. H. Hendriks, P. Klint, and J. Rekers. The syntax definition formalism SDF— reference manual. SIGPLAN Notices, 24(11):43–75, 1989.
S. C. Johnson. YACC—yet another compiler-compiler. Technical Report CS-32, AT & T Bell Laboratories, Murray Hill, N. J., 1975.
P. Klint and E. Visser. Using filters for the disambiguation of context-free grammars. In G. Pighizzini and P. San Pietro, editors, Proc. ASMICS Workshop on Parsing Theory, pages 1–20, Milano, Italy, 1994. Tech. Rep. 126-1994, Dipartimento di Scienze dell’Informazione, Università di Milano.
R. Lämmel and C. Verhoef. VS COBOL II grammar, 2001.
B. Lang. Deterministic techniques for efficient non-deterministic parsers. In J. Loeckx, editor, Proceedings of the Second Colloquium on Automata, Languages and Programming, volume 14 of LNCS, pages 255–269. Springer-Verlag, 1974.
M. E. Lesk and E. Schmidt. LEX— A lexical analyzer generator. Bell Laboratories, 1986. UNIX Programmer’s Supplementary Documents, Volume 1 (PS1).
L. Moonen. Generating robust parsers using island grammars. In Proceedings of the 8th Working Conference on Reverse Engineering, pages 13–22. IEEE Computer Society Press, 2001.
J. Rekers. Parser Generation for Interactive Environments. PhD thesis, University of Amsterdam, 1992. ftp://ftp.cwi.nl/pub/gipe/reports/Rek92.ps.Z.
D. J. Salomon and G. V. Cormack. Scannerless NSLR(1) parsing of programming languages. SIGPLAN Notices, 24(7):170–178, 1989.
D. J. Salomon and G. V. Cormack. The disambiguation and scannerless parsing of complete character-level grammars for programming languages. Technical Report 95/06, Dept. of Computer Science, University of Manitoba, 1995.
E. Scott, A. Johnstone, and S. S. Hussain. Technical Report TR-00-12, Royal Holloway, University of London, Computer Science Dept., 2000.
M. Tomita. Efficient Parsing for Natural Languages. A Fast Algorithm for Practical Systems. Kluwer Academic Publishers, 1985.
E. Visser. Scannerless generalized-LR parsing. Technical Report P9707, Programming Research Group, University of Amsterdam, 1997.
E. Visser. Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam, 1997.
E. Visser. Stratego: Alan guage for program transformation based on rewriting strategies. System description of Stratego 0.5. In A. Middeldorp, editor, RTA’01, volume 2051 of LNCS, pages 357–361. Springer-Verlag, 2001.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
van den Brand, M.G.J., Scheerder, J., Vinju, J.J., Visser, E. (2002). Disambiguation Filters for Scannerless Generalized LR Parsers. In: Horspool, R.N. (eds) Compiler Construction. CC 2002. Lecture Notes in Computer Science, vol 2304. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45937-5_12
Download citation
DOI: https://doi.org/10.1007/3-540-45937-5_12
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43369-9
Online ISBN: 978-3-540-45937-8
eBook Packages: Springer Book Archive