Re: Verrazano/CFFI R.I.P.?



Petter Gustad wrote:

> Kenny Tilton <NOktiltonSPAM@xxxxxxxxxx> writes:
>
>> Or know a better way than Antlr? gcc_xml does not do function
>
> I prefer ANTLR/PCCTS over yacc/lex if I'm working in C/Java. I like
> Zebu when working in CL (even though I wish it had a lexical
> analyzer). But I guess you will not find a ready Zebu C grammar
> specification out there?
>
> Petter
>

I used Zebu on a project a few years ago and I'm quite relieved that Craig
Lanning finally re-wrote that part of our system in lisp. Parsers built on
that LALR crap / jump tables are difficult to debug. Back in those days I
used ANTLR to debug the grammar we were developing, but even there I would
have been better off with lisp. What's wrong with using the lisp reader for
the lexer? Craig wrote a nice one for our project. The code can be found
here: http://cvs.sourceforge.net/viewcvs.py/exp-engine/expresso/p11/
(see reader.lsp, token-stream.lsp)

The code generation part of that work could be better (It could have used
backquoted forms directly in the syntax rules to generate lisp while
parsing). Here again is a place where I think you could do much better than
ANTLR. I have a small example that generates lisp from XPath expressions,
improves the token reading a bit too -- if anyone wants to see examples,
just let me know. It's not on sourceforge yet...

Zebu is decades old and badly in need of a face lift -- it seems to be
mostly an experiment in reversible grammars (or some such thing -- I forgot
what they called it). We can do better than this today.

--
Best regards,
- Peter
.



Relevant Pages

  • Re: Writing a Pascal translator
    ... >You might want to use ANTLR. ... >There is a common lisp version. ... >It comes with an example of translating JAVA to Commom Lisp. ... to a version written in or targeting Lisp on the ANTLR web site. ...
    (comp.lang.lisp)
  • Re: Verrazano/CFFI R.I.P.?
    ... > Just started working on a C to Lisp translator, using Antlr. ... Do it in Lisp. ... Juliusz Chroboczek wrote: ... That link does not work anymore but you can ask Juliusz Chroboczek for a recent version. ...
    (comp.lang.lisp)
  • Re: C++ sucks for games
    ... > time and space reasons) it'll be about text parsing, a la Yacc, ANTLR, ... zebu is great, but I wish it had a lexical analyzer generator as well. ...
    (comp.lang.lisp)