Skip to main content

Lazy Lexing is Fast

  • Conference paper
Functional and Logic Programming (FLOPS 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1722))

Included in the following conference series:

Abstract

This paper introduces a set of combinators for building lexical analysers in a lazy functional language. During lexical analysis, the combinators generate a deterministic, table-driven analyser on the fly. Consequently, the presented method combines the efficiency of off-line scanner generators with the flexibility of the combinator approach. The method makes essential use of the lazy semantics of the implementation language Haskell. Finally, the paper discusses benchmarks of a scanner for the programming language C.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers – Principles, Techniques and Tools. Addison-Wesley Publishing Company, Reading (1986)

    Google Scholar 

  2. Appel, A.W., Mattson, J.S., Tardit, D.R.: A lexical analyzer generator for Standard ML (1994), http://cm.bell-labs.com/cm/cs/what/smlnj/doc/ML-Lex/manual.html

  3. Hutton, G.: Higher-order functions for parsing. Journal of Functional Programming 2(3), 323–343 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  4. Hutton, G., Meijer, E.: Monadic parsing in Haskell. Journal of Functional Programming 8(4), 437–444 (1998)

    Article  MATH  Google Scholar 

  5. Marlow, S.: Happy user guide (1997), http://www.dcs.gla.ac.uk/fp/software/happy/doc/happy.html

  6. Nikhil, R.S., Arvind, B., Hicks, J.E., Aditya, S., Augustsson, L., Maessen, J.W., Zhou, Y.: pH language reference manual, version 1.0. Technical Report CSG-Memo-369, Massachussets Institute of Technology, Laboratory for Computer Science (1995)

    Google Scholar 

  7. Swierstra, S.D., Duponcheel, L.: Deterministic, error-correcting combinatory parsers. In: Launchbury, J., Sheard, T., Meijer, E. (eds.) AFP 1996. LNCS, vol. 1129, pp. 184–207. Springer, Heidelberg (1996)

    Google Scholar 

  8. Tarditi, D.R., Appel, A.W.: ML-Yacc user’s manual (1994), http://cm.bell-labs.com/cm/cs/what/smlnj/doc/ML-Yacc/manual.html

  9. Waite, W.W., Goos, G.: Compiler Construction, 2nd edn. Springer, Heidelberg (1985)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Chakravarty, M.M.T. (1999). Lazy Lexing is Fast. In: Middeldorp, A., Sato, T. (eds) Functional and Logic Programming. FLOPS 1999. Lecture Notes in Computer Science, vol 1722. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10705424_5

Download citation

  • DOI: https://doi.org/10.1007/10705424_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66677-6

  • Online ISBN: 978-3-540-47950-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics