Re: Designing Lisp from scratch
Robbert Haarman <[email protected]> Tue, 20 Mar 2007 11:24:59 +0100
| Newsgroups | gmane.comp.lang.lightweight |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Mar 20, 2007 at 01:12:37AM -0400, [email protected] wrote: > > Meanwhile, here's how it is done with uCalc Language Builder, which I think > should be much easier. First, you skip all these multi-stage steps mentioned > above. Splitting source code into tokens etc is interesting, though I don't > see why the programmer needs to concern herself with such details. With > uCalc, you end up writing less code to define the language, which can all be > placed in the same file (if you want) and can be loaded all in one step. > Definitions consist of syntax closely coupled with matching semantics. This makes > it easier to get the whole picture by glancing at the language definition > code. Conversely, with lex and yacc, the system would be much more modular. Instead of having lexing, parsing, and the rest all thrown together in one big mess, you have the various levels cleanly separated. Once it's tokenized, you don't care about characters anymore. Once it's parsed, you don't care about syntax at all anymore, and deal only with semantics. I'm just trying to point out that there is something to be said for both approaches. Regards, Bob -- The advantage of Windows is that it works the way many people want it to. The advantage of Unix is that you can make it work the way you want it to.
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF/7Z7fb9wcmD+WN4RAtL0AJ9H1CRy/+5gNMdbfHIAo0ZkyjJ6tACgqIu9 51RzWlGIMQwHvAzbx+34yUo= =7NdZ -----END PGP SIGNATURE-----