Pragmatic parsing in Common Lisp; or, putting defmacro on steroids

  • Authors:
  • Henry G. Baker

  • Affiliations:
  • -

  • Venue:
  • ACM SIGPLAN Lisp Pointers
  • Year:
  • 1991

Quantified Score

Hi-index 0.00

Visualization

Abstract

We review META, a classic technique for building recursive descent parsers, that is both simple and efficient. While META does not handle all possible regular or context-free grammars, it handles a surprisingly large fraction of the grammars encountered by Lisp programmers. We show how META can be used to parse streams, strings and lists---including Common Lisp's hairy lambda expression parameter lists. Finally, we compare the execution time of this parsing method to the built-in methods of Common Lisp.