[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[epsilon-devel] Managing S-expressions in epsilon, and more

From: Luca Saiu
Subject: [epsilon-devel] Managing S-expressions in epsilon, and more
Date: Wed, 24 Dec 2003 01:14:19 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.3a) Gecko/20021212

  Hi Matteo.
Thanks to the hard-working Savannah guys the CVS server and the web interface are back up, and I'm in the process of committing all the changes; yet the download area won't be accessible for some time, so you'll have to fetch your next snapshot from CVS (go to the Savannah page; note that you'll need to use CVS over ssh). If you need a snapshot when you are in Spain don't worry, I'll mail snapshots to this list.

Could you please send me a copy of the interpreter we wrote together two days ago? And an exercise for you: modify apply_ to manage primitive operators; it's easy if there are no errors in the file you have; but there could be some. Mail me a copy and I'll help you.

The main limitation we have in writing interpreters is our current inability to easily write parsers. A temporary (but however very good) solution is using S-expressions, as Lisp does. I wrote an epsilon library (attached) allowing us to do this with extreme ease; try reading the sources. Even if there aren't many comments you should be able to understand everything except the scanner and the parser. The library is also useful for many other things, and I'm going to include it in the default epsilon library. We could even use S-expressions as a temporary concrete syntax for epsilon; so we would be able to write a translator from S-expressions to abstract epsilon syntax in *minutes*.
  For example \ x . x + 1 would be written in concrete syntax as
  (lambda x (+ x 1))
, and define y = x + 12; could become
  (define y (+ x 12))

First tell me if you don't understand something about what I wrote; then we'll update an interpreter to use S-expressions, and discuss the datails.


Luca Saiu, maintainer of GNU epsilon

Attachment: s_expressions.tar.gz
Description: GNU Zip compressed data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]