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

A Dylan parser-generator.



I'm looking for a parser-generator ("compiler compiler") for Dylan.  Ideally
it would be a Dylan product that generated Dylan code.  Also acceptable
would be a product that used some other language but which generated Dylan
code.  Is there such a beast anywhere?  If not, can anyone recommend a good
tool that could be ported to Dylan?

I'm already aware of ANTLR which is a Java program and which could in
principle have a Dylan back-end plugged into it.  Lately, however, ANTLR 2.n
seems to have been developing some lethal weaknesses which make it less than
ideal for the kinds of things I'd like.  On the other hand its pred-LL(k)
grammars make programming simpler.  It's a toss-up.

I also know of the ML-Lex/ML-Yacc tools which come with SML/NJ.  This seems
initially an attractive option given the functional nature of SML and the
equivalent functional portions of Dylan.  Unfortunately ML-Yacc gives me an
LALR(1) parser.  The project I have in mind doesn't reduce well to an
LALR(1) grammar.  ANTLR's pred-LL(k) grammars suit the job better.

Haskell has a few parser-generators available.  One of these, Lucky, looks
very good.  Unfortunately I don't grok Haskell's monads sufficiently to take
this "monadic parser combinator"-based tool and port it into Dylan.  There's
also the CTK (Compiler Tool Kit) package which may or may not supply what I
need.  Again, however, there are issues surrounding Haskell monads which
interfere with my understanding and, therefore, would likely interfere with
porting.

Does anybody know of any other tools which could do the job?





Follow-Ups: