skip to main content
article

Why bison is becoming extinct

Published:05 July 2001Publication History
Skip Abstract Section

Abstract

At some point in your career, you're going to implement a computer language. You probably won't be implementing Java or C++. You may not even recognize it as a language. Truth be told, there are an awful lot of domain-specific languages, or "little languages" [7] in common use:

  • configuration files,

  • HTML/XML documents,

  • shell scripts,

  • network protocols,

  • mail headers,

  • command-line arguments.

The list goes on. A number of programs allow you to write scripts to control their operation; infact, just the other day I downloaded a neural network simulator which provided a little programming language to steer the simulation.How will you implement your language? There's the ad hoc approach, of course, but it's not well suited to languages whose design is complex or frequently changing. You also end up writing code to perform tasks which can be effectively automated.You might also consider using existing languages like Tcl [18] and Python [6]. These languages are designed to either be embedded in an existing application, or easily extended. This is a good solution when it can be used, saving a lot of time and effort. However, there may be concerns about tying your language to one which is itself changing, or the syntax and semantics of your language may not match those of such a "host" language.A third approach is to use compiler tools to implement your language. Most were designed for the implementation of large programming languages, but the same principles and techniques apply equally well to little languages. This article is the story of one such tool -- a parser generator tool -- and more importantly, what sort of tool is going to replace it, and why.

References

  1. Aho, A.V., Sethi, R., and Ullman, J.D. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Aho, A.V., and Ullman, J.D. The Theory of Parsing, Translation, and Compiling, Volume 1: Parsing. Prentice-Hall, 1972. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Aycock, J., and Horspool, N. Faster generalized LR parsing. In Proceedings of the 8th International Conference on Compiler Construction (LNCS #1575). Springer-Verlag, 1999, pp. 32-46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Aycock, J., and Horspool, N. Directly-executable Earley parsing. In Proceedings of the 10th International Conference on Compiler Construction (LNCS #2027). Springer-Verlag, 2001, pp. 229-243.Google ScholarGoogle ScholarCross RefCross Ref
  5. Aycock, J., Horspool, N., Janousek, J., and Melichar, B. Even faster generalized LR parsing. To appear in Acta Informatica. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Beazley, D. Python Essential Reference. New Riders, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Bentley, J. Little languages. In More Programming Pearls. Addison-Wesley, 1988, pp. 83-100. Google ScholarGoogle Scholar
  8. Earley, J. An efficient context-free parsing algorithm. Communications of the ACM 13, 2 (Feb. 1970), 94-102. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Fischer, C.N., and LeBlanc Jr., R.J. Crafting a Compiler. Benjamin/Cummings, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Glanville, R.S., and Graham, S.L. A new method for compiler code generation. In 5th Annual ACM Symposium on Principles of Programming Languages. ACM/SIGPLAN, 1978, pp. 231-240. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Graham, S.L., Harrison, A.M., and Ruzzo, W.L. An improved context-free recognizer. ACM Transactions on Programming Languages and Systems 2, 3 (1980), 415-462. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Grune, D., and Jacobs, C.J.H. Parsing Techniques: A Practical Guide. Ellis Horwood, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Hopcroft, J.E., and Ullman, J.D. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Johnson, S.C. YACC -- yet another compiler compiler. UNIX Programmer's Manual, 7th Edition, 2B, 1978.Google ScholarGoogle Scholar
  15. Lang, B. Deterministic techniques for efficient non-deterministic parsers. In Automata, Languages, and Programming (LNCS #14). Springer-Verlag, 1974, pp. 255-269. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Levine, J.R., Mason, T., and Brown, D. Lex & Yacc, second edition. O'Reilly & Associates, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. McLean, P., and Horspool, R.N. A faster Earley parser. In Proceedings of the International Conference on Compiler Construction (CC '96). Spring-Verlag, 1996, pp. 281-293. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Ousterhout, J.K. Tcl and the Tk Toolkit. Addison-Wesley, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Tomita, M. Efficient Parsing for Natural Languages. Kluwer Academic, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. van den Brand, M., Sellink, A., and Verhoef, C. Current parsing technologies in software renovation considered harmful. In International Workshop on Program Comprehension, 1998, pp. 108-117. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Weingarten, F.W. Translation of Computer Languages. Holden-Day, 1973. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Why bison is becoming extinct

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image XRDS: Crossroads, The ACM Magazine for Students
      XRDS: Crossroads, The ACM Magazine for Students  Volume 7, Issue 5
      August 2001 - Late Summer Edition
      41 pages
      ISSN:1528-4972
      EISSN:1528-4980
      DOI:10.1145/969637
      Issue’s Table of Contents

      Copyright © 2001 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 5 July 2001

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format .

    View HTML Format