Dendra

LISP - style syntax parsing and printing code.

Please send new implementations and bug reports here.

Language Files Notes
English Dendra.txt I've tried to give a precise grammar here.
Java Dendra.java Symbol.java The Java implementation parses and prints Long, Double, String, dendra.Symbol, Vector and Hashtable. The parser implementation is completely horrible, and should be replaced by one that reads from Readers or InputStreams. Has methods for doing the dictionary transformation.
Haskell Dict.hs Dendra.hs Defines a "Dendra" data type. Included is a red-black balanced binary tree finite map implementation ("Dict.hs"), based on the one in Chris Okasaki's "Purely Functional Data Structures" book, plus delete operation. Includes dictionary transformation functions.
C Dendra.h Dendra.c extbuf.h extbuf.c Defines a "Dendra" union data type, using malloc() / free() to build structures. Should have a version of this that parses from a file descriptor instead of char pointer, really. Note that the float parser bit needs fixing so that it isn't limited to the integer range (see eg Java version). There's no dictionary implementation. One day I'll get 'round to writing a red-black tree implementation for this.

Tools

DendraFormatters.hs
Some pretty-printing combinators.

Licence
Its free. If you pretend you wrote it and try to stop other people from using it, people will point at you in public and snigger behind your back, or just laugh in you face.

History

Fri Feb 8 06:39:54 GMT+8 2002
Fixed bug in Haskell 'fromDictForm' function. Uploaded DendraFormatters.hs .