Gray lexer input streams

Upstream URL


Alexander Kahl <>


graylex - Gray lexer input streams ================================== graylex offers a means to do string operations on input streams without slurping all input at once by using Common Lisp Gray Streams, fixed-sized and flexible buffers. This is especially interesting for lexical analysis ("lexing") [lex] where input files can be exuberant, e.g. SQL dumps weighing hundreds of Megabytes. graylex is completely written in Common Lisp and licensed under the GPLv3+ [gpl]. Please see the file COPYING in the top-level directory of the distribution tarball or see the link at [2] if you didn't receive a copy along with this file. Installation ------------ Please see file INSTALL. Usage ----- Please see file examples/graylex-m4-example.lisp for a self-explanatory real-world example. History ------- graylex is inspired by dso-lex [dso-lex] but tackles two shortcomings of other lexing libraries including dso-lex: - Lexing and parsing should be performed on streams (i.e. string chunks of a stream) which can be a tedious task to implement manually - There are languages where the grammar [grammar] is volatile and the set of terminals [term] changes during immediate evaluation, hence eval'ing dynamically scoped variables is necessary (e.g. M4) Links and References -------------------- Homepage: <> Hacking: <> [lex]: [gpl]: [dso-lex]: [grammar]: [term]: Copyright --------- Copyright (C) 2010 2011 Alexander Kahl <> This file is part of graylex. graylex is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. graylex is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <>.

Dependencies (4)

  • alexandria
  • cl-heredoc
  • cl-ppcre
  • trivial-gray-streams

Dependents (3)

  • GitHub
  • Quicklisp