[comp.lang.lisp] Yacc and lex in lisp?

sra@ecs.soton.ac.uk (Stephen Adams) (09/22/89)

Does anyone know of any parsing tools like lex and yacc, but written
in lisp?  I would prefer common lisp or scheme.

Many thanks.

Stephen Adams
S.Adams@ecs.soton.ac.uk

--
Stephen

aboulang@bbn.com (Albert Boulanger) (09/23/89)

In article SRA.89Sep22085128@mccarthy.ecs.soton.ac.uk, Stephen Adams writes:


  Does anyone know of any parsing tools like lex and yacc, but written
  in lisp?  I would prefer common lisp or scheme.


This question comes up from time to time. Below is the beginning of a
description of the package, CGOL. Note that the syntax is only the
default and is completely rewritable. (I did a semi-automated Simula
to Flavors translator with it at one time.)


	     CGOL - an Algebraic Notation For MACLISP users

			    V. R. Pratt

			      1/27/77

             Common-Lisp annotations by G.J. Carrette 9/14/82

ABSTRACT

	MACLISP programmers who feel comfortable with ALGOL-like
notation, that is, an algebraic style in which one might write a
matrix multiply routine as
	for i in 1 to n do
	  for k in 1 to n do
	    (ac := 0;
	     for j in 1 to n do
		ac := ac + a(i,j)*b(j,k);
	     c(i,k) := ac)
can now write LISP programs in just such a notation.  This notation is
essentially transparent to the MACLISP system, and files containing
CGOL code (possibly mixed in with standard code) can be read by the
interpreter and compiled by the compiler just as though they were
written in straight LISP notation. 

I can send the rest of the descritpion if you are interested.

Cheers,
Albert Boulanger
BBN Systems & Technologies Corp.
aboulanger@bbn.com

chewy@apple.com (Paul Snively) (09/24/89)

In article <45996@bbn.COM> aboulang@bbn.com (Albert Boulanger) writes:
> In article SRA.89Sep22085128@mccarthy.ecs.soton.ac.uk, Stephen Adams 
writes:
> 
> 
>   Does anyone know of any parsing tools like lex and yacc, but written
>   in lisp?  I would prefer common lisp or scheme.
> 
> 
> This question comes up from time to time. Below is the beginning of a
> description of the package, CGOL. Note that the syntax is only the
> default and is completely rewritable. (I did a semi-automated Simula
> to Flavors translator with it at one time.)

It might be worth point out that, with reader macros, the Common Lisp 
"READ" function is essentially a programmable recursive-descent parser.

__________________________________________________________________________
Just because I work for Apple Computer, Inc. doesn't mean that they 
believe what I believe or vice-versa.
__________________________________________________________________________