[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)
    Message-Id: <9011131917.AA13337@daneel>
    To: slug@Warbucks.AI.SRI.COM
    Subject: lexical analysis
    Does anyone know of a lexical analysis tool available (public domain)
    for LISP (i.e. unix lex).  For that matter, how about yacc?
    I would really prefer not to reinvent the wheel on this one.
The following message was posted on comp.lang.lisp recently.
Article 2477 of comp.lang.lisp:
Path: puma!ge-dab!crdgw1!rpi!zaphod.mps.ohio-state.edu!usc!apple!chewy
From: chewy@Apple.COM (Paul Snively)
Newsgroups: comp.lang.lisp
Subject: GLisp Available
Summary: Generalized Lisp Translator Available
Keywords: Common Lisp, Syntax, Parsing, MLisp, RLisp, PLisp, GLisp
Message-ID: <45336@apple.Apple.COM>
Date: 3 Oct 90 05:20:01 GMT
Followup-To: comp.lang.lisp
Organization: Apple Computer Inc., Cupertino, CA
Lines: 57
Lisp fans,
Pursuant to a lengthy conversation in this forum regarding Lisp syntax, in
which a variety of syntax packages were mentioned and discussed, I'm pleased
to be able to announce that Apple's Legal Beagles have apparently seen fit
for us to release GLisp.
GLisp stands for Generalized Lisp, and it's sole purpose in life is to support
the (relatively painless) additions of new syntaxes to Common Lisp.
As shipped, GLisp includes support for three dialects: Common Lisp as we know
and love it; PLisp, which is "Pattern-matching Lisp," a rule-based system
geared towards the support of new dialects; and MLisp, or "Meta-Lisp," which
is an Algol-like syntax.
Once you learn PLisp (in particular), it becomes quite an easy matter for the
most part to add still other syntaxes to GLisp's repertoire.
The process is a translation process.  That is, you write a source file in one
of GLisp's dialects and parse the file to produce good ol' Common Lisp code,
which you can then load/compile/further obfuscate/whatever.
GLisp and PLisp are well-documented.  MLisp, on the other hand, isn't--but
the PLisp source code is provided, and it's fairly easy to read.
Speaking of documentation, there are a few things you should know:
The documentation is in Microsoft Word 4.0 format for the Macintosh, so when
you extract the documentation files from the compressed tar archive, you'll
have to get 'em to a Mac and make the file type be WDBN and the file creator
be MSWD.
The compressed tar archive was created on a Macintosh, so spaces in file/
directory names were converted to underscores (_).  If you're going back to
a Mac, just change 'em all back to spaces.  If you're porting to something
else, you'll have to change all of the pathnames in the code anyway.
Speaking of porting... the code is highly portable.  The only platform
dependencies that I'm aware of are the pathnames, and even their use is
Now for the part you've been waiting for: to get the stuff, FTP to:
apple.com, directory pub/dts/mac/lisp, file glisp.tar.Z
It is a compressed tar archive, so remember to be in binary mode when you do
the FTP.
Please feel free to send comments, questions, etc. to me (chewy@apple.com).
It's not actually my job to support this (it's not even part of my job to be
on the Internet), but I'll try to respond to all queries.
Paul Snively
Macintosh Developer Technical Support
Apple Computer, Inc.