[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Egg request: banterpixra
From: |
Alaric Snell-Pym |
Subject: |
[Chicken-users] Egg request: banterpixra |
Date: |
Mon, 12 Jul 2010 14:10:14 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; NetBSD amd64; en-US; rv:1.9.1.9) Gecko/20100520 Lightning/1.0b2pre Shredder/3.0.4 |
Hello all,
I've written a quick few hundred lines of Chicken Scheme that converts
BNF-esque grammars such as:
(s-expression
. (choice
(seq "(" (one-or-more s-expression) "." s-expression ")")
(seq "(" (zero-or-more s-expression) ")")
(seq "\"" string "\"")
(seq "#(" (zero-or-more s-expression) ")")
(seq "#" symbol)
(seq ":" symbol)
(seq symbol ":")
symbol
number
(seq "'" s-expression)
(seq "`" s-expression)
(seq "," s-expression)
(seq ",@" s-expression)))
(symbol
. (choice
(seq "|" (one-or-more character) "|")
(seq symbol-first-character (zero-or-more
symbol-subsequent-character))))
Into SVG syntax diagrams such as:
http://love.warhead.org.uk/~alaric/junk/sexpr.svg
It uses matchable and sxpath-lolevel (from the sxpath egg) - the latter
for turning the sxml representation of SVG into yucky XML.
If it's of use to anybody else (I wrote it so I could draw syntax
diagrams for the constructed language Lojban - see
http://love.warhead.org.uk/~alaric/junk/lojban.svg for a more stressful
workout of the layout engine), I'd like to put it in an egg, please!
ABS
--
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
- [Chicken-users] Egg request: banterpixra,
Alaric Snell-Pym <=