[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lexical analysis
Date: Tue, 13 Nov 90 12:17:29 MST
From: riedesel@daneel.den.mmc.com (Billy Joel)
Does anyone know of a lexical analysis tool available (public domain)
for LISP (i.e. unix lex). For that matter, how about yacc?
What do you mean by lexical analysis tool? Are you writing a program which
needs to know about the textual representation of Lisp or its underlying
internal representation? For example, READ is a function which takes data in
Lisp source form and converts it to machine-readable form. At the other end
of the spectrum, there are a number of text editors which attempt to
"understand" Lisp source, for the purposes of balancing parentheses and
indenting source correctly; these include Zwei (the MIT Lisp Machine editor)
and Emacs (available from the Free Software Foundation in Cambridge, Mass.,
among others).
If you think READ does part of what you want, but you want to walk down the
code representation looking for patterns in the program structure itself,
there are a number of code walkers. The most portable one I know about
offhand is part of the PCL implementation of CLOS. There is a code walker
which is part of the Genera interpreter and compiler (LT:MAPFORMS), for which
the documentation (in the Genera source) is quite good.