|ANNOUNCEMENT: Syntax-diagram generator for YACC grammars email@example.com (2000-09-08)|
|Date:||8 Sep 2000 02:18:55 -0400|
A few weeks ago, I wanted to have a syntax-diagram generator for my
YACC grammar. I had an idea of how to do it, and some time to play
with Python. My ideas turned out to be working nicely, and as a
result I now have `showgrammar', my syntax-diagram generator.
Written in Python, it takes a clean (i.e. not polluted with code) YACC
grammar, and generates PStricks code (a LaTeX package for drawing
postscript pictures). As a goodie, I added `stripgrammar.l', a LEX
specification for a grammar-cleaning tool. It may not be perfect, but
it is a nice starting point.
I tried to find some other programs that did the same, but all I could
find were BNF syntax-diagram generators. Although I cannot really
imagine that I am the first to write such a tool, people who are
interested in `showgrammar' can find it at
Return to the
Search the comp.compilers archives again.